muhammad_nasif

TASK_06

Apr 15th, 2021
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def convert_days(value):
  2.     year = int(value / 365)
  3.     value = value % 365
  4.     month = int(value / 30)
  5.     value = value % 30
  6.     days = value
  7.     return year, month, days
  8.  
  9.  
  10. days = input()
  11. days = int(days)
  12. result = convert_days(days)
  13. print(str(result[0]) + "Y " + str(result[1]) + "M " + str(result[2]) + "D")
  14.  
Advertisement
Add Comment
Please, Sign In to add comment