Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- limit_first_num = int(input())
- limit_second_num = int(input())
- limit_third_num = int(input())
- isFirst_even = False
- isSecond_in_range = False
- isThird_even = False
- for first_num in range(1, limit_first_num + 1):
- if first_num % 2 == 0:
- isFirst_even = True
- else:
- isFirst_even = False
- for second_num in range(2, limit_second_num + 1):
- if second_num == 2 or second_num == 3 or second_num == 5 or second_num == 7:
- isSecond_in_range = True
- else:
- isSecond_in_range = False
- for third_num in range(1, limit_third_num + 1):
- if third_num % 2 == 0:
- isThird_even = True
- else:
- isThird_even = False
- if isFirst_even and isSecond_in_range and isThird_even:
- print(f"{first_num} {second_num} {third_num}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement