結果
問題 |
No.227 簡単ポーカー
|
ユーザー |
|
提出日時 | 2017-01-25 13:38:57 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 963 bytes |
コンパイル時間 | 1,139 ms |
コンパイル使用メモリ | 111,292 KB |
実行使用メモリ | 27,136 KB |
最終ジャッジ日時 | 2024-12-23 08:23:22 |
合計ジャッジ時間 | 2,161 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 2 |
コンパイルメッセージ
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; using System.Collections.Generic; class Program { static void Main(string[] args) { int[] a = Console.ReadLine().Split().Select(b => int.Parse(b)).ToArray(); int[] card = new int[13]; string output = "NO HAND"; for (int i = 0; i < 5; i++) { card[a[i] - 1]++; } if (Array.IndexOf(card, 3) > 0) { if (Array.IndexOf(card, 2) > 0) { output = "FULL HOUSE"; } else { output = "THREE CARD"; } } if (Array.IndexOf(card, 2) > 0) { card[Array.IndexOf(card, 2)] = 0; if (Array.IndexOf(card, 2) > 0) { output = "TWO PAIR"; } else { output = "ONE PAIR"; } } Console.WriteLine(output); } }