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