Submission #1690366
Source Code Expand
require 'prime' bound = 10**9 gen = Prime::EratosthenesGenerator.new gen.next primes = 200.times.map{gen.next} 100.times{ prod = 1 ps = [] loop{ ps = 3.times.map{primes.sample}.sort prod = ps.zip([3,2,1]).map{|a|a.reduce(:**)}.reduce(:*) break if prod<=bound } prod **= 2 while prod**2<=bound prod *= ps[0] if prod*ps[0]<=bound while prod*2<=bound if prod*4>bound prod *= (prod*3<=bound) ? 3 : 2 else prod *= 2 end end p prod }
Submission Info
Submission Time | |
---|---|
Task | A - 約数をたくさんつくろう! |
User | refle |
Language | Ruby (2.3.3) |
Score | 5376 |
Code Size | 504 Byte |
Status | AC |
Exec Time | 32 ms |
Memory | 2428 KB |
Judge Result
Set Name | test_01 | ||
---|---|---|---|
Score / Max Score | 5376 / 100000 | ||
Status |
|
Set Name | Test Cases |
---|---|
test_01 | noinput.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
noinput.txt | AC | 32 ms | 2428 KB |