Sherlock and The Beast

  • + 0 comments
    def decentNumber(n):
        for fives in range(n, -1, -1):
            if fives % 3 == 0 and (n - fives) % 5 == 0:
                print('5' * fives + '3' * (n - fives))
                return
        print(-1)