結果

問題 No.920 あかあお
ユーザー poi_kyopropoi_kyopro
提出日時 2019-11-08 21:31:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 453 bytes
コンパイル時間 5,924 ms
コンパイル使用メモリ 73,872 KB
実行使用メモリ 57,660 KB
最終ジャッジ日時 2023-10-24 11:16:25
合計ジャッジ時間 5,012 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
57,468 KB
testcase_01 AC 125 ms
57,600 KB
testcase_02 AC 122 ms
57,160 KB
testcase_03 AC 125 ms
57,448 KB
testcase_04 AC 125 ms
57,532 KB
testcase_05 AC 127 ms
57,568 KB
testcase_06 AC 126 ms
57,380 KB
testcase_07 AC 126 ms
57,636 KB
testcase_08 AC 127 ms
57,424 KB
testcase_09 AC 126 ms
57,648 KB
testcase_10 AC 125 ms
57,492 KB
testcase_11 AC 128 ms
57,468 KB
testcase_12 AC 126 ms
57,360 KB
testcase_13 AC 127 ms
57,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        int x = stdIn.nextInt();
        int y = stdIn.nextInt();
        int z = stdIn.nextInt();
        
        for(int i = z; i > 0; i--){
            if(x >= y){
                y++;
            }else{
                x++;
            }
        }
        
        System.out.println(Math.min(x, y));
    }
}
0