結果

問題 No.785 色食い虫
ユーザー CroweaCrowea
提出日時 2019-02-12 14:06:08
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 796 bytes
コンパイル時間 5,605 ms
コンパイル使用メモリ 102,356 KB
実行使用メモリ 25,764 KB
最終ジャッジ日時 2023-10-11 10:53:43
合計ジャッジ時間 6,715 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 59 ms
21,560 KB
testcase_08 AC 59 ms
21,720 KB
testcase_09 AC 59 ms
21,572 KB
testcase_10 AC 59 ms
21,520 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 60 ms
23,552 KB
testcase_15 AC 58 ms
21,508 KB
testcase_16 AC 59 ms
21,712 KB
testcase_17 AC 59 ms
23,612 KB
testcase_18 AC 59 ms
21,660 KB
testcase_19 AC 58 ms
21,512 KB
testcase_20 AC 59 ms
23,704 KB
testcase_21 AC 58 ms
21,624 KB
testcase_22 AC 59 ms
21,548 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 60 ms
23,688 KB
testcase_27 AC 59 ms
21,640 KB
testcase_28 AC 60 ms
23,608 KB
testcase_29 AC 60 ms
21,576 KB
testcase_30 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.Generic;
using System.Linq;

public class Program
{

    public static void Main(string[] args)
    {
        var colors = new[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
                                    "A", "B", "C", "D", "E", "F" };

        var patterns = 1;
        var except = 0;
        string line;
        string[] lineStr;
        for (var i=0; i<3; i++)
        {
            line = Console.ReadLine();
            if (line != "NONE")
            {
                lineStr = line.Split(',');
                except = colors.Except(lineStr.ToArray()).Count();
                except = except * except;
                patterns *= except;
            }
        }
        Console.WriteLine(patterns == 0 ? 16777216 : patterns);
    }
}
0