更新 README,增加 t10
This commit is contained in:
parent
a1ced46784
commit
a273b013ab
|
@ -1,2 +1,7 @@
|
||||||
# XJTU-Python
|
# XJTU-Python
|
||||||
西交大 Python 相关资源
|
西交大 Python 相关资源
|
||||||
|
### 一些自学可以参考的资源
|
||||||
|
|
||||||
|
[菜鸟教程](https://www.runoob.com/python3/python3-tutorial.html)
|
||||||
|
|
||||||
|
[GitHub:Python - 100天从新手到大师](https://github.com/jackfrued/Python-100-Days)
|
|
@ -0,0 +1,18 @@
|
||||||
|
def run(year):
|
||||||
|
if (year % 400 == 0):
|
||||||
|
return True
|
||||||
|
elif (year % 100 == 0):
|
||||||
|
return False
|
||||||
|
elif (year % 4 == 0):
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
ms = [0, 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
||||||
|
|
||||||
|
y, m, d = map(int, input().split())
|
||||||
|
ms[2] = 29 if run(y) else 28
|
||||||
|
ans = 0
|
||||||
|
for i in range(1, m):
|
||||||
|
ans += ms[i]
|
||||||
|
print(ans+d)
|
Loading…
Reference in New Issue