Advertisement
kalinx

unique pin 1

Oct 23rd, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. limit_first_num = int(input())
  2. limit_second_num = int(input())
  3. limit_third_num = int(input())
  4. isFirst_even = False
  5. isSecond_in_range = False
  6. isThird_even = False
  7.  
  8. for first_num in range(1, limit_first_num + 1):
  9.     if first_num % 2 == 0:
  10.         isFirst_even = True
  11.     else:
  12.         isFirst_even = False
  13.     for second_num in range(2, limit_second_num + 1):
  14.         if second_num == 2 or second_num == 3 or second_num == 5 or second_num == 7:
  15.             isSecond_in_range = True
  16.         else:
  17.             isSecond_in_range = False
  18.         for third_num in range(1, limit_third_num + 1):
  19.             if third_num % 2 == 0:
  20.                 isThird_even = True
  21.             else:
  22.                 isThird_even = False
  23.             if isFirst_even and isSecond_in_range and isThird_even:
  24.                 print(f"{first_num} {second_num} {third_num}")
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement