这个代码有问题吗!
查看原帖
这个代码有问题吗!
324038
Motbloveut221楼主2020/4/28 20:16
#include<iostream>
#include<cmath>
// 填上你觉得需要的其他头文件
const double PI = 3.141593;
using namespace std;
int main() {
    int T;
    cin >> T;
    if (T == 1) {
        // 粘贴问题 1 的主函数代码,除了 return 0
        cout << "I love Luogu!";
    } else if (T == 2) {
        // 粘贴问题 2 的主函数代码,除了 return 0
        cout << 2 + 4 << " " << 10 - 2 - 4;
    } else if (T == 3) {
        cout << 3 << endl;
        cout << 12 << endl;
        cout << 2;
    } else if (T == 4) {
        cout << 166.667;
    } else if (T == 5) {
        cout << 20;
    } else if (T == 6) {
        cout << (int)(sqrt(36+81));
    } else if (T == 7) {
        int a=100;
        a+=10;
        cout << a << endl;
        a-=20;
        cout << a << endl;
        cout << 0;
    } else if (T == 8) {
        cout << PI*2*5 << endl << PI*5*5 << endl << 4/3*PI*5*5*5;
    } else if (T == 9) {
        int a=1;
        a++;
        a*=2;
        a++;
        a*=2;
        a++;
        a*=2;
        cout << a;
    } else if (T == 10) {
        cout << 9;
    } else if (T == 11) {
        cout << 1.0*100/3;
    } else if (T == 12) {
        cout << 13 << endl << "R";
    } 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;
    }
    return 0;
}
2020/4/28 20:16
加载中...