Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin>>n;
int a =1,c=0;
long long x;
while(x<=n){
x=1;
x = a*a;
if (x<=n) c++;
x = a*a+1;
if (x<=n) c++;
a++;
}
cout<<c;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1191 A. Balanced Product
- Contest
- Brain Booster #10
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-06-13 16:01:40
- Judged At
- 2025-06-13 16:01:40
- Judged By
- Score
- 40
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB