str = input().strip()
s1 = str[0]
s2 = str[-1]
str = str[1:-1]
n = str.replace('dot', '.')
print(s1 + n.replace('at', '@', 1) + s2)

4、最长递增的区间长度 

输入样例:

6
5 2 3 8 1 9

输出样例:

3

思路:

代码如下:

n = int(input().strip())
arr = [int(item) for item in input().strip().split()]
dp = [1 for _ in range(n)]
for i in range(1, n):
    if arr[i - 1] < arr[i]:
        dp[i] = dp[i - 1] + 1
print(max(dp))

经验心得

资料分享

09-21 15:42