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

#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
int main()
{
  long long n,s=0;cin>>n;
  for(long long  i =1;i<=n;i++)
    for(long long  j =1;j<=n;j++)
      for(long long  k =1;k<=n;k++)
          s+=gcd(i,j,k);
 cout<<s;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: no matching function for call to 'gcd(long long int&, long long int&, long long int&)'
   10 |           s+=gcd(i,j,k);
      |              ~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/numeric:173:5: note: candidate: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
/usr/include/c++/14/numeric:173:5: note:   candidate expects 2 arguments, 3 provided
Language: C

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<queue>
#include<deque>
#include<stack>
#include<cstdio>
#include<utility>
#include<set>
#include<list>
#include<cmath>
#include<stdio.h>
#include<string.h>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define REP(i, n) FOR(i, 0, n - 1)
#define NREP(i, n) FOR(i, 1, n)
using ll = long long;
using pii = pair<int, int>;
using piii = pair<pii, pii>;
const ll dx[4] = { 0, -1, 1, 0 };
const ll dy[4] = { -1, 0, 0, 1 };
const int INF = 1e9 + 7;
int gcd(int x, int y) {
	if (x < y)swap(x, y);
	if (y == 0)return x;
	return gcd(y, x%y);
}
void mul(ll a, ll b) {
	a = a * b % INF;
}
using Graph = vector<vector<int>>;
ll mypow(ll x, ll n, ll m) {
	if (n == 0) {
		return 1;
	}
	if (n % 2 == 0) {
		return mypow(x*x%m, n / 2, m);
	}
	else {
		return x * mypow(x, n - 1, m) % m;
	}
}
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}
const int MAX = 510000;
ll fac[MAX], finv[MAX], inv[MAX];
//テーブルをつくる前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;//mod pにおける1,2,,,nの逆元
	for (int i = 2; i < MAX; ++i) {
		fac[i] = fac[i - 1] * i%INF;
		inv[i] = INF - inv[INF%i] * (INF / i) % INF;
		finv[i] = finv[i - 1] * inv[i] % INF;
	}
}

ll COM(int n, int k) {
	if (n < k)return 0;
	if (n < 0 || k < 0)return 0;
	return fac[n] * (finv[k] * finv[n - k] % INF) % INF;
}
///////////////////////////////////////


int main() {
	int k; cin >> k;
	int sum = 0;
	for (int i = 1; i <= k; ++i) {
		for (int j = 1; j <= k; ++j) {
			for (int l = 1; l <= k; ++l) {
				sum += gcd(i, gcd(j, l));
			}
		}
	}
	cout << sum << endl;
	return 0;
}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define vi vector<int>
#define vii vector<int, int>
#define po pop_back
#define hell 1000000007
using namespace std;

int a[201][201];

int gcd(int a, int b){
	if(a%b==0) return b;
	else return gcd(b,a%b);
}

void filla(){
	for(int i=1;i<201;i++){
		for(int j=1;j<201;j++){
			if(a[i][j]!=0) continue;
			else{
				a[i][j] = gcd(i,j);
				a[j][i] = a[i][j];
			}
		}
	}
}

void solve(){
	memset(a,0,sizeof(a));
	filla();
	int k;
	cin>>k;
	ll ans = 0;
	for(int i=1;i<k+1;i++){
		for(int j=1;j<k+1;j++){
			for(int l=1;l<k+1;l++){
				ans+=a[i][a[j][l]];
			}
		}
	}
	cout<<ans;
}

int main(){
	int t = 1;
	//cin>>t;
	while(t--){
		solve();
	}
}

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

#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<utility>
#include<queue>
#include<tuple>
#include<stdio.h>
#define rep(i, n) for(int i=1;i<=n;i++)
using namespace std;

int main(){
	int n;
	cin>>n;
	int long long a=0;
	rep(i, n){
		rep(j, n){
			rep(k, n){
				for(int l=min(min(i, j), k);l>0;l--){
					if(i%l==0 && j%l==0 && k%l==0){
						a+=l;
						break;
					}
				}
			}
		}
	}
	cout<<a<<endl;
	return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
const int INF=1e9+7;
typedef long long ll;
typedef pair<int,int> P;

int main() {
	int K,s=0;
	cin >> K;
	vector<vector<int>> g(K, vector<int>(K));

	rep(i,K)
		rep(j,K)
			g.at(i).at(j) = __gcd(i+1, j+1);
		
	rep(i,K)
		rep(j,K)
			rep(k,K)
				s += g.at(g.at(i).at(j)-1).at(k);

	cout << s << endl;
}

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

#include <iostream>
using namespace std;

int main(int argc, char* argv[]) {
    int k, t = 0;
    int a, b, c, d, ab;
    cin >> k;
    for (a = 0; a < k; a++){
        for (b = 0; b < k; b++){
            for (c = 0; c < k; c++){
                ab = gcd(a, b);
                d = gcd(ab, c);
                t += d;
            }
        }

    }
    cout << d << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:11:22: error: 'gcd' was not declared in this scope
   11 |                 ab = gcd(a, b);
      |                      ^~~
Language: C



import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int k = sc.nextInt();
		int ans = 0;

		for (int i = 1; i <= k; i++) {
			for (int j = 1; j <= k; j++) {
				for (int l = 1; l <= k; l++) {
					ans += gcd(i, gcd(j, l));
				}
			}
		}

		System.out.println(ans);

	}

	private static int gcd(int a, int b) {
		int c = 0;
		int r = 1;

		if (a > b) {

			while (r > 0) {
				r = a % b;
				a = b;
				b = r;
			}
			c = a;

		} else if (b > a) {
			while (r > 0) {
				r = b % a;
				b = a;
				a = r;
			}
			c = b;
		} else {
			c = a;
		}

		return c;
	}

}


