这个代码为什么错
查看原帖
这个代码为什么错
764102
Zpril楼主2023/9/28 14:53

40pts:

#include <bits/stdc++.h>
using namespace std;

int x, a, y, b;

int main() {
	cin >> x >> a >> y >> b;
	printf("%.2lf\n",1.0 * ((x * a - y * b) / (a - b)));
	
	return 0;
}

100pts:

#include <bits/stdc++.h>
using namespace std;

double x, a, y, b;

int main() {
	cin >> x >> a >> y >> b;
	printf("%.2lf\n", 1.0 * ((x * a - y * b) / (a - b)));
	
	return 0;
}
2023/9/28 14:53
加载中...