Problem In python: 1234 import mathmath.log(243,3)4.999999999999999 Solution 123 import mathmath.log10(243)/math.log10(3)5 123456789 import math>>> x = math.log(243,3)# Judge whether an int>>> judge = (round(x)-x) < 0.0000001True# get the Int value>>> round(x) 赞微海报分享
近期评论