結果
| 問題 | No.227 簡単ポーカー | 
| コンテスト | |
| ユーザー |  jj | 
| 提出日時 | 2016-07-29 18:57:15 | 
| 言語 | Fortran (gFortran 14.2.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 629 bytes | 
| コンパイル時間 | 194 ms | 
| コンパイル使用メモリ | 31,360 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-06 18:31:45 | 
| 合計ジャッジ時間 | 874 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 | 
ソースコード
  integer::A(5),i
  integer::card(13)
  integer::num(5)
  integer::three=0,two=0
  character*16::res
  data card/13*0/, num/5*0/
  read *,A
  do i=1,5
     card(A(i)) = card(A(i)) + 1
  end do
  do i=1,13
     if(card(i).eq.3) then
        three = three + 1
     else if(card(i).eq.2) then
        two  = two + 1
     end if
  end do
  if (three.eq.1) then
     if(two.eq.1 ) then
        res = 'FULL HOUSE'
     else
        res = 'THREE CARD'
     end if
  else if(two.eq.2) then
     res = 'TWO PAIR'
  else if(two.eq.1) then
     res = 'ONE PAIR'
  else
     res = 'NO HAND'
  end if
  print '(a)', TRIM(res)
end program
            
            
            
        