結果
問題 |
No.785 色食い虫
|
ユーザー |
|
提出日時 | 2019-02-12 14:13:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 672 bytes |
コンパイル時間 | 863 ms |
コンパイル使用メモリ | 116,504 KB |
実行使用メモリ | 27,232 KB |
最終ジャッジ日時 | 2024-09-13 09:38:46 |
合計ジャッジ時間 | 2,660 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; public class Program { const int RED_GREEN_BLUE = 3; 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 remain = 0; var line = string.Empty; for (var i = 0; i < RED_GREEN_BLUE; i++) { line = Console.ReadLine(); remain = (line == "NONE") ? colors.Count() : colors.Except(line.Split(',').ToArray()).Count(); patterns *= remain * remain; } Console.WriteLine(patterns); } }