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

#1118. [CSP-J 2021] 分糖果(民间数据)

https://sjzezoj.com/submission/41761
This commit is contained in:
Baoshuo Ren 2021-10-30 19:11:30 +08:00 committed by Baoshuo Ren
parent 56273f8b48
commit 67cf3c995d
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

11
S2OJ/1118/1118.cpp Normal file
View File

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