0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 22:48:48 +00:00
OI-codes/Luogu/P7909/P7909.cpp

12 lines
190 B
C++

#include <bits/stdc++.h>
using namespace std;
int n, l, r, ans;
int main() {
cin >> n >> l >> r;
cout << min((int)(ceil(1.0 * l / n) * n + n - 1), r) % n << endl;
return 0;
}