結果
問題 | No.227 簡単ポーカー |
ユーザー | swdamdr |
提出日時 | 2017-02-15 16:11:05 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 943 bytes |
コンパイル時間 | 3,937 ms |
コンパイル使用メモリ | 100,400 KB |
実行使用メモリ | 23,976 KB |
最終ジャッジ日時 | 2023-08-28 17:13:01 |
合計ジャッジ時間 | 3,885 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 61 ms
23,976 KB |
testcase_01 | AC | 60 ms
21,764 KB |
testcase_02 | AC | 61 ms
21,836 KB |
testcase_03 | AC | 61 ms
23,920 KB |
testcase_04 | AC | 61 ms
21,956 KB |
testcase_05 | AC | 61 ms
23,792 KB |
testcase_06 | AC | 61 ms
21,860 KB |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | AC | 61 ms
21,760 KB |
testcase_10 | AC | 60 ms
21,892 KB |
testcase_11 | AC | 61 ms
21,992 KB |
testcase_12 | RE | - |
testcase_13 | RE | - |
コンパイルメッセージ
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[] card = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; string ans = "NO HAND"; int[] ary = Console.ReadLine().Split().Select(int.Parse).ToArray(); for (int i = 0; i < ary.Length; i++) { card[ary[i]]++; } Array.Sort(card); if (card[12] == 3) { if (card[11] == 2) { ans = "FULL HOUSE"; } else { ans = "THREE CARD"; } } else if (card[12] == 2) { if (card[11] == 2) { ans = "TWO PAIR"; } else { ans = "ONE PAIR"; } } Console.WriteLine(ans); Console.Read(); } }