Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
ll binpow(ll a, ll b, ll m) {
a %= m;
ll res = 1;
while (b > 0) {
if (b & 1)
res = res * a % m;
a = a * a % m;
b >>= 1;
}
return res;
}
void solve(){
ll n;
cin>>n;
ll num = sqrtl(n);
if (num*num==n){
cout<<2*num-1<<endl;
}
else{
cout<<2*num<<endl;
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll tt;
tt =1;
while(tt--){
solve();
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1191 A. Balanced Product
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-07-14 11:07:46
- Judged At
- 2025-07-14 11:07:46
- Judged By
- Score
- 40
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB