結果

問題 No.1844 Divisors Sum Sum
ユーザー dachengzdachengz
提出日時 2022-12-17 15:48:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 487 ms / 3,000 ms
コード長 291 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 76,416 KB
最終ジャッジ日時 2024-04-28 10:16:06
合計ジャッジ時間 10,553 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 462 ms
75,832 KB
testcase_01 AC 482 ms
76,032 KB
testcase_02 AC 484 ms
75,904 KB
testcase_03 AC 481 ms
76,160 KB
testcase_04 AC 487 ms
76,032 KB
testcase_05 AC 483 ms
75,904 KB
testcase_06 AC 479 ms
76,416 KB
testcase_07 AC 480 ms
76,032 KB
testcase_08 AC 483 ms
75,776 KB
testcase_09 AC 484 ms
75,776 KB
testcase_10 AC 446 ms
75,904 KB
testcase_11 AC 157 ms
75,904 KB
testcase_12 AC 361 ms
75,776 KB
testcase_13 AC 120 ms
76,032 KB
testcase_14 AC 211 ms
76,416 KB
testcase_15 AC 41 ms
51,968 KB
testcase_16 AC 40 ms
51,456 KB
testcase_17 AC 40 ms
51,456 KB
testcase_18 AC 41 ms
51,712 KB
testcase_19 AC 41 ms
51,456 KB
testcase_20 AC 40 ms
51,584 KB
testcase_21 AC 41 ms
51,712 KB
testcase_22 AC 40 ms
51,456 KB
testcase_23 AC 41 ms
51,712 KB
testcase_24 AC 39 ms
51,328 KB
testcase_25 AC 41 ms
51,712 KB
testcase_26 AC 41 ms
51,968 KB
testcase_27 AC 41 ms
51,328 KB
testcase_28 AC 39 ms
51,584 KB
testcase_29 AC 39 ms
51,712 KB
testcase_30 AC 40 ms
51,584 KB
testcase_31 AC 40 ms
51,584 KB
testcase_32 AC 40 ms
51,584 KB
testcase_33 AC 40 ms
51,584 KB
testcase_34 AC 40 ms
51,712 KB
testcase_35 AC 40 ms
51,840 KB
testcase_36 AC 40 ms
51,968 KB
testcase_37 AC 40 ms
51,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 10 ** 9 + 7
L = int(input())
ans = 1
for _ in range(L):
    p, e = map(int, input().split())
    # a(p^e) = (p*(p^(e+1)-1)-(p-1)*(e+1))/(p-1)^2
    numer = (p * (pow(p, e + 1, mod) - 1) - (p - 1) * (e + 1)) % mod
    ans = ans * numer % mod * pow(p - 1, mod - 3, mod) % mod
print(ans)
0