結果

問題 No.920 あかあお
ユーザー fal_rndfal_rnd
提出日時 2019-11-21 23:59:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 2,144 ms
コンパイル使用メモリ 73,976 KB
実行使用メモリ 41,600 KB
最終ジャッジ日時 2024-04-19 10:06:13
合計ジャッジ時間 4,379 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
41,408 KB
testcase_01 AC 102 ms
41,444 KB
testcase_02 AC 99 ms
41,348 KB
testcase_03 AC 112 ms
40,016 KB
testcase_04 AC 115 ms
41,084 KB
testcase_05 AC 112 ms
41,412 KB
testcase_06 AC 114 ms
40,044 KB
testcase_07 AC 112 ms
41,488 KB
testcase_08 AC 115 ms
41,356 KB
testcase_09 AC 106 ms
41,440 KB
testcase_10 AC 100 ms
40,020 KB
testcase_11 AC 112 ms
40,192 KB
testcase_12 AC 121 ms
41,600 KB
testcase_13 AC 108 ms
40,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main{
	public static void main(String[] $) {
		Scanner s=new Scanner(System.in);
		int x=s.nextInt(),y=s.nextInt(),z=s.nextInt();
		int r=Math.min(x,y),q=Math.max(x,y)-r;
		System.out.println(r+(q<=z?(q+z)/2:z));
	}
}
0