結果

問題 No.1844 Divisors Sum Sum
ユーザー roarisroaris
提出日時 2022-03-01 23:36:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 590 ms / 3,000 ms
コード長 264 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 77,380 KB
最終ジャッジ日時 2023-09-22 14:42:11
合計ジャッジ時間 14,266 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 573 ms
77,188 KB
testcase_01 AC 583 ms
77,164 KB
testcase_02 AC 582 ms
77,284 KB
testcase_03 AC 581 ms
77,264 KB
testcase_04 AC 581 ms
77,380 KB
testcase_05 AC 583 ms
77,236 KB
testcase_06 AC 581 ms
77,136 KB
testcase_07 AC 581 ms
77,156 KB
testcase_08 AC 590 ms
77,248 KB
testcase_09 AC 582 ms
77,336 KB
testcase_10 AC 542 ms
77,340 KB
testcase_11 AC 188 ms
77,248 KB
testcase_12 AC 432 ms
77,280 KB
testcase_13 AC 135 ms
77,180 KB
testcase_14 AC 248 ms
77,208 KB
testcase_15 AC 72 ms
71,360 KB
testcase_16 AC 72 ms
71,244 KB
testcase_17 AC 72 ms
71,312 KB
testcase_18 AC 72 ms
71,352 KB
testcase_19 AC 72 ms
71,364 KB
testcase_20 AC 72 ms
71,408 KB
testcase_21 AC 71 ms
71,512 KB
testcase_22 AC 73 ms
71,460 KB
testcase_23 AC 72 ms
71,132 KB
testcase_24 AC 71 ms
71,516 KB
testcase_25 AC 72 ms
71,428 KB
testcase_26 AC 71 ms
71,456 KB
testcase_27 AC 70 ms
71,348 KB
testcase_28 AC 72 ms
71,264 KB
testcase_29 AC 70 ms
71,432 KB
testcase_30 AC 71 ms
71,428 KB
testcase_31 AC 70 ms
71,132 KB
testcase_32 AC 72 ms
71,260 KB
testcase_33 AC 72 ms
71,488 KB
testcase_34 AC 70 ms
71,332 KB
testcase_35 AC 73 ms
71,532 KB
testcase_36 AC 71 ms
71,264 KB
testcase_37 AC 71 ms
71,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

L = int(input())
ans = 1
MOD = 10**9+7
inv = lambda x: pow(x, MOD-2, MOD)

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

print(ans)
0