結果

問題 No.784 「,(カンマ)」
ユーザー betrue12betrue12
提出日時 2019-02-08 21:41:08
言語 Ruby
(3.1.1p18 )
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 122 bytes
コンパイル時間 105 ms
使用メモリ 13,972 KB
最終ジャッジ日時 2023-01-28 14:58:55
合計ジャッジ時間 2,048 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 69 ms
13,808 KB
testcase_01 AC 70 ms
13,964 KB
testcase_02 AC 68 ms
13,848 KB
testcase_03 AC 68 ms
13,848 KB
testcase_04 AC 69 ms
13,808 KB
testcase_05 AC 69 ms
13,972 KB
testcase_06 AC 69 ms
13,856 KB
testcase_07 AC 69 ms
13,832 KB
testcase_08 AC 69 ms
13,808 KB
testcase_09 AC 68 ms
13,964 KB
testcase_10 AC 67 ms
13,956 KB
testcase_11 AC 68 ms
13,804 KB
testcase_12 AC 68 ms
13,948 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.chomp
ans = ""
N.length.times do |i|
    ans << "," if i > 0 && i% 3 == 0
    ans << N[-i-1]
end
puts ans.reverse
0