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