题解 | #小美的外卖订单编号#
小美的外卖订单编号
https://www.nowcoder.com/practice/91506d447f3445c999a27d556e530a37
#include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
while(t--){
int a, b;
while (cin >> a >> b) { // 注意 while 处理多个 case
if(b % a != 0)cout << b%a << endl;
else if(b % a == 0)cout << a << endl;
}
}
}
// 64 位输出请用 printf("%lld")
让我们直接mod一下
注意特殊情况: b 是 a的倍数
(甚至直接改了牛客的基础模板就交了)
#悬赏#言の随记题解 文章被收录于专栏
喵喵喵喵喵

