結果

問題 No.123 カードシャッフル
ユーザー s0j1sans0j1san
提出日時 2018-01-08 03:00:40
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 502 ms
コンパイル使用メモリ 26,980 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-08-24 23:49:20
合計ジャッジ時間 4,217 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 OLE -
testcase_12 OLE -
testcase_13 OLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
	implicit none
	integer n,m
	integer i,dummy
	integer,allocatable,dimension(:)::a,b
	read(*,*)n,m
	allocate(a(m),b(n))
	read(*,*)a
	do i=1,n
		b(i)=i
	enddo
	do i=1,m
		dummy=b(a(i))
		b(2:a(i))=b(1:a(i)-1)
		b(1)=dummy
		write(*,*)b
	enddo
	write(*,*)dummy
end program main
0