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.
da,ma,ya=input().split(" ")#actuald,m,yde,me,ye=input().split(" ")#expectedd,m,ydd,md,yd=int(da)-int(de),int(ma)-int(me),int(ya)-int(ye)#differencebetweenactualandexpected# funtion to calculate fine based on difference in d, m , ydefcalc_fine(d,m,y):ify>0:return10000elify==0:ifm>0:return500*melifm==0:ifd>0:return15*dreturn0print(calc_fine(dd,md,yd))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 26: Nested Logic
You are viewing a single comment's thread. Return to all comments →