結果

問題 No.509 塗りつぶしツール
ユーザー jj
提出日時 2017-04-28 23:25:56
言語 Fortran
(gFortran 14.2.0)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 635 ms
コンパイル使用メモリ 31,360 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-13 18:34:56
合計ジャッジ時間 1,566 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.f90:16:30:

   16 |     write(cformat(5:9),'(i0)'),size(array)
      |                              1
Warning: Legacy Extension: Comma before i/o item list at (1)

ソースコード

diff #

program main
  implicit none
  character*10::N
  integer::i,sum
  integer::num(0:9)
  data num/1,0,0,0,1,0,1,0,2,1/,sum/0/
  read *,N
  do i=1, LEN_TRIM(N)
     sum = sum + num(ICHAR(N(i:i))-ICHAR('0'))
  end do
  print '(i0)', sum+2*LEN_TRIM(N)+1
contains
  subroutine aprinter(array)
    integer*8::array(:)
    character*32::cformat='(i0,     (1x,i0))'
    write(cformat(5:9),'(i0)'),size(array)
    write(*,cformat) array
  end subroutine aprinter
end program main
0