题解 | #开学?#
开学?
https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467
#include <stdio.h> int main() { int X, N; scanf("%d %d",&X,&N); if((X>=1&&X<=7)&&(N>=1&&N<=1000)) { if((X+N)>7) { int a=(X+N)%7; if(a==0) { printf("%d\n",a+7); } else { printf("%d",a); } } else { printf("%d\n",X+N); } } return 0; }