結果

問題 No.355 数当てゲーム(2)
ユーザー AreTrashAreTrash
提出日時 2016-09-05 10:09:31
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,064 bytes
コンパイル時間 2,344 ms
コンパイル使用メモリ 105,140 KB
実行使用メモリ 45,976 KB
平均クエリ数 13.12
最終ジャッジ日時 2023-09-23 11:29:10
合計ジャッジ時間 14,654 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
40,040 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 WA -
testcase_07 WA -
testcase_08 RE -
testcase_09 WA -
testcase_10 RE -
testcase_11 RE -
testcase_12 WA -
testcase_13 WA -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 93 ms
39,636 KB
testcase_18 AC 94 ms
39,956 KB
testcase_19 WA -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 92 ms
41,588 KB
testcase_24 WA -
testcase_25 AC 90 ms
38,164 KB
testcase_26 RE -
testcase_27 WA -
testcase_28 WA -
testcase_29 RE -
testcase_30 AC 92 ms
42,300 KB
testcase_31 WA -
testcase_32 AC 92 ms
42,192 KB
testcase_33 RE -
testcase_34 AC 96 ms
45,976 KB
testcase_35 RE -
testcase_36 RE -
testcase_37 AC 96 ms
41,676 KB
testcase_38 RE -
testcase_39 AC 96 ms
39,824 KB
testcase_40 AC 94 ms
42,316 KB
testcase_41 AC 94 ms
41,708 KB
testcase_42 RE -
testcase_43 AC 92 ms
39,992 KB
testcase_44 AC 98 ms
42,312 KB
testcase_45 WA -
testcase_46 RE -
testcase_47 WA -
testcase_48 AC 96 ms
41,884 KB
testcase_49 AC 96 ms
42,216 KB
testcase_50 WA -
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;
            var random = new Random();
            while(true){
                var i = random.Next(10000);
                var x = output(i.ToString());
                if(x[0] == 4) return;
                if(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