結果

問題 No.227 簡単ポーカー
ユーザー te-sh
提出日時 2016-09-16 16:50:08
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 616 bytes
コンパイル時間 780 ms
コンパイル使用メモリ 119,120 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 04:29:56
合計ジャッジ時間 1,491 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm, std.array, std.container, std.range, std.bitmanip;
import std.numeric, std.math, std.bigint, std.random, core.bitop;
import std.string, std.regex, std.conv, std.stdio, std.typecons;

void main()
{
  auto ai = readln.split.map!(to!int).map!("a - 1");

  auto p = iota(13).count!(a => ai.count!(b => b == a) == 2);
  auto t = iota(13).count!(a => ai.count!(b => b == a) == 3);

  if (p == 1 && t == 1)
    writeln("FULL HOUSE");
  else if (t == 1)
    writeln("THREE CARD");
  else if (p == 2)
    writeln("TWO PAIR");
  else if (p == 1)
    writeln("ONE PAIR");
  else
    writeln("NO HAND");
}
0