Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define int long long
void iusearchbtw () {
int n; cin >> n;
int x = sqrt(n);
int ans = 2 * x;
if (x * (x + 1) > n) ans--;
cout << ans << endl;
}
signed main () {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int tt = 1;
//cin >> tt;
while (tt --> 0) iusearchbtw();
}
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:33:17
- Judged At
- 2025-06-13 15:33:17
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 772.0 KiB