結果

問題 No.920 あかあお
ユーザー 37zigen37zigen
提出日時 2020-01-23 03:37:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 381 bytes
コンパイル時間 2,109 ms
コンパイル使用メモリ 72,424 KB
実行使用メモリ 56,360 KB
最終ジャッジ日時 2023-09-25 07:19:49
合計ジャッジ時間 5,197 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,452 KB
testcase_01 AC 121 ms
56,044 KB
testcase_02 AC 122 ms
55,984 KB
testcase_03 AC 123 ms
55,892 KB
testcase_04 AC 120 ms
55,760 KB
testcase_05 AC 120 ms
55,648 KB
testcase_06 AC 123 ms
55,976 KB
testcase_07 AC 121 ms
56,160 KB
testcase_08 AC 120 ms
56,280 KB
testcase_09 AC 120 ms
55,864 KB
testcase_10 AC 123 ms
56,152 KB
testcase_11 AC 123 ms
56,360 KB
testcase_12 AC 121 ms
55,904 KB
testcase_13 AC 122 ms
56,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;

class Main{
	public static void main(String[] args){
		new Main().run();
	}
	
	void run(){
		Scanner sc=new Scanner(System.in);
		int ans=0;
		int[] a=new int[3];
		for(int i=0;i<3;++i)a[i]=sc.nextInt();
		for(int i=0;i<=a[2];++i){
			int X=a[0]+i;
			int Y=a[1]+a[2]-i;
			ans=Math.max(ans,Math.min(X,Y));
		}
		System.out.println(ans);
	}
}
0