这种做法对吗?
查看原帖
这种做法对吗?
1001535
封禁用户楼主2024/7/8 20:40
#include <iostream>
#include <cmath>
using namespace std;

int main() {
    int T;
    cin >> T;
    
    while (T--) {
        int n, m;
        cin >> n >> m;
        if(abs(n - m) % 2 == 0) {
		cout << 3 << endl;
		
	}
        else cout << 2 << endl;
            }
    
    return 0;
}

打算骗样例的,没想到过了。

2024/7/8 20:40
加载中...