1 .

# -- coding: utf-8 --

“”"
Created on Mon Sep 17 20:58:57 2018

@author: win8
“”"

#!/bin/python

# -- coding: utf8 --

import sys
import os
import re

#请完成下面这个函数，实现题目要求的功能
#当然，你也可以不按照下面这个模板来作答，完全按照自己的想法来 -
#开始写代码

def candy(numbers):
import numpy as np
childnum = len(numbers)
count = np.ones(childnum)
for i in range(childnum-1):
if numbers[i] < numbers[i+1]:
count[i+1] = count[i]+1
if numbers[i] > numbers[i+1]:
if count[i] < count[i+1]:
count[i] = count[i+1]+1
else:
continue
else:
continue
return count.sum()

#结束写代码

_numbers_cnt = 0
_numbers_cnt = int(input())
_numbers_i=0
_numbers = []
while _numbers_i < _numbers_cnt:
_numbers_item = float(input())
_numbers.append(_numbers_item)
_numbers_i+=1

res = candy(_numbers)

print(str(res) + “\n”)

#!/bin/python

# -- coding: utf8 --

import sys
import os
import re

#请完成下面这个函数，实现题目要求的功能
#当然，你也可以不按照下面这个模板来作答，完全按照自己的想法来 -
#开始写代码

def change(str1, str2):

count=0
str1 = list(str1)
str2 = list(str2)
if len(str1) < len(str2):
for k in range(len(str2)-len(str1)):
str1.append('0')
if len(str1) > len(str2):
str1 = str1[0:len(str2)]

str1 = ''.join(str1)
str2 = ''.join(str2)
for i in range(len(str2)):
if str1[i]!=str2[i]:
count = count+1
str1 = str1.replace(str1[i],str2[i])
else:
continue
return count


#结束写代码

try:
_str1 = input()
except:
_str1 = None

try:
_str2 = input()
except:
_str2 = None

res = change(_str1, _str2)

print(str(res) + “\n”)