結果
問題 | No.275 中央値を求めよ |
ユーザー |
![]() |
提出日時 | 2018-10-29 18:20:06 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 4 ms / 1,000 ms |
コード長 | 499 bytes |
コンパイル時間 | 1,051 ms |
コンパイル使用メモリ | 32,896 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-25 01:59:23 |
合計ジャッジ時間 | 2,637 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
program heikininteger(8) a,n,sreal(8) breal(8),allocatable :: x(:)read(*,*) nallocate (x(n))read(*,*) (x(m),m=1,n)call mat(x,n)if (mod(n,2)==1) thens=int(n/2)s=s+1write(*,*) x(s)elses=n/2b=(x(s)+x(s+1))/2write(*,*) bend ifend programsubroutine mat(x,n)integer(8) n,j,i,treal(8),dimension(n) ::xdo i=1,n-1do j=i+1,nif(x(i) > x(j))thent=x(i)x(i)=x(j)x(j)=tend ifend doend doend subroutine