結果

問題 No.1844 Divisors Sum Sum
ユーザー horitaka1999horitaka1999
提出日時 2022-02-19 00:22:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 526 ms / 3,000 ms
コード長 329 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 89,032 KB
最終ジャッジ日時 2023-09-11 20:20:21
合計ジャッジ時間 12,238 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 494 ms
88,708 KB
testcase_01 AC 517 ms
88,960 KB
testcase_02 AC 526 ms
88,964 KB
testcase_03 AC 521 ms
88,844 KB
testcase_04 AC 520 ms
89,032 KB
testcase_05 AC 523 ms
88,740 KB
testcase_06 AC 514 ms
88,524 KB
testcase_07 AC 520 ms
88,732 KB
testcase_08 AC 519 ms
88,992 KB
testcase_09 AC 524 ms
88,976 KB
testcase_10 AC 483 ms
87,008 KB
testcase_11 AC 182 ms
80,000 KB
testcase_12 AC 392 ms
85,060 KB
testcase_13 AC 137 ms
77,440 KB
testcase_14 AC 235 ms
81,496 KB
testcase_15 AC 69 ms
71,192 KB
testcase_16 AC 69 ms
71,092 KB
testcase_17 AC 71 ms
71,180 KB
testcase_18 AC 69 ms
71,088 KB
testcase_19 AC 70 ms
71,088 KB
testcase_20 AC 69 ms
71,092 KB
testcase_21 AC 69 ms
71,100 KB
testcase_22 AC 70 ms
71,180 KB
testcase_23 AC 69 ms
71,236 KB
testcase_24 AC 68 ms
71,156 KB
testcase_25 AC 69 ms
71,096 KB
testcase_26 AC 69 ms
71,220 KB
testcase_27 AC 71 ms
71,092 KB
testcase_28 AC 71 ms
71,140 KB
testcase_29 AC 73 ms
71,136 KB
testcase_30 AC 73 ms
71,156 KB
testcase_31 AC 71 ms
71,192 KB
testcase_32 AC 69 ms
71,000 KB
testcase_33 AC 70 ms
71,340 KB
testcase_34 AC 73 ms
71,188 KB
testcase_35 AC 70 ms
71,192 KB
testcase_36 AC 71 ms
71,160 KB
testcase_37 AC 70 ms
71,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
mod = 10 ** 9 + 7
store = []
for _ in range(L):
    p,e = map(int,input().split())
    store.append((p,e))
ans = 1
for p,e in store:
    up = p * (pow(p,e+1,mod)-1) - (p-1) * (e+1)
    up %= mod
    down = (p-1) ** 2
    down %= mod
    tmp =  up * pow(down,mod-2,mod) 
    ans *= tmp
    ans %= mod
print(ans)

0