criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

const long long int INF = 1e15;

int main() {
  long long int N;
  cin>>N;
  long long int ans = N - 1;
  for(int i=1;i<=sqrt(N);i++){
    if(N % i == 0){
      ans = min(ans, i * (N % i);)
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: expected ')' before ';' token
   12 |       ans = min(ans, i * (N % i);)
      |                ~                ^
      |                                 )
a.cc:12:34: error: expected primary-expression before ')' token
   12 |       ans = min(ans, i * (N % i);)
      |                                  ^
Language: C

#include<stdio.h>
 
int main(){
  int n,i,j,sum=0;
  scanf("%d",&n);
  for(i=1; i<=n; i++){
    for(j=1; j<=n; j++){
      if(n==i*j && j<=i){
        sum = i-1+j-1
        printf("%d",sum);
      	return 0;}
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:22: error: expected ';' before 'printf'
    9 |         sum = i-1+j-1
      |                      ^
      |                      ;
   10 |         printf("%d",sum);
      |         ~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  long long n;
  
  cin >> n;
  long long m = sqrt(n);
  long long i;
  for(i = m;i<=n;i++){
    if(n%i==0) break;
  }
  cout << i+n/i-2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'sqrt' was not declared in this scope
    8 |   long long m = sqrt(n);
      |                 ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>

int b(void);
int c(void);

int main(void) {
	c();
	return 0;
}

int c(void) {
	int N;
	std::cin >> N;
	int up_b = static_cast<int>(std::sqrt(N));
	int max_i = 0;
	for (int i = up_b; i > 0; i--) {
		if (N % i == 0) {
			max_i = i;
			break;
		}
	
	}
	std::cout << max_i + (N / max_i) -2;
	return 0;
}

int b(void) {
	int N;
	std::cin >> N;
	if (N > 81) {
		std::cout << "No";
		return 0;
	}
	else {
		for (int i = 1; i < 10; i++) {
			if (N % i == 0 && N / i < 10) {
				
				std::cout << "Yes";
				return 0;
			}
		}
	}
	std::cout << "No";
	return 0;
}

Compiler output:
a.cc: In function 'int c()':
a.cc:18:42: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   18 |         int up_b = static_cast<int>(std::sqrt(N));
      |                                          ^~~~
      |                                          sort
Language: C++

#define INF ULLONG_MAX
#define ll  long long
#define ull unsigned long long
#define rep(i,n) for(ll i=0; i<n; ++i)
#define FOR(i, s, e) for(ll i=s; i<e; ++i)
#define MOD 1000000007
using namespace std;
template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) { if(a<b) {a=b; return true;} return false;}

vector<ull> div(ull n) {
  vector<ull> ret;
  for(ull i=1; i*i <= n; ++i) {
    if(n%i == 0) {
      ret.push_back(i);
      if(i*i != 0) ret.push_back(n/i);
    }
  }
  sort(ret.begin(),ret.end());
  unique(ret.begin(),ret.end());
  return ret;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ull N; cin >> N;
  vector<ull> div_arr = div(N);
  ull ans = INF;
  for(ull a:div_arr) {
    ull b = N/a;
    chmin(ans, a+b-2);
  }
  cout << ans << endl;
}

Compiler output:
a.cc:11:1: error: 'vector' does not name a type
   11 | vector<ull> div(ull n) {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:25:3: error: 'cin' was not declared in this scope
   25 |   cin.tie(0);
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define INF ULLONG_MAX
a.cc:26:3: error: 'ios' has not been declared
   26 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:28:3: error: 'vector' was not declared in this scope
   28 |   vector<ull> div_arr = div(N);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #define INF ULLONG_MAX
a.cc:3:13: error: expected primary-expression before 'unsigned'
    3 | #define ull unsigned long long
      |             ^~~~~~~~
a.cc:28:10: note: in expansion of macro 'ull'
   28 |   vector<ull> div_arr = div(N);
      |          ^~~
a.cc:1:13: error: 'ULLONG_MAX' was not declared in this scope
    1 | #define INF ULLONG_MAX
      |             ^~~~~~~~~~
a.cc:29:13: note: in expansion of macro 'INF'
   29 |   ull ans = INF;
      |             ^~~
a.cc:1:1: note: 'ULLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
  +++ |+#include <climits>
    1 | #define INF ULLONG_MAX
a.cc:30:13: error: 'div_arr' was not declared in this scope
   30 |   for(ull a:div_arr) {
      |             ^~~~~~~
a.cc:34:3: error: 'cout' was not declared in this scope
   34 |   cout << ans << endl;
      |   ^~~~
a.cc:34:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:18: error: 'endl' was not declared in this scope
   34 |   cout << ans << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define INF ULLONG_MAX
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    int result = 0;
    for(int a = 1;a <= sprt(N);a += 1){
    
      if(N % a == 0){
        
        result = a + (N / a) - 2;
        
      };
      
    };
  
    cout << result << endl;
};

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'sprt' was not declared in this scope; did you mean 'sqrt'?
    9 |     for(int a = 1;a <= sprt(N);a += 1){
      |                        ^~~~
      |                        sqrt
Language: Java

import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long s = n;

    if (n > 10000000000) {
      System.out.println(n-1);
    } else {
      for (long i = 1; i < n; i++) {
        for (long j = 1; j < n; j++) {
          if(i * j == n) {
            s = Math.min(s,i-1+j-1);
            break;
          }
        }
      }
      System.out.println(s);
    }


  }

}


Compiler output:
Main.java:10: error: integer number too large
    if (n > 10000000000) {
            ^
1 error
Language: C++

#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define rep(I,N) for(auto I=0;I<(N);++I)
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define mp make_pair
#define mt make_tuple
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define rs resize
typedef long long ll;
typedef unsigned long long ull;
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                                      ins(T &p){for_each(all(p),in<decltype(p[0])>);}
template<class T>inline void                             out(T p){cout<<p<<endl;}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<endl;}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<endl;}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;}
inline                                              void out(double p){printf("%.10f\n",p);}
template<class T>inline                             void outs(T p){for_each(all(p),out<decltype(p[0])>);}

inline void solve(void){
  cpp_int N;in(N);
  cpp_int ans=ULONG_MAX;
  for(cpp_int i=1;i*i<=N;i++)if(N%i==0)ans=min(ans,N/i+i-2);
  out(ans);
}
int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


Compiler output:
a.cc:2:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    2 | #include<boost/multiprecision/cpp_int.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
//#define ll long long
using namespace std;
int a[1001];
int main()
{
	long long n;
	cin >> n;
	long long a = sqrt(n);
	long long tmp1, tmp2;
	for (int i = a;i >= 1;i--)
	{
		if (n % i == 0)
		{
			tmp1 = i;
			tmp2 = n / i;
			break;
		}
	}
	cout << (tmp1 + tmp2 - 2) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'sqrt' was not declared in this scope
    9 |         long long a = sqrt(n);
      |                       ^~~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
void printDivisors(long n) 
{ 
  	long ans = INT_MAX;
  
    for (int i=1; i<=sqrt(n); i++) 
    { 
        if (n%i == 0) 
        { 
            if (n/i == i) 
            {
              	ans = min(ans, 2*i - 2);
            }
  			else{
              	ans = min(ans, i + n/i - 2);
            }
        } 
    } 
  	cout<<ans<<'\n';
  	return;
}
int main(){
	long n;
  	cin>>n;
  	printDivisors(n);
  	return 0;
}

Compiler output:
a.cc: In function 'void printDivisors(long int)':
a.cc:15:26: error: no matching function for call to 'min(long int&, int)'
   15 |                 ans = min(ans, 2*i - 2);
      |                       ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:15:26: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   15 |                 ans = min(ans, 2*i - 2);
      |                       ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:15:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   15 |                 ans = min(ans, 2*i - 2);
      |                       ~~~^~~~~~~~~~~~~~
Language: C++

#include <iostream>
#define ll long long
using namespace std;
int a[1001];
int main()
{
	ll n;
	cin >> n;
	ll a = sqrt(n);
	ll tmp1, tmp2;
	for (int i = a;i >= 1;i--)
	{
		if (n % i == 0)
		{
			tmp1 = i;
			tmp2 = n / i;
			break;
		}
	}
	cout << (tmp1 + tmp2 - 2) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'sqrt' was not declared in this scope
    9 |         ll a = sqrt(n);
      |                ^~~~
Language: Java

import java.util.*;

public class Main {

  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {
    long A = sc.nextInt();

    int score=0;
    int thre=0;
    for (int i=1; i<A; i++){
      if (i>thre && thre!=0)break;
      if(A%i==0){

        int B = i;
        int C = A/i;
        int sc = (B-1+C-1);
        if(score==0){score = sc;thre=Math.max(B,C);}
        else if (score>sc){
          score =  sc;
        }

      }
    }
    System.out.println(score);
  }
}


Compiler output:
Main.java:17: error: incompatible types: possible lossy conversion from long to int
        int C = A/i;
                 ^
1 error
Language: Java

//package atcoder.beginner144;

import java.io.*;
import java.util.StringTokenizer;

public class WalkOnTable {
    public static void main(String[] args) {
//        try {
//            FastScanner in = new FastScanner(new FileInputStream("src/input.in"));
//            PrintWriter out = new PrintWriter(new FileOutputStream("src/output.out"));
        FastScanner in = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        long n = in.nextLong();
        long res = Long.MAX_VALUE;
        for(long i = 1; i * i <= n; i++) {
            if(n % i == 0) {
                res = Math.min(res, i + n / i);
            }
        }
        out.println(res - 2);
        out.close();

//        }
//        catch (IOException e) {
//            e.printStackTrace();
//        }
    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            try {
                br = new BufferedReader(new InputStreamReader(stream));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}




Compiler output:
Main.java:6: error: class WalkOnTable is public, should be declared in a file named WalkOnTable.java
public class WalkOnTable {
       ^
1 error
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

#define FOR(i,m,M) for(int i = m;i<M;i++)

int main()
{
	long long N,m = 1,n;
	bool flag = false;
	cin >> N;
	for(long long i = (long long)std::sqrt(N);i>0;i--)
	{
		if (N % i == 0)
		{
			m = i;
			break;
		}
	}
	n = N / m;
	cout << n + m - 2;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:43: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   13 |         for(long long i = (long long)std::sqrt(N);i>0;i--)
      |                                           ^~~~
      |                                           sort
Language: C++

#include<algorithm>
#include<string>
#include<stdio.h>
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<utility>
#include<functional>
#include<cassert>

using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
typedef vector<int> vint;
typedef vector<vint> vvint;

int main(void) {
	ll n;
	cin >> n;
	ll ans = n;
	for (ll i = 1; i < sqrt(n);i++ ){
		if (n%i == 0) {
			ll a;
			a = n / i;
			if (a  + i - 2 < ans) {
				ans = a - 1 + i - 1;
			}
		}
	}
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: 'sqrt' was not declared in this scope
   22 |         for (ll i = 1; i < sqrt(n);i++ ){
      |                            ^~~~
Language: C++

#define ll long long
#include<bits/stdc++.h>
using namespace std;
int main()
{
    ll n;
    cin>>n;
    ll num = sqrt(n);
    vector<ll>vec;
    for(int i=num;i>0;i--)
    {
        if(n%i==0)
        {

            vec.push_back(i+(n/i)-2);
        }
    }
    sort(vec.begin(),vec.end());

    cout<<vec[0]<<endl;
50
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: expected ';' before '}' token
   21 | 50
      |   ^
      |   ;
   22 | }
      | ~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

#define FOR(i,m,M) for(int i = m;i<M;i++)

int main()
{
	long long N,m = 1,n;
	bool flag = false;
	cin >> N;
	for(long long i = (long long)sqrt(N);i>0;i--)
	{
		if (N % i == 0)
		{
			m = i;
			break;
		}
	}
	n = N / m;
	cout << n + m - 2;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:38: error: 'sqrt' was not declared in this scope
   13 |         for(long long i = (long long)sqrt(N);i>0;i--)
      |                                      ^~~~
Language: Java

import java.util.*;

public class Main {

  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {
    int A = sc.nextInt();

    int score=0;
    int thre=0;
    for (int i=1; i<A; i++){
      if (i>thre && thre!=0)break; 
      if(A%i==0){

        int B = i;
        int C = A/i;
        int sc = (B-1+C-1);
        if(score==0){score = sc;thre=Math.max(B,C)}
        else if (score>sc){
          score =  sc;
        }

      }
    }
    System.out.println(score);
  }
}

Compiler output:
Main.java:19: error: ';' expected
        if(score==0){score = sc;thre=Math.max(B,C)}
                                                  ^
1 error
Language: C++

    #include <bits/stdc++.h>
    #define ll long long
    #define f(i, a, b) for(ll i=a; i<b; i++)
    #define pb push_back
    #define mp make_pair
    #define F first
    #define S second
    using namespace std;
    ll findSubarraySum(ll arr[], ll n, ll sum = 0) 
    {
        unordered_map<ll, ll> prevSum;
        ll res = 0;
        ll currsum = 0;
        for (ll i = 0; i < n; i++)
        {
            currsum += arr[i];
            if (currsum == sum) res++;
            if (prevSum.find(currsum - sum) != prevSum.end()) res += (prevSum[currsum - sum]);
            prevSum[currsum]++;
        }
        return res; 
    } 
    ll gcd(ll a, ll b) 
    { 
        if (a == 0) 
            return b; 
        return gcd(b % a, a); 
    } 
      
    ll findGCD(ll arr[], ll n) 
    { 
        ll result = arr[0]; 
        for (ll i = 1; i < n; i++)
            result = gcd(arr[i], result); 
      
        return result; 
    } 
    ll powmp(ll x, ll y, ll p) 
    { 
        ll res = 1;     x = x % p;   
        while (y > 0) 
        {  
            if (y & 1)  res = (res*x) % p; 
            y = y>>1; 
            x = (x*x) % p;   
        } 
        return res; 
    } 
     
    int main()
    {
        ios_base::sync_with_stdio(false); 
        cin.tie(NULL);
        ll n,b,a; cin>>n;
     for(ll i*i=(ll)sqrt(n);i>=1;i--)
     {
     if(n%i==0)
     {
     a=i;b=n/i;break;
     }
     }
      ll ans=0;
      ans=a-1+b-1;
      cout<<ans;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:55:14: error: expected ';' before '*' token
   55 |      for(ll i*i=(ll)sqrt(n);i>=1;i--)
      |              ^
      |              ;
a.cc:55:14: error: invalid type argument of unary '*' (have 'long long int')
   55 |      for(ll i*i=(ll)sqrt(n);i>=1;i--)
      |              ^~
a.cc:55:33: error: expected ')' before ';' token
   55 |      for(ll i*i=(ll)sqrt(n);i>=1;i--)
      |         ~                       ^
      |                                 )
a.cc:55:34: error: 'i' was not declared in this scope
   55 |      for(ll i*i=(ll)sqrt(n);i>=1;i--)
      |                                  ^
Language: C++

#include <algoriVGVG
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <string>
#include <map>
#include <cmath>
#include <cstring>

#define fi first
#define se second
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rrep(i,n) for (int i = 1; i < (n); ++i)
#define drep(i,n) for (int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define all(x) (x).begin(), (x).end()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define pb push_back
#define sz(x) (int)(x).size()
#define PQ(T) priority_queue<T, v(T), greater<T> >

using namespace std;
typedef long long ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;

const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;

const int mod = 1000000007;

int main() {
    ll N;
    cin >> N;
    ll n = sqrt(N);

    ll ans = N-1;
    for (int i = 1; i <= n; ++i) {
        ll r = N % i;
        if (r != 0) continue;
        else {
            ll q = N / i;
            ans = min(ans, (i-1)+(q-1));
        }
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc:1:21: error: missing terminating > character
    1 | #include <algoriVGVG
      |                     ^
a.cc:1:10: fatal error: algoriVGVG: No such file or directory
    1 | #include <algoriVGVG
      |          ^
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long a;
  cin >> a;
  for(long long i=sqrt(a)/1;i>0;i++){
    if(a%i==0){
      cout << i+a/i-2 << endl;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: expected '}' at end of input
   10 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

#define FOR(i,m,M) for(int i = m;i<M;i++)

int main()
{
	long long N,m = 1,n;
	bool flag = false;
	cin >> N;
	for(int i = (int)sqrt(N);i>0;i--)
	{
		if (N % i == 0)
		{
			m = i;
			break;
		}
	}
	n = N / m;
	cout << n + m - 2;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: 'sqrt' was not declared in this scope
   13 |         for(int i = (int)sqrt(N);i>0;i--)
      |                          ^~~~
Language: C++

#include <iostream>
#include <cmath.h>

int main(void) {
	long N;
  	std::cin >> N;
  	int a = std::sqrt(N) , b;
  	for(; a > 0; --a){
    	if(N%a != 0) continue;
      	b = N/a;
      	break;
    }
  
  	std::cout << a+b-2 << std::endl;
  	return 0;
}

Compiler output:
a.cc:2:10: fatal error: cmath.h: No such file or directory
    2 | #include <cmath.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

#define FOR(i,m,M) for(int i = m;i<M;i++)

int main()
{
	long long N,m = 1,n;
	bool flag = false;
	cin >> N;
	for(int i = sqrt(N);i>0;i--)
	{
		if (N % i == 0)
		{
			m = i;
			break;
		}
	}
	n = N / m;
	cout << n + m - 2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'sqrt' was not declared in this scope
   13 |         for(int i = sqrt(N);i>0;i--)
      |                     ^~~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

#define FOR(i,m,M) for(int i = m;i<M;i++)

int main()
{
	long long N,m,n;
	bool flag = false;
	cin >> N;
	for(int i = sqrt(N);i>0;i--)
	{
		if (N % i == 0)
		{
			m = i;
			break;
		}
	}
	n = N / m;
	cout << n + m - 2;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'sqrt' was not declared in this scope
   13 |         for(int i = sqrt(N);i>0;i--)
      |                     ^~~~
Language: C++

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

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll n;
  cin >> n;
  ll i;
  ll ans = n-1;
  for(i=1;(i*i) <=n;i++)
  {
    if(n%i==0)
    {
      ll yay1 = n/i;
      ll temp = i-1;
      temp += yay-1;
      ans = min(ans,temp);
    }
  }
  cout << ans << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: 'yay' was not declared in this scope; did you mean 'yay1'?
   19 |       temp += yay-1;
      |               ^~~
      |               yay1
Language: Java

import java.util.*;
class Main{
	public static void main(String[]args){
      	Scanner sc = new Scanner(System.in);
    	long n,k,min;
      	n = sc.nextLong();
      	k = Math.sqrt(n);
      	min = n;
      	for(long i=1;i<=k;i++){
        	if(n%i==0){
            	long j=n/i;
              	if(i+j-2<min){min = i+j-2;}
            }
        }
      	System.out.println(min);
    }
}

Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from double to long
      	k = Math.sqrt(n);
      	             ^
1 error
Language: C++

#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <algorithm>
#include <utility>
#include <numeric>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cmath>
#include <limits>
#include <cassert>

#define for0(i, N)    for (int i = 0  ; i <  (N); ++i)
#define for1n(i, N)   for (int i = 1  ; i <= (N); ++i)
#define for1(i, N)    for (int i = 1  ; i <  (N); ++i)
#define forn(i, N)    for (int i = 0  ; i <= (N); ++i)
#define forx(i, N, x) for (int i = (x); i <  (N); ++i)
#define forl(i, N, x, a) for (int i = (x), a = 0; a < (N);  \
                              i = (i + 1) % (N), ++a)

using namespace std;

typedef long long ll;
typedef long double ld;
typedef priority_queue<ll> pq;
typedef priority_queue<ll,vector<ll>, greater<ll>> pql;
typedef stack<ll> stk;
typedef queue<ll> qu;
typedef pair<ll, ll> pll;
typedef map<ll, ll> mll;
typedef unordered_map<ll, ll> umll;
typedef set<ll> sll;
typedef unordered_set<ll> usll;

int main(void){
    cin.tie(0); ios::sync_with_stdio(false);

    int N;

    cin >> N;

    int result = INT_MAX;

    for1n(i, N){
        if (N % i == 0) {
            result = min(result, N / i + i);
        }
    }

    cout << result - 2;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:18: error: 'INT_MAX' was not declared in this scope
   49 |     int result = INT_MAX;
      |                  ^~~~~~~
a.cc:19:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   18 | #include <cassert>
  +++ |+#include <climits>
   19 |
Language: C++

#include <iostream>
using namespace std;

int main() {
	long long n;
	cin >> n;
	for(int i = (int)sqrt(n); i >= 0; i--){
		if (n % i == 0) {
			cout << i - 1 + n / i - 1 << '\n';
			return 0;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: 'sqrt' was not declared in this scope
    7 |         for(int i = (int)sqrt(n); i >= 0; i--){
      |                          ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  long long N;
  cin >> N;
  long long best = N+2;
  for (long long i = 1; i * i <= n; i++){
    if (N%i==0){
      best = i + N/i;
    }
  }
  cout << best - 2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: 'n' was not declared in this scope
    7 |   for (long long i = 1; i * i <= n; i++){
      |                                  ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <list>
#include <map>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <numeric>
 
using namespace std;
 
#define ll long long
const int maxn = 1e5+5;
 
int main() {
 
    ios::sync_with_stdio(false);
    cin.tie(0);

    ll n; cin >> n;
    ll ans = n+1;
    for (int i = 1; i <= sqrt(n); i++) {
        if (n % i == 0) {
            ans = min(ans, i + n/i);
        }
    }
    cout << ans-2 << endl;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:31:26: error: 'sqrt' was not declared in this scope
   31 |     for (int i = 1; i <= sqrt(n); i++) {
      |                          ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <string>
#include <set>
#include <bitset>
#include <unordered_map>

using namespace std;
using ll = long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
template <class T>
using Vvec = vector<vector<T> >;

int main()
{
    ll N;
    cin >> N;

    ll ans = N;
    for(int i=1; i<=sqrt(N); i++){
        if(N%i!=0) continue;
        ans = min(ans, i+N/i-2);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: 'sqrt' was not declared in this scope
   24 |     for(int i=1; i<=sqrt(N); i++){
      |                     ^~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<queue>
#define ll long long
#define itn int
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,1,n)
#define SORT(V) sort((V).begin(),(V).end())
#define REVERSE(V) reverse((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;

int main(){
  ll N;
  cin>>N;
  
  forll i=sqrt(N); i>=1; i--){
    if(N%i==0){
      cout<<i+N/i-2<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: 'forll' was not declared in this scope
   25 |   forll i=sqrt(N); i>=1; i--){
      |   ^~~~~
a.cc:25:20: error: 'i' was not declared in this scope
   25 |   forll i=sqrt(N); i>=1; i--){
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using usize = ::std::size_t;
using u64 = ::std::int_least64_t;
//using u64 = long long;
static constexpr u64 Inf = ::std::numeric_limits<u64>::max() / 2;
int main(int argc, char *argv[])
{
    
    
    cin.tie(0) ;
    ios::sync_with_stdio(false) ;
    
    int a,b,x;
    cin >> a >> b >> x;
    double base = (double) pow(a, 2)*b/2;
    if(x > base) {
        double denominator = (double) a;
        double numerator = ((double) pow(a, 2)*b - x) * 2/ pow(a, 2);
    //cout << denominator << " " << numerator << " " << denominator/numerator << endl;
        cout << fixed << setprecision(10) << atan(numerator/denominator)*180.0/acos(-1) << endl;
    } else {
        double denominator = (double) x * 2/(a * b);
        double numerator = (double) b;
        cout << fixed << setprecision(10) << atan(numerator/denominator)*180.0/acos(-1) << endl;
    //cout << denominator << " " << numerator << " " << denominator/numerator << endl;
    }
    return 0;
    
}


Compiler output:
a.cc:18:1: error: extended character   is not valid in an identifier
   18 |         double denominator = (double) a;
      | ^
a.cc:19:1: error: extended character   is not valid in an identifier
   19 |         double numerator = ((double) pow(a, 2)*b - x) * 2/ pow(a, 2);
      | ^
a.cc:23:1: error: extended character   is not valid in an identifier
   23 |         double denominator = (double) x * 2/(a * b);
      | ^
a.cc:24:1: error: extended character   is not valid in an identifier
   24 |         double numerator = (double) b;
      | ^
a.cc: In function 'int main(int, char**)':
a.cc:18:1: error: '\U000000a0' was not declared in this scope
   18 |         double denominator = (double) a;
      | ^
a.cc:19:2: error: expected ';' before 'double'
   19 |         double numerator = ((double) pow(a, 2)*b - x) * 2/ pow(a, 2);
      |  ^      ~~~~~~
      |  ;
a.cc:21:51: error: 'numerator' was not declared in this scope
   21 |         cout << fixed << setprecision(10) << atan(numerator/denominator)*180.0/acos(-1) << endl;
      |                                                   ^~~~~~~~~
a.cc:21:61: error: 'denominator' was not declared in this scope
   21 |         cout << fixed << setprecision(10) << atan(numerator/denominator)*180.0/acos(-1) << endl;
      |                                                             ^~~~~~~~~~~
a.cc:23:1: error: '\U000000a0' was not declared in this scope
   23 |         double denominator = (double) x * 2/(a * b);
      | ^
a.cc:24:2: error: expected ';' before 'double'
   24 |         double numerator = (double) b;
      |  ^      ~~~~~~
      |  ;
a.cc:25:51: error: 'numerator' was not declared in this scope
   25 |         cout << fixed << setprecision(10) << atan(numerator/denominator)*180.0/acos(-1) << endl;
      |                                                   ^~~~~~~~~
a.cc:25:61: error: 'denominator' was not declared in this scope
   25 |         cout << fixed << setprecision(10) << atan(numerator/denominator)*180.0/acos(-1) << endl;
      |                                                             ^~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <map>
#include <iomanip>
#define intt long long
#define PI 3.14159265359
using namespace std;
int main() {
    int main(void)
    {
        const double PI = 3.14159265358979323846;
        double a, b, x; std::cin >> a >> b >> x;
        double s = x / a;
        double ans = 0;
        double a2 = 0;
        if (s == a * b) {
            ans = 0;
        }
        else {
            if (s > b * a / 2) {
                double bu = 2 * s / a - b;
                s -= a * bu;
                b -= bu;
                a2 = 2 * s / b;
            }
            else {
                a2 = 2 * s / b;
            }
            double r = std::atan(b / a2);
            // ラジアン-角度変換
            ans = r * (180.0 / PI);
        }
        cout << fixed << setprecision(10) << ans << endl;

        return 0;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: a function-definition is not allowed here before '{' token
   14 |     {
      |     ^
Language: C

#include <stdio.h>

int main() {
  double a, b, x;
  scanf("%lf", &a);
  scanf("%lf", &b);
  scanf("%lf", &c);
  
  printf(1);
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'c' undeclared (first use in this function)
    7 |   scanf("%lf", &c);
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:10: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    9 |   printf(1);
      |          ^
      |          |
      |          int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

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

int main(){
    int a, b, x;
    cin >> a >> b >> x;
    double pi = acos(-1);
    if(x >= a*a*b/2){
        double c = a, d = b, e = x;
        printf("%.10f",atan(2.0*(c*c*d - e)/(c*c*c)) * 360.0 / (2.0*pi));
    }
    else{
        double c = a, d = b, e = x;
        printf("%.10f",cout << atan(d*d*c/(2*e)) * 360.0 / (2.0*pi) << endl);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: use of deleted function 'std::basic_ostream<_CharT, _Traits>::basic_ostream(const std::basic_ostream<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]'
   14 |         printf("%.10f",cout << atan(d*d*c/(2*e)) * 360.0 / (2.0*pi) << endl);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/ostream:447:7: note: declared here
  447 |       basic_ostream(const basic_ostream&) = delete;
      |       ^~~~~~~~~~~~~
a.cc:14:15: note: use '-fdiagnostics-all-candidates' to display considered candidates
   14 |         printf("%.10f",cout << atan(d*d*c/(2*e)) * 360.0 / (2.0*pi) << endl);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

from math import degrees,atan2
a,b,x = map(int, input().split())
ans = 0
if (a*a*b/2 >= x):
    ans = degrees(atan2(a*b*b,2*x))
else:
    x = a*a*b - x
    ans = degrees(atan2(2*x,a*a*a))

print(ans)


Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from math import degrees,atan2
      | ^~~~
Language: C++

#include <bits//stdc++.h>
using namespace std;
typedef long double ld;
#define c(n) cout << fixed <<setprecision(10) << n << endl
int main() {
	int a, b, x; cin >> a >> b >> x;ld d;
	if (2 * x > a * a * b)d = 2.0 *(b * a * a - x) / pow(a,3);
	else d = 1.0 * b * b * a / (2 * x);
	c((atan(d)) / pi * 180);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'pi' was not declared in this scope
    9 |         c((atan(d)) / pi * 180);
      |                       ^~
a.cc:4:50: note: in definition of macro 'c'
    4 | #define c(n) cout << fixed <<setprecision(10) << n << endl
      |                                                  ^
Language: C++

int main() {
  double a, b, x;
  cin >> a >> b >> x;
  if(x > a * a * b / 2){
    double length = (a*a*b-x) / a / a* 2;
    double num = atan(length / a);
    double ans = num / PI * 180;
  cout << fixed << setprecision(10)<< ans << endl;
  }
  else{
    double length = x / a / b* 2;
    double num = atan(b/length);
    double ans = num / PI * 180;
  cout << fixed << setprecision(10)<< ans << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> a >> b >> x;
      |   ^~~
a.cc:6:18: error: 'atan' was not declared in this scope
    6 |     double num = atan(length / a);
      |                  ^~~~
a.cc:7:24: error: 'PI' was not declared in this scope
    7 |     double ans = num / PI * 180;
      |                        ^~
a.cc:8:3: error: 'cout' was not declared in this scope
    8 |   cout << fixed << setprecision(10)<< ans << endl;
      |   ^~~~
a.cc:8:11: error: 'fixed' was not declared in this scope
    8 |   cout << fixed << setprecision(10)<< ans << endl;
      |           ^~~~~
a.cc:8:20: error: 'setprecision' was not declared in this scope
    8 |   cout << fixed << setprecision(10)<< ans << endl;
      |                    ^~~~~~~~~~~~
a.cc:8:46: error: 'endl' was not declared in this scope
    8 |   cout << fixed << setprecision(10)<< ans << endl;
      |                                              ^~~~
a.cc:12:18: error: 'atan' was not declared in this scope
   12 |     double num = atan(b/length);
      |                  ^~~~
a.cc:13:24: error: 'PI' was not declared in this scope
   13 |     double ans = num / PI * 180;
      |                        ^~
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << fixed << setprecision(10)<< ans << endl;
      |   ^~~~
a.cc:14:11: error: 'fixed' was not declared in this scope
   14 |   cout << fixed << setprecision(10)<< ans << endl;
      |           ^~~~~
a.cc:14:20: error: 'setprecision' was not declared in this scope
   14 |   cout << fixed << setprecision(10)<< ans << endl;
      |                    ^~~~~~~~~~~~
a.cc:14:46: error: 'endl' was not declared in this scope
   14 |   cout << fixed << setprecision(10)<< ans << endl;
      |                                              ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main () {
  int a, b, x;
  cin >> a >> b >> x;
  if (x < (a * a * b + 0.0) / 2) {
    double h = (x + 0.0) / (b * a);
    h *= 2;
    double m = atan(h / b);
    m /= 3.14159265358979;
    m *= 180;
    m = 90 - m;
    cout << fixed << setprecision(10);
    cout << m << endl;
  }
  else {
    double h = ((b * a * a - x) * 2 + 0.0) / (a * a);
    double m = atan(a / h);
    m /= 3.14159265358979;
    m *= 180;
    m = 90 - m;
    cout << fixed << setprecision(10);
    cout << m << endl;
  } 

Compiler output:
a.cc: In function 'int main()':
a.cc:25:4: error: expected '}' at end of input
   25 |   }
      |    ^
a.cc:4:13: note: to match this '{'
    4 | int main () {
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  const double pi = 3.1415926535;
  double a,b,x;
  cin >> a >> b >> x;
  if(a*a*b/2 >= x){
    cout << fixed << setprecision(10) << atan2(a,x/a/a*2/a)*180/pi << endl;
  }
  else {
    cout <<fixed << setprecision(10) << atan2(b,(x-a*a*b/2)/a*2/b << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:67: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<'
   11 |     cout <<fixed << setprecision(10) << atan2(b,(x-a*a*b/2)/a*2/b << endl;
      |                                                 ~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  const double pi = 3.1415926535;
  double a,b,x;
  cin >> a >> b >> x;
  if(a*a*b/2 >= x){
    cout << fixed << setprecision(10) << acos2(a,x/a/a*2/a)*180/pi << endl;
  }
  else {
    cout <<fixed << setprecision(10) << acos2(b,(x-a*a*b/2)/a*2/b << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:42: error: 'acos2' was not declared in this scope; did you mean 'acosl'?
    8 |     cout << fixed << setprecision(10) << acos2(a,x/a/a*2/a)*180/pi << endl;
      |                                          ^~~~~
      |                                          acosl
a.cc:11:67: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<'
   11 |     cout <<fixed << setprecision(10) << acos2(b,(x-a*a*b/2)/a*2/b << endl;
      |                                                 ~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
#include<cmath>
using namespace std;
typedef double db;
int main () {
  db a, b, x;
  cin >> a >> b >> x;
  db V = a * a * b;
  if (x > V / 2) {
    x -= (V / 2);
    x /= a;
    db k = x / a;
    k *= 2;
    k = b - k;
    cout << setprecision(7) << atan(a / k)  << endl;
  }
  else {
    x /= a;
    db k = x / b;
    k *= 2;
    cout << atan(b / k) << setpresicion(7) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: 'setpresicion' was not declared in this scope
   21 |     cout << atan(b / k) << setpresicion(7) << endl;
      |                            ^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
typedef double db;
int main () {
  db a, b, x;
  cin >> a >> b >> x;
  db V = a * a * b;
  if (x > V / 2) {
    x -= (V / 2);
    x /= a;
    db k = x / a;
    k *= 2;
    k = b - k;
    cout << setpresision(7) << atan(a / k)  << endl;
  }
  else {
    x /= a;
    db k = x / b;
    k *= 2;
    cout << atan(b / k) << setpresicion(7) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'setpresision' was not declared in this scope
   15 |     cout << setpresision(7) << atan(a / k)  << endl;
      |             ^~~~~~~~~~~~
a.cc:21:28: error: 'setpresicion' was not declared in this scope
   21 |     cout << atan(b / k) << setpresicion(7) << endl;
      |                            ^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
typedef double db;
int main () {
  db a, b, x;
  cin >> a >> b >> x;
  db V = a * a * b;
  if (x > V / 2) {
    x -= (V / 2);
    x /= a;
    db k = x / a;
    k *= 2;
    k = b - k;
    cout << setprecision(7) << atan(a / k)  << endl;
  }
  else {
    x /= a;
    db k = x / b;
    k *= 2;
    cout << atan(b / k) << setpresicion(7) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'setprecision' was not declared in this scope
   15 |     cout << setprecision(7) << atan(a / k)  << endl;
      |             ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    2 | #include<cmath>
  +++ |+#include <iomanip>
    3 | using namespace std;
a.cc:21:28: error: 'setpresicion' was not declared in this scope
   21 |     cout << atan(b / k) << setpresicion(7) << endl;
      |                            ^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
typedef double db;
int main () {
  db a, b, x;
  cin >> a >> b >> x;
  db V = a * a * b;
  if (x > V / 2) {
    x -= (V / 2);
    x /= a;
    db k = x / a;
    k *= 2;
    k = b - k;
    cout << atan(a / k) << setpresicion(7) << endl;
  }
  else {
    x /= a;
    db k = x / b;
    k *= 2;
    cout << atan(b / k) << setpresicion(7) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: 'setpresicion' was not declared in this scope
   15 |     cout << atan(a / k) << setpresicion(7) << endl;
      |                            ^~~~~~~~~~~~
a.cc:21:28: error: 'setpresicion' was not declared in this scope
   21 |     cout << atan(b / k) << setpresicion(7) << endl;
      |                            ^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
typedef double db;
int main () {
  db a, b, x;
  cin >> a >> b >> x;
  db V = a * a * b;
  if (x > V / 2) {
    x -= (V / 2);
    x /= a;
    db k = x / a;
    k *= 2;
    k = b - k;
    cout << atan(a / k) << setprecicion(7) << endl;
  }
  else {
    x /= a;
    db k = x / b;
    k *= 2;
    cout << atan(b / k) << setprecicion(7) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: 'setprecicion' was not declared in this scope
   15 |     cout << atan(a / k) << setprecicion(7) << endl;
      |                            ^~~~~~~~~~~~
a.cc:21:28: error: 'setprecicion' was not declared in this scope
   21 |     cout << atan(b / k) << setprecicion(7) << endl;
      |                            ^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
typedef double db;
int main () {
  db a, b, x;
  cin >> a >> b >> x;
  db V = a * a * b;
  if (x > V / 2) {
    x -= (V / 2);
    x /= a;
    db k = x / a;
    k *= 2;
    k = b - k;
    cout << atan(a / k) << setprecision(7) << endl;
  }
  else {
    x /= a;
    db k = x / b;
    k *= 2;
    cout << atan(b / k) << setprecision(7) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: 'setprecision' was not declared in this scope
   15 |     cout << atan(a / k) << setprecision(7) << endl;
      |                            ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    2 | #include<cmath>
  +++ |+#include <iomanip>
    3 | using namespace std;
a.cc:21:28: error: 'setprecision' was not declared in this scope
   21 |     cout << atan(b / k) << setprecision(7) << endl;
      |                            ^~~~~~~~~~~~
a.cc:21:28: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
Language: C++

#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
using ll = long long;
using P = pair<ll,ll>;
const long double PI = acos((-1.0));
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
long double a,b,x;
cin >> a >> b >> x;
x /= a;
if(x > a * b / 2){
    cout << fixed << setprecision(10) << atan2((a* b - x) * 2, a * a) * 180 / PI << endl;
}else{
    cout << fixed << setprecision(10) << atan2(b * b, x * 2) * 180 / PI << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:10:11: note: to match this '{'
   10 | int main(){
      |           ^