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