fork(1) download
  1. def visk_year(a):
  2. if a%4==0 and a%100!=0 or a%400==0:
  3. c=True
  4. else:
  5. c=False
  6. return c
  7. def norm(date,month, year):#Задача 7. Есть ли такое число?
  8. if month==2 and (visk_year(year)==True and 0<date<=29 or visk_year(year)==False and 0<date<=28):
  9. c=True
  10. elif month in (1,3,5,7,8,10,12) and 0<date<=31:
  11. c=True
  12. elif month in (4,6,9,11) and 0<date<=30:
  13. c=True
  14. else:
  15. c=False
  16. return c
  17.  
  18. date=int(input())
  19. month=int(input())
  20. year=int(input())
  21. print(norm(date,month, year))
  22. #Рика унизь моё достоинство своими замечаниями
Success #stdin #stdout 0.02s 9984KB
stdin
30
2
2016
stdout
False