s[i] = s[i-1] + a[i] a[i] = s[i] - s[i-1] #include <stdio.h> int n, m, i, j, k, s, t; int main(){ scanf("%d", &n); for(i=1; i<=n; i++){ scanf("%d", &s); printf("%d ", s-t); t = s; } return 0; } 文章导航 ABC280A二维字符数组统计字符 ABC280C查找两个字符串第一个不同的元素