5ooii7 @ 2023-07-22 12:11:05
#include<bits/stdc++.h>
#include<math.h>
using namespace std;
int main() {
int T;
cin >> T;
if (T == 1) {
cout << "I love Luogu!";
} else if (T == 2) {
cout << 2 + 4 << " " << 10 - 2 - 4;
} else if (T == 3) {
cout<<14/4<<endl<<(14/4)*4<<endl<<14-(14/4);
} else if (T == 4) {
printf("%.6lf",500/3*1.0);
} else if (T == 5) {
cout<<(260+220)/(12+20);
} else if (T == 6) {
cout<<sqrt(pow(6,2)+pow(9,2));
} else if (T == 7) {
cout<<100+10<<endl<<100+10-20<<endl<<0;
} else if (T == 8) {
cout<<2*5<<endl<<3.141593*pow(5,2)<<endl<<3.141593*(4/3)*pow(5,3);
} else if (T == 9) {
cout<<(((((1+1)*2)+1)*2)+1)*2;
} else if (T == 10) {
cout<<9;
} else if (T == 11) {
cout<<100/(8-5);
} else if (T == 12) {
cout<<13<<endl<<'R';
} else if (T == 13) {
cout<<(int)(pow(4.0/3.0*3.141593*(4*4*4+10*10*10),1.0*1/3));
} else if (T == 14) {
cout<<50;
}
return 0;
}
by lingyuxuan666 @ 2023-07-22 12:27:27
#include<bits/stdc++.h>
using namespace std;
int N;
string A[10005] = {"" , "I love Luogu!" , "6 4" , "3\n12\n2" , "166.667" , "15" , "10.8167" , "110\n90\n0" , "31.4159\n78.5398\n523.599" , "22" , "9" , "33.3333" , "13\nR" , "16" , "50"};
int main()
{
cin >> N;
cout << A[N] << endl;
return 0;
}
by 5ooii7 @ 2023-07-22 14:00:49
@lingyuxuan666 谢谢
by kkkkld @ 2023-07-23 20:02:05
#include<bits/stdc++.h>
using namespace std;
const double pi=3.141593;
int main() {
int n;
int r=5;
int r1=4,r2=10;
double v=4.0/3*pi*r1*r1*r1+4.0/3*pi*r2*r2*r2;
cin>>n;
switch(n){
case 1:
cout<<"I love Luogu!";
break;
case 2:
cout<<"6 4";
break;
case 3:
cout<<3<<endl<<12<<endl<<2;
break;
case 4:
cout<<"166.667";
break;
case 5:
cout<<"15";
break;
case 6:
cout<<sqrt(6*6+9*9);
break;
case 7:
cout<<110<<endl<<90<<endl<<0;
break;
case 8:
cout<<2*pi*r<<endl;
cout<<r*r*pi<<endl;
cout<<4.0/3*pi*r*r*r<<endl;
break;
case 9:
cout<<22;
break;
case 10:
cout<<9;
break;
case 11:
cout<<1.0*100/3;
break;
case 12:
cout<<(int)('M'-'A')+1<<endl<<(char)(18+'A'-1);
break;
case 13:
v=pow(v,1.0/3);
printf("%.0lf\n",v);
break;
case 14:
cout<<50;
break;
}
return 0;
}