10 条题解
-
3
#include <bits/stdc++.h> #include <iostream> #include <iomanip> #include <cmath> #include <math.h> #include <algorithm> #include <cstring> using namespace std; const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; int main() { float b , r = 3.0 , w , f = 1.2 , m; cin >> m; b = m / r + 50; w = m / f; if( b > w ) { cout << "Walk" << endl; } else if( b < w ) { cout << "Bike" << endl; } else { cout << "All" << endl; } return 0; }
-
3
#include <queue> #include <math.h> #include <stack> #include <stdio.h> #include <iostream> #include <vector> #include <iomanip> #include <string.h> #include <algorithm> using namespace std; #define LL long long const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; int main() { float s; cin >> s; float q,z; q = 50 + s / 3.0; z = s / 1.2; if (z==q) { cout <<"All"; } else if (q > z) { cout <<"Walk" ; } else if(q < z) { cout <<"Bike"; } }
- 1
信息
- ID
- 874
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 7
- 标签
- 递交数
- 1659
- 已通过
- 401
- 上传者