Advertisement
Spocoman

Gifts from Santa

Feb 27th, 2022 (edited)
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. n = int(input())
  2. m = int(input())
  3. s = int(input())
  4.  
  5. for i in range(m, n - 1, -1):
  6.     if i == s and s % 2 == 0 and s % 3 == 0:
  7.         break
  8.     elif i % 2 == 0 and i % 3 == 0:
  9.         print(i, end=" ")
  10.        
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement