CCF好像有个错误的解法没卡掉
#include <iostream>
using namespace std;
int main() {
int n, l, r;
cin >> n >> l >> r;
if(l % n >= r % n) cout << n - 1 << endl;
else cout << r % n << endl;
return 0;
}
上面是我考场的代码(大体上)
#include <iostream>
using namespace std;
int main() {
int n, l, r;
cin >> n >> l >> r;
if(l / n != r / n) cout << n - 1 << endl;
else cout << r % n << endl;
return 0;
}
这是正解
两者不一样,可是我T1还是100pts