結果

問題 No.1844 Divisors Sum Sum
ユーザー 👑 KazunKazun
提出日時 2022-02-18 22:02:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 451 ms / 3,000 ms
コード長 379 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 87,032 KB
実行使用メモリ 77,372 KB
最終ジャッジ日時 2023-09-11 19:10:05
合計ジャッジ時間 9,966 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 431 ms
77,372 KB
testcase_01 AC 443 ms
77,004 KB
testcase_02 AC 445 ms
76,936 KB
testcase_03 AC 442 ms
77,016 KB
testcase_04 AC 447 ms
77,120 KB
testcase_05 AC 444 ms
77,012 KB
testcase_06 AC 442 ms
76,988 KB
testcase_07 AC 446 ms
76,996 KB
testcase_08 AC 444 ms
77,028 KB
testcase_09 AC 451 ms
77,064 KB
testcase_10 AC 420 ms
76,824 KB
testcase_11 AC 155 ms
77,036 KB
testcase_12 AC 336 ms
77,184 KB
testcase_13 AC 124 ms
76,776 KB
testcase_14 AC 203 ms
76,980 KB
testcase_15 AC 74 ms
71,240 KB
testcase_16 AC 72 ms
71,176 KB
testcase_17 AC 73 ms
71,104 KB
testcase_18 AC 74 ms
71,220 KB
testcase_19 AC 74 ms
71,172 KB
testcase_20 AC 72 ms
71,128 KB
testcase_21 AC 71 ms
71,100 KB
testcase_22 AC 71 ms
71,176 KB
testcase_23 AC 70 ms
71,288 KB
testcase_24 AC 71 ms
71,248 KB
testcase_25 AC 69 ms
71,316 KB
testcase_26 AC 71 ms
70,932 KB
testcase_27 AC 71 ms
71,184 KB
testcase_28 AC 70 ms
70,928 KB
testcase_29 AC 70 ms
71,096 KB
testcase_30 AC 70 ms
71,376 KB
testcase_31 AC 67 ms
71,128 KB
testcase_32 AC 70 ms
71,352 KB
testcase_33 AC 70 ms
71,220 KB
testcase_34 AC 69 ms
71,304 KB
testcase_35 AC 69 ms
71,228 KB
testcase_36 AC 72 ms
71,108 KB
testcase_37 AC 70 ms
71,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def product_mod(*X):
    y=1
    for x in X:
        y*=x%Mod; y%=Mod
    return y
#==================================================

import sys
input=sys.stdin.readline

Ans=1; Mod=10**9+7
L=int(input())
for _ in range(L):
    P,e=map(int,input().split())

    alpha=pow(P-1,Mod-2,Mod)
    Ans*=product_mod(pow(P,e+2,Mod)-(P-1)*(e+2)-1, alpha**2)
    Ans%=Mod

print(Ans%Mod)
0