結果
問題 |
No.246 質問と回答
|
ユーザー |
|
提出日時 | 2017-05-25 15:24:04 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 328 bytes |
コンパイル時間 | 616 ms |
コンパイル使用メモリ | 98,916 KB |
実行使用メモリ | 25,856 KB |
平均クエリ数 | 30.07 |
最終ジャッジ日時 | 2024-06-12 19:24:01 |
合計ジャッジ時間 | 3,338 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 30 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string; const maxR = 10 ^^ 9; void main() { auto r = iota!int(1, maxR+2).assumeSorted!isLow.upperBound(0); writeln("! ", r.front); stdout.flush(); } bool isLow(int _, int x) { writeln("? ", x); stdout.flush(); auto r = readln.chomp.to!int; return r == 1; }