Forgotten_0114507666 @ 2020-08-06 11:25:42
#include<bits/stdc++.h>
using namespace std;
const double pi=3.141593;
int main(){
ios::sync_with_stdio(false);
int n;
cin >> n;
switch(n){
case 1:puts("I love Luogu!");break;
case 2:puts("6 4");break;
case 3:puts("3 12 2");break;
case 4:printf("%0.3f\n",500/3);break;
case 5:printf("%d",(220+260)/(20+12));break;
case 6:cout<<sqrt(6*6+9*9);break;
case 7:puts("110\n90\n0");break;
case 8:cout<<pi*10<<endl<<pi*25<<endl<<4/3*pi*125<<endl;break;
case 9:puts("22");break;
case 10:puts("9");break;
case 11:cout << 1.0*100/3 << endl;break;
case 12:puts("13 R");break;
case 13:cout<<(int)(pow(4/3*pi*(4*4*4+10*10*10),1.0*1/3));break;
case 14:puts("50");break;
default:puts("I roll roll you");
}
return 0;
}
by songxiao @ 2020-08-06 11:27:55
这题确实很坑
by 朕在世界之巅 @ 2020-08-06 11:28:10
@shijunyan20090806 case 3是换行 其他也是这问题 请自行审题
by mnesia @ 2020-08-06 11:28:44
@shijunyan20090806 case 4
by 朕在世界之巅 @ 2020-08-06 11:28:47
@shijunyan20090806 case 4 500/3 根据整数截断会变成166
by 朕在世界之巅 @ 2020-08-06 11:28:58
你这错误太多了 我都懒得看
by songxiao @ 2020-08-06 11:29:05
@shijunyan20090806 #3要换行
by mnesia @ 2020-08-06 11:29:30
@shijunyan20090806 case 4:500、3都是整形,把其中任意一个换成小数(.0),另外建议把%f换成%lf
by 朕在世界之巅 @ 2020-08-06 11:29:58
case 12也要换行
by 朕在世界之巅 @ 2020-08-06 11:30:12
怎么会有人这题做不出来?
by sweet_carrot @ 2020-08-06 11:31:47
btd,jbl