- 【深基1-2】小学数学 N 合一
哪里错了啊!!!
- @ 2026-9-19 8:57:58
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { int T; cin >> T; if (T == 1) { cout << "I love Luogu!"; } else if (T == 2) { cout << 2 + 4 << " " << 10 - 2 - 4; } else if (T == 3) { cout << 14 / 4 << endl; cout << 14 / 4 * 4 << endl; cout << 14 % 4 << endl; } else if (T == 4) { cout << setprecision(6) << fixed << 500.0 / 3; } else if (T == 5) { cout << (260 + 220) / (12 + 20); } else if (T == 6) { cout << sqrt(6 * 6 + 9 * 9); } else if (T == 7) { int balance = 100; balance += 10; cout << balance << endl; balance -= 20; cout << balance << endl; balance = 0; cout << balance << endl; } else if (T == 8) { const double pi = 3.141593; int r = 5; cout << 2 * pi * r << endl; cout << pi * r * r << endl; cout << 4.0 / 3 * pi * r * r * r << endl; } else if (T == 9) { int peach = 1; peach = (peach + 1) * 2; peach = (peach + 1) * 2; peach = (peach + 1) * 2; cout << peach; } else if (T == 10) { cout << 9; } else if (T == 11) { cout << 100.0 / (8 - 5); } else if (T == 12) { cout << 'M' - 'A' + 1 << endl; cout << char('A' + 18 - 1); } else if (T == 13) { const double pi = 3.141593; double total_volume = 4.0 / 3 * pi * 4 * 4 * 4 + 4.0 / 3 * pi * 10 * 10 * 10; cout << (int)cbrt(total_volume); } else if (T == 14) { cout << 50; } return 0; }
ac:10,wa:1
3 条评论
-
母谨铭 LV 4 @ 2026-9-30 14:20:37#include<bits/stdc++.h> #define PI 3.14159 using namespace std; int main(){ double r,d,c,s; cin>>r; d=r2; c=2PIr; s=PIr*r; cout<<setiosflags(ios::fixed)<<setprecision(4); cout<<d<<' '<<c<<' '<<s<<endl; return 0; }
-
@ 2026-9-23 13:12:39
不知道
-
@ 2026-9-21 19:59:25fixed << setprecision(6)去掉fixed,在8的分支前,添加cout << setprecision(10);
- 1
信息
- ID
- 3870
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 10
- 标签
- 递交数
- 5
- 已通过
- 1
- 上传者