integer concatenation by wilkes

from itertools import *
exec'i=raw_input().split();i=permutations(i,len(i));print max(int(l)-int("".join(l[::-1])) for l in map("".join,i));'*input()

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page