結果

問題 No.514 宝探し3
ユーザー jp_ste
提出日時 2017-05-16 21:47:21
言語 Java
(openjdk 23)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 552 bytes
コンパイル時間 2,304 ms
コンパイル使用メモリ 76,068 KB
実行使用メモリ 71,736 KB
平均クエリ数 2.92
最終ジャッジ日時 2024-07-16 13:45:34
合計ジャッジ時間 5,005 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

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