| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148390 | 张晓冉 | 22相差2的数的个数 | C++ | Wrong Answer | 0 MS | 268 KB | 266 | 2026-02-12 19:55:40 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[101] = {}; int c = 0; for(int i = 0;i < n-1;i++){ cin>>a[i]; if(a[i] - a[i-1] == 2){ c++; } } cout<<c; return 0; }
------Input------
10 80 79 78 77 65 55 54 54 50 49
------Answer-----
3
------Your output-----
0