superleo @ 2024-04-09 19:11:35
a = int(input())
b = a / 1.2
c = a / 3.0 + 5.0
if b == c:
print('All')
elif c > b:
print('Walk')
elif b > c:
print('Bike')
by Czs120828 @ 2024-07-11 22:23:05
c = a / 3.0 + 5.0 这里是50,不是5.0;```c
using namespace std; double n,a,b; int main() { cin>>n; a=n/1.2; b=n/3.0+50; if (a<b) { cout<<"Walk"; } else if (a>b) { cout<<"Bike"; } else { cout<<"All"; } return 0; }
你看一下我的
by Czs120828 @ 2024-07-11 22:23:38
#include <iostream>
using namespace std;
double n,a,b;
int main()
{
cin>>n;
a=n/1.2;
b=n/3.0+50;
if (a<b)
{
cout<<"Walk";
}
else if (a>b)
{
cout<<"Bike";
}
else
{
cout<<"All";
}
return 0;
}
by Pig3 @ 2024-07-18 16:40:55
n = int(input())
walk = n/1.2
bike = n/3+50
if walk == bike:
print('All')
elif walk > bike:
print('Bike')
else:
print('Walk')