結果

問題 No.513 宝探し2
ユーザー takeya_okinotakeya_okino
提出日時 2019-08-05 22:17:01
言語 Java19
(openjdk 21)
結果
AC  
実行時間 175 ms / 2,000 ms
コード長 506 bytes
コンパイル時間 4,229 ms
コンパイル使用メモリ 84,984 KB
実行使用メモリ 74,700 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-24 02:18:36
合計ジャッジ時間 6,036 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 175 ms
73,112 KB
testcase_01 AC 174 ms
72,556 KB
testcase_02 AC 168 ms
72,968 KB
testcase_03 AC 170 ms
73,008 KB
testcase_04 AC 169 ms
74,700 KB
testcase_05 AC 170 ms
70,184 KB
testcase_06 AC 174 ms
70,812 KB
testcase_07 AC 169 ms
72,780 KB
testcase_08 AC 145 ms
70,964 KB
testcase_09 AC 171 ms
72,832 KB
testcase_10 AC 172 ms
72,844 KB
testcase_11 AC 148 ms
71,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.println(0 + " " + 0);
    System.out.flush();
    int ret1 = sc.nextInt();
    if(ret1 == 0) System.exit(0);
    System.out.println(0 + " " + 100000);
    System.out.flush();
    int ret2 = sc.nextInt();
    if(ret2 == 0) System.exit(0);
    int x = (ret1 + ret2 - 100000) / 2;
    int y = ret1 - x;
    System.out.println(x + " " + y);
    System.out.flush();
  }
}
0