提交时间:2024-01-07 13:32:42
运行 ID: 229881
#include<bits/stdc++.h> using namespace std; int m,x; int t; int main() { cin >> t; while(t--) { cin >> m >> x; if(x % m == 0) { cout << m << endl; continue; } else { cout << x % m << endl; } } return 0; }