結果

問題 No.305 鍵(2)
ユーザー keymoonkeymoon
提出日時 2021-02-01 22:40:28
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,147 bytes
コンパイル時間 2,093 ms
コンパイル使用メモリ 104,840 KB
実行使用メモリ 39,888 KB
平均クエリ数 21.62
最終ジャッジ日時 2023-09-24 09:43:42
合計ジャッジ時間 6,436 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
39,420 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 75 ms
37,136 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using MethodImplAttribute = System.Runtime.CompilerServices.MethodImplAttribute;
using MethodImplOptions = System.Runtime.CompilerServices.MethodImplOptions;

public static class P
{
    public static void Main()
    {
        char[] res = "0000000000".ToArray();
        int Query()
        {
            Console.WriteLine(res);
            var s = Console.ReadLine().Split();
            if (s[1] == "unlocked") Environment.Exit(0);
            return int.Parse(s[0]);
        }
        var last = Query();
        for (int i = 0; i < 10; i++)
        {
            for (int j = 1; j < 10; j++)
            {
                res[i] = (char)('0' + j);
                var curRes = Query();
                if (curRes != last)
                {
                    if (curRes < last) res[i] = '0';
                    break;
                }
            }
        }
    }
}
0