結果

問題 No.305 鍵(2)
ユーザー jj
提出日時 2016-09-10 22:38:43
言語 Fortran
(gFortran 14.2.0)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 558 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 31,232 KB
実行使用メモリ 25,220 KB
平均クエリ数 86.69
最終ジャッジ日時 2024-07-17 00:24:55
合計ジャッジ時間 1,685 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
  implicit none
  integer::N,query(10),passwd(10),i,j,num
  data query/10*0/

  do i=1,10
     num = 0
     do j=0,9
        query(i) = j
        call print_query(query)
        read *,N
        if(N.eq.10) return
        if(N.gt.num) then
           num = N
           passwd(i) = j
        end if
     end do
     query(i) = passwd(i)
  end do
contains
  subroutine print_query(query)
    integer::query(10),i
    do i=1,10
       write (*,'(i0)',advance='no') query(i)
    end do
    write (*,*)
  end subroutine print_query
end program main
0