求助,c++可以运行到洛谷上就编译失败
查看原帖
求助,c++可以运行到洛谷上就编译失败
1131627
Freya_楼主2023/11/2 17:14
#include <bits/stdc++.h>
using namespace std;

int main() {
    int T;
    double PI=3.141593;
    cin >> T;
    if (T == 1) {
        cout << "I love Luogu!";
    } else if (T == 2) {
        cout << 2 + 4 << " " << 10 - 2 - 4;
    } else if (T == 3) {
        cout<<14/4<<endl;
        cout<<14-14%4<<endl;
        cout<<14%4<<endl;
    } else if (T == 4) {
        printf("%.3f",500*1.0/3);
    } else if (T == 5) {
        cout<<(260+220)/(12+20);
    } else if (T == 6) {
       cout<<sqrt(6*6+9*9);
    } else if (T == 7) {
        cout<<110<<endl;
        cout<<90<<endl;
        cout<<0;   
    } else if (T == 8) {
        cout<<10*PI<<endl;
        cout<<25*PI<<endl;
        cout<<(4*1.0)/3*PI*125;
    } else if (T == 9) {
        cout<<22;
    } else if (T == 10) {
        cout<<9;
    } else if (T == 11) {
        cout<<100*1.0/3; 
    } else if (T == 12) {
        cout<<13<<endl;
        cout<"R";
    } else if (T == 13) {
        double v;
        v=4*1.0/3*PI*64+4*1.0/3*PI*1000;
        printf("%d",(int)(pow(v,1.0*1/3)));
    } else if (T == 14) {
        cout<<50<<endl;
    }
    return 0;
}
2023/11/2 17:14
加载中...