結果
| 問題 |
No.784 「,(カンマ)」
|
| コンテスト | |
| ユーザー |
nononaga
|
| 提出日時 | 2020-09-12 16:15:38 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 81 ms / 2,000 ms |
| コード長 | 198 bytes |
| コンパイル時間 | 275 ms |
| コンパイル使用メモリ | 8,064 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2025-01-02 06:36:11 |
| 合計ジャッジ時間 | 2,163 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
Syntax OK
ソースコード
orignal=gets.chomp.split("")
str = ""
orignal.reverse.each_with_index do |c, index|
str += c
str += "," if ((index+1)%3==0)
end
str.reverse!
puts str[0] == "," ? str[1...str.size] : str
nononaga