結果

問題 No.1217 せしすせそ
ユーザー penqenpenqen
提出日時 2020-12-15 16:49:07
言語 Elixir
(1.16.2)
結果
AC  
実行時間 633 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 1,024 ms
コンパイル使用メモリ 55,004 KB
実行使用メモリ 49,948 KB
最終ジャッジ日時 2023-08-30 01:00:05
合計ジャッジ時間 10,815 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 619 ms
49,780 KB
testcase_01 AC 624 ms
49,256 KB
testcase_02 AC 629 ms
49,772 KB
testcase_03 AC 615 ms
49,800 KB
testcase_04 AC 630 ms
49,400 KB
testcase_05 AC 623 ms
49,280 KB
testcase_06 AC 626 ms
49,476 KB
testcase_07 AC 633 ms
49,848 KB
testcase_08 AC 626 ms
49,776 KB
testcase_09 AC 615 ms
49,320 KB
testcase_10 AC 605 ms
49,300 KB
testcase_11 AC 622 ms
49,272 KB
testcase_12 AC 611 ms
49,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    s = IO.read(:line) |> String.trim()

    solve(s) |> IO.puts
  end
  
  def solve(sd) do
    s = "abcdefghijklmnopqrstuvwxyz" |> String.codepoints()
    sd = sd |> String.codepoints()

    s
    |> Enum.with_index()
    |> Enum.find_value(fn {w, i} ->
      if w != Enum.at(sd, i), do: "#{w}to#{Enum.at(sd, i)}"
    end)
  end
end
0