大佬们帮我看看代码哪里出错了好吗?本人蒟蒻查不出来

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

D_M_ @ 2021-08-10 20:44:34

#include <bits/stdc++.h>
using namespace std;
const double pi=3.141593;
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;
    } else if (T == 4) {
        cout << "166.666";
    } else if (T == 5) {
        cout << (220+260)/(20+12);
    } else if (T == 6) {
        cout<<sqrt(6*6+9*9);
    } else if (T == 7) {
        cout << 110 << endl << 90 << endl << 0;
    } else if (T == 8) {
        cout<<pi*10<<endl<<pi*25<<endl<<4/3*pi*125<<endl;
    } else if (T == 9) {
       cout<<((((1+1)*2)+1*2)+1)*2;
    } else if (T == 10) {
        cout<<((((1+1)*2)+1*2)+1)*2;
    } else if (T == 11) {
        cout<<1.0*100/3;
    } else if (T == 12) {
        cout<<(int)('M'-'A')+1<<endl<<(char)(18+'A'-1);
    } else if (T == 13) {
        cout<<(int)(pow(4/3*pi*(4*4*4+10*10*10),1.0*1/3));
    } else if (T == 14) {
        cout<<50<<endl;
    }
    return 0;
}

by 渡鸦2007 @ 2021-08-10 20:48:28

@B站滴魔墨

4:166.667

8:3/4==>3.0/4.0

9\10\13还在看


by D_M_ @ 2021-08-10 20:49:15

@fqyz_wyc 谢谢谢大佬


by 渡鸦2007 @ 2021-08-10 20:49:20

9:cout<<((((1+1)*2)+1*2)+1)*2;改为

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


by 渡鸦2007 @ 2021-08-10 20:51:31

10看不懂您的解法,经典牛吃草问题您就自己想想吧(其实我觉得您10是打错了吧,和9完全一样

13和8一样的错误


by D_M_ @ 2021-08-10 20:52:13

@fqyz_wyc 好的( ̄▽ ̄)و,谢谢你


by D_M_ @ 2021-08-10 20:53:06

@fqyz_wyc 在b站用我的小号关注你了


by D_M_ @ 2021-08-10 20:57:13

@fqyz_wyc 提醒一下哈,9的括号是我打多了(其实是后面的括号打多了)

其次,谢谢大佬,我过了


|