WA呀WA

B2046 骑车与走路

Traveller_Blanca @ 2023-07-19 20:55:46

#include <iostream>
using namespace std;
int main()
{
    double a;
    cin>>a;
    double x=a/1.2;
    double y=23.0+27.0+a/3.0;
    if(x>y)
    {
        cout <<"Walk";
    }
    else if(x<y)
    {
        cout <<"Bike";
    }
    else
    {
        cout <<"All";
    }
    return 0;
}

by _Glassy_Sky_ @ 2023-07-19 21:11:42

@Stare 你前两个判断的输出似乎反了


by Traveller_Blanca @ 2023-07-19 21:15:05

哦对,谢谢大佬,粗心的我()


|