/ SeriousOJ /

Record Detail

Compile Error

foo.c:1:9: 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 int long long
#define yes cout<<"YES"<<'\n'
#define no cout<<"NO"<<'\n'
#define nl cout<<"\n"

void solve() {
    int n; cin>>n;
    int ans = 0;
    for(int i=1; i<=n; i++)
    {
        if(i*(i+1) <= n) ans++;
        if(i*i <= n) ans++;
    }
    cout<<ans;
}

int32_t main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int t=1;
    // cin>>t;
    while(t--)
    {
        solve();
    }
    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 16:09:13
Judged At
2025-06-13 16:09:13
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes