0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 18:52:02 +00:00

P7909 [CSP-J 2021] 分糖果(民间数据)

R60830182
This commit is contained in:
Baoshuo Ren 2021-10-24 15:44:24 +08:00 committed by Baoshuo Ren
parent da1529e205
commit 3dedd00a70
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,11 @@
#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;
}