提交时间:2021-04-03 11:35:01
运行 ID: 6534
#include <bits/stdc++.h> #define int long long using namespace std; int n,ans,mod,num[1010],cnt; int a[16]={0,1,0,0,2,14,90,646,5242,47622,479306,5296790,63779034,831283558,11661506218}; bool f[1010]; signed main(){ while(scanf("%lld%lld",&n,&mod)!=EOF){ cout<<a[n]%mod<<endl; } return 0; }