@@ -0,0 +1,408 @@
+def sum_of_threes(n):%0A    %0A    powers = %5B%5D%0A%0A    while n %3E 0:%0A        if n == 2: return 'Impossible'%0A        res = gen_power(n); n -= pow(3, res)%0A        powers.append(res)%0A%0A    return '+'.join('3%5E'+str(p) for p in powers) %5C%0A               if len(set(powers)) == len(powers) else 'Impossible'%0A    %0A    %0Adef gen_power(lim, p=0):%0A    while True:%0A        if pow(3,p) %3E lim:%0A            return p-1%0A        p += 1%0A

Create 6kyu_sum_of_threes.py