/ SeriousOJ /

Record Detail

Compile Error

foo.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

Code

#include <bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
    ll n;cin>>n;
    ll k = 1;
    ll ans = 1;
    for ( ; k*k <= n ; k++) {
        // cout<<k<<" ";
        if (k*(k+1) <= n || k*k <= n) {
            ans = k;
        }
    }

    if (ans*ans == n) {
        cout<<2*(ans-1)+1;
    } else {
        cout<<2*ans;
    }

    cout<<endl;
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1191 A. Balanced Product
Contest
Brain Booster #10
Language
C99 (GCC 13.2.0)
Submit At
2025-06-13 15:47:33
Judged At
2025-06-13 15:47:33
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes