0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-18 11:31:59 +00:00
OI-codes/S2OJ/1118/1118.cpp

12 lines
185 B
C++
Raw Normal View History

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