-
Notifications
You must be signed in to change notification settings - Fork 0
/
日期.py
40 lines (38 loc) · 1.22 KB
/
日期.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
month,day=[int(x) for x in input().split("/")]
c=0
if month==1 and 0<=day<=31:
c=day
print("这是2018年的%d天"%(c))
elif month==2 and 0<=day<=28:
c=31+day
print("这是2018年的%d天"%(c))
elif month==3 and 0<=day<=31:
c=31+28+day
print("这是2018年的%d天"%(c))
elif month==4 and 0<=day<=30:
c=31+28+31+day
print("这是2018年的%d天"%(c))
elif month==5 and 0<=day<=31:
c=31+28+31+30+day
print("这是2018年的%d天"%(c))
elif month==6 and 0<=day<=30:
c=31+28+31+30+31+day
print("这是2018年的%d天"%(c))
elif month==7 and 0<=day<=31:
c=31+28+31+30+31+30+day
print("这是2018年的%d天"%(c))
elif month==8 and 0<=day<=31:
c=31+28+31+30+31+30+31+day
print("这是2018年的%d天"%(c))
elif month==9 and 0<=day<=30:
c=31+28+31+30+31+30+31+31+day
print("这是2018年的%d天"%(c))
elif month==10 and 0<=day<=31:
c=31+28+31+30+31+30+31+31+30+day
print("这是2018年的%d天"%(c))
elif month==11 and 0<=day<=30:
c=31+28+31+30+31+30+31+31+30+31+day
print("这是2018年的%d天" % (c))
elif month ==12 and 0<=day<=31:
c=31+28+31+30+31+30+31+31+30+31+30+day
print("这是2018年的%d天" % (c))