Ruby Examples

This commit is contained in:
2026-01-15 14:01:21 +09:00
commit cf3d7d3296
76 changed files with 1191 additions and 0 deletions

13
level6/60.rb Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
문자열 압축 (aaabb → a3b2)
=end
str = "hello world"
puts str.chars
.chunk{|c| c.itself}
.map{|c,a| "#{c}#{a.size}"}.join