結果

問題 No.1020 Reverse
ユーザー gemmarogemmaro
提出日時 2020-04-21 22:04:16
言語 Elixir
(1.16.2)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 1,094 ms
コンパイル使用メモリ 54,768 KB
実行使用メモリ 74,640 KB
最終ジャッジ日時 2023-08-30 00:35:25
合計ジャッジ時間 13,728 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 607 ms
49,812 KB
testcase_01 AC 612 ms
49,424 KB
testcase_02 AC 605 ms
49,812 KB
testcase_03 WA -
testcase_04 AC 613 ms
49,056 KB
testcase_05 AC 608 ms
49,348 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 611 ms
64,432 KB
testcase_09 AC 615 ms
64,296 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 627 ms
66,516 KB
testcase_13 AC 628 ms
64,840 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 630 ms
62,928 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()
    |> String.to_charlist()
    |> solve(k)
    |> IO.puts()
  end

  def solve(s, k) do
    {a, b} = s |> Enum.split(k - 1)
    b |> Enum.concat(a)
  end
end
0