結果
| 問題 |
No.246 質問と回答
|
| コンテスト | |
| ユーザー |
YOS G-spec
|
| 提出日時 | 2018-10-17 23:45:23 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 2,000 ms |
| コード長 | 343 bytes |
| コンパイル時間 | 870 ms |
| コンパイル使用メモリ | 107,808 KB |
| 実行使用メモリ | 42,544 KB |
| 平均クエリ数 | 30.90 |
| 最終ジャッジ日時 | 2024-07-16 20:19:05 |
| 合計ジャッジ時間 | 5,366 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
class Program{
static void Main(){
var numMin=1;
var numMax=1000000001;
for(;;){
int chkNum=(numMin+numMax)/2;
Console.WriteLine("? {0}",chkNum,numMin,numMax);
if(Console.ReadLine()=="1") numMin=chkNum; else numMax=chkNum;
if(numMin==numMax-1){
Console.WriteLine("! {0}",numMin);
break;
}
}
}
}
YOS G-spec