結果
| 問題 |
No.2009 Drunkers' Contest
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2022-07-15 23:52:49 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 340 bytes |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 82,156 KB |
| 実行使用メモリ | 146,016 KB |
| 最終ジャッジ日時 | 2024-06-27 21:36:55 |
| 合計ジャッジ時間 | 8,791 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 17 WA * 37 |
ソースコード
from math import sqrt
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
S=[]
for i in range(N):
if bool(S) and S[-1][0]/S[-1][1]>A[i]/B[i]:
S[-1][0]+=A[i]
S[-1][1]+=B[i]
else:
S.append([A[i],B[i]])
T=0
for a,b in S:
x=max(sqrt(a/b)-1,0)
T+=a/(1+x)+b*(1+x)
print(T)
Kazun