LOADING

加载过慢请开启缓存,浏览器默认开启

daily

2023/4/14 daily Codeforces

CF 1816A

int gcd(int a, int b){
    return b ? gcd(b, a % b) : a;
}
void solve(){
    int a,b;
    cin>>a>>b;
    if(gcd(a, b) == 1){
        cout << 1 << endl;
        cout << a << ' ' << b << endl;
    }
    else {
        cout << 2 << endl;
        cout << 1 << ' ' << b - 1 << endl;
        cout << a << ' ' << b << endl;
    }
}