結果

問題 No.1844 Divisors Sum Sum
ユーザー brthyyjpbrthyyjp
提出日時 2022-02-20 15:04:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,132 ms / 3,000 ms
コード長 291 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 79,728 KB
最終ジャッジ日時 2023-09-11 21:01:22
合計ジャッジ時間 19,873 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,081 ms
79,312 KB
testcase_01 AC 1,132 ms
79,456 KB
testcase_02 AC 1,110 ms
79,728 KB
testcase_03 AC 1,122 ms
79,484 KB
testcase_04 AC 1,116 ms
79,620 KB
testcase_05 AC 1,114 ms
79,552 KB
testcase_06 AC 1,122 ms
79,436 KB
testcase_07 AC 1,119 ms
79,612 KB
testcase_08 AC 1,118 ms
79,652 KB
testcase_09 AC 1,117 ms
79,560 KB
testcase_10 AC 1,033 ms
79,176 KB
testcase_11 AC 306 ms
79,112 KB
testcase_12 AC 807 ms
79,604 KB
testcase_13 AC 208 ms
79,364 KB
testcase_14 AC 439 ms
79,288 KB
testcase_15 AC 75 ms
71,340 KB
testcase_16 AC 75 ms
71,460 KB
testcase_17 AC 74 ms
71,516 KB
testcase_18 AC 75 ms
71,548 KB
testcase_19 AC 74 ms
71,324 KB
testcase_20 AC 73 ms
71,440 KB
testcase_21 AC 73 ms
71,360 KB
testcase_22 AC 73 ms
71,364 KB
testcase_23 AC 72 ms
71,296 KB
testcase_24 AC 74 ms
71,492 KB
testcase_25 AC 73 ms
71,432 KB
testcase_26 AC 74 ms
71,212 KB
testcase_27 AC 73 ms
71,344 KB
testcase_28 AC 74 ms
71,400 KB
testcase_29 AC 74 ms
71,492 KB
testcase_30 AC 74 ms
71,400 KB
testcase_31 AC 74 ms
71,412 KB
testcase_32 AC 73 ms
71,012 KB
testcase_33 AC 72 ms
71,452 KB
testcase_34 AC 75 ms
71,176 KB
testcase_35 AC 73 ms
71,296 KB
testcase_36 AC 74 ms
71,548 KB
testcase_37 AC 72 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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