题解 | 开学?
开学?
https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467
#include <iostream> using namespace std; int main() { int X,N; cin>>X>>N; N%=7; if((X+N)%7==0) cout<<7; else cout<<(X+N)%7; } // 64 位输出请用 printf("%lld")
开学?
https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467
#include <iostream> using namespace std; int main() { int X,N; cin>>X>>N; N%=7; if((X+N)%7==0) cout<<7; else cout<<(X+N)%7; } // 64 位输出请用 printf("%lld")
相关推荐