题解 | #开学?#
开学?
https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467
#include <stdio.h> int main() { int x, n, y; scanf("%d%d", &x, &n); y = x + n; if (0 == y%7){ y = 7; } else{ y %= 7; } printf("%d", y); return 0; }
开学?
https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467
#include <stdio.h> int main() { int x, n, y; scanf("%d%d", &x, &n); y = x + n; if (0 == y%7){ y = 7; } else{ y %= 7; } printf("%d", y); return 0; }
相关推荐