201509-1 数列分段
n = int(input())
data = list(map(int,input().split()))
duan = 1
for i in range(n-1):
if data[i]!=data[i+1]:
duan+=1
print(duan)
201509-2 日期计算
没有break会扣10分!一定要记住!
y = int(input())
d = int(input())
m = 1
r = 1
month = [31,28,31,30,31,30,31,31,30,31,30,31]
def is_run(year):
if (y%4==0 and y%100!=0) or (y%400==0):
return True
else:
return False
if is_run(y) == True:
month[1]=29
for i in month:
if d > i:
m+=1
d-=i
continue
else:
r = d
break
print(m)
print(r)