Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のコード:
def cube_root(x) a = x**(1/3.0) p = a.ceil puts p end gets.chomp.to_i.times do q = gets.chomp.to_i cube_root(q) end
input 2 8 1000
input
output 2.0 10.0
output
期待される出力 2.0000000000 10.0000000000