結果
問題 |
No.505 カードの数式2
|
ユーザー |
![]() |
提出日時 | 2017-04-21 22:45:58 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 517 bytes |
コンパイル時間 | 596 ms |
コンパイル使用メモリ | 31,488 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 05:35:36 |
合計ジャッジ時間 | 3,268 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 8 RE * 11 |
コンパイルメッセージ
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::N,i integer::a(16),m data a/16*0/ read *,N read *,a(1:N) m = a(1) do i=2,N if(a(i).eq.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