提交时间:2021-12-06 14:02:32

运行 ID: 33492

#include <bits/stdc++.h> using namespace std; int main() { freopen("candy.in", "r", stdin); freopen("candy.out", "w", stdout); int n, L, R; cin >> n >> L >> R; if(R <= n * 2) cout << R % n << endl; else cout << n - 1 << endl; return 0; }