93分,离成功只差一步!

P2433 【深基1-2】小学数学 N 合一

zouzhuohao @ 2023-08-02 13:47:49

小学数学,算一算就可以!

上代码!

#include<bits/stdc++.h>
using namespace std;
const double pi=3.141593;
int main(){
    int n;
    cin>>n;
    if(n==1){
        cout<<"I love Luogu!";
    }else if(n==2){
        cout<<2+4<<" "<<10-2-4;
    }else if(n==3){
        cout<<14/4<<endl;
        cout<<14/4*4<<endl;
        cout<<14-14/4*4;
    }else if(n==4){
        cout<<fixed<<setprecision(3)<<1.0*500/3;
    }else if(n==5){
        cout<<(220+260)/(12+20);
    }else if(n==6){
        cout<<sqrt(36+81);
    }else if(n==7){
        cout<<100+10<<endl;
        cout<<100+10-20<<endl;
        cout<<0;
    }else if(n==8){
        cout<<2*pi*5<<endl;
        cout<<5*5*pi<<endl;
        cout<<4.0/3*pi*5*5*5<<endl;
    }else if (n==9){
        cout<<((((1+1)*2)+1*2)+1)*2;
    }else if(n==10){
        cout<<9;
    }else if(n==11){
        cout<<100.0/(8-5);
    }else if(n==12){
        cout<<13<<endl<<"R";
    }else if(n==13){
        cout<<int((pow(4/3*pi*(4*4*4+10*10*10),1.0*1/3)));
    }else if(n==14){
        cout<<50;
    }
    return 0;
}

《真·简单》

13题WA了!

再来!

9题也WA了!

最高成绩:93分!

MD%^&^%&%$&&*^&^%%&%#^&%&#^#^%#%#&%^&%&#&&%^&&

SOS!HELP!


by AKPC @ 2023-08-02 13:52:11

9$:答案 $22 13$:答案 $16

by Czero_2023 @ 2023-08-02 13:52:50

@zouzhuohao 9题应该是括号打乱了


by AKPC @ 2023-08-02 13:53:25

@zouzhuohao 13 题的 4/3 默认 int 类型


by __ii__ @ 2023-08-02 14:05:35

你要不像我一样,把答案算出来,直接输出


by xiaofeng_and_xiaoyu @ 2023-08-02 14:33:21

//#9

cout<<((((1+1)*2)+1)*2+1)*2;

//#12

cout<<int((pow(4*1.0/3*pi*(4*4*4+10*10*10),1.0*1/3)));

@zouzhuohao


|