| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159070 | 孔声豪 | 22相差2的数的个数 | C++ | Compile Error | 0 MS | 0 KB | 263 | 2026-08-25 14:25:39 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a[101]={},b=0; 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;
Main.cc: In function 'int main()':
Main.cc:17:10: error: expected '}' at end of input
return 0;
^