You are viewing a single comment's thread. Return to all comments →
Python 3, all test cases passed. Simple and understandable solution.
def decentNumber(n): three = 0 five = n while five > 0 and five%3 != 0: three += 5 five -= 5 if five < 0: print(-1) else: print(int('5'*five + '3'*three))
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and The Beast
You are viewing a single comment's thread. Return to all comments →
Python 3, all test cases passed. Simple and understandable solution.