You are viewing a single comment's thread. Return to all comments →
python 3
def closestNumber(a, b, x): f=(math.floor((a**b)/x)*x) c=(math.ceil((a**b)/x)*x) if((a**b)-f<c-(a**b)): return f return c
Seems like cookies are disabled on this browser, please enable them to open this website
Closest Number
You are viewing a single comment's thread. Return to all comments →
python 3