【题目链接】点击打开链接【算法】gcd(a,a+1) = 1所以当a = b时,答案为a,否则为1【代码】#include<bits/stdc++.h> using namespace std; string a,b; int main() { cin >> a >> b; if (a == b) cout<< a << endl; else cout<< << endl; return ; }