結果

問題 No.2008 Super Worker
ユーザー achapiachapi
提出日時 2022-07-16 01:37:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 417 ms / 2,000 ms
コード長 251 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 123,696 KB
最終ジャッジ日時 2023-09-10 08:23:45
合計ジャッジ時間 8,354 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,480 KB
testcase_01 AC 69 ms
71,340 KB
testcase_02 AC 70 ms
71,280 KB
testcase_03 AC 71 ms
71,480 KB
testcase_04 AC 72 ms
71,260 KB
testcase_05 AC 74 ms
71,360 KB
testcase_06 AC 69 ms
71,528 KB
testcase_07 AC 72 ms
71,356 KB
testcase_08 AC 72 ms
71,036 KB
testcase_09 AC 72 ms
71,032 KB
testcase_10 AC 71 ms
71,204 KB
testcase_11 AC 71 ms
71,204 KB
testcase_12 AC 70 ms
71,392 KB
testcase_13 AC 79 ms
76,600 KB
testcase_14 AC 79 ms
76,872 KB
testcase_15 AC 79 ms
76,688 KB
testcase_16 AC 79 ms
76,904 KB
testcase_17 AC 79 ms
76,732 KB
testcase_18 AC 80 ms
76,628 KB
testcase_19 AC 78 ms
75,612 KB
testcase_20 AC 80 ms
76,512 KB
testcase_21 AC 80 ms
76,872 KB
testcase_22 AC 76 ms
75,688 KB
testcase_23 AC 369 ms
110,660 KB
testcase_24 AC 362 ms
110,452 KB
testcase_25 AC 361 ms
110,452 KB
testcase_26 AC 359 ms
110,524 KB
testcase_27 AC 358 ms
110,412 KB
testcase_28 AC 415 ms
123,116 KB
testcase_29 AC 416 ms
123,132 KB
testcase_30 AC 417 ms
123,012 KB
testcase_31 AC 414 ms
122,932 KB
testcase_32 AC 415 ms
122,892 KB
testcase_33 AC 180 ms
122,660 KB
testcase_34 AC 413 ms
123,696 KB
testcase_35 AC 154 ms
108,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
s=[(a[i],b[i])for i in range(n)]
s.sort(lambda x:(x[1]-1)/x[0], reverse=True)
x=1
ans=0
mod=10**9+7
for a,b in s:
    ans+=a*x
    ans%=mod
    x*=b
    x%=mod
print(ans)
0