/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 2ms 328.0 KiB
#3 Accepted 1ms 540.0 KiB
#4 Accepted 1ms 772.0 KiB
#5 Accepted 2ms 540.0 KiB
#6 Accepted 1ms 540.0 KiB

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