結果

問題 No.920 あかあお
ユーザー d-yoshd-yosh
提出日時 2019-12-09 08:25:13
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 499 bytes
コンパイル時間 2,046 ms
コンパイル使用メモリ 72,208 KB
実行使用メモリ 57,924 KB
最終ジャッジ日時 2023-09-02 13:11:22
合計ジャッジ時間 5,286 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,004 KB
testcase_01 AC 118 ms
55,608 KB
testcase_02 AC 116 ms
55,928 KB
testcase_03 AC 115 ms
55,780 KB
testcase_04 AC 115 ms
55,656 KB
testcase_05 AC 118 ms
55,452 KB
testcase_06 WA -
testcase_07 AC 118 ms
55,660 KB
testcase_08 AC 119 ms
56,028 KB
testcase_09 AC 117 ms
55,928 KB
testcase_10 AC 115 ms
55,904 KB
testcase_11 AC 116 ms
55,872 KB
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        int z = Integer.parseInt(sc.next());

        int res = 0;
        if(x < y) {
            res += x;
            res += (y - x + z) / 2;
        } else {
            res += y;
            res += (x - y + z) / 2;
        }

        System.out.println(res);
    }
}
0