Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79476 小徐老师 22相差2的数的个数 Python3 Wrong Answer 32 MS 3776 KB 251 2024-07-06 18:53:32

Tests(1/2):


Code:

n = int(input()) a = list(map(int, input().split())) max_val = 1 for i in range(0, n - 1): if a[i] - a[i - 1] <= 2: max_val = 2 for i in range(1, n - 1): if a[i + 1] + a[i - 1] == 2 * a[i]: max_val = 3 print(max_val)


Run Info:

------Input------
10 80 79 78 77 65 55 54 54 53 49
------Answer-----
4
------Your output-----
3