結果

問題 No.24 数当てゲーム
ユーザー jjjj
提出日時 2016-07-31 21:05:45
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 672 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 32,372 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 13:26:48
合計ジャッジ時間 606 ms
ジャッジサーバーID
(参考情報)
judge5 / 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
権限があれば一括ダウンロードができます

ソースコード

diff #

  integer::N,i,j,ans
  integer,dimension(1:6)::A,B,C,D
  character*3,dimension(1:6)::R
  integer::memo(0:9)
  data memo/10*1/

  read *, N
  do i=1,N
     read *,A(i),B(i),C(i),D(i),R(i)
  end do

  do i=1,N

     if(R(i).eq."YES") then
        do j=0,9
           if(j.eq.A(i) .or. &
              j.eq.B(i) .or. &
              j.eq.C(i) .or. &
              j.eq.D(i) ) then
           else
              memo(j)=0
           end if
        end do
     else
        memo(A(i))=0
        memo(B(i))=0
        memo(C(i))=0
        memo(D(i))=0
     end if
  end do

  do i=0,9
     if(memo(i).eq.1) then
        ans=i
     end if
  end do

  print '(i0)',ans
end program
0