Python 3, 1 task, 268 bytes, non-competitive
##Python 3, 1 task, 268 bytes, non-competitive II tried Task #2 in Python 3.5.2 I am new to code golfing and python
import itertools
def f2(l):
n=1000000
l=list(itertools.permutations(l))
j = len(l)
m=[None]*j
while j>0:
j -= 1
m[j]= int(''.join(str(i) for i in l[j]))
l[j]=abs(n-m[j])
l.sort()
k=n-l[0]
return(n+l[0],k)[k in m]