Skip to content

Instantly share code, notes, and snippets.

@yowasou
Created August 19, 2015 11:32
Show Gist options
  • Save yowasou/1954501b987c6fbdae97 to your computer and use it in GitHub Desktop.
Save yowasou/1954501b987c6fbdae97 to your computer and use it in GitHub Desktop.
#途中であきらめました
def getbaisu(n,na)
head = n.gsub("x","0").to_i
st = 0
ed = fact(n.count("x")) #10のx乗を求めたい
return 0
end
def fact(n)
return 1 if n == 0
n * fact(n - 1)
end
puts getbaisu("2004xxx",[2,3,4,5,6,7,8])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment