Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b6736ec

Browse files
Nested Logic
1 parent 7ade130 commit b6736ec

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎Day 26: Nested Logic.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Enter your code here. Read input from STDIN. Print output to STDOUT
2+
from datetime import date
3+
ReturnDate = input().split()
4+
DueDate = input().split()
5+
ReDate = date(int(ReturnDate[2]),int(ReturnDate[1]),int(ReturnDate[0]))
6+
DuDate = date(int(DueDate[2]),int(DueDate[1]),int(DueDate[0]))
7+
if ReDate.year==DuDate.year or ReDate<DuDate:
8+
if ReDate.month==DuDate.month:
9+
print((ReDate-DuDate).days*15)
10+
elif ReDate>DuDate:
11+
print((ReDate.month-DuDate.month)*500)
12+
else:
13+
print('0')
14+
else:
15+
print("10000")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /