5 条题解
-
1
#include <iostream> #include <iomanip> using namespace std; int main() { int n; cin >> n; if(n == 1) { cout << "5.0"; } if(n >= 2 and n <= 5) { cout << fixed << setprecision(1) << n * 4.5; } if(n >= 6 and n <= 10) { cout << fixed << setprecision(1) << n * 4.0; } if(n > 10) { cout << fixed << setprecision(1) << n * 3.5; } return 0; }//已AC
-
-1
#include <iostream>//hetao3097453 #include <iomanip> using namespace std; int main() { int n; cin >> n; if(n == 1) { cout << fixed << setprecision(1) << 1 * 5.0; } else if(n == 2 || n == 3 || n == 4 || n == 5) { cout << fixed << setprecision(1) << n * 4.5; } else if(n == 6 || n == 7 || n == 8 || n == 9 || n == 10) { cout << fixed << setprecision(1) << n * 4.0; } else { cout << fixed << setprecision(1) << n * 3.5; } return 0; }
-
-2
- 1
信息
- ID
- 714
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 4
- 标签
- 递交数
- 123
- 已通过
- 61
- 上传者