結果

問題 No.2314 Backflip
ユーザー rio-yuasario-yuasa
提出日時 2023-06-16 17:53:47
言語 Ruby
(3.3.0)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 531 ms
コンパイル使用メモリ 11,132 KB
実行使用メモリ 15,236 KB
最終ジャッジ日時 2023-09-06 15:49:03
合計ジャッジ時間 1,822 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,168 KB
testcase_01 AC 77 ms
15,144 KB
testcase_02 AC 76 ms
15,028 KB
testcase_03 AC 75 ms
15,048 KB
testcase_04 AC 76 ms
15,144 KB
testcase_05 AC 76 ms
15,028 KB
testcase_06 AC 75 ms
15,192 KB
testcase_07 AC 76 ms
15,236 KB
testcase_08 AC 76 ms
15,060 KB
testcase_09 AC 77 ms
15,236 KB
testcase_10 AC 77 ms
15,044 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# 入力された値を文字列で受け取る
input = gets.chomp

*a, b =  input.chars.map{ _1.to_i } 

if b == 0
    b = 1
elsif b == 1
    b = 0
end

puts a.join.to_s + b.to_s
0