結果

問題 No.920 あかあお
ユーザー iwa_choco_168iwa_choco_168
提出日時 2019-12-01 22:01:38
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 456 bytes
コンパイル時間 4,190 ms
コンパイル使用メモリ 72,012 KB
実行使用メモリ 57,444 KB
最終ジャッジ日時 2023-08-14 01:50:54
合計ジャッジ時間 5,361 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
55,732 KB
testcase_01 AC 94 ms
55,536 KB
testcase_02 AC 91 ms
55,580 KB
testcase_03 AC 92 ms
55,448 KB
testcase_04 AC 91 ms
55,644 KB
testcase_05 AC 91 ms
55,812 KB
testcase_06 WA -
testcase_07 AC 91 ms
55,652 KB
testcase_08 AC 94 ms
55,508 KB
testcase_09 AC 94 ms
56,148 KB
testcase_10 AC 93 ms
54,036 KB
testcase_11 AC 93 ms
55,812 KB
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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());
        
        //処理
        z -= Math.abs(x - y);
        int ans = Math.max(x, y) + z / 2;
        
        //出力
        System.out.println(ans);
    }
}
0