結果
問題 | No.2008 Super Worker |
ユーザー |
![]() |
提出日時 | 2022-07-16 00:17:45 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 299 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 82,396 KB |
実行使用メモリ | 141,580 KB |
最終ジャッジ日時 | 2024-06-27 22:09:00 |
合計ジャッジ時間 | 5,508 ms |
ジャッジサーバーID (参考情報) |
judge4 / 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())) mod = 10**9+7 C = [] for i in range(N): tmp = (B[i]-1)/A[i] C.append([tmp,i]) C.sort() C.reverse() level = 1 ans = 0 for i,ii in C: ans+=level*A[ii] ans = ans%mod level*=B[ii] print(ans)