結果
問題 | No.227 簡単ポーカー |
ユーザー |
![]() |
提出日時 | 2020-01-10 00:33:17 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 554 bytes |
コンパイル時間 | 15,443 ms |
コンパイル使用メモリ | 241,960 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-23 05:10:14 |
合計ジャッジ時間 | 14,522 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
package main import "fmt" // https://yukicoder.me/problems/no/227 // 簡単ポーカー func main() { set := make(map[int]int, 0) for i := 0; i < 5; i++ { var v int fmt.Scan(&v) set[v]++ } var pair, trio int for _, v := range set { if v == 2 { pair++ } else if v == 3 { trio++ } } if trio == 1 && pair == 1 { fmt.Println("FULL HOUSE") } else if trio == 1 { fmt.Println("THREE CARD") } else if pair == 2 { fmt.Println("TWO PAIR") } else if pair == 1 { fmt.Println("ONE PAIR") } else { fmt.Println("NO HAND") } }