3 条题解

  • 0
    @ 2025-2-23 11:14:30
    #include<bits/stdc++.h> 
    using namespace std; 
    int L,R,n; 
    int main() 
    { 
    	scanf("%d%d%d",&n,&L,&R); 
    	int x1,x2,x3; 
    	x1=L/n; 
    	x2=(x1+1)*n; 
    	if(x2<=R) 
    	cout<<n-1; 
    	if(x2>R) 
    { 
    	x3=max(L%n,R%n); 
    	cout<<x3; 
    } 
    	return 0; 
    }

    信息

    ID
    588
    时间
    1000ms
    内存
    256MiB
    难度
    8
    标签
    递交数
    37
    已通过
    5
    上传者