'commit'
This commit is contained in:
13
TangDou/CSP-J/AcWingTraining/T6/4086.cpp
Normal file
13
TangDou/CSP-J/AcWingTraining/T6/4086.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <bits/stdc++.h>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
int n, l, r;
|
||||
cin >> n >> l >> r;
|
||||
if (l / n == r / n) // 是不是在同一个周期内
|
||||
cout << r % n << endl;
|
||||
else
|
||||
cout << n - 1 << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user