結果

問題 No.1020 Reverse
ユーザー kotatsugamekotatsugame
提出日時 2020-04-10 21:27:06
言語 Ruby
(3.3.0)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 74 bytes
コンパイル時間 591 ms
コンパイル使用メモリ 11,372 KB
実行使用メモリ 16,232 KB
最終ジャッジ日時 2023-10-13 23:12:42
合計ジャッジ時間 2,733 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
15,196 KB
testcase_01 AC 77 ms
15,176 KB
testcase_02 AC 75 ms
15,256 KB
testcase_03 AC 75 ms
15,060 KB
testcase_04 AC 77 ms
15,180 KB
testcase_05 AC 78 ms
15,256 KB
testcase_06 AC 75 ms
15,268 KB
testcase_07 AC 77 ms
15,744 KB
testcase_08 AC 79 ms
15,688 KB
testcase_09 AC 79 ms
15,656 KB
testcase_10 AC 80 ms
15,852 KB
testcase_11 AC 80 ms
15,864 KB
testcase_12 AC 77 ms
15,780 KB
testcase_13 AC 83 ms
15,908 KB
testcase_14 AC 79 ms
15,780 KB
testcase_15 AC 80 ms
16,232 KB
testcase_16 AC 79 ms
16,036 KB
testcase_17 AC 80 ms
15,636 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,k,s=`dd`.split
t=s[0,k=k.to_i-1]
puts s[k..].+1>(n.to_i-k)%2?t:t.reverse
0