結果
問題 | No.246 質問と回答 |
ユーザー |
|
提出日時 | 2016-04-01 21:34:00 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 1,473 ms |
コンパイル使用メモリ | 137,324 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 30.90 |
最終ジャッジ日時 | 2024-06-12 03:19:06 |
合計ジャッジ時間 | 4,556 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
import std.stdio; import std.string; import std.math; import std.conv; enum MAX = 10 ^^ 9; void main() { uint l = 1; uint u = MAX; while (l != u) { uint c = to!uint((0.5 * (u + l)).ceil); writef("? %s\n", c); stdout.flush; if ("1" == readln.strip) { l = c; continue; } u = c - 1; } writef("! %s\n", u); stdout.flush; }