結果
問題 | No.227 簡単ポーカー |
ユーザー |
|
提出日時 | 2018-08-25 15:17:47 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 5,000 ms |
コード長 | 801 bytes |
コンパイル時間 | 840 ms |
コンパイル使用メモリ | 111,756 KB |
実行使用メモリ | 26,012 KB |
最終ジャッジ日時 | 2024-06-26 04:00:04 |
合計ジャッジ時間 | 1,941 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; class Program{ static void Main(string[]args){ string[]t=Console.ReadLine().Split(' '); int[]A=new int[t.Length]; for(int i=0;i<t.Length;i++){ A[i]=int.Parse(t[i]); } int count=0; for(int i=0;i<A.Length-1;i++){ for(int j=i+1;j<A.Length;j++){ if(A[i]==A[j]){ count++; } } } if(count==4){ Console.WriteLine("FULL HOUSE"); }else if(count==3){ Console.WriteLine("THREE CARD"); }else if(count==2){ Console.WriteLine("TWO PAIR"); } else if(count==1){ Console.WriteLine("ONE PAIR"); }else{ Console.WriteLine("NO HAND"); } } }