Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
231280 | 陈柏丞 | *小美的外卖订单编号 | C++ | Accepted | 100 | 56 MS | 272 KB | 251 | 2024-01-13 19:52:57 |
#include<bits/stdc++.h> using namespace std; int main(){ int q, x, m; cin >> q; for(int i = 1;i <= q;i++){ cin >> m >> x; int n = x%m; if(x%m == 0){ cout << m << endl; }else{ cout << x%m << endl; } } return 0; }