2 solutions

  • 1
    @ 2026-9-13 14:40:35
    #include<bits/stdc++.h>
    
    using namespace std;
    
    int main(){
      
        int n,x,y;
      
        cin>>n>>x>>y;
      
            if(y/x>=n){
              
                cout<<"0";
              
                return 0;
              
            }
      
            if(y%x==0){
              
                cout<<n-y/x;
              
            }
              
            else{
              
                cout<<n-(y/x+1);
              
            }
      
    return 0;
      
    }
    
    
    • 0
      @ 2025-12-13 15:56:58
      
      
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	int x,y,n;
      	cin>>n>>x>>y;
          int t=(y+x-1)/x;
      	int r=n-t;
      	if(r<=0)
      	{
      		r=0;
      	}
      	cout<<r;
      	return 0;
       }
      
      
      
      • 1

      Information

      ID
      856
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      655
      Accepted
      146
      Uploaded By