結果
問題 |
No.505 カードの数式2
|
ユーザー |
![]() |
提出日時 | 2017-04-21 22:46:41 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 521 bytes |
コンパイル時間 | 1,642 ms |
コンパイル使用メモリ | 30,972 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-20 05:36:34 |
合計ジャッジ時間 | 2,614 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 7 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*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).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