結果

問題 No.2008 Super Worker
ユーザー ShirotsumeShirotsume
提出日時 2022-07-17 02:52:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 439 ms / 2,000 ms
コード長 428 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 86,664 KB
実行使用メモリ 123,448 KB
最終ジャッジ日時 2023-09-11 13:38:31
合計ジャッジ時間 10,214 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,244 KB
testcase_01 AC 73 ms
71,164 KB
testcase_02 AC 72 ms
71,440 KB
testcase_03 AC 73 ms
71,328 KB
testcase_04 AC 73 ms
71,068 KB
testcase_05 AC 73 ms
71,012 KB
testcase_06 AC 74 ms
71,144 KB
testcase_07 AC 76 ms
71,172 KB
testcase_08 AC 73 ms
71,012 KB
testcase_09 AC 72 ms
71,244 KB
testcase_10 AC 75 ms
71,080 KB
testcase_11 AC 75 ms
71,020 KB
testcase_12 AC 71 ms
71,260 KB
testcase_13 AC 144 ms
76,844 KB
testcase_14 AC 83 ms
76,628 KB
testcase_15 AC 81 ms
76,680 KB
testcase_16 AC 83 ms
76,820 KB
testcase_17 AC 83 ms
76,612 KB
testcase_18 AC 83 ms
76,564 KB
testcase_19 AC 81 ms
75,528 KB
testcase_20 AC 84 ms
76,560 KB
testcase_21 AC 81 ms
76,756 KB
testcase_22 AC 78 ms
75,632 KB
testcase_23 AC 375 ms
110,260 KB
testcase_24 AC 397 ms
121,272 KB
testcase_25 AC 381 ms
110,392 KB
testcase_26 AC 372 ms
110,632 KB
testcase_27 AC 376 ms
110,276 KB
testcase_28 AC 417 ms
122,576 KB
testcase_29 AC 438 ms
122,976 KB
testcase_30 AC 428 ms
122,576 KB
testcase_31 AC 436 ms
122,984 KB
testcase_32 AC 434 ms
122,828 KB
testcase_33 AC 195 ms
122,452 KB
testcase_34 AC 439 ms
123,448 KB
testcase_35 AC 171 ms
108,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
INF = 2 ** 63 - 1
mod = 998244353
mod = 10 ** 9 + 7
n = ii()

a = li()
b = li()

AB = [(a[i], b[i]) for i in range(n)]

AB.sort(key = lambda x: (x[1] - 1) / x[0], reverse=True)
ans = 0
foo = 1
for a, b in AB:
    ans += foo * a
    ans %= mod
    foo *= b
    foo %= mod
print(ans)
0