竞赛
考级
注,它是完整的苹果,且m不能除0(t=0特判)
潜龙暗虎
#include <bits/stdc++.h> using namespace std;int main(){int n,x,y;cin>>n>>x>>y;if (y%x==0){if (n-y/x<=0){cout<<0;}else{cout<<n-y/x;}}else{if (n-(y/x+1)<=0){cout<<0;}else{cout<<n-(y/x+1);}}return 0;}
🕈.👎.☝✌💧❄☜☼
正在减肥的吃货
#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; }
醉词意
七(6)朱瀚辰
想加的点下面链接 笑点一高
Louye(小号)
简单 #include<iostream> using namespace std; int main(){ int n,x,y; cin>>n>>x>>y; n -= y / x; if(y % x > 0){ n -= 1; } if(n < 0){ n= 0; } cout<<n; return 0; }
189****8376
#include<iostream> using namespace std; int main(){ int a,b,c,d; cin>>a>>b>>c; d=a-((c-1)/b+1); if(d<0){ cout<<0; } else{ cout<<d; } return 0; }
LS_YZY
注意负数
huangboxiang
。
耐高总冠军 张文杰
#include <bits/stdc++.h> using namespace std; int main(){ int n,x,y; cin>>n>>x>>y; int ans = n - ceil(y*1.0/x); if (ans<0) ans = 0; cout << ans; return 0; }
~
私密马赛
#include <iostream> using namespace std; int main() { int n,x,y; cin>>n>>x>>y; if(y%x==0){ if(n-y/x>=0){ cout<<n-y/x; } else{ cout<<0; } }
cz(^-^)
「欢愉」花火
王子豪
Eren.
#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
a = input() l = [int(x) for x in a.split()] for i in range(l[2]): if i % l[1] == 0: l[0] -= 1 if l[0] == 0: break print(l[0])
186****5339
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)
金独子
共49条