You are viewing a single comment's thread. Return to all comments →
from datetime import date i1 = [int(e) for e in input().split(" ")] return_date = date(i1[2], i1[1], i1[0]) i2 = [int(e) for e in input().split(" ")] expected_return_date = date(i2[2], i2[1], i2[0]) fine = 0 if return_date > expected_return_date: if return_date.year != expected_return_date.year: fine = 10000 elif return_date.month != expected_return_date.month: fine = 500 * (return_date.month - expected_return_date.month) else: fine = 15 * (return_date.day - expected_return_date.day) print(str(fine))
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 →