結果

問題 No.920 あかあお
ユーザー d07ki3bq1uzd07ki3bq1uz
提出日時 2019-12-08 22:03:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 576 bytes
コンパイル時間 4,337 ms
コンパイル使用メモリ 70,740 KB
実行使用メモリ 56,044 KB
最終ジャッジ日時 2023-08-30 07:22:13
合計ジャッジ時間 7,084 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,740 KB
testcase_01 AC 124 ms
55,636 KB
testcase_02 AC 124 ms
55,484 KB
testcase_03 AC 125 ms
55,880 KB
testcase_04 AC 123 ms
55,744 KB
testcase_05 AC 123 ms
55,588 KB
testcase_06 AC 123 ms
55,892 KB
testcase_07 AC 125 ms
55,944 KB
testcase_08 AC 124 ms
56,044 KB
testcase_09 AC 123 ms
55,892 KB
testcase_10 AC 125 ms
55,876 KB
testcase_11 AC 126 ms
55,952 KB
testcase_12 AC 123 ms
56,004 KB
testcase_13 AC 123 ms
55,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main{
    public static void main (String[] args) {
        
        Scanner s = new Scanner(System.in);
        int X =s.nextInt();
        int Y =s.nextInt();
        int Z =s.nextInt();
            int p = Math.max(X,Y);
            int q = Math.min(X,Y);
            int r = p-q;

                int m,n;
                if (r <= Z) {
                     m = r;
                     n = (Z-r)/2;
                }else{
                     m = Z;
                     n = 0;
                }
                System.out.println(q+m+n);
    }
}
0