結果

問題 No.3011 あ、俺こいつの役やりたい!
ユーザー InTheBloom
提出日時 2025-01-31 17:39:54
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 5,085 ms
コンパイル使用メモリ 159,152 KB
実行使用メモリ 26,216 KB
平均クエリ数 12.45
最終ジャッジ日時 2025-01-31 17:40:04
合計ジャッジ時間 9,394 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

import std;

void main () {
    int p = 10 ^^ 9;
    while (true) {
        writeln(p);
        stdout.flush;
        int r = readln.chomp.to!int;
        if (r == 1) break;

        p /= 2;
    }
}

void read (T...) (string S, ref T args) {
    import std.conv : to;
    import std.array : split;
    auto buf = S.split;
    foreach (i, ref arg; args) {
        arg = buf[i].to!(typeof(arg));
    }
}
0