观察 题解

题目在主页,如有出错请指出

include <bits/stdc++.h>

using namespace std;

int main()
{
int n, x, y;
cin >> n >> x >> y;
if (x < y) cout << y - x << endl;
else cout << max(min(n - x + y - x, 1), 0) << endl;
return 0;
}

posted @ 2025-04-26 10:25  嵇若凌  阅读(19)  评论(0)    收藏  举报