結果
問題 | No.236 鴛鴦茶 |
ユーザー |
![]() |
提出日時 | 2025-03-20 20:30:40 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 245 ms |
コンパイル使用メモリ | 82,336 KB |
実行使用メモリ | 53,840 KB |
最終ジャッジ日時 | 2025-03-20 20:31:31 |
合計ジャッジ時間 | 2,003 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)