解法一
✅ 完整代碼
評分結果(參考) : AC (3ms, 340KB)
#include <bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int w;
    cin >> w;
    cout << (w>50 ? w-1 : w);
    return 0;
}評分結果(參考) : AC (3ms, 340KB)
#include <bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int w;
    cin >> w;
    cout << (w>50 ? w-1 : w);
    return 0;
}