1 条题解

  • 0
    @ 2024-7-25 13:01:16

    参考答案:

    #include<iostream>
    
    using namespace std;
    
    int main()
    {
        int a, b, c;
        scanf("%d\n%d\n%d", &a, &b, &c);
    
        int sum1, sum2, sum3, sum4, sum5, sum6;
        sum1 = a * b * c;
        sum2 = (a + b) * c;
        sum3 = a * (b + c);
        sum4 = a + b + c;
        sum5 = a * b + c;
        sum6 = a + b * c;
        int d[6] = { sum1,sum2,sum3,sum4,sum5,sum6 };
    
        for (int i = 0; i < 5; i++)
        {
            if (d[i] > d[i + 1])
            {
                swap(d[i], d[i + 1]);
            }
        }
        printf("%d", d[5]);
    }
    
    • 1

    信息

    ID
    43
    时间
    1000ms
    内存
    32MiB
    难度
    10
    标签
    递交数
    1
    已通过
    1
    上传者