結果
問題 | No.920 あかあお |
ユーザー |
![]() |
提出日時 | 2019-11-08 22:01:04 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 53 ms / 2,000 ms |
コード長 | 548 bytes |
コンパイル時間 | 3,467 ms |
コンパイル使用メモリ | 74,080 KB |
実行使用メモリ | 50,248 KB |
最終ジャッジ日時 | 2024-09-23 03:40:56 |
合計ジャッジ時間 | 4,766 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int x = Integer.parseInt(sa[0]); int y = Integer.parseInt(sa[1]); int z = Integer.parseInt(sa[2]); br.close(); if (x > y + z) { System.out.println(y + z); } else if (x + z < y) { System.out.println(x + z); } else { System.out.println((x + y + z) / 2); } } }