結果

問題 No.227 簡単ポーカー
ユーザー jjjj
提出日時 2016-07-29 18:57:15
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 629 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 31,604 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 10:51:58
合計ジャッジ時間 692 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

  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
0