mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 23:36:32 +00:00
12 lines
185 B
C++
12 lines
185 B
C++
#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;
|
|
}
|