結果

問題 No.40 多項式の割り算
ユーザー jjjj
提出日時 2017-01-29 02:25:46
言語 Fortran
(gFortran 14.2.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 515 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 33,024 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 22:39:36
合計ジャッジ時間 1,571 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.f90:23:30:

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

ソースコード

diff #

program main
  implicit none
  integer*8::DA,DB
  integer*8,allocatable::a(:)
  integer::i
  read *,DA
  allocate(a(0:DA))
  read *,a

  do i=DA, 3, -1
     a(i-2) = a(i-2) + a(i)
  end do

  do i=2, 0, -1
     if(a(i).ne.0) exit
  end do
  print '(i0)',MAX(i,0)
  call aprinter(a(0:MAX(i,0)))
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