結果
| 問題 | No.2314 Backflip |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2024-11-07 05:53:50 |
| 言語 | Elixir (1.19.5) |
| 結果 |
AC
|
| 実行時間 | 314 ms / 2,000 ms |
| コード長 | 398 bytes |
| 記録 | |
| コンパイル時間 | 1,818 ms |
| コンパイル使用メモリ | 75,620 KB |
| 実行使用メモリ | 63,476 KB |
| 最終ジャッジ日時 | 2026-05-07 14:44:29 |
| 合計ジャッジ時間 | 6,518 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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