Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def convert_days(value):
- year = int(value / 365)
- value = value % 365
- month = int(value / 30)
- value = value % 30
- days = value
- return year, month, days
- days = input()
- days = int(days)
- result = convert_days(days)
- print(str(result[0]) + "Y " + str(result[1]) + "M " + str(result[2]) + "D")
Advertisement
Add Comment
Please, Sign In to add comment