星期一到星期日分别用0到6表示,类似7进制的数只取最低位。
#include int main() { int x, n; scanf("%d %d",&x,&n); printf("%d",(x-1+n)%7+1); return 0; }