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