Files

13 lines
258 B
C++
Raw Permalink Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, l, r;
cin >> n >> l >> r;
if (l / n == r / n) // 是不是在同一个周期内
cout << r % n << endl;
else
cout << n - 1 << endl;
return 0;
}