题解 | 开学?

开学?

https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467

using System;
public class Program {
    public static void Main() {
        string[] str = Console.ReadLine().Split();
        int x = int.Parse(str[0]);
        int n = int.Parse(str[1]);
        int x1 = (x + n) % 7 == 0 ? 7 : (x + n) % 7;
        Console.WriteLine(x1);    
        }
}

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务