第4个数据点错了
查看原帖
第4个数据点错了
1084872
ouyangyp2024楼主2024/1/22 19:56
#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141593;
int main () {
	int n ,sum;
	cin >> n;
	if (n == 1) {
		cout << "I love Luogu!" << endl;
	} else if (n == 2) {
		cout << 6 << " " << 4 << endl;
	} else if (n == 3) {
		cout << 3 << endl << 12 << endl << 2 << endl;
	} else if (n == 4) {
		sum = 166.66666666666;
		cout<<setprecision(6)<<sum<<endl;
	} else if (n == 5) {
		cout << (260 + 220) / (12 + 20) << endl;
	} else if (n == 6) {
		cout << sqrt(6 * 6 + 9 * 9) << endl;
	} else if (n == 7) {
		cout << 110 << endl << 90 << endl << 0 << endl;
	} else if (n == 8) {
		int a = 5;
		cout << 2 * a * PI << endl;
		cout << a * a * PI << endl;
		cout << a * 100 * PI / 3 << endl;
	} else if (n == 9) {
		cout << 22 << endl;
	} else if (n == 10) {
		cout << 9 << endl;
	} else if (n == 11) {
		cout << 33.3333 << endl;
	} else if (n == 12) {
		cout << 13 << endl << 'R' << endl;
	} else if (n == 13) {
		double i;
		double P1 = 3.141593;
		i = pow(1.0 * 4 / 3 * P1 * (64 + 1000) ,1.0 * 1 / 3);
		cout << (int)i;
	} else {
		cout << 50 << endl;
	}
	return 0;
}
2024/1/22 19:56
加载中...