mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 12:46:53 +08:00
10 lines
156 B
Ruby
10 lines
156 B
Ruby
|
|
||
|
start = Time.now
|
||
|
N = 50000000; factors = []
|
||
|
for i in 1...N+1
|
||
|
if N % i == 0
|
||
|
factors.append(i)
|
||
|
end
|
||
|
end
|
||
|
puts "elapsed: " + (Time.now - start).to_s + ' s'
|