結果
問題 |
No.227 簡単ポーカー
|
ユーザー |
|
提出日時 | 2024-09-20 11:18:50 |
言語 | Scala(Beta) (3.6.2) |
結果 |
AC
|
実行時間 | 902 ms / 5,000 ms |
コード長 | 485 bytes |
コンパイル時間 | 12,810 ms |
コンパイル使用メモリ | 268,388 KB |
実行使用メモリ | 63,664 KB |
最終ジャッジ日時 | 2024-09-20 11:19:18 |
合計ジャッジ時間 | 22,603 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
import scala.io.StdIn.readLine import scala.util.chaining._ @main def yuki227(): Unit = val f = (hand: List[Int]) => hand match case 3 :: 2 :: _ => "FULL HOUSE" case 3 :: _ => "THREE CARD" case 2 :: 2 :: _ => "TWO PAIR" case 2 :: _ => "ONE PAIR" case _ => "NO HAND" readLine .split("\\s+") .toList .groupBy(identity) .mapValues(_.size) .values .toList .sorted(Ordering[Int].reverse) .pipe(f) .pipe(println)