c++,wa了1个,请大佬帮我找找哪个选项错了呗!
查看原帖
c++,wa了1个,请大佬帮我找找哪个选项错了呗!
936111
baibaobao666楼主2023/2/27 18:48

qwq

#include <bits/stdc++.h>
using namespace std;

int main() {
    double T,p=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 << int(14/4) << endl << 14-(14%4) << endl << 14%4;
    } else if (T == 4) {
        cout << fixed << setprecision(3) << 1.0 * 500 / 3;
    } else if (T == 5) {
        cout << 480 / 32;
    } 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 << 1.0 * 5*2*p << endl << 1.0 * 5*5*p << endl << 1.0 * 4/3*p*(5*5*5);
    } else if (T == 9) {
        cout << (((1+1)*2+1)*2+1)*2;
    } 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*p*(4*4*4+10*10*10),1.0*1/3));
    } else if (T == 14) {
        int minn = 1e9;
        for(int i=110,j=10;i >= 1;i--,j++)
        {
            if(i*j >= 3500)
            minn = min(minn,i);
        }
        cout << minn;
    }
    
    return 0;
}
2023/2/27 18:48
加载中...