結果

問題 No.246 質問と回答
ユーザー mbanmban
提出日時 2017-01-04 02:57:47
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 680 bytes
コンパイル時間 2,011 ms
コンパイル使用メモリ 99,964 KB
実行使用メモリ 39,128 KB
平均クエリ数 30.97
最終ジャッジ日時 2023-09-23 20:21:01
合計ジャッジ時間 7,022 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
34,584 KB
testcase_01 AC 101 ms
36,408 KB
testcase_02 AC 102 ms
36,948 KB
testcase_03 AC 104 ms
38,380 KB
testcase_04 AC 102 ms
37,080 KB
testcase_05 AC 102 ms
38,724 KB
testcase_06 AC 102 ms
38,656 KB
testcase_07 AC 103 ms
36,288 KB
testcase_08 AC 102 ms
38,680 KB
testcase_09 AC 102 ms
34,936 KB
testcase_10 AC 102 ms
36,840 KB
testcase_11 AC 101 ms
38,648 KB
testcase_12 AC 103 ms
34,844 KB
testcase_13 AC 101 ms
38,912 KB
testcase_14 AC 103 ms
36,476 KB
testcase_15 AC 102 ms
39,128 KB
testcase_16 AC 101 ms
36,540 KB
testcase_17 AC 104 ms
36,244 KB
testcase_18 AC 101 ms
36,344 KB
testcase_19 AC 104 ms
38,648 KB
testcase_20 AC 103 ms
36,504 KB
testcase_21 AC 104 ms
37,044 KB
testcase_22 AC 103 ms
38,396 KB
testcase_23 AC 105 ms
36,904 KB
testcase_24 AC 103 ms
36,928 KB
testcase_25 AC 103 ms
36,504 KB
testcase_26 AC 103 ms
36,732 KB
testcase_27 AC 103 ms
36,432 KB
testcase_28 AC 101 ms
36,356 KB
testcase_29 AC 101 ms
36,812 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;


class Magatro
{
    static void Main()
    {
        int min = 1;
        int max = 1000000001;
        while (min < max)
        {
            int A = (min + max) / 2;
            Console.WriteLine("? {0}", A);
            int r = int.Parse(Console.ReadLine().Split(' ')[0]);
            if (r == 0)
            {
                max = A;
            }
            else
            {
                min = A + 1;
            }
        }
        Console.WriteLine("! {0}", min-1);
    }
}

0