que_de_yu_fu @ 2024-10-25 20:27:37
#include<iostream>
#include<cmath>
using namespace std;
int t;
int main()
{
cin>>t;
if(t==1)
{
cout<<"I love Luogu!";
}
else if(t==2){
cout<<"6 4";
}
else if(t==3){
cout<<"3"<<endl;
cout<<"12"<<endl;
cout<<"2";
}
else if(t==4){
cout<<"166.667";
}
else if(t==5){
cout<<"15";
}
else if(t==6){
cout<<sqrt(117);
}
else if(t==7){
cout<<"110"<<endl;
cout<<"90"<<endl;
cout<<"0"<<endl;
}
else if(t==8)
{
cout<<3.141593*10<<endl;
cout<<3.141593*25<<endl;
cout<<3.141593*500/3<<endl;
}
else if(t==9){
cout<<"21";
}
else if(t==10){
cout<<"9";
}
else if(t==11){
cout<<100/3;
}
else if(t==12){
cout<<"13"<<endl;
cout<<"r"<<endl;
}
else if(t==13){
cout<<cbrt(4256*3.141593/3);
}
else if(t==14){
cout<<"50";
}
return 0;
}
不想再算了,搞了半天已经破防了...
by luduoduo2023 @ 2024-10-25 20:31:20
#include<iostream>
#include<cstdio>
#include<cmath>
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<<3<<endl<<12<<endl<<2<<endl;
else if (T == 4) printf("%.3lf\n",500.0/3.0);
else if (T == 5) cout<<15<<endl;
else if (T == 6) cout<<sqrt(6*6+9*9)<<endl;
else if (T == 7) cout<<110<<endl<<90<<endl<<0<<endl;
else if (T == 8) {
double const pi=3.141593;
double const r=5;
cout<<pi*r*2<<endl<<pi*r*r<<endl<<4.0/3*pi*r*r*r<<endl;
}
else if (T == 9) cout<<22<<endl;
else if (T == 10) cout<<9<<endl;
else if (T == 11) cout<<100.0/(8-5)<<endl;
else if (T == 12) cout<<13<<endl<<"R"<<endl;
else if (T == 13) {
double const pi=3.141593;
double V=pi*4*4*4*4/3+pi*10*10*10*4/3;
cout<<floor(pow(V,1.0/3))<<endl;
}
else if (T == 14) cout<<50<<endl;
return 0;
}
by xywuyu @ 2024-10-25 20:31:24
#include<bits/stdc++.h>
using namespace std;
int main() {
int T,a,b,c,n;double pi=3.141593;
cin >> T;
if (T == 1) {
cout << "I love Luogu!";return 0;
} else if (T == 2) {
cout << 2 + 4 << " " << 10 - 2 - 4;return 0;
} else if (T == 3) {
cout<<"3\n12\n2";return 0;
} else if (T == 4) {
cout<<"166.667";return 0;
} else if (T == 5) {
cout<<(220+260)/(20+12);return 0;
} else if (T == 6) {
cout<<sqrt(6*6+9*9);return 0;
} else if (T == 7) {
cout<<"110\n90\n0";return 0;
} else if (T == 8) {
cout<<pi*10<<endl<<pi*25<<endl<<pi*125*4/3.0<<endl;return 0;
} else if (T == 9) {
cout<<"22";return 0;
} else if (T == 10) {
cout<<"9";return 0;
} else if (T == 11) {
cout<<1.0*100/3;return 0;
} else if (T == 12) {
cout<<(int)('M'-'A')+1<<endl<<(char)(18+'A'-1);return 0;
} else if (T == 13) {
cout<<(int)(pow(pi*(4*4*4+10*10*10)*4/3.0,1.0*1/3));return 0;
} else if (T == 14) {
cout<<"50";return 0;
}
return 0;
}
by xywuyu @ 2024-10-25 20:32:19
一道简单但坑贼多的题...
by luduoduo2023 @ 2024-10-25 20:32:36
别破防了,看看吧 @que_de_yu_fu