結果

問題 No.564 背の順
ユーザー BQZet
提出日時 2017-11-29 00:03:17
言語 Fortran
(gFortran 14.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 421 bytes
コンパイル時間 1,393 ms
コンパイル使用メモリ 32,640 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-27 13:23:39
合計ジャッジ時間 709 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

program program1
integer,allocatable,dimension(:)::tall
integer::mytall,n,rank,rank1

read(*,*)mytall,n
allocate(tall(n-1))
read(*,*)tall(:)

rank=count(mytall<tall(:))+1
rank1=mod(rank,10)

if(rank1==1) then
 write(*,'(i0,A)')rank,'st'
else if(rank1==2) then
 write(*,'(i0,A)')rank,'nd'
else if(rank1==3) then
 write(*,'(i0,A)')rank,'rd'
else
 write(*,'(i0,A)')rank,'th'
end if

end program program1
0