結果

問題 No.1844 Divisors Sum Sum
ユーザー shobonvipshobonvip
提出日時 2022-02-18 21:30:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 818 ms / 3,000 ms
コード長 287 bytes
コンパイル時間 1,656 ms
コンパイル使用メモリ 86,104 KB
実行使用メモリ 79,476 KB
最終ジャッジ日時 2023-09-11 18:35:26
合計ジャッジ時間 15,955 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 783 ms
79,476 KB
testcase_01 AC 810 ms
77,568 KB
testcase_02 AC 816 ms
77,264 KB
testcase_03 AC 818 ms
77,412 KB
testcase_04 AC 817 ms
77,464 KB
testcase_05 AC 816 ms
77,220 KB
testcase_06 AC 814 ms
77,328 KB
testcase_07 AC 813 ms
77,508 KB
testcase_08 AC 811 ms
77,448 KB
testcase_09 AC 810 ms
77,396 KB
testcase_10 AC 748 ms
77,288 KB
testcase_11 AC 242 ms
77,528 KB
testcase_12 AC 596 ms
77,404 KB
testcase_13 AC 174 ms
77,176 KB
testcase_14 AC 337 ms
77,408 KB
testcase_15 AC 76 ms
70,952 KB
testcase_16 AC 74 ms
71,500 KB
testcase_17 AC 74 ms
71,112 KB
testcase_18 AC 76 ms
71,408 KB
testcase_19 AC 75 ms
71,204 KB
testcase_20 AC 75 ms
71,284 KB
testcase_21 AC 76 ms
71,272 KB
testcase_22 AC 77 ms
71,288 KB
testcase_23 AC 76 ms
71,396 KB
testcase_24 AC 75 ms
71,268 KB
testcase_25 AC 76 ms
71,324 KB
testcase_26 AC 74 ms
71,288 KB
testcase_27 AC 74 ms
71,204 KB
testcase_28 AC 76 ms
71,244 KB
testcase_29 AC 74 ms
71,272 KB
testcase_30 AC 75 ms
71,196 KB
testcase_31 AC 75 ms
71,360 KB
testcase_32 AC 75 ms
71,200 KB
testcase_33 AC 74 ms
71,440 KB
testcase_34 AC 73 ms
71,220 KB
testcase_35 AC 75 ms
71,208 KB
testcase_36 AC 75 ms
71,412 KB
testcase_37 AC 75 ms
71,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())

#(1*3+2*2+4*1)(1*2+3)
#Σ(i P[i]^(e[i]-i+1))
mod = 10**9 + 7

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

print(ans)
0