#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; }
打算骗样例的,没想到过了。