题解 | #开学?#
开学?
https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467
using System; namespace ConsoleApp1 { class Program { static void Main(string[] args) { string[] S = Console.ReadLine().Split(" "); int num1 = int.Parse(S[0]); int num2 = int.Parse(S[1]); //把两个数之和对7取余,等于0说明能被7整除就是星期天,不是就直接输出星期几 Console.WriteLine(((num1+num2)%7==0?7:(num1+num2)%7)); } } }