結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 6 ms
5,532 KB
testcase_10 AC 8 ms
6,364 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 8 ms
6,480 KB
testcase_14 AC 7 ms
6,440 KB
testcase_15 WA -
testcase_16 AC 7 ms
6,356 KB
testcase_17 AC 7 ms
5,784 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(n % 2 = 1)
		do s.reverse()
	end if
	do ans :~ s
	do cui@print("\{ans}\n")
end func
0