結果

問題 No.1844 Divisors Sum Sum
ユーザー 👑 rin204rin204
提出日時 2022-02-18 21:36:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 657 ms / 3,000 ms
コード長 299 bytes
コンパイル時間 1,077 ms
コンパイル使用メモリ 86,348 KB
実行使用メモリ 77,324 KB
最終ジャッジ日時 2023-09-11 18:41:45
合計ジャッジ時間 13,563 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 608 ms
77,064 KB
testcase_01 AC 652 ms
76,988 KB
testcase_02 AC 656 ms
76,960 KB
testcase_03 AC 647 ms
76,884 KB
testcase_04 AC 653 ms
77,196 KB
testcase_05 AC 649 ms
76,900 KB
testcase_06 AC 653 ms
77,108 KB
testcase_07 AC 655 ms
77,144 KB
testcase_08 AC 657 ms
77,324 KB
testcase_09 AC 650 ms
77,136 KB
testcase_10 AC 602 ms
77,152 KB
testcase_11 AC 211 ms
77,180 KB
testcase_12 AC 480 ms
76,992 KB
testcase_13 AC 147 ms
77,164 KB
testcase_14 AC 276 ms
77,184 KB
testcase_15 AC 66 ms
71,024 KB
testcase_16 AC 66 ms
70,828 KB
testcase_17 AC 69 ms
71,140 KB
testcase_18 AC 69 ms
71,152 KB
testcase_19 AC 70 ms
71,012 KB
testcase_20 AC 71 ms
71,308 KB
testcase_21 AC 67 ms
71,208 KB
testcase_22 AC 67 ms
70,876 KB
testcase_23 AC 68 ms
71,200 KB
testcase_24 AC 70 ms
71,084 KB
testcase_25 AC 67 ms
71,180 KB
testcase_26 AC 67 ms
71,184 KB
testcase_27 AC 67 ms
71,000 KB
testcase_28 AC 69 ms
71,084 KB
testcase_29 AC 70 ms
70,820 KB
testcase_30 AC 71 ms
70,996 KB
testcase_31 AC 67 ms
71,236 KB
testcase_32 AC 67 ms
71,136 KB
testcase_33 AC 68 ms
71,044 KB
testcase_34 AC 68 ms
71,012 KB
testcase_35 AC 67 ms
71,044 KB
testcase_36 AC 68 ms
71,044 KB
testcase_37 AC 69 ms
70,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7

l = int(input())
ans = 1
for _ in range(l):
    p, e = map(int, input().split())
    e += 1
    s = pow(p, e, MOD) - e
    s %= MOD
    inv = pow(p - 1, MOD - 2, MOD)
    s += p * (pow(p, e - 1, MOD) - 1) * inv
    s %= MOD
    ans *= s * inv % MOD
    ans %= MOD

print(ans)
    
0