#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y, z;
cin >> n >> x >> y;
z = y / x + y % x;
cout << n - z;
cout << "0";
return 0;
}
#include
#include
using namespace std;
int main(){
int n , x , y;
cin >> n >> x >> y;
int Bad_apple = ceil(1.0*y/x);
int Good_apple = n-Bad_apple;
if(Bad_apple>n){
cout << 0;
}
else{
cout<<n-Bad_apple;
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y, z;
cin >> n >> x >> y;
z = y / x + y % x;
if (n > 0)
cout << n - z;
else
cout << "0";
return 0;
}
站长请问一下为什么我只有40分?????????!!!!!!!!!!!!!!!!
共 5 条回复
#include #include using namespace std; int main(){ int n , x , y; cin >> n >> x >> y; int Bad_apple = ceil(1.0*y/x); int Good_apple = n-Bad_apple; if(Bad_apple>n){ cout << 0; } else{ cout<<n-Bad_apple; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y, z; cin >> n >> x >> y; z = y / x + y % x; if (n > 0) cout << n - z; else cout << "0"; return 0; } 站长请问一下为什么我只有40分?????????!!!!!!!!!!!!!!!!
是只要删掉其中一个吗????????????????????
谢谢站长!!!!!
判断一下 n - z 的值,如果大于0就输出 n - z, 否则才输出 0 , 你把两个答案写一起输出,当然 0 分了。