結果

問題 No.2394 部分和乗総和
ユーザー tailstails
提出日時 2023-07-31 16:16:43
言語 cLay
(20240104-1)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 7,856 ms
コンパイル使用メモリ 220,452 KB
実行使用メモリ 14,060 KB
最終ジャッジ日時 2024-04-18 16:19:21
合計ジャッジ時間 8,482 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
13,180 KB
testcase_01 AC 10 ms
10,820 KB
testcase_02 AC 10 ms
10,804 KB
testcase_03 AC 10 ms
11,148 KB
testcase_04 AC 11 ms
11,528 KB
testcase_05 AC 10 ms
10,692 KB
testcase_06 AC 10 ms
11,820 KB
testcase_07 AC 11 ms
11,676 KB
testcase_08 AC 10 ms
10,688 KB
testcase_09 AC 11 ms
13,448 KB
testcase_10 AC 10 ms
10,820 KB
testcase_11 AC 9 ms
10,820 KB
testcase_12 AC 10 ms
10,824 KB
testcase_13 AC 12 ms
10,944 KB
testcase_14 AC 13 ms
11,204 KB
testcase_15 AC 11 ms
11,332 KB
testcase_16 AC 13 ms
11,920 KB
testcase_17 AC 18 ms
11,908 KB
testcase_18 AC 19 ms
14,060 KB
testcase_19 AC 18 ms
11,840 KB
testcase_20 AC 18 ms
11,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ull c[2][65536];
ll@n;
ull@m,@b,z=1;
m%=b;
rep(j,2){
	c[j][0]=1;
	c[j][1]=j==0?m:c[j-1][65535]*c[j-1][1]%b;
	rep(i,2,65536){
		c[j][i]=c[j][i-1]*c[j][1]%b;
	}
}
ull p=EulerPhi(b);
rep(n){
	ull@a;
	a=(a-1)%p+1;
	z=z*(c[1][a>>16]*c[0][a&65535]%b+1)%b;
}
wt(z);
0