結果

問題 No.123 カードシャッフル
ユーザー s0j1sans0j1san
提出日時 2018-01-08 03:01:02
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 20 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 1,047 ms
コンパイル使用メモリ 26,868 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-24 23:50:32
合計ジャッジ時間 2,146 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,384 KB
testcase_04 AC 1 ms
4,504 KB
testcase_05 AC 1 ms
4,384 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 1 ms
4,384 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 16 ms
4,380 KB
testcase_11 AC 20 ms
4,380 KB
testcase_12 AC 20 ms
4,380 KB
testcase_13 AC 20 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

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
	enddo
	write(*,*)dummy
end program main
0