結果

問題 No.1844 Divisors Sum Sum
ユーザー hir355hir355
提出日時 2022-02-18 22:35:48
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 527 ms / 3,000 ms
コード長 229 bytes
コンパイル時間 419 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 77,532 KB
最終ジャッジ日時 2023-09-11 19:38:17
合計ジャッジ時間 11,286 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 509 ms
77,404 KB
testcase_01 AC 526 ms
77,164 KB
testcase_02 AC 525 ms
77,504 KB
testcase_03 AC 523 ms
77,532 KB
testcase_04 AC 524 ms
77,400 KB
testcase_05 AC 526 ms
77,344 KB
testcase_06 AC 527 ms
77,372 KB
testcase_07 AC 522 ms
77,240 KB
testcase_08 AC 521 ms
77,244 KB
testcase_09 AC 519 ms
77,320 KB
testcase_10 AC 484 ms
77,348 KB
testcase_11 AC 183 ms
77,360 KB
testcase_12 AC 393 ms
77,328 KB
testcase_13 AC 144 ms
77,500 KB
testcase_14 AC 242 ms
77,312 KB
testcase_15 AC 77 ms
71,336 KB
testcase_16 AC 76 ms
71,156 KB
testcase_17 AC 75 ms
71,264 KB
testcase_18 AC 79 ms
71,268 KB
testcase_19 AC 74 ms
71,188 KB
testcase_20 AC 75 ms
71,320 KB
testcase_21 AC 75 ms
71,332 KB
testcase_22 AC 74 ms
71,264 KB
testcase_23 AC 75 ms
71,320 KB
testcase_24 AC 73 ms
71,396 KB
testcase_25 AC 73 ms
71,096 KB
testcase_26 AC 76 ms
71,448 KB
testcase_27 AC 76 ms
71,448 KB
testcase_28 AC 75 ms
71,400 KB
testcase_29 AC 75 ms
71,392 KB
testcase_30 AC 74 ms
71,260 KB
testcase_31 AC 74 ms
71,428 KB
testcase_32 AC 74 ms
71,416 KB
testcase_33 AC 76 ms
71,524 KB
testcase_34 AC 75 ms
71,220 KB
testcase_35 AC 74 ms
71,392 KB
testcase_36 AC 75 ms
71,384 KB
testcase_37 AC 74 ms
71,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7
l = int(input())
ans = 1
for i in range(l):
    p, e = map(int, input().split())
    ans *= (p * (pow(p, e + 1, MOD) - 1) - p * (e + 1) + (e + 1)) * pow((p - 1) * (p - 1), MOD - 2, MOD)
    ans %= MOD
print(ans)
0