結果
| 問題 |
No.785 色食い虫
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-12 14:06:08 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 796 bytes |
| コンパイル時間 | 2,388 ms |
| コンパイル使用メモリ | 112,324 KB |
| 実行使用メモリ | 29,140 KB |
| 最終ジャッジ日時 | 2024-09-13 09:38:43 |
| 合計ジャッジ時間 | 3,020 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 15 WA * 13 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}