Compiler output:
main.c:3:1: error: unknown type name 'import'
    3 | import java.util.Scanner;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.util.Scanner;
      |            ^
main.c:5:1: error: unknown type name 'public'
    5 | public class Main {
      | ^~~~~~
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    5 | public class Main {
      |              ^~~~
Language: C

#include<iostream>
#include<string>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
using ll=long long;
const ll INF=1LL<<60;


int main(){
  ll k,sum=0;
  cin>>k;
  auto gcd=[&](int a,int b){
    int tmp=a%b;
    while(tmp!=0){
      a=b;
      b=tmp;
      tmp=a%b;
    }
    return b;
  };
  for(int a=1;a<=k;a++){
    for(int b=1;b<=k;b++){
      for(int c=1;c<=k;c++){
	int x=gcd(max(a,b),min(a,b));
	int y=gcd(max(b,c),min(b,c));
	sum+=gcd(max(x,y),min(x,y));
      }
    }
  }
  cout << sum;
}






Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

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

int gcd(int a, int b){
  if(a%b==0)
    return b;
  else
    return gcd(b,a%b);
}

int main() {
  int K, s=0;
  cin >> K;
  for(int a = 1; a <= K; a++) {
    for(int b = a+1; b <= K; b++) {
      int x = gcd(a,b);
      for(int c = b+1; c <= K; c++) {
        s += gcd(a,b)*6;
      }
    }
  }
  for(int a = 1; a <= K; a++) {
    for(int b = a+1; b <= K; b++) {
      s += gcd(x,c)*6;
    }
  }
  s += K*(K+1)/2;
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: 'x' was not declared in this scope
   24 |       s += gcd(x,c)*6;
      |                ^
a.cc:24:18: error: 'c' was not declared in this scope
   24 |       s += gcd(x,c)*6;
      |                  ^
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long int ll;
typedef pair<int, int> P;

int n;

int main()
{
    cin >> n;
    ll sum = 0;
    for(int i = 1; i <= n; i++)
    {
        for(int j = 1; j <= n; j++)
        {
            for(int k = 1; k <= n; k++)
            {
                sum += __gcd(i, __gcd(j, k));
            }
        }
    }
    cout << sum << endl;
    
    return 0;
}

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

#include<iostream>
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include <algorithm>
#define lln long long int
using namespace std;


int main()
{
    int  n,sum=0;
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            int p=__gcd(i,j);
            for(int k=1;k<=n;k++){
                int res=__gcd(p,k);
                sum=sum+res;
            }
        }
    }
    printf("%d",sum);

}


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

#include <iostream>
#include <numeric>
#include <boost/math/common_factor_rt.hpp>
using namespace std;
int main() {
  int K;
    cin>>K;
  int sum=0;
  for (int i = 0; i < K; i++) {
    for (int j = 0; j < K; j++) {
      for (int k = 0; k < K; k++) {
        sum +=gcd(i,j,k);
      }
    }
  }

    cout << sum << endl;
}

Compiler output:
a.cc:3:10: fatal error: boost/math/common_factor_rt.hpp: No such file or directory
    3 | #include <boost/math/common_factor_rt.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C


// Problem : C - Sum of gcd of Tuples (Easy)
// Contest : AtCoder Beginner Contest 162
// URL : https://atcoder.jp/contests/abc162/tasks/abc162_c
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int mod = 1e9+7;
int inf = 4e18;
const int N = 5e5+5;

signed main()
{
    io
    int tt = 1;
    //cin>>tt;
    while(tt--)
    {
    	int k;
    	cin>>k;
    	int gcd;
    	int result;
    	int ct = 0;
    	
    	for(int i=1;i<=k;++i)
    	{
    		for(int j=1;j<=k;++j)
    		{
    			for(int l=1;l<=k;++l)
    			{
    				result = __gcd(i,__gcd(j,l));
    				
    				ct+=result;
    			}
    		}
    	}
    	cout<<ct;
    }
    return 0;
}



Compiler output:
main.c:8:10: fatal error: bits/stdc++.h: No such file or directory
    8 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define pb push_back
#define fi first
#define se second
#define sz(A) (int)(A.size())
#define all(x) (x).begin(),(x).end()
#define caset int ___T; cin>>___T; for(int cs=1;cs<=___T;cs++)
#define get(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
typedef long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
const ll mod=1e9+7;
const int Max = 1e6+10;
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
void solve(){
	int k;
	ll ans=0;
	cin>>k;
	rep(a,1,k+1){
		rep(b,1,k+1){
			rep(c,1,k+1){
				int x = __gcd(a,b);
				ans+=__gcd(x,c);
			}
		}
	}
	cout<<ans;
}
int main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	//caset{
		solve();
	//}
  	return 0;
}






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

