結果

問題 No.1020 Reverse
ユーザー 👑 tatt61880tatt61880
提出日時 2020-04-11 16:15:37
言語 Kuin
(KuinC++ v.2021.9.17)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 2,308 ms
コンパイル使用メモリ 157,204 KB
実行使用メモリ 6,660 KB
最終ジャッジ日時 2023-10-14 16:07:37
合計ジャッジ時間 3,163 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 1 ms
4,356 KB
testcase_04 WA -
testcase_05 AC 2 ms
4,352 KB
testcase_06 WA -
testcase_07 AC 5 ms
5,152 KB
testcase_08 WA -
testcase_09 AC 6 ms
5,440 KB
testcase_10 WA -
testcase_11 AC 7 ms
6,388 KB
testcase_12 WA -
testcase_13 AC 7 ms
6,472 KB
testcase_14 WA -
testcase_15 AC 7 ms
6,132 KB
testcase_16 WA -
testcase_17 AC 6 ms
5,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var ss: [][]char :: cui@input().split(" ")
	var n: int :: ss[0].toInt(&)
	var k: int :: ss[1].toInt(&)
	var s: []char :: cui@input()
	var ans: []char :: s.sub(k - 1, n - k + 1)
	do s :: s.sub(0, k - 1)
	if(k % 2 = 0)
		do s.reverse()
	end if
	do ans :~ s
	do cui@print("\{ans}\n")
end func
0