結果
問題 |
No.505 カードの数式2
|
ユーザー |
![]() |
提出日時 | 2017-04-21 22:46:56 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 521 bytes |
コンパイル時間 | 107 ms |
コンパイル使用メモリ | 31,488 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 05:36:39 |
合計ジャッジ時間 | 971 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 10 |
コンパイルメッセージ
Main.f90:22:30: 22 | write(cformat(5:9),'(i0)'),size(array) | 1 Warning: Legacy Extension: Comma before i/o item list at (1)
ソースコード
program main implicit none integer*8::N,i integer*8::a(16),m data a/16*0/ read *,N read *,a(1:N) m = a(1) do i=2,N if(a(i).ne.0) then m = MAX(m*a(i),MAX(m-a(i),MAX(m+a(i),m/a(i)))) else m = MAX(m*a(i),MAX(m-a(i),m+a(i))) end if end do print '(i0)',m contains subroutine aprinter(array) integer::array(:) character*32::cformat='(i0, (1x,i0))' write(cformat(5:9),'(i0)'),size(array) write(*,cformat) array end subroutine aprinter end program main