結果

問題 No.355 数当てゲーム(2)
ユーザー AreTrashAreTrash
提出日時 2016-09-05 10:06:36
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,006 bytes
コンパイル時間 2,271 ms
コンパイル使用メモリ 105,908 KB
実行使用メモリ 40,036 KB
平均クエリ数 70.73
最終ジャッジ日時 2023-09-23 11:28:20
合計ジャッジ時間 13,487 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
38,096 KB
testcase_01 AC 93 ms
38,108 KB
testcase_02 AC 92 ms
39,520 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 93 ms
38,048 KB
testcase_06 RE -
testcase_07 AC 93 ms
38,188 KB
testcase_08 AC 92 ms
39,732 KB
testcase_09 RE -
testcase_10 AC 90 ms
37,592 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 93 ms
37,512 KB
testcase_14 RE -
testcase_15 AC 92 ms
37,620 KB
testcase_16 AC 92 ms
37,724 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 95 ms
40,036 KB
testcase_21 AC 92 ms
38,144 KB
testcase_22 RE -
testcase_23 AC 89 ms
38,116 KB
testcase_24 AC 93 ms
37,700 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 AC 92 ms
39,916 KB
testcase_28 AC 94 ms
37,924 KB
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 AC 93 ms
40,000 KB
testcase_33 AC 93 ms
35,976 KB
testcase_34 RE -
testcase_35 RE -
testcase_36 AC 87 ms
37,500 KB
testcase_37 AC 95 ms
37,760 KB
testcase_38 AC 94 ms
38,164 KB
testcase_39 RE -
testcase_40 AC 90 ms
38,100 KB
testcase_41 AC 95 ms
39,588 KB
testcase_42 AC 93 ms
37,568 KB
testcase_43 AC 93 ms
37,868 KB
testcase_44 RE -
testcase_45 RE -
testcase_46 AC 90 ms
39,832 KB
testcase_47 RE -
testcase_48 RE -
testcase_49 AC 92 ms
39,504 KB
testcase_50 RE -
testcase_51 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;

namespace No355{
    public class Program{
        public static void Main(string[] args){
            Func<string, int[]> output = s =>{
                if(s.Distinct().Count() != s.Length) return new [] {-1, -1};
                Console.WriteLine(string.Join(" ", s.ToCharArray()));
                return Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            };

            int[] res;
            for(var i = 1234;; i++){
                var x = output(i.ToString());
                if(x[0] == 4) return;
                if(x[0] == 0 && x[1] == 0){
                    res = i.ToString().Select(c => c - '0').ToArray();
                    break;
                }
            }

            for(var i = 0; i < 4; i++){
                for(var j = 0; j < 10; j++){
                    res[i] = j;
                    var x = output(string.Join("", res));
                    if(x[0] == i + 1) break;
                }
            }
        }
    }
}
0