The Sol Programming Language!
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

13 行
311 B

execfile("tests/_lib.sol")
func blow_up_stack(n)
return if n > 0 then
1 + blow_up_stack(n - 1)
else
0
end
end
assert_eq(blow_up_stack(5), 5, "blow_up_stack 5 deep")
assert_eq(blow_up_stack(5000), 5000, "blow_up_stack 5000 deep")
assert_eq(blow_up_stack(5000000), 5000000, "blow_up_stack 5000000 deep")