Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 01. Matrix
- a = int(input())
- b = int(input())
- c = int(input())
- d = int(input())
- for first_row_first_number in range(a, b+1):
- for first_row_second_number in range(a, b+1):
- for second_row_first_number in range(c, d+1):
- for second_row_second_number in range(c, d+1):
- sum_main_diagonal = first_row_first_number + second_row_second_number
- sum_second_diagonal = first_row_second_number + second_row_first_number
- if sum_main_diagonal == sum_second_diagonal:
- if first_row_first_number != first_row_second_number and second_row_first_number != second_row_second_number:
- print(f"{first_row_first_number}{first_row_second_number}")
- print(f"{second_row_first_number}{second_row_second_number}")
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement