4 solutions
- 1
Information
- ID
- 525
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 2
- Tags
- # Submissions
- 76
- Accepted
- 46
- Uploaded By
#include<bits/stdc++.h>
using namespace std;
int n,x,y;
int main(){
cin>>n>>x>>y;
int s=n;
s-=(y/x);
if(y%x) s--;
cout<<s<<endl;
return 0;
}
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n,x,y;
cin>>n>>x>>y;//输入
int s=floor(y/x);//向下取整
cout<<n-s-1;//输出
return 0;//完结散花
}
#include <iostream>
using namespace std;
int n,x,y;
int main(){
cin>>n>>x>>y;
if(!y%x){
cout<<n-y/x<<endl;
return 0;
}
if(y%x){
double ans=(double)y/x*1.00;
ans=(int)ans;
cout<<n-ans-1<<endl;
return 0;
}
}
麻烦了
By signing up a ZXOJ universal account, you can submit code and join discussions in all online judging services provided by us.