CSP-J 2021真题——分糖果

在这里插入图片描述

//Author:PanDaoxi
#include <iostream>
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;
} 

猜你喜欢

转载自blog.csdn.net/PanDaoxi2020/article/details/121066025