結果

問題 No.355 数当てゲーム(2)
ユーザー AreTrashAreTrash
提出日時 2016-09-05 10:07:33
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 993 bytes
コンパイル時間 2,375 ms
コンパイル使用メモリ 109,740 KB
実行使用メモリ 42,208 KB
平均クエリ数 61.37
最終ジャッジ日時 2023-09-23 11:28:53
合計ジャッジ時間 15,179 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
37,976 KB
testcase_01 WA -
testcase_02 AC 92 ms
37,884 KB
testcase_03 WA -
testcase_04 RE -
testcase_05 WA -
testcase_06 RE -
testcase_07 AC 92 ms
39,520 KB
testcase_08 AC 92 ms
38,372 KB
testcase_09 RE -
testcase_10 AC 93 ms
37,524 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 WA -
testcase_14 RE -
testcase_15 AC 93 ms
41,816 KB
testcase_16 AC 94 ms
39,624 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 WA -
testcase_21 WA -
testcase_22 RE -
testcase_23 AC 93 ms
39,600 KB
testcase_24 WA -
testcase_25 RE -
testcase_26 AC 93 ms
37,656 KB
testcase_27 AC 94 ms
38,132 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 RE -
testcase_31 RE -
testcase_32 WA -
testcase_33 WA -
testcase_34 RE -
testcase_35 RE -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 RE -
testcase_40 AC 91 ms
38,192 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 95 ms
37,988 KB
testcase_44 RE -
testcase_45 RE -
testcase_46 WA -
testcase_47 AC 93 ms
38,116 KB
testcase_48 WA -
testcase_49 AC 92 ms
38,156 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[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