#include <stdio.h> int main() { int Week, Day; scanf("%d%d", &Week, &Day); printf("%d\n",(Week + Day - 1) % 7 + 1); //避免出现周日余数为0,兼顾简洁易懂 return 0; }