結果
問題 |
No.2008 Super Worker
|
ユーザー |
👑 ![]() |
提出日時 | 2022-04-27 02:26:57 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 363 ms / 2,000 ms |
コード長 | 304 bytes |
コンパイル時間 | 511 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 113,860 KB |
最終ジャッジ日時 | 2024-06-28 07:35:32 |
合計ジャッジ時間 | 6,962 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
import sys input=sys.stdin.readline N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) I=sorted(range(N),key=lambda i:(B[i]-1)/A[i], reverse=True) Ans=0; Mod=10**9+7 Level=1; for i in I: Ans+=A[i]*Level; Ans%=Mod Level*=B[i]; Level%=Mod print(Ans)