結果
問題 |
No.227 簡単ポーカー
|
ユーザー |
|
提出日時 | 2017-01-25 13:34:49 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,246 bytes |
コンパイル時間 | 1,037 ms |
コンパイル使用メモリ | 111,876 KB |
実行使用メモリ | 26,696 KB |
最終ジャッジ日時 | 2024-12-23 08:23:14 |
合計ジャッジ時間 | 2,038 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 RE * 4 |
コンパイルメッセージ
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]]++; } while (true) { if (Array.IndexOf(card, 3) > 0) { if (Array.IndexOf(card, 2) > 0) { output = "FULL HOUSE"; break; } else { output = "THREE CARD"; break; } } if (Array.IndexOf(card, 2) > 0) { card[Array.IndexOf(card, 2)] = 0; if (Array.IndexOf(card, 2) > 0) { output = "TWO PAIR"; break; } else { output = "ONE PAIR"; break; } } break; } Console.WriteLine(output); Console.Read(); } }