You are viewing a single comment's thread. Return to all comments →
python 3
def decentNumber(n): fives = n threes = 0 while fives >= 0: if fives % 3 == 0 and threes % 5 == 0: break else: fives -= 1 threes += 1 print(-1 if fives < 0 else ('5' * fives) + ('3' * threes))
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