import math
from functools import reduce

def calc(a, b, c):
    return reduce(math.gcd, [a, b, c])

def solve(k):
    count = 0
    for i in range(1, k+1):
        for j in range(1, k+1):
            for k in range(1, k+1):
                count += calc(i, j, k)

    return count

k = int(input())

print(solve(k))


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import math
      | ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'from'
    2 | from functools import reduce
      | ^~~~
main.c:2:1: error: unknown type name 'from'
Language: C

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
#include <limits>
#include <numeric>
#include <type_traits>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<string> VS;
typedef vector< vector<int> > VVI;
typedef vector< vector<ll> > VVL;
typedef pair<int,int> PII;
typedef pair<ll,ll> PLL;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pf push_front
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define ub upper_bound
#define lb lower_bound
 
int main(){
  ll K;
  cin>>K;
  ll ans=0;
  rep(a,K) rep(b,K) rep(c,K) ans+=gcd(gcd((a+1),(b+1)),c+1);
  cout<<ans<<endl;
}



Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long k,n=0;
  cin>>k;
  int m;
  for(int a=1;a<=k;a++){
    for(int b=1;b<=k;b++){
      for(int c=1;c<=k;c++){
        m=min(a,b,c);
        n+=m;
      }
    }
  }
  cout<<n<<"\n";
  return(0);
}

Compiler output:
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: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:10:14:   required from here
   10 |         m=min(a,b,c);
      |           ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file  
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> // for less  
using namespace         std;
#define                 int long long
#define                 double long double
#define                 pb push_back
#define                 mp make_pair
#define st(arr,a)       memset(arr,a,sizeof arr)
#define                 nl cout<<'\n'
#define bitcount(x)     __builtin_popcountll(x)
const int MOD = 1000000007ll;
#define forn(i,a,b)     for(int i=a;i<=b;i++)
#define rfor(i,a,b)     for(int i=a;i>=b;i--)
#define all(x)          x.begin() , x.end()
#define pi pair<int,int>
#define X first
#define Y second
#define N 1014159
#define  vi vector<int>
#define  v  vector
#define die exit(0)
#define alln(arr) arr+1 , arr+1+n
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
        tree_order_statistics_node_update> oset;

int n, m, k, arr[N];

void solve()
{
    cin >> n;
    int ans = 0;
    forn(i, 1, n)forn(j, 1, n)forn(k, 1, n)ans += __gcd(i, __gcd(j, k));
    cout << ans;
}


signed main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    int t = 1;
    //cin>>t;
    forn(i, 1, t)
    {
        solve();
        nl;
    }



    return 0;

}

//       clang++ c.cpp ; ./a.out < a.txt ;

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <iostream>
#include <algorithm>
#define rep(i,a,b) for(int i=a; i< (int)(b); ++i)
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
typedef long double ld;
using ll=long long;
using namespace std;
const auto mod=1e9+7;


int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  
  int k; cin >> k;
  int sum=0;
  rep(i,1,k+1){
  	rep(j,1,k+1){
  		rep(l,1,k+1){
  			int res = __gcd(i,j);
  			sum+=__gcd(res,l);
  		}
  	}
  }
  cout << sum << endl;
 }

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C



#include<bits/stdc++.h>



#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)

using namespace std;

template <class T>
using vec = std::vector<T>;
typedef long long ll;
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; }

const long long INF = 1LL<<60;

int lcm(int a,int b){
    //最小公倍数
    return a/__gcd(a,b) * b;
}

int k;

int main()
{
    cin>>k;
    ll sum=0;
    int tmp;
    loop(a,1,k+1)loop(b,1,k+1)loop(c,1,k+1){
        tmp=__gcd(a,b);
        sum+=__gcd(tmp,c);
    }
    cout<<sum<<endl;

    return 0;

}




Compiler output:
main.c:3:9: fatal error: bits/stdc++.h: No such file or directory
    3 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = 100000000;
#define rep(i, n) for (ll i=1; i<(n+1); i++) 


