Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Uncategorized category for Bigger Together by Elena_Korljukova
def bigger_together(ints):
ints = list(map(str,ints))
ints = sorted(ints, key = lambda x: [i + i[0] for i in ints][ints.index(x)])
return int(''.join(ints[::-1]))-int(''.join(ints))
if __name__ == '__main__':
print(bigger_together([3,12,22,32, 34]))
#These "asserts" using only for self-checking and not necessary for auto-testing
assert bigger_together([1,2,3,4]) == 3087, "4321 - 1234"
assert bigger_together([1,2,3,4, 11, 12]) == 32099877, "43212111 - 11112234"
assert bigger_together([0, 1]) == 9, "10 - 01"
assert bigger_together([100]) == 0, "100 - 100"
print('Done! I feel like you good enough to click Check')
Sept. 16, 2020