Skip to content

Instantly share code, notes, and snippets.

@andriiburka
Created January 29, 2020 12:54
Show Gist options
  • Save andriiburka/27c80f19d8137e15ff38c555ab0fd5e5 to your computer and use it in GitHub Desktop.
Save andriiburka/27c80f19d8137e15ff38c555ab0fd5e5 to your computer and use it in GitHub Desktop.
softuniada_1_2019
# n1 = int(input())
# n2 = int(input())
# n3 = int(input())
unsorted_list = [3, 3, 4]
# unsorted_list.append(n1)
# unsorted_list.append(n2)
# unsorted_list.append(n3)
sorted_to_min = sorted(unsorted_list)
sorted_to_max = list(reversed(sorted_to_min))
start = ''.join(map(str, sorted_to_min))
end = ''.join(map(str, sorted_to_max))
# start = int(start)
# end = int(end)
# RESULTS
print(int(start) % sum(unsorted_list))
# if __name__ == '__main__':
# print(f'The sum of the digits is {sum(unsorted_list)}. We start forming the numbers:')
# for num in range(start, end + 1):
# num = str(num)
# if str(unsorted_list[0]) in num and \
# str(unsorted_list[1]) in num and \
# str(unsorted_list[2]) in num:
# num = int(num)
# print(f'{num} / {sum(unsorted_list)} = {num / sum(unsorted_list)}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment