We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 26: Nested Logic
Day 26: Nested Logic
Sort by
recency
|
792 Discussions
|
Please Login in order to post a comment
python3 d1, m1, y1 =list(map(int, input().split())) d2, m2, y2 =list(map(int, input().split()))
if y1 > y2: print(10000) elif y1 == y2 and m1 > m2: print((m1-m2)*500) elif m1 == m2 and d1 > d2: print((d1-d2)*15) else: print(0)
rd,rm,ry=map(int,input().split()) dd,dm,dy=map(int,input().split()) t=0 if ry>dy: t+=10000 elif ry==dy: if rm>dm: t+=((rm-dm)*500) elif rm==dm: if rd>dd: t+=((rd-dd)*15) print(t)