結果

問題 No.514 宝探し3
ユーザー jp_stejp_ste
提出日時 2017-05-16 21:47:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 190 ms / 2,000 ms
コード長 552 bytes
コンパイル時間 2,303 ms
コンパイル使用メモリ 73,968 KB
実行使用メモリ 73,448 KB
平均クエリ数 2.92
最終ジャッジ日時 2023-09-23 14:06:31
合計ジャッジ時間 5,323 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 183 ms
72,900 KB
testcase_01 AC 189 ms
72,916 KB
testcase_02 AC 182 ms
72,388 KB
testcase_03 AC 178 ms
71,104 KB
testcase_04 AC 179 ms
72,544 KB
testcase_05 AC 177 ms
73,448 KB
testcase_06 AC 174 ms
71,020 KB
testcase_07 AC 190 ms
72,960 KB
testcase_08 AC 146 ms
72,160 KB
testcase_09 AC 186 ms
72,736 KB
testcase_10 AC 180 ms
72,444 KB
testcase_11 AC 161 ms
71,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        System.out.println(0 + " " + 0);
        int d1 = scan.nextInt();
        if(d1 == 0) {
            System.out.println(0 + " " + 0);
            return;
        }
        System.out.println(0 + " " + d1);
        int d2 = scan.nextInt();
        if(d2 == 0) {
            System.out.println(0 + " " + 0);
            return;
        }
        System.out.println(d2/2 + " " + (d1-d2/2));
    }
}
0