結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
8,448 KB
testcase_01 AC 8 ms
8,448 KB
testcase_02 AC 8 ms
8,448 KB
testcase_03 AC 8 ms
8,448 KB
testcase_04 AC 7 ms
8,448 KB
testcase_05 AC 9 ms
8,448 KB
testcase_06 AC 8 ms
8,576 KB
testcase_07 AC 8 ms
8,448 KB
testcase_08 AC 8 ms
8,448 KB
testcase_09 AC 8 ms
8,448 KB
testcase_10 AC 8 ms
8,448 KB
testcase_11 AC 8 ms
8,448 KB
testcase_12 AC 8 ms
8,448 KB
testcase_13 AC 10 ms
8,576 KB
testcase_14 AC 12 ms
9,088 KB
testcase_15 AC 11 ms
9,216 KB
testcase_16 AC 13 ms
9,472 KB
testcase_17 AC 16 ms
9,344 KB
testcase_18 AC 17 ms
9,472 KB
testcase_19 AC 16 ms
9,344 KB
testcase_20 AC 15 ms
9,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ull c[4][256];
ll@n;
ull@m,@b,z=1;
m%=b;
rep(j,4){
	c[j][0]=1;
	c[j][1]=j==0?m:c[j-1][255]*c[j-1][1]%b;
	rep(i,2,256){
		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[3][a>>24]*c[2][a>>16&255]%b*c[1][a>>8&255]%b*c[0][a&255]%b+1)%b;
}
wt(z);
0