2 solutions
-
0
Guest MOD
- 1
Information
- ID
- 1334
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- (None)
- # Submissions
- 209
- Accepted
- 49
- Uploaded By
#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;
}
#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; }
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.