結果
問題 |
No.2008 Super Worker
|
ユーザー |
|
提出日時 | 2022-07-16 01:37:24 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 240 bytes |
コンパイル時間 | 208 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 124,192 KB |
最終ジャッジ日時 | 2024-06-27 23:50:44 |
合計ジャッジ時間 | 5,612 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 TLE * 1 -- * 12 |
ソースコード
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 print(ans)