2019-PTA模拟赛-L1-3 后天(三目表达式-仅代码)

Code:

#include<iostream>
using namespace std;
int main(){
    int d;
    cin >> d;
    int res = (d + 2) % 7 == 0 ? 7 : (d + 2) % 7;
    cout << res;
    return 0;
}
posted @ 2025-03-02 14:14  Yuhhhhh  阅读(12)  评论(0)    收藏  举报