比赛 期末考试4 评测结果 WAAAAAWWWW
题目名称 故障机器人 最终得分 50
用户昵称 zhyn 运行时间 0.113 s
代码语言 C++ 内存使用 3.69 MiB
提交时间 2026-02-12 11:05:05
显示代码纯文本
#include<bits/stdc++.h>
using namespace std;

#define maxn 3005
int n,q;
int num[maxn];
int ans[maxn]={0,1,4,24,180,1680}; 

int main(){
	
	
	freopen("robot.in","r",stdin);
	freopen("robot.out","w",stdout);
	
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	
	cin>>q;
	
	while(q--){
		cin>>n;
		if(n>5){
			cout<<"0\n";
			continue;
		}
		cout<<ans[n]<<"\n";
	}
	
	
	
	
	return 0;
}