結果

問題 No.2008 Super Worker
ユーザー Kiri8128Kiri8128
提出日時 2021-08-21 16:18:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 440 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 130,136 KB
最終ジャッジ日時 2023-09-20 10:20:05
合計ジャッジ時間 9,843 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,316 KB
testcase_01 AC 69 ms
71,468 KB
testcase_02 AC 72 ms
71,520 KB
testcase_03 AC 71 ms
71,324 KB
testcase_04 AC 71 ms
71,164 KB
testcase_05 AC 72 ms
71,536 KB
testcase_06 AC 73 ms
71,164 KB
testcase_07 AC 72 ms
71,420 KB
testcase_08 AC 73 ms
71,540 KB
testcase_09 AC 72 ms
71,352 KB
testcase_10 AC 72 ms
71,164 KB
testcase_11 AC 71 ms
71,156 KB
testcase_12 AC 72 ms
71,312 KB
testcase_13 AC 84 ms
77,008 KB
testcase_14 AC 81 ms
77,116 KB
testcase_15 AC 82 ms
76,752 KB
testcase_16 AC 80 ms
76,880 KB
testcase_17 AC 81 ms
76,848 KB
testcase_18 AC 79 ms
76,700 KB
testcase_19 AC 73 ms
71,408 KB
testcase_20 AC 81 ms
76,824 KB
testcase_21 AC 80 ms
76,824 KB
testcase_22 AC 74 ms
71,436 KB
testcase_23 AC 359 ms
114,556 KB
testcase_24 AC 356 ms
114,484 KB
testcase_25 AC 357 ms
114,568 KB
testcase_26 AC 363 ms
114,748 KB
testcase_27 AC 361 ms
114,664 KB
testcase_28 AC 423 ms
129,900 KB
testcase_29 AC 433 ms
130,044 KB
testcase_30 AC 440 ms
130,136 KB
testcase_31 AC 431 ms
130,132 KB
testcase_32 AC 419 ms
129,912 KB
testcase_33 AC 181 ms
129,780 KB
testcase_34 AC 419 ms
130,100 KB
testcase_35 AC 154 ms
113,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P = 10 ** 9 + 7
N = int(input())
X = sorted([(int(a), int(b)) for a, b in zip(input().split(), input().split())], key = lambda x: -(x[1] - 1) / x[0])
ans = 0
l = 1
for a, b in X:
    ans = (ans + l * a) % P
    l = l * b % P
print(ans)
0