简答题 偏难
#17303

试题名称 :数组清零 时间限制 :1.0 s 内存限制 :512.0 MB

试题名称:数组清零

时间限制:1.0 s

内存限制:512.0 MB

未登录也能判分,登录后才会记录
答案与解析
正确答案:<pre class="brush:python;toolbar:false">n = int(input()) a = list(map(int, input().split())) res = a[0] for i in range(1, n):     if a[i] &gt; a[i-1]:         res += a[i] - a[i-1] print(res)</pre><p><br/></p>
这道题暂未补解析。