2 solutions

  • 3
    @ 2025-4-18 17:51:33
    #include<bits/stdc++.h>
    using namespace std;
    int m,s,t;
      int main(){
    	cin>>m>>t>>s;
    	if(t==0)
    	{
    		cout<<0<<endl;
    		return 0;
    	}
    	if(s%t==0)
    	   cout<<max( m-s/t , 0)<<endl;
    	else
    	cout<<max( m-s/t-1 , 0)<<endl; 
    	return 0;
    }
    
    
    • 0
      @ 2025-12-9 18:06:57

      #include<bits/stdc++.h> using namespace std; int m,s,t; int main(){ cin>>m>>t>>s; if(t0) { cout<<0<<endl; return 0; } if(s%t0) cout<<max( m-s/t , 0)<<endl; else cout<<max( m-s/t-1 , 0)<<endl; return 0; }

      • 1

      【深基2.习6】Apples Prologue / 苹果和虫子

      Information

      ID
      1334
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      7
      Tags
      (None)
      # Submissions
      209
      Accepted
      49
      Uploaded By