You are viewing a single comment's thread. Return to all comments →
My solution in Python 3:
#!/bin/python3 import sys t = int(input().strip()) for a0 in range(t): n = int(input().strip()) k0 = 6*n % 15 k = k0 + 15*((n-k0)//15) print( "-1" if k0 > n else k*"5" + (n-k)*"3" )
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 →
My solution in Python 3: