ASSIGNMENT - 3 Years, Weeks & Days

 Years, Weeks & Days

Given

N
number of days as input, write a program to convert
N
number of days to years (
Y
), weeks (
W
) and days (
D
).

Note:
Take 1 year = 365 days.


Input

The input contains single integer

N
.


Output

Print in each new line

Y
,
W
and
D
.


Explanation

Given

N = 1329
. The value can be written as

1329 = 3 years + 33 weeks + 3 days

So the output should be

3
33
3
Sample Input 1
1329
Sample Output 1
3
33
3
Sample Input 2
0
Sample Output 2
0
0
0


n=int(input())
y=int(n/365)
rd=n-(y)*365
w=int(rd/7)
d=rd-(w)*7
print(y)
print(w)
print(d)




Comments

Popular posts from this blog

CODING ASSIGNMENT 4

CODING PRACTICE 11 Music Page

CCBP Static Website Coding Assignment 2 Solution | Yoga Page