int main() {
    ll n;
    cin >> n;
    ll ans = 0;
    rep(i, n){
        rep(j,n){
            rep(k,n){
                ans += gcd(i,gcd(j,k));
            }
        }
    }    
    cout << ans << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int gcd(int a, int b)
{
   if (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }
}
int main(void)
{
  int k;
  cin >> k;
  ll s = 0;
  for(int i = 1;i<=k;i++) s+=i;
  for(int i = 1;i<=k;i++)
  {
      for(int j=i+1;j<=k;j++)
      {
          s += gcd(i,j) * 6;
      }
  }
  for(int i = 1;i<=k;i++)
  {
      for(int j=i+1;j<=k;j++)
      {
          for(int l = j+1;l<=k;l++)
          {
              int g = gcd(i,j);
              s += gcd(g,l) * 6;
          }
      }
  }
  cout << s << endl;
  return 0;
}


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

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

int gcd(int a, int b) {
	if (a % b == 0)
		return(b);
	else
		return(gcd(b, a % b));
}

int main(void) {
	int K;
	int sum = 0;
	cin >> K;
	for (int k = 1; k <= K; k++)
		for (int j = 1; j <= K; j++)
			for (int i = 1; i <= K; i++)
				sum += gcd(gcd(i, j), k);
	cout << sum << endl;
	return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include "bits/stdc++.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int gcd(int a, int b){
  if(a%b==0){
    return b;
  }else{
    return gcd(b, a%b);
  }
}

int main(){
  ll k, ans = 0;
  cin >> k;
  for(ll a=1; k<=a; a++){
    for(ll b=1; k<=b; b++){
      for(ll c=1; k<=c; c++){
        ans += gcd(a, b, c);
      }
    }
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: no matching function for call to 'gcd(ll&, ll&, ll&)'
   20 |         ans += gcd(a, b, c);
      |                ~~~^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/numeric:173:5: note: candidate: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
/usr/include/c++/14/numeric:173:5: note:   candidate expects 2 arguments, 3 provided
a.cc:6:5: note: candidate: 'int gcd(int, int)'
    6 | int gcd(int a, int b){
      |     ^~~
a.cc:6:5: note:   candidate expects 2 arguments, 3 provided
Language: C

import fractions
from functools import reduce
i = 200
 
def gcd(*numbers):
    return reduce(fractions.gcd, numbers)
      
ans = 0
for i1 in range(1,i+1):
    for i2 in range(1,i+1):
        for i3 in range(1,i+1):
            num = gcd(i1,i2,i3)
            ans += num
print(ans)

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import fractions
      | ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'from'
    2 | from functools import reduce
      | ^~~~
main.c:2:1: error: unknown type name 'from'
Language: C

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

int calcGcd(int a, int b, int c)
{
    int x = a, y = b, rem = x % y;
    while (rem != 0)
    {
        x = y;
        y = rem;
        rem = x % y;
    }

    int gcd = y;

    x = gcd;
    y = c;
    rem = x % y;
    while (rem != 0)
    {
        x = y;
        y = rem;
        rem = x % y;
    }

    gcd = y;

    return y;
}

int main()
{
    int k;
    cin >> k;

    long long gcdSum = 0;

    int maxSum = k * 3;

    for (int a = 1; a <= k; ++a)
    {
        for (int b = 1; b <= k; ++b)
        {
            for (int c = 1; c <= k; ++c)
            {
                gcdSum += calcGcd(a, b, c);
            }
        }
    }

    cout << gcdSum << endl;
}

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

#include <iostream>
using namespace std;

int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }
int main() {
int K;
  cin>>K;
int sum=0;
for (int i = 1; i <=K; i++) {
 for (int j = 1; j <=K; j++) {
  for(int l = 1; l <=K; l++) {
    for(int m=1; m<i;m++){
      j=gcd(j,l);
    }
  sum+=j;}}
  cout<<sum<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: expected '}' at end of input
   16 |   cout<<sum<<endl;}
      |                    ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C

K = int(input())
ans1 = 0
ans2 = 0
ans3 = 0

def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

def gn(num):
    value = num[0]
    for item in num[1:]:
        value = gcd(value, item)
    return value


a = gn([3,15,18])

import itertools

seq = [x+1 for x in range(K)]
ptr = list(itertools.combinations(seq,3))

for i in range(len(ptr)):
    ans1 += gn(ptr[i])*6
    
seq2 = [x+1 for x in range(K)]
ptr2 = list(itertools.combinations(seq2,2))

for i in range(len(ptr2)):
    ans2 += gcd(ptr2[i][0],ptr2[i][1])*6
    
ans3 = K*(K+1)/2
print(int(ans1+ans2+ans3))

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | K = int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'K' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
    1 | K = int(input())
      |     ^~~
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
 
using namespace std; 
 
#define NOT_FOUND -1
#define rep(i,n) for(int i=0;i<(int)(n); i++)
/*for文のマクロ定義
rep(i,回数){
    処理
}
*/
 
void swap(int *a, int *b){
	*b=*a-*b;
	*a-=*b;
	*b+=*a;
}
 
int sosu_judge(int N){
	/*素数ならば1
	  素数でなければ0を返す
	*/
	int i,j;
 
	if(N==2)   return 1;
	if(N%2==0) return 0;
 
	for(i=3;i<N && N%i!=0;i+=2);
 
	if(i>=N) return 1;
	
	return 0;
}
 
int factorial(int N){  //Nの階乗を求める関数
	int ans=1;
 
	while(N--) ans*=(N+1);
	return ans;
}
 
//クイックソートをする関数
void q_sort(int a[], int first, int last){
    int i,j;
    int x,t;
 
    x = a[(first + last) / 2];
    i = first; j=last;
 
    while(1){
        while( a[i] < x) i++;
        while( x < a[j]) j--;
        
        if( i >= j) break;
        
        swap(&a[i],&a[j]);
        i++; j--;
    }
    if(first < i-1) q_sort(a, first,i-1 );
    if(last > j+1)  q_sort(a, j+1,  last);
}
 
int b_search(int target, int array[],int right, int left){
    /*二分探索を行う関数である。
      戻り値は探索したい値の格納されている位置である。
      もし値が存在しない場合、NOT_FOUND(-1)を返す
    */
    int mid;
    while(left<right){
        mid=(right+left)/2;
        if(array[mid]<target) left =mid+1;
        else                  right=mid;
    }
    if(array[mid]==target) return mid;
    return NOT_FOUND;
}
 
unsigned long combination(int n, int r){
    /*nCrの値を求める関数である。
      値が巨大になる可能性があるため、戻り地はunsigned longである
    */
    int i,j;
    unsigned long a[17];
 
    if(n-r<r) r=n-r;
    if(r==0 ) return 1;
    if(r==1 ) return n;
    if(r>17 ) return 0;
    for(i=1;i<r;i++) a[i]=i+2;
    for(i=3;i<=n-r+1;i++){
        a[0]=i;
        for(j=1;j<r;j++)a[j]+=a[j-1];
    }
    return a[r-1];
}

int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }

int main(){
    int K;
    int i,j,k;
    long sum=0;

    cin>>K;

    rep(i,K){
        rep(j,K){
            rep(k,K){
                sum+=gcd()


Compiler output:
a.cc: In function 'int main()':
a.cc:113:25: error: too few arguments to function 'int gcd(int, int)'
  113 |                 sum+=gcd()
      |                      ~~~^~
a.cc:101:5: note: declared here
  101 | int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }
      |     ^~~
a.cc:113:27: error: expected '}' at end of input
  113 |                 sum+=gcd()
      |                           ^
a.cc:112:21: note: to match this '{'
  112 |             rep(k,K){
      |                     ^
a.cc:113:27: error: expected '}' at end of input
  113 |                 sum+=gcd()
      |                           ^
a.cc:111:17: note: to match this '{'
  111 |         rep(j,K){
      |                 ^
a.cc:113:27: error: expected '}' at end of input
  113 |                 sum+=gcd()
      |                           ^
a.cc:110:13: note: to match this '{'
  110 |     rep(i,K){
      |             ^
a.cc:113:27: error: expected '}' at end of input
  113 |                 sum+=gcd()
      |                           ^
a.cc:103:11: note: to match this '{'
  103 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
int main()
{
  long long n,sum=0;cin>>n;
  for(long long  i =1;i<=n;i++)
    for(long long  j =1;j<=n;j++)
      for(long long  k =1;k<=n;k++)
          s+=gcd(i,j,k);
 cout<<sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 's' was not declared in this scope
   10 |           s+=gcd(i,j,k);
      |           ^
a.cc:10:17: error: no matching function for call to 'gcd(long long int&, long long int&, long long int&)'
   10 |           s+=gcd(i,j,k);
      |              ~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/numeric:173:5: note: candidate: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
/usr/include/c++/14/numeric:173:5: note:   candidate expects 2 arguments, 3 provided
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define PI 3.14159265359
#define INF 1000100100
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define P pair<int, int>
using namespace std;
 
int main(){
    int k; cin >> k;
    ll ans=0;
    rep(i,n){
        for(int j=i; j<n; j++){
            for(int p=j; p<n; p++){
                int factl=3;
                if(i!=j && i!=p && j!=p) factl=6;
                if(i==j && j==p) factl=1;
                ans+=gcd(gcd(i+1,j+1),p+1)*factl;
            }
        }
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'n' was not declared in this scope
   13 |     rep(i,n){
      |           ^
a.cc:2:33: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<n; i++)
      |                                 ^
Language: Java

import java.util.*;
import java.lang.*;
public class Main{
public static int hcf(int a, int b) {
		if (b == 0)
			return a;
		else
			return hcf(b, a % b);
	}

	public static int hcf(int a, int b, int c) {

		return hcf(hcf(a, b), c);}
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
  int a=sc.nextInt();
    ArrayList<int> val = new ArrayList<int>();
    for (int i=1;i<a;i++){
      if(a%i==0){
      val.add(i);
      }}
    long total=0;
    for(int i=0;i<val.size();i++){
    for(int j=0;j<val.size();j++){
    for(int k=0;k<val.size();k++){
    total+=hcf(i,j,k);
    }
    }
    }
          System.out.println(total);
  }
}


Compiler output:
Main.java:17: error: unexpected type
    ArrayList<int> val = new ArrayList<int>();
              ^
  required: reference
  found:    int
Main.java:17: error: unexpected type
    ArrayList<int> val = new ArrayList<int>();
                                       ^
  required: reference
  found:    int
2 errors
Language: C

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <vector>
#include <list>
#include <queue>
#include <stack>

using namespace std;

int gcd(int a, int b, int c) {
	int v[3] = { a,b,c }, mini = 200;
	while (1) {
		v[1] %= v[0];
		v[2] %= v[0];
		mini = min(mini, min(v[1], v[2]));
		sort(v, v + 3);
		if (v[0] == 0 && v[1] == 0)break;
		if (v[0] == 0) {
			swap(v[0], v[1]);
			swap(v[1], v[2]);
		}
	}
	return v[2];
}

int main() {
	int k;
	cin >> k;
	int sum = 0;
	for (int i = 1; i <= k; i++) {
		for (int j = i; j <= k; j++) {
			for (int l = j; l <= k; l++) {
				if (i == j && j == l)sum += gcd(i, j, l);
				else if (i != j && j != l && l != i)sum += (gcd(i, j, l) * 6);
				else sum += (gcd(i, j, l) * 3);
			}
		}
	}
	cout << sum << endl;
	return 0;
}



Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int gcd(int a, int b) 
{ 
    // Everything divides 0  
    if (a == 0) 
       return b; 
    if (b == 0) 
       return a; 
   
    // base case 
    if (a == b) 
        return a; 
   
    // a is greater 
    if (a > b) 
        return gcd(a-b, b); 
    return gcd(a, b-a); 
} 
int main()
{
	int a;
    scanf("%d", &a);
    int b = a;
    int c = a;
    long long int sum = 0;
    for(int i=1;i<=a;i++)
    {
        for(int j=1;j<=b;j++)
        {
            for(int k=1;k<=c;k++)
            {
              int x = gcd(j,k)
                x = gcd(x, i)
                sum += x;
            }
        }
    }
    printf("%lld", sum);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:33:17: error: expected ',' or ';' before 'x'
   33 |                 x = gcd(x, i)
      |                 ^
Language: C++

#include <iostream>
using namespace std;

int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }
int main() {
int sum=0;
for (int i = 1; i <=K; i++) {
 for (int j = 1; j <=K; j++) {
  for(int l = 1; l <=K; l++) {
    for(int m=1; m<i;m++){
      j=gcd(j,l);
    }
  sum+=j;}}
  cout<<sum<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'K' was not declared in this scope
    7 | for (int i = 1; i <=K; i++) {
      |                     ^
a.cc:14:20: error: expected '}' at end of input
   14 |   cout<<sum<<endl;}
      |                    ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C

#define _GLIBCXX_DEBUG
// #include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
using namespace std;

typedef long long ll;
typedef pair<int,int> pp;
const int INF = 1e9;
const int MOD = 1000000007;
const double pi = 3.141592653589793238;

// 最大公約数を求める
long long GCD(long long x, long long y) {
    return y ? GCD(y, x%y) : x;
}

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; }


int main() {
  int K;
  cin >> K;

  int sum = 0;
  for(int i = 1; i <=K; i++) {
    for( int j = 1; j <=K; j++) {
      for(int k = 1; k <=K; k++) {
        sum += GCD(i, GCD(j, k));
      }
    }
  }

  cout << sum << endl;
}


Compiler output:
main.c:3:10: fatal error: iostream: No such file or directory
    3 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<string>

using namespace std;

int func(int a, int b) {
    int tmp,r;
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }

  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
  return b;

}

int main()
{
    // スペース区切りの整数の入力
    int K,ab;
    cin >> K;

    long int sum;

    sum = 0;
    for (int i = 1; i < K+1; i++)
    {
        for (int j = 1; j < K+1; j++)
        {
            for (int k = 1; k < K+1; k++)
            {
                ab= func(i,j);
                sum += func(ab,k);
            }
        }
    }

    cout << sum << endl;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

using namespace std;

int gcd(int x int y)
{
   if (a%b == 0)
   {
       return(y);
   }
   else
   {
       return(gcd(x, x%y));
   }
}


int main()
{
   int N;
   cin >> N;
    int sum = 0;

for (int i = 0; i < N; i++)
{
    for (int j = 0; j < N; j++)
    {
        for (int k = 0; k < N; k++)
        {
           sum += gcd(gcd(i,j),k);
        }
        
    }
    
    cout << sum << endl;
}



}

Compiler output:
a.cc:5:15: error: expected ',' or '...' before 'int'
    5 | int gcd(int x int y)
      |               ^~~
a.cc: In function 'int gcd(int)':
a.cc:7:8: error: 'a' was not declared in this scope
    7 |    if (a%b == 0)
      |        ^
a.cc:7:10: error: 'b' was not declared in this scope
    7 |    if (a%b == 0)
      |          ^
a.cc:9:15: error: 'y' was not declared in this scope
    9 |        return(y);
      |               ^
a.cc:13:24: error: 'y' was not declared in this scope
   13 |        return(gcd(x, x%y));
      |                        ^
a.cc: In function 'int main()':
a.cc:30:26: error: too many arguments to function 'int gcd(int)'
   30 |            sum += gcd(gcd(i,j),k);
      |                       ~~~^~~~~
a.cc:5:5: note: declared here
    5 | int gcd(int x int y)
      |     ^~~
a.cc:30:22: error: too many arguments to function 'int gcd(int)'
   30 |            sum += gcd(gcd(i,j),k);
      |                   ~~~^~~~~~~~~~~~
a.cc:5:5: note: declared here
    5 | int gcd(int x int y)
      |     ^~~
Language: C

#include <bits/stdc++.h>

#define repo(i,n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;


int uclid(int m,int n){
    while(true){
        int r = m % n;
        if (r == 0){
            return n;
        }
        return uclid(n,r);
    }
}
int main(){
    
   int K;
  cin >> K; 
  int sum = 0;
    for(int i =1; i <= K; i++ ){
        for(int j = 1; j <= K; j++){
            for(int k = 1; k <= K; k++){
                sum += uclid(uclid(i,j),k);
            }
        }
    }
    
    cout << sum << endl;
    return 0;
}



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

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

int main() {
  int n;
  cin>>n;
  int x=0;
  for(int i=1;i<n+1;i++){
    for(int j=1;j<n+1;j++){
      for(int k=1;k<n+1;k++){
        int a= gcd(i, j ,k);
        x+=a;
      }
    }
  }
  cout<<x<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: no matching function for call to 'gcd(int&, int&, int&)'
   11 |         int a= gcd(i, j ,k);
      |                ~~~^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/numeric:173:5: note: candidate: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
/usr/include/c++/14/numeric:173:5: note:   candidate expects 2 arguments, 3 provided
Language: C++

#include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;

void Main()
{
  int N;
  
  cin >> N;
  
  int min;
  int S[N*N*N];
  int count = 0;
  int sum = 0;
  
  for(int i = 1; i <= N; i++){
    for(int j = 1; j <= N; j++){
      for(int k = 0; k <= N; k++){
        
        //最小値判別
        if(i <= j){
          if(i <= k){
            min = i;
          }
          else{
            min = k;
          }
        }
        else{
          if(j <= k){
            min = j;
          }
          else{
            min = k;
          }
        }
        
        //最大公約数判定
        for(int l = 0; l < min; l++){
          if(i % l == 0 && j % l == 0 && k % l == 0)
            S[count] = l;
        }
        
        //カウントアップ
        count++;
        
      }
    }
  }
  
  for(int i = 0; i < N*N*N; i++){
    sum += S[i];
  }
  
  printf("%d", sum);
	
	
}

int main()
{
	std::cin.tie(nullptr);
	std::ios_base::sync_with_stdio(false);
	std::cout << std::fixed << std::setprecision(15);
	Main();
}

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

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


int main() {
	int n;
	cin >> n;

	int64_t sum =0;
	for (int i=1; i<=n; i++) {
		for (int j=1; j<=n; j++) {
			for (int l=1; l<=n; l++) {
				int g = gcd(j, l);
				sum += gcd(i, g);
			}
		}
	}

	cout << sum << endl;

}


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

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second

int gcd(int a, int b)
{
   if (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }
}

int main() {
    int k; cin >> k;
    ll sum=0;
    for(int a=1; a<=k; a++){
        for(int b=1; b<=k; b++){
            for(int c=1; c<=k; c++){
                sum += gcd(gcd(a,b),gcd(b,c));
            }
        }
    }

    cout << sum << endl;
}

Compiler output:
main.c:2:10: fatal error: bits/stdc++.h: No such file or directory
    2 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.lang.*;
public class Main{
public static int hcf(int a, int b) {
		if (b == 0)
			return a;
		else
			return hcf(b, a % b);
	}

	public static int hcf(int a, int b, int c) {

		return hcf(hcf(a, b), c)
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
  int a=sc.nextInt();
    ArrayList<int> val = new ArrayList<int>();
    for (int i=1;i<a;i++){
      if(a%i==0){
      val.add(i);
      }}
    long total=0;
    for(int i=0;i<val.size();i++){
    for(int j=0;j<val.size();j++){
    for(int k=0;k<val.size();k++){
    total+=hcf(i,j,k);
    }
    }
    }
          System.out.println(total);
  }
}

Compiler output:
Main.java:13: error: ';' expected
		return hcf(hcf(a, b), c)
		                        ^
Main.java:14: error: illegal start of expression
  public static void main(String[]args){
  ^
2 errors
Language: C

#include <iostream>
using namespace std;

int main()
{
  long long K;
  cin >> K;
  long long ans = 1;
  for (long long i = 1; i < K; i++)
  {
    for (long long j = 0; j < i; j++)
    {
      ans += 6 * i * (j + 1);
    }
  }
  ans += K;
  cout << ans;
  return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

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

//def
#define debug(x) cout << #x << ": " << x << '\n'
#define out(x) cout << x << '\n'
#define repeat(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define revrepeat(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define revrep(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define foreach(e, v) for (auto &e : v)
#define all(x) (x).begin(), (x).end()
#define CYES cout << "Yes" << endl
#define CNO cout << "No" << endl
#define SPC(x) cout << fixed << setprecision(x)
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int>> vii;
typedef vector<ll> vl;
typedef vector<vector<ll>> vll;
typedef pair<int, int> P;
constexpr int MOD = 1e9 + 7;
constexpr int INF = __INT_MAX__;               // 2^31 - 1
constexpr long long INFLL = __LONG_LONG_MAX__; // 2^61 - 1
constexpr int MAX_N = 1e5 + 5;
constexpr double PI = acos(-1);

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

    int k;
    ll ans = 0;
    cin >> k;
    rep(i, k) rep(j, k) rep(l, k) {
        ans += gcd(i + 1, gcd(j + 1, l + 1));
    }

    out(ans);
    return 0;
}


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

K=int(input())
import math

if K==1:
  print(1)
  exit()
elif K==2:
  print(8)
  exit()
else:
  t=0
  for i in range(1,K-1):
    for j in range(i+1,K):
      for k in range(j+1,K+1):
        a=math.gcd(i,j)
        b=math.gcd(a,k)
        t+=b
  tw=0
  for i in range(1,K):
    for j in range(i+1,K+1):
      a=math.gcd(i,j)
      tw+=a
  
  on=0
  for i in range(1,K+1):
    on+=i
  print(t*6+tw*6+on)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | K=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'K' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | K=int(input())
      |   ^~~
Language: C

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

#define int long long
#define pii pair<int, int>
#define pb push_back

int gcd(int a, int b){
    if(a > b) return gcd(b, a);
    if(b % a == 0) return a;
    return gcd(a, b%a);
}

signed main(){

    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

    int k;
    cin >> k;
    int res = 0;
    for(int i = 1; i <= k; i++){
        for(int j = 1; j <= k; j++){
            for(int l = 1; l <= k; l++){
                res += gcd(gcd(i, j), l);
            }
        }
    }
    cout << res << endl;   

    return 0;
}

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

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

signed main()
{
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
    cout.tie(NULL);
    //cout<<"I must do it...Yeahhh";
    
    int t=1;
    //cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int sum=0;
        for(int i=1;i<=n;i++)
            for(int j=1;j<=n;j++)
                for(int k=1;k<=n;k++)
                    sum+=__gcd(i,__gcd(j,k));
        cout<<sum;
    }
    //cerr<<"[Execution : "<<(1.0*clock())/CLOCKS_PER_SEC<<"s]\n";
    return 0;
}

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

#include<iostream>

using namespace std;
using ll = long long;

int gcd(int a,int b,int c){
    int x = min (a,b,c),ans;
    for(int i=x;i>0;i--){
        if(a%i==0 && b%i ==0 && c%i == 0){
            ans += i;
        }
    }
    return ans;
}

int main(){
    ll k,ans=0;
    cin >> k;
    k++;

    for(int i = 1; i<k;i++){
        for(int j=1;j<k;j++){
            for(int l=1;l<k;l++){
                ans += gcd(i,j,l);

            }
        }
    }
    cout << ans << endl;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:17:   required from here
    7 |     int x = min (a,b,c),ans;
      |             ~~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<map>
#include<cstdlib>
using namespace std;
int main()
{
	int n; 
	bool fl = false;
	cin >>n;
	char str[3];
	itoa(n,str,10);
	for(int i=0;i<3;i++) if(str[i]=='7') fl = true;
	if(fl)cout<<"Yes"<<endl;
	else cout<<"No"<<endl ;
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'itoa' was not declared in this scope
   12 |         itoa(n,str,10);
      |         ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int n;
long long x = 0;
int main()
{
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >>n;
  for (int i = 1; i <= n; ++i)
  {
    for (int j = 1; j <= n; ++j)
    {
      long long g = __gcd(i, j);
      for (int k = 1; k <= n; ++k)
      {
        x += __gcd(g, k);
      }
    }
  }
  cout <<x << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: no matching function for call to '__gcd(long long int&, int&)'
   18 |         x += __gcd(g, k);
      |              ~~~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:18:19: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
   18 |         x += __gcd(g, k);
      |              ~~~~~^~~~~~