竞赛
考级
#include<bits/stdc++.h> using namespace std; int m,t,s; int main() { cin>>m>>t>>s; if(t0) { cout<<0; return 0; } if(s%t0) cout<<max(m-s/t,0); else cout<<max(m-s/t-1,0); return 0; }
风中雪zLyXj
Python (不喜勿喷) (有问题提出) lb = input().split() n = int(lb[0]) x = int(lb[1]) y = int(lb[2]) if (y0 or x0 ): print(n) else: cd = y / x cd2 = int(-(-cd //1)) sx = n - cd2 if sx < 0: sx = 0 print(sx)
金独子
#include<bits/stdc++.h> using namespace std; int main(){ int n,x,y; cin>>n>>x>>y; if(y%x!=0){ cout<<n-y/x-1; }else if(n-y/x<=0){ cout<<"0"; }else{ cout<<n-y/x; } return 0; }
Dream
#include<iostream> using namespace std; int main(){ int n; int x; int y; cin>>n>>x>>y; if(y%x!=0){ cout<<n-y/x-1; }else{ if(n-y/x<=0){ cout<<"0"; }else{ cout<<n-y/x;} } return 0; }
LELECHA
卢某人
以下是这道题的题解:#include<iostream> using namespace std; int main() { int n,x,y; cin>>n>>x>>y; if (y%x >= 1) { if ((n-y/x-1) < 0) { cout<<0; } else { cout<<n-y/x-1; } } else { if ((n-y/x) < 0) { cout<<0; } else { cout<<n-y/x; } } }
中山小学苗轩瑞
这是犇犇第一次写题解,写的不好别骂 完结撒花!
z-io
zsy
???
#include <bits/stdc++.h> using namespace std; int main() { int n,x,y,ans; cin >> n >> x >> y; if(y%x!=0) { ans= n-(y/x+1); } else { ans= n-y/x; } if(ans>0) { cout << ans; } else { cout << 0; } return 0; }
136****9555
#include <iostream> using namespace std; int main(){ int n,x,y,a; cin >> n >> x >> y; //(y%x == 0)?a = y/x:a = y/x+1; if (x >= 0 && x <= 99999 && n >= 0 && n <= 99999 && y >= 0 && y <= 99999) { a = y/x; if (y%x != 0) a++; }
shao
#include <iostream> using namespace std; int main(){ int n,x,y; cin>>n>>x>>y; if(y%x!=0){ cout<<n-y/x-1; }else if(n-y/x<=0){ cout<<"0"; }else{ cout<<n-y/x; } return 0; }
150****9508
共52条