Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
#define MOD 998244353
#define ll long long
#define ull unsigned long long
#define ld long double
const int MAX_n = 1e5 + 5;
#define MAX_X 1000000
const int InF = 1e9; // for int
const ll INF = 1e18; // for ll
void solve()
{
int n;
cin>>n;
int tem=sqrt(n);
if(tem*tem==n)
cout<<(2*tem)-1<<endl;
else
cout<<2*tem<<endl;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
solve();
return 0;
}
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 15:39:17
- Judged At
- 2025-06-13 15:39:17
- Judged By
- Score
- 40
- Total Time
- 1ms
- Peak Memory
- 764.0 KiB