結果

問題 No.1844 Divisors Sum Sum
ユーザー chineristACchineristAC
提出日時 2022-02-18 22:25:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 481 ms / 3,000 ms
コード長 542 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 81,292 KB
最終ジャッジ日時 2023-09-11 19:31:36
合計ジャッジ時間 11,546 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 461 ms
81,020 KB
testcase_01 AC 477 ms
81,120 KB
testcase_02 AC 481 ms
81,272 KB
testcase_03 AC 476 ms
80,792 KB
testcase_04 AC 476 ms
81,084 KB
testcase_05 AC 474 ms
81,064 KB
testcase_06 AC 474 ms
81,244 KB
testcase_07 AC 476 ms
81,240 KB
testcase_08 AC 477 ms
81,240 KB
testcase_09 AC 477 ms
81,228 KB
testcase_10 AC 446 ms
80,796 KB
testcase_11 AC 199 ms
81,292 KB
testcase_12 AC 375 ms
81,232 KB
testcase_13 AC 166 ms
81,228 KB
testcase_14 AC 245 ms
81,088 KB
testcase_15 AC 115 ms
74,820 KB
testcase_16 AC 114 ms
74,780 KB
testcase_17 AC 116 ms
74,508 KB
testcase_18 AC 115 ms
74,824 KB
testcase_19 AC 115 ms
74,760 KB
testcase_20 AC 114 ms
74,308 KB
testcase_21 AC 115 ms
74,512 KB
testcase_22 AC 114 ms
74,868 KB
testcase_23 AC 115 ms
74,636 KB
testcase_24 AC 115 ms
74,700 KB
testcase_25 AC 115 ms
74,860 KB
testcase_26 AC 113 ms
74,700 KB
testcase_27 AC 119 ms
74,744 KB
testcase_28 AC 114 ms
74,684 KB
testcase_29 AC 114 ms
74,520 KB
testcase_30 AC 116 ms
74,944 KB
testcase_31 AC 114 ms
74,516 KB
testcase_32 AC 113 ms
74,664 KB
testcase_33 AC 114 ms
74,764 KB
testcase_34 AC 112 ms
74,896 KB
testcase_35 AC 115 ms
74,584 KB
testcase_36 AC 113 ms
74,516 KB
testcase_37 AC 114 ms
74,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import log,gcd

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

mod = 10**9 + 7

L = int(input())
res = 1
for _ in range(L):
    p,e = mi()

    ip = pow(p-1,mod-2,mod)
    res *= ip * (((p*(pow(p,e+1,mod)-1)%mod)*ip % mod)-(e+1)) % mod
    #print(ip * (((p*(pow(p,e+1,mod)-1)%mod)*ip % mod)-(e+1)))
    res %= mod

print(res)
0