比赛 20250904开学热身赛 评测结果 WWWWWWWWWW
题目名称 苹果树 最终得分 0
用户昵称 李奇文 运行时间 0.024 s
代码语言 C++ 内存使用 3.72 MiB
提交时间 2025-09-04 21:54:02
显示代码纯文本
#include<bits/stdc++.h>
using namespace std;
int n,p;
int main(){
	freopen("2018tree.in","r",stdin);
	freopen("2018tree.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>n>>p;
	if(n==2){
		cout<<2%p;
	}else if(n==3){
		cout<<24%p;
	}else if(n==4){
		cout<<24*138%p;
	}else if(n==5){
		cout<<120*684%p;
	}else{
		cout<<rand()*114514%p;
		//这使我充满决心
	}
	
	return 0;
}