結果

問題 No.1844 Divisors Sum Sum
ユーザー asumo0729asumo0729
提出日時 2022-02-18 21:58:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 548 ms / 3,000 ms
コード長 805 bytes
コンパイル時間 420 ms
コンパイル使用メモリ 86,744 KB
実行使用メモリ 99,576 KB
最終ジャッジ日時 2023-09-11 19:05:41
合計ジャッジ時間 12,501 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 521 ms
99,576 KB
testcase_01 AC 542 ms
99,240 KB
testcase_02 AC 542 ms
99,236 KB
testcase_03 AC 539 ms
99,284 KB
testcase_04 AC 542 ms
99,292 KB
testcase_05 AC 537 ms
99,304 KB
testcase_06 AC 548 ms
99,332 KB
testcase_07 AC 536 ms
99,388 KB
testcase_08 AC 545 ms
99,040 KB
testcase_09 AC 532 ms
99,232 KB
testcase_10 AC 518 ms
97,668 KB
testcase_11 AC 201 ms
81,708 KB
testcase_12 AC 406 ms
92,980 KB
testcase_13 AC 161 ms
79,740 KB
testcase_14 AC 261 ms
85,360 KB
testcase_15 AC 108 ms
72,556 KB
testcase_16 AC 105 ms
72,808 KB
testcase_17 AC 107 ms
72,608 KB
testcase_18 AC 105 ms
72,624 KB
testcase_19 AC 105 ms
72,284 KB
testcase_20 AC 104 ms
72,852 KB
testcase_21 AC 104 ms
72,348 KB
testcase_22 AC 104 ms
72,880 KB
testcase_23 AC 105 ms
72,552 KB
testcase_24 AC 106 ms
72,704 KB
testcase_25 AC 106 ms
72,540 KB
testcase_26 AC 106 ms
72,488 KB
testcase_27 AC 105 ms
72,492 KB
testcase_28 AC 103 ms
72,712 KB
testcase_29 AC 107 ms
72,304 KB
testcase_30 AC 103 ms
72,552 KB
testcase_31 AC 107 ms
72,608 KB
testcase_32 AC 104 ms
72,556 KB
testcase_33 AC 106 ms
72,512 KB
testcase_34 AC 107 ms
72,472 KB
testcase_35 AC 106 ms
72,656 KB
testcase_36 AC 106 ms
72,632 KB
testcase_37 AC 109 ms
72,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from operator import itemgetter
from collections import defaultdict, deque
import heapq
import bisect
import math
import itertools
import copy

stdin=sys.stdin
sys.setrecursionlimit(10 ** 8)

ip=lambda: int(sp())
fp=lambda: float(sp())
lp=lambda:list(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()
Yp=lambda:print('Yes')
Np=lambda:print('No')
inf = 1 << 60
inf = float('inf')
mod = 10 ** 9 + 7
#mod = 998244353
eps = 1e-9
sortkey1 = itemgetter(0)
sortkey2 = lambda x: (x[0], x[1])

###############################################################

L = ip()
primes = [lp() for _ in range(L)]
ans = 1
for p, e in primes:
    x = pow(p, e + 2, mod) - 1
    y = pow(p - 1, mod - 2, mod)
    res = (x * y - (e + 2)) * y
    res %= mod
    ans *= res
    ans %= mod

print(ans)
0