結果
問題 |
No.2008 Super Worker
|
ユーザー |
|
提出日時 | 2022-07-16 01:37:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 393 ms / 2,000 ms |
コード長 | 251 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 81,820 KB |
実行使用メモリ | 124,564 KB |
最終ジャッジ日時 | 2024-06-27 23:51:16 |
合計ジャッジ時間 | 6,672 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
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)