4 条题解
- 1
信息
- ID
- 1802
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 6
- 标签
- 递交数
- 109
- 已通过
- 33
- 上传者
#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;
}
else
{
cout << n-1;
}
return 0;
}
>
#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; } else { cout << n-1; } return 0; }
#include<bits/stdc++.h> using namespace std; int main(){ int n,l,r,ma=0; cin>>n>>l>>r; for(int i=l;i<=r;i++){ if(i%n>ma) ma=i%n; } cout<<ma; return 0; } (过不了就多交几次)