题解 | 小美的外卖订单编号
小美的外卖订单编号
https://www.nowcoder.com/practice/91506d447f3445c999a27d556e530a37
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
using namespace std;
#define int long long
#define ios ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define MAXN 100010
signed main(){
ios;
int t;
cin>>t;
while(t--){
int n,m;
cin>>n>>m;
cout<<(m-1)%n+1<<endl;
}
return 0;
}
