Skip to content

Commit c2fd975

Browse files
committed
problem 4
1 parent c54573e commit c2fd975

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

4.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
r = []
2+
999.downto(1) do |x|
3+
999.downto(1) do |y|
4+
s = (x * y).to_s
5+
r << s.to_i if s == s.reverse
6+
end
7+
end
8+
p r.sort[-1]
9+
10+

0 commit comments

Comments
 (0)