結果

問題 No.1844 Divisors Sum Sum
ユーザー rlangevinrlangevin
提出日時 2023-02-05 16:36:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 617 ms / 3,000 ms
コード長 284 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 77,448 KB
最終ジャッジ日時 2023-09-17 08:24:16
合計ジャッジ時間 14,674 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 593 ms
77,212 KB
testcase_01 AC 616 ms
77,404 KB
testcase_02 AC 612 ms
77,136 KB
testcase_03 AC 616 ms
77,188 KB
testcase_04 AC 616 ms
77,448 KB
testcase_05 AC 612 ms
77,192 KB
testcase_06 AC 617 ms
77,168 KB
testcase_07 AC 616 ms
77,176 KB
testcase_08 AC 611 ms
77,188 KB
testcase_09 AC 612 ms
77,060 KB
testcase_10 AC 566 ms
77,052 KB
testcase_11 AC 188 ms
77,204 KB
testcase_12 AC 448 ms
77,164 KB
testcase_13 AC 137 ms
77,052 KB
testcase_14 AC 257 ms
76,988 KB
testcase_15 AC 71 ms
71,564 KB
testcase_16 AC 72 ms
71,156 KB
testcase_17 AC 73 ms
71,372 KB
testcase_18 AC 73 ms
71,344 KB
testcase_19 AC 73 ms
71,156 KB
testcase_20 AC 74 ms
71,376 KB
testcase_21 AC 76 ms
71,156 KB
testcase_22 AC 76 ms
71,372 KB
testcase_23 AC 75 ms
71,480 KB
testcase_24 AC 75 ms
71,436 KB
testcase_25 AC 75 ms
71,292 KB
testcase_26 AC 74 ms
71,156 KB
testcase_27 AC 73 ms
71,472 KB
testcase_28 AC 74 ms
71,140 KB
testcase_29 AC 73 ms
71,520 KB
testcase_30 AC 75 ms
71,576 KB
testcase_31 AC 74 ms
71,456 KB
testcase_32 AC 75 ms
71,576 KB
testcase_33 AC 76 ms
71,496 KB
testcase_34 AC 75 ms
71,156 KB
testcase_35 AC 74 ms
71,156 KB
testcase_36 AC 73 ms
71,260 KB
testcase_37 AC 75 ms
71,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline

ans = 1
mod = 10 ** 9 + 7
L = int(readline())
for i in range(L):
    d, e = map(int, readline().split())
    ans *= pow(d - 1, mod - 2, mod) * (d * (pow(d, e + 1, mod) - 1) * pow(d - 1, mod - 2, mod) - (e + 1)  )
    ans %= mod
print(ans)    
0