結果

問題 No.1844 Divisors Sum Sum
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-02-21 22:28:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 574 ms / 3,000 ms
コード長 258 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 87,116 KB
実行使用メモリ 81,996 KB
最終ジャッジ日時 2023-09-12 13:16:02
合計ジャッジ時間 13,729 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 555 ms
81,776 KB
testcase_01 AC 572 ms
81,996 KB
testcase_02 AC 571 ms
81,872 KB
testcase_03 AC 572 ms
81,800 KB
testcase_04 AC 571 ms
81,832 KB
testcase_05 AC 574 ms
81,908 KB
testcase_06 AC 574 ms
81,760 KB
testcase_07 AC 572 ms
81,796 KB
testcase_08 AC 573 ms
81,700 KB
testcase_09 AC 574 ms
81,756 KB
testcase_10 AC 544 ms
81,588 KB
testcase_11 AC 248 ms
81,752 KB
testcase_12 AC 449 ms
81,840 KB
testcase_13 AC 214 ms
81,888 KB
testcase_14 AC 306 ms
81,644 KB
testcase_15 AC 145 ms
79,772 KB
testcase_16 AC 148 ms
79,760 KB
testcase_17 AC 148 ms
79,776 KB
testcase_18 AC 145 ms
79,768 KB
testcase_19 AC 148 ms
79,764 KB
testcase_20 AC 147 ms
79,604 KB
testcase_21 AC 145 ms
79,760 KB
testcase_22 AC 145 ms
79,892 KB
testcase_23 AC 148 ms
79,816 KB
testcase_24 AC 148 ms
79,756 KB
testcase_25 AC 147 ms
79,860 KB
testcase_26 AC 146 ms
79,588 KB
testcase_27 AC 146 ms
80,032 KB
testcase_28 AC 147 ms
79,796 KB
testcase_29 AC 148 ms
79,568 KB
testcase_30 AC 148 ms
79,588 KB
testcase_31 AC 147 ms
79,812 KB
testcase_32 AC 149 ms
79,592 KB
testcase_33 AC 149 ms
79,812 KB
testcase_34 AC 146 ms
79,772 KB
testcase_35 AC 146 ms
79,772 KB
testcase_36 AC 146 ms
79,860 KB
testcase_37 AC 145 ms
79,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from re import A


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