1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
#include<bits/stdc++.h> using namespace std; int main(){ int num; cin>>num; if(num==1){ cout<<"I love Luogu!"; return 0; } else if(num==2){ cout<<2+4<<" "<<10-2-4; return 0; } else if(num==3){ cout<<14/4<<endl<<14/4*4<<endl<<14%4; return 0; } else if(num==4){ cout<<fixed<<setprecision(3)<<1.0*500/3; return 0; } else if(num==5){ cout<<(220+260)/(20+12); return 0; } else if(num==6){ cout<<sqrt(6*6+9*9); return 0; } else if(num==7){ cout<<100+10<<endl<<100+10-20<<endl<<0; return 0; } else if(num==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; return 0; } else if(num==9){ int peach; peach=(((((1+1)*2)+1)*2)+1)*2; cout<<peach; return 0; } else if(num==10){ cout<<(15+7.5*10)/10; return 0; } else if(num==11){ cout<<1.0*100/3; return 0; } else if(num==12){ cout<<(int)('M'-'A')+1<<endl<<(char)(18+'A'-1); return 0; } else if(num==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; return 0; } else if(num==14){ cout<<50<<endl; return 0; } return 0; }
|