题解 | #开学?# 标准严格,思路清晰的解法
开学?
https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467
#include <stdio.h> int main() { int X = 0, N = 0; scanf("%d%d", &X, &N); if(X >= 1 && X <= 7 && N >= 1 && N <= 1000) { X = (X + N) % 7; //如果是星天的话是0 if(X == 0) { X = 7; } printf("%d", X); } return 0; }