Advertisement
AntonStanoev

Gifts

Dec 18th, 2022 (edited)
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. N = int(input())
  2. M = int(input())
  3. S = int(input())
  4.  
  5. for x in range(M, N, -1):
  6.     if x % 2 == 0 and x % 3 == 0:
  7.         if x == S:
  8.             break
  9.         else:
  10.             print(x, end=' ')
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement