結果

問題 No.1020 Reverse
ユーザー gemmarogemmaro
提出日時 2020-04-21 21:48:34
言語 Elixir
(1.16.2)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 1,125 ms
コンパイル使用メモリ 57,708 KB
実行使用メモリ 52,020 KB
最終ジャッジ日時 2023-08-30 00:35:11
合計ジャッジ時間 14,220 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 615 ms
49,252 KB
testcase_01 AC 618 ms
49,820 KB
testcase_02 AC 612 ms
49,172 KB
testcase_03 WA -
testcase_04 AC 613 ms
49,992 KB
testcase_05 AC 612 ms
49,208 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 619 ms
49,964 KB
testcase_09 AC 623 ms
50,572 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 613 ms
50,020 KB
testcase_13 AC 622 ms
49,980 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 613 ms
52,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    [_, k] =
      IO.read(:line)
      |> String.trim()
      |> String.split()
      |> Enum.map(&String.to_integer/1)

    IO.read(:line)
    |> String.trim()
    |> solve(k)
    |> IO.puts()
  end

  def solve(s, k) do
    {a, b} = s |> String.split_at(k - 1)
    b <> a
  end
end
0