4 条题解

  • 4
    @ 2024-10-3 11:59:12
    #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;
    }
    

    祝你AC,求赞

    • 0
      @ 2025-4-22 11:49:59
      #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;
      }
      • 0
        @ 2025-4-22 11:49:38

        > #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; }

        • 0
          @ 2024-10-19 15:46:42

          #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; } (过不了就多交几次)

          • 1

          信息

          ID
          1802
          时间
          1000ms
          内存
          512MiB
          难度
          6
          标签
          递交数
          109
          已通过
          33
          上传者