結果

問題 No.1164 GCD Products hard
ユーザー yuruhiyayuruhiya
提出日時 2020-08-12 12:46:29
言語 cLay
(20240420-1)
結果
AC  
実行時間 185 ms / 2,500 ms
コード長 297 bytes
コンパイル時間 3,139 ms
コンパイル使用メモリ 174,208 KB
実行使用メモリ 9,624 KB
最終ジャッジ日時 2023-09-19 00:59:27
合計ジャッジ時間 7,678 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
9,208 KB
testcase_01 AC 147 ms
9,588 KB
testcase_02 AC 106 ms
8,908 KB
testcase_03 AC 37 ms
8,004 KB
testcase_04 AC 35 ms
7,972 KB
testcase_05 AC 125 ms
9,232 KB
testcase_06 AC 143 ms
9,416 KB
testcase_07 AC 141 ms
9,468 KB
testcase_08 AC 130 ms
9,472 KB
testcase_09 AC 99 ms
8,960 KB
testcase_10 AC 37 ms
7,896 KB
testcase_11 AC 110 ms
9,180 KB
testcase_12 AC 151 ms
9,624 KB
testcase_13 AC 92 ms
8,772 KB
testcase_14 AC 78 ms
8,952 KB
testcase_15 AC 143 ms
9,420 KB
testcase_16 AC 91 ms
9,096 KB
testcase_17 AC 123 ms
9,188 KB
testcase_18 AC 108 ms
9,208 KB
testcase_19 AC 37 ms
8,076 KB
testcase_20 AC 62 ms
8,288 KB
testcase_21 AC 164 ms
9,604 KB
testcase_22 AC 2 ms
7,440 KB
testcase_23 AC 123 ms
9,416 KB
testcase_24 AC 185 ms
9,412 KB
testcase_25 AC 2 ms
7,364 KB
testcase_26 AC 3 ms
7,444 KB
testcase_27 AC 2 ms
7,500 KB
testcase_28 AC 2 ms
7,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll a, b, n;
int prime[700000], s;
Mint ans = 1;
{
	rd(a, b, n);
	s = Prime(b+1, prime);
	rep(i, s) {
		ll p = prime[i];
		modint sum = 0;
		sum.setmod(MD - 1);
		for (ll i = p; i <= b; i *= p) {
			modint x = b / i - (a - 1) / i;
			sum += x.pw(n);
		}
		ans *= Mint(p).pw(sum.val);
	}
	wt(ans);
}
0