結果

問題 No.1844 Divisors Sum Sum
ユーザー 👑 tamatotamato
提出日時 2022-02-18 21:38:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 443 ms / 3,000 ms
コード長 379 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 77,416 KB
最終ジャッジ日時 2023-09-11 18:42:57
合計ジャッジ時間 9,834 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 414 ms
77,164 KB
testcase_01 AC 435 ms
77,416 KB
testcase_02 AC 435 ms
77,372 KB
testcase_03 AC 434 ms
77,276 KB
testcase_04 AC 435 ms
77,344 KB
testcase_05 AC 435 ms
77,412 KB
testcase_06 AC 436 ms
76,976 KB
testcase_07 AC 436 ms
77,108 KB
testcase_08 AC 433 ms
77,372 KB
testcase_09 AC 443 ms
77,292 KB
testcase_10 AC 406 ms
77,348 KB
testcase_11 AC 153 ms
77,100 KB
testcase_12 AC 328 ms
77,236 KB
testcase_13 AC 120 ms
77,412 KB
testcase_14 AC 201 ms
77,156 KB
testcase_15 AC 74 ms
71,400 KB
testcase_16 AC 74 ms
71,712 KB
testcase_17 AC 73 ms
71,748 KB
testcase_18 AC 74 ms
71,668 KB
testcase_19 AC 72 ms
71,764 KB
testcase_20 AC 74 ms
71,404 KB
testcase_21 AC 75 ms
71,484 KB
testcase_22 AC 75 ms
71,692 KB
testcase_23 AC 74 ms
71,396 KB
testcase_24 AC 72 ms
71,744 KB
testcase_25 AC 73 ms
71,688 KB
testcase_26 AC 74 ms
71,708 KB
testcase_27 AC 74 ms
71,660 KB
testcase_28 AC 74 ms
71,744 KB
testcase_29 AC 74 ms
71,712 KB
testcase_30 AC 73 ms
71,668 KB
testcase_31 AC 73 ms
71,488 KB
testcase_32 AC 73 ms
71,812 KB
testcase_33 AC 73 ms
71,404 KB
testcase_34 AC 74 ms
71,660 KB
testcase_35 AC 75 ms
71,692 KB
testcase_36 AC 74 ms
71,400 KB
testcase_37 AC 74 ms
71,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    L = int(input())
    ans = 1
    for _ in range(L):
        p, e = map(int, input().split())
        inv = pow(p - 1, mod - 2, mod)
        tmp = inv * (inv * (pow(p, e + 2, mod) - 1) - (e + 2))%mod
        ans = (ans * tmp)%mod
    print(ans)


if __name__ == '__main__':
    main()
0