結果
| 問題 |
No.2314 Backflip
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2024-11-07 05:53:50 |
| 言語 | Elixir (1.18.1) |
| 結果 |
AC
|
| 実行時間 | 558 ms / 2,000 ms |
| コード長 | 398 bytes |
| コンパイル時間 | 2,053 ms |
| コンパイル使用メモリ | 61,356 KB |
| 実行使用メモリ | 54,212 KB |
| 最終ジャッジ日時 | 2024-11-07 05:54:01 |
| 合計ジャッジ時間 | 9,656 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 |
ソースコード
defmodule Main do
def input, do: IO.read(:line) |> String.trim
def ii, do: input() |> String.to_integer
def li, do: input() |> String.split |> Enum.map(&String.to_integer/1)
def yn(b), do: IO.puts(if b, do: "Yes", else: "No")
def main do
s = input()
c = String.at(s, -1)
t = String.slice(s, 0..-2//1)
ans = t <> if c == "0", do: "1", else: "0"
IO.puts ans
end
end
norioc