結果

問題 No.3011 あ、俺こいつの役やりたい!
ユーザー 鳩でもわかるC#
提出日時 2025-01-28 18:32:58
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 507 bytes
コンパイル時間 8,548 ms
コンパイル使用メモリ 171,728 KB
実行使用メモリ 46,848 KB
平均クエリ数 12.45
最終ジャッジ日時 2025-01-28 18:33:26
合計ジャッジ時間 15,391 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 44
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (130 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static string ReadLine()
    {
        return Console.ReadLine().Trim();
    }

    static void Main()
    {
        int x = (int)Math.Pow(10, 9);

        while (true)
        {
            Console.WriteLine(x);
            int r = int.Parse(ReadLine());
            if (r == 0)
                x /= 2;
            if (r == 1)
                break;
            if (r == -1)
                return;
        }
    }
}

0