题解 | #开学?#

开学?

https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467

#include <iostream>
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    if(a+b>7){
      if((a+b)%7==0)
      cout<<7<<endl;
      else
       cout<<(a+b)%7<<endl;;
    } 
    else
        cout << a + b << endl;
    return 0;
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

点赞 评论 收藏
分享
评论
2
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务