結果

問題 No.305 鍵(2)
ユーザー NoNo
提出日時 2017-05-25 19:16:27
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 1,060 bytes
コンパイル時間 4,075 ms
コンパイル使用メモリ 103,996 KB
実行使用メモリ 39,104 KB
平均クエリ数 51.08
最終ジャッジ日時 2023-09-24 01:17:11
合計ジャッジ時間 4,685 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
34,756 KB
testcase_01 AC 79 ms
39,104 KB
testcase_02 AC 80 ms
36,600 KB
testcase_03 AC 81 ms
36,860 KB
testcase_04 AC 79 ms
36,848 KB
testcase_05 AC 80 ms
36,768 KB
testcase_06 AC 81 ms
38,448 KB
testcase_07 AC 78 ms
36,844 KB
testcase_08 AC 82 ms
36,904 KB
testcase_09 AC 81 ms
34,216 KB
testcase_10 AC 78 ms
38,580 KB
testcase_11 AC 81 ms
36,252 KB
testcase_12 AC 84 ms
36,400 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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)
        {
            long a = 0;
            long 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