結果

問題 No.305 鍵(2)
ユーザー NoNo
提出日時 2017-05-25 19:11:11
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,058 bytes
コンパイル時間 4,219 ms
コンパイル使用メモリ 100,084 KB
実行使用メモリ 38,900 KB
平均クエリ数 48.69
最終ジャッジ日時 2023-09-23 14:09:11
合計ジャッジ時間 5,014 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
36,888 KB
testcase_01 AC 77 ms
38,656 KB
testcase_02 AC 77 ms
37,164 KB
testcase_03 AC 77 ms
35,076 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 74 ms
38,676 KB
testcase_07 AC 78 ms
34,432 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace Yuki
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 0;
            int k = 1;
            while (true)
            {
                int ff = 0;
                for (int i = 0; i <= 9; i++)
                {
                    Console.WriteLine((a + (i * k)).ToString("0000000000"));
                    int f = int.Parse(Console.ReadLine().Split()[0]);
                    if (f == 10) return;
                    if (i == 0)
                    {
                        ff = f;
                    }
                    else
                    {
                        if (ff < f)
                        {
                            a += (i * k);
                            k *= 10;
                            break;
                        }
                        if (ff > f)
                        {
                            k *= 10;
                            break;
                        }
                    }
                }
            }
        }
    }
}
0