結果

問題 No.784 「,(カンマ)」
ユーザー gemmarogemmaro
提出日時 2019-10-17 21:32:22
言語 Ruby
(3.2.2)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 148 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 11,524 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-09-07 07:20:00
合計ジャッジ時間 2,354 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,068 KB
testcase_01 AC 82 ms
15,048 KB
testcase_02 AC 82 ms
15,144 KB
testcase_03 AC 81 ms
15,304 KB
testcase_04 AC 80 ms
15,284 KB
testcase_05 AC 88 ms
15,164 KB
testcase_06 AC 83 ms
15,352 KB
testcase_07 AC 83 ms
15,032 KB
testcase_08 AC 83 ms
15,228 KB
testcase_09 AC 82 ms
15,212 KB
testcase_10 AC 82 ms
15,284 KB
testcase_11 AC 82 ms
15,132 KB
testcase_12 AC 82 ms
15,140 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp.chars.reverse
result = []
n.each_slice(3) {|arr|
    result << arr.reverse << ','
}
puts result.reverse.join("").reverse.chop.reverse
0