Compile Error
foo.cc: In function 'int main()': foo.cc:22:23: error: expected ';' before 'endl' 22 | cout << counter endl; | ^ ~~~~ | ;
Code
#include <bits/stdc++.h>
using namespace std;
/// complete sliding window and two pointer
///A. Codeforces Checking
int main()
{
long long t,n;
cin >> t;
while(t--){
cin >> n;
int counter = 1;
for(int i=1; i<n-1; i++){
for(int j=1; j<n-1; j++){
if(i<j && i+j==n){
counter++;
}
}
}
cout << counter endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1073 Pair Sum
- Contest
- Bangladesh 2.0
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-08-16 15:54:42
- Judged At
- 2024-10-03 13:29:31
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes