結果

問題 No.784 「,(カンマ)」
ユーザー daichi daichi
提出日時 2019-02-08 22:40:24
言語 Ruby
(3.1.1p18 )
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 125 bytes
コンパイル時間 33 ms
使用メモリ 13,976 KB
最終ジャッジ日時 2023-02-01 16:56:07
合計ジャッジ時間 1,998 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 72 ms
13,716 KB
testcase_01 AC 72 ms
13,840 KB
testcase_02 AC 71 ms
13,928 KB
testcase_03 AC 72 ms
13,732 KB
testcase_04 AC 72 ms
13,800 KB
testcase_05 AC 72 ms
13,964 KB
testcase_06 AC 72 ms
13,928 KB
testcase_07 AC 71 ms
13,976 KB
testcase_08 AC 72 ms
13,836 KB
testcase_09 AC 71 ms
13,888 KB
testcase_10 AC 72 ms
13,716 KB
testcase_11 AC 72 ms
13,872 KB
testcase_12 AC 71 ms
13,788 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

class Integer
  def jpy_comma
    self.to_s.gsub(/(\d)(?=(\d{3})+(?!\d))/, '\1,')
  end
end

a = gets.to_i

puts a.jpy_comma
0