题解 | 小美的外卖订单编号

小美的外卖订单编号

https://www.nowcoder.com/practice/91506d447f3445c999a27d556e530a37

#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 2e5 + 5;
int __t = 1, n, m, x;
void solve() {
    cin >> m >> x;
    cout << (x - 1) % m + 1 << "\n";
    return;
}
int32_t main() {
#ifdef ONLINE_JUDGE
    ios::sync_with_stdio(false);
    cin.tie(0);
#endif
    cin >> __t;
    while (__t--)
        solve();
    return 0;
}


全部评论

相关推荐

饿魔:没人说?我来牛美孩
点赞 评论 收藏
分享
评论
6
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务