結果
| 問題 |
No.236 鴛鴦茶
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 18:42:19 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 359 bytes |
| コンパイル時間 | 175 ms |
| コンパイル使用メモリ | 82,384 KB |
| 実行使用メモリ | 53,664 KB |
| 最終ジャッジ日時 | 2025-03-20 18:42:29 |
| 合計ジャッジ時間 | 1,887 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
A, B, X, Y = map(int, input().split())
if X * B <= Y * A:
max_volume = (X * (A + B)) / A
else:
max_volume = (Y * (A + B)) / B
# Format the output to handle decimal precision and trailing zeros
formatted = "{0:.12f}".format(max_volume).rstrip('0').rstrip('.') if '.' in "{0:.12f}".format(max_volume) else "{0:.0f}".format(max_volume)
print(formatted)
lam6er