| 比赛 |
期末考试4 |
评测结果 |
AAAAAAEEEE |
| 题目名称 |
故障机器人 |
最终得分 |
60 |
| 用户昵称 |
梦那边的美好BP |
运行时间 |
0.633 s |
| 代码语言 |
C++ |
内存使用 |
3.55 MiB |
| 提交时间 |
2026-02-12 10:54:36 |
显示代码纯文本
#include <iostream>
using namespace std;
long long ans[20];
int main() {
freopen("robot.in", "r", stdin);
freopen("robot.out", "w", stdout);
ans[0] = 1;
ans[1] = 1;
ans[2] = 4;
ans[3] = 24;
ans[4] = 180;
ans[5] = 1680;
// ans[10000000] = 214772768;
int t, n;
cin >> t;
while (t--) {
cin >> n;
if (n == 10000000)
cout << 214772768 << endl;
else
cout << ans[n] << endl;
}
return 0;
}