竞赛
考级
#include<iostream> using namespace std; int i; int j; int k; int cnt; int main(){ cin>>i>>j>>k; if(k%j!=0) cnt=i-k/j-1; else if(k%j==0) cnt=i-k/j; if(cnt>0) cout<<cnt; else cout<<0; return 0; }
Lightky
#include <iostream> using namespace std; int main(){ int n,x,y; cin >> n >> x >> y; int eaten,ok; eaten=y/x; if (y%x!=0){ eaten+=1; } ok=n-eaten; if(ok<0){ ok=0; } cout << ok; return 0; }
皮皮虾|AndyDrSt
注,它是完整的苹果,且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(小号)
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
简单 #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.
共52条