結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
12,324 KB
testcase_01 AC 8 ms
9,564 KB
testcase_02 AC 9 ms
9,796 KB
testcase_03 AC 9 ms
9,940 KB
testcase_04 AC 8 ms
9,824 KB
testcase_05 AC 8 ms
9,820 KB
testcase_06 AC 9 ms
9,692 KB
testcase_07 AC 8 ms
9,688 KB
testcase_08 AC 8 ms
9,820 KB
testcase_09 AC 8 ms
11,736 KB
testcase_10 AC 8 ms
10,024 KB
testcase_11 AC 8 ms
9,820 KB
testcase_12 AC 8 ms
10,840 KB
testcase_13 AC 9 ms
10,264 KB
testcase_14 AC 11 ms
10,332 KB
testcase_15 AC 10 ms
10,456 KB
testcase_16 AC 12 ms
10,992 KB
testcase_17 AC 17 ms
11,160 KB
testcase_18 AC 16 ms
10,952 KB
testcase_19 AC 15 ms
10,844 KB
testcase_20 AC 16 ms
11,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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