結果
問題 |
No.1230 Hall_and_me
|
ユーザー |
![]() |
提出日時 | 2021-03-17 13:56:51 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 140 ms / 2,000 ms |
コード長 | 426 bytes |
コンパイル時間 | 2,846 ms |
コンパイル使用メモリ | 84,108 KB |
実行使用メモリ | 54,376 KB |
最終ジャッジ日時 | 2024-11-14 17:04:41 |
合計ジャッジ時間 | 8,745 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 36 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double total = 0; double[] rates = new double[3]; for (int i = 0; i < 3; i++) { rates[i] = sc.nextInt(); total += rates[i]; } Arrays.sort(rates); System.out.println(Math.max(1 - rates[0] / total, rates[2] / total)); } }