C#代码 50分 WA 求助!
查看原帖
C#代码 50分 WA 求助!
962237
wildog楼主2023/3/15 13:12
using System;

namespace ConsoleApp6
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string[] str1 = str.Split(' ');
            int x = int.Parse(str1[0]);
            int n = int.Parse(str1[1]);
            int n1 = n % 7;
            int week = n / 7;
            int day = x + n1;
            if (x < 6)
            {
                if (day < 6) { Console.WriteLine((week * 5 + day + 1 - x) * 250); }
                else if (day == 6) { Console.WriteLine((week * 5 + day - x) * 250); }
                else if (day == 7) { Console.WriteLine((week * 5 + day - 1 - x) * 250); }
                else { Console.WriteLine((week * 5 + day - 1 - x) * 250); }
            }
            else if (x == 6)
            {
                if (day == 6) { Console.WriteLine((week * 5 + day - x) * 250); }
                else if (day == 7) { Console.WriteLine((week * 5 + day - 1 - x) * 250); }
                else { Console.WriteLine((week * 5 + day - 1 - x) * 250); }
            }
            else 
            {
                if (day == 7) { Console.WriteLine((week * 5 + day - x) * 250); }
                else if (day == 13) { Console.WriteLine((week * 5 + day-1- x) * 250); }
                else { Console.WriteLine((week * 5 + day  - x) * 250); }
            }
        }
    }
}
2023/3/15 13:12
加载中...