14 solutions
- 1
Information
- ID
- 486
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 8
- Tags
- # Submissions
- 534
- Accepted
- 74
- Uploaded By
#include <bits/stdc++.h> using namespace std; int main(int argc, char **argv){ int x,a,y,b; scanf("%d %d %d %d",&x,&a,&y,&b); // printf("%.2f",1.0 * (y * b - (x * a)) / (b - a)); printf("%.2lf",double(y * b - (x * a)) / (b - a)); return 0; }
#include <bits/stdc++.h>
using namespace std;
int main(){
int x , y , a , b;
scanf("%d %d %d %d", &x , &a , &y , &b);
double o = (y * b - a * x) / (a - b);
int h = -o;
printf("%d.00", h);
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char **argv){
int x,a,y,b;
scanf("%d %d %d %d",&x,&a,&y,&b);
// printf("%.2f",1.0 * (y * b - (x * a)) / (b - a));
printf("%d.00",(y * b - (x * a)) / (b - a));
return 0;
}
无语了,为啥数据是整数啊?
#include<iostream>
using namespace std;
int main(){
long long cao,yuan,a,b,c,d;
cin>>a>>b>>c>>d;
cao=(c*d-(a*b))/(d-b);
cout<<cao<<".00";
return 0;
}
```
#include<iostream>
using namespace std;
int main(){
long long cao,yuan,a,b,c,d;
cin>>a>>b>>c>>d;
cao=(c*d-(a*b))/(d-b);
cout<<cao<<".00";
return 0;
}
#include using namespace std; int main(){ long long cao,yuan,a,b,c,d; cin>>a>>b>>c>>d; cao=(cd-(ab))/(d-b); cout<<cao<<".00"; return 0; }
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main(){
double x,a,y,b;
cin>>x>>a>>y>>b;
cout<<fixed<<setprecision(2);
int c=(b*y-a*x)/(b-a);
cout<<(double)c;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
long long cao,yuan,a,b,c,d;
cin>>a>>b>>c>>d;
cao=(c*d-(a*b))/(d-b);
cout<<cao<<".00";
return 0;
}
#include<iostream>
#include<iomanip>.
using namespace std;
int main(){
int x,a,y,b;
cin x>>a>>y>>b;
double n=((x*a)-(y*b))*1.0/a-b;
cout<<fixed<<setprecision(2)<<n;
return 0;
}
#include<iostream>
#include<iomanip>
using namespace std;
int main() {
int x,a,y,b,p,q,r;
cin>>x>>a>>y>>b;
p=y*b-x*a;
q=b-a;
r=p/q;
cout<<r<<".00";
return 0;
}
这服务器SB吧?
#新题解
#include<iostream>
#include<iomanip>
using namespace std;
int main() {
double x,a,y,b,p,q,r;
cin>>x>>a>>y>>b;
p=y*b-x*a;
q=b-a;
r=p/q;
cout<<fixed<<setprecision(2)<<r;
return 0;
}
By signing up a ZXOJ universal account, you can submit code and join discussions in all online judging services provided by us.