結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー jj
提出日時 2016-07-26 23:53:50
言語 Fortran
(gFortran 14.2.0)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 1,341 ms
コンパイル使用メモリ 31,872 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-06 17:11:22
合計ジャッジ時間 1,418 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 18 WA * 2 RE * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.f90:9:28:

    9 |   write(cformat(4:8),'(i5)'),N-1
      |                            1
Warning: Legacy Extension: Comma before i/o item list at (1)

ソースコード

diff #

  implicit none
  integer::N,i
  character,allocatable::L(:)
  integer::total(6),max,indx
  character*16::cformat='(a,     (1x,a))'
  data total/6*0/
  read *,N
  allocate(L(N-1))
  write(cformat(4:8),'(i5)'),N-1
  read cformat,L

  do i=1,N-1
     indx = ICHAR(L(i))-ICHAR('0')
     total(indx) = total(indx) + 1
  end do
  max = MAXVAL(total)
  do i=6,1,-1
     if(max.eq.total(i)) then
        print '(i0)', i
        return
     end if
  end do
end program
0