社区讨论

救救我

P2433【深基1-2】小学数学 N 合一参与者 2已保存回复 2

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
2 条
当前快照
1 份
快照标识符
@mig3sw0s
此快照首次捕获于
2025/11/26 22:32
3 个月前
此快照最后确认于
2025/11/27 09:41
3 个月前
查看原帖
CPP
#include<bits/stdc++.h>
using namespace std;

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 << 14 / 4 << endl;
        cout << (14 / 4) * 4 << endl;
        cout << 14 % 4;
    } 
    else if (T == 4) {
        cout << fixed << setprecision(6) << 500.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 << 90 << endl << 0;
    } 
    else if (T == 8) {
        const double PI = 3.141593;
        cout << 2 * PI * 5 << endl;
        cout << PI * 5 * 5 << endl;
        cout << 4.0 / 3 * PI * 5 * 5 * 5;
    } 
    else if (T == 9) {
        int peaches = 1;
        peaches = (peaches + 1) * 2;
        peaches = (peaches + 1) * 2;
        peaches = (peaches + 1) * 2;
        cout << peaches;
    } 
    else if (T == 10) {
        cout << 23;
    } 
    else if (T == 11) {
        cout << 100.0 / (8 - 5);
    } 
    else if (T == 12) {
        cout << 13 << endl << 'R';
    } 
    else if (T == 13) {
        const double PI = 3.141593;
        double vol1 = 4.0/3 * PI * 4*4*4;
        double vol2 = 4.0/3 * PI * 10*10*10;
        double total = vol1 + vol2;
        cout << (int)pow(total, 1.0/3);
    } 
    else if (T == 14) {
        cout << 70;
    }
    
    return 0;
}

回复

2 条回复,欢迎继续交流。

正在加载回复...