homoteam_ikun @ 2023-01-05 11:56:47
rt,51分
#include<iostream>
#include<iomanip>
#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) {
int a=14.0/4;
cout<<a<<" "<<a*4<<" "<<14-a*4;
} else if (T == 4) {
cout<<fixed<<setprecision(6)<<500.0/3;
} else if (T == 5) {
cout<<(260+220)/(12+20)<<endl;
} else if (T == 6) {
cout<<sqrt(6*6+9*9);
} else if (T == 7) {
int a;
cout<<a+10<<a-20<<"0";
} else if (T == 8) {
cout<<2*3.141593*5<<5*5*3.141593<<4/3*3.141593*5*5*5;
} 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<<"R";
} else if (T == 13) {
cout<<(int)(pow(4/3*3.141593*(4*4*4+10*10*10),1.0*1/3));
} else if (T == 14) {
cout<<50;
}
return 0;
}
by uid_310801 @ 2023-01-05 12:01:53
你可以看题解
by Scaramouche_LZX @ 2023-01-05 12:05:23
@homoteam_ikun 满分程序:
#include<bits/stdc++.h>
using namespace std;
const double y=3.141593;
int main(){
int t;
cin>>t;
if(t==1)cout<<"I love Luogu!";
else if(t==2)cout<<"6 4";
else if(t==3)cout<<3<<endl<<12<<endl<<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<<90<<endl<<0;
else if(t==8)cout<<y*10<<endl<<y*25<<endl<<y*125*4/3;
else if(t==9)cout<<"22";
else if(t==10)cout<<"9";
else if(t==11)cout<<1.0*100/3;
else if(t==12)
cout<<(int)('M'-'A')+1<<endl<<(char)(17+'A');
else if(t==13){
double V=y*4*4*4*4/3+y*10*10*10*4/3;
cout<<floor(pow(V,1.0/3));
}
else if(t==14)cout<<"50";
return 0;
}
by Scaramouche_LZX @ 2023-01-05 12:05:38
拿走不谢
by RobinQIN1 @ 2023-01-10 10:59:30
@China_Dream_Lucy 这是啥???
/tmp/compiler_zgrvbubk/src:26:2: 错误:程序中有游离的‘#’
26 | }#include<bits/stdc++.h>
| ^
/tmp/compiler_zgrvbubk/src:26:3: 错误:‘include’不是一个类型名
26 | }#include<bits/stdc++.h>
| ^~~~~~~
/tmp/compiler_zgrvbubk/src:28:14: 错误:‘const double y’ 重定义
28 | const double y=3.141593;
| ^
/tmp/compiler_zgrvbubk/src:3:14: 附注:‘const double y’ previously defined here
3 | const double y=3.141593;
| ^
/tmp/compiler_zgrvbubk/src:29:5: 错误:‘int main()’ 重定义
29 | int main(){
| ^~~~
/tmp/compiler_zgrvbubk/src:4:5: 附注:‘int main()’ previously defined here
4 | int main(){
| ^~~~
by Scaramouche_LZX @ 2023-01-10 11:30:01
@RobinQIN1 程序给我看一下
by RobinQIN1 @ 2023-01-12 11:58:18
@China_Dream_Lucy ``` //你给的呀
using namespace std; const double y=3.141593; int main(){ int t; cin>>t; if(t==1)cout<<"I love Luogu!"; else if(t==2)cout<<"6 4"; else if(t==3)cout<<3<<endl<<12<<endl<<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<<90<<endl<<0; else if(t==8)cout<<y10<<endl<<y25<<endl<<y1254/3; else if(t==9)cout<<"22"; else if(t==10)cout<<"9"; else if(t==11)cout<<1.0100/3; else if(t==12) cout<<(int)('M'-'A')+1<<endl<<(char)(17+'A'); else if(t==13){ double V=y4444/3+y101010*4/3; cout<<floor(pow(V,1.0/3)); } else if(t==14)cout<<"50"; return 0; }
by RobinQIN1 @ 2023-01-12 11:59:18
@China_Dream_Lucy 有点乱
by Scaramouche_LZX @ 2023-01-12 12:09:24
@RobinQIN1 没啥问题呀,你再试一下
#include<bits/stdc++.h>
using namespace std;
const double y=3.141593;
int main(){
int t;
cin>>t;
if(t==1)cout<<"I love Luogu!";
else if(t==2)cout<<"6 4";
else if(t==3)cout<<3<<endl<<12<<endl<<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<<90<<endl<<0;
else if(t==8)cout<<y*10<<endl<<y*25<<endl<<y*125*4/3;
else if(t==9)cout<<"22";
else if(t==10)cout<<"9";
else if(t==11)cout<<1.0*100/3;
else if(t==12)cout<<(int)('M'-'A')+1<<endl<<(char)(17+'A');
else if(t==13){
double V=y*4*4*4*4/3+y*10*10*10*4/3;
cout<<floor(pow(V,1.0/3));
}
else if(t==14)cout<<"50";
return 0;
}
by Scaramouche_LZX @ 2023-01-12 12:10:08
@RobinQIN1 你选择的语言没问题吧,自动识别就行了
by RobinQIN1 @ 2023-01-12 12:18:29
@China_Dream_Lucy ok now thank you very much!