13 lines
258 B
C++
13 lines
258 B
C++
#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;
|
|
} |