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

#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <bitset>
#include<iomanip>//小数点以下を精度良く表示

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define INF 2000000000
#define INF2 1000000000000000000
#define rep(i,n) for(int i=0;i<(n);i++)
typedef pair<string, string> P;
const ll MOD=1000000007;
using Graph = vector<vector<int>>;



const int MAX_N = 1000;
const int MAX_K = 100000;

template<class T>  T gcd(T a, T b) {
    while (a % b != 0) {
        T tmp = b;
        b = a % b;
        a = tmp;
    }
    return b;
}

template<class T> T lcm(T a, T b) {
    if (a == b) return b;
    T g = gcd(a, b);
    return (a / g) * b;
}
bool memo[200][200][200] = {false};
void input(int a,int b,int c) {
    memo[a][b][c] = true;
    memo[a][c][b] = true;
    memo[b][a][c] = true;
    memo[b][c][a] = true;
    memo[c][a][b] = true;
    memo[c][b][a] = true;
}

int k;

int main() {
    cin >> k;
    ll res = 0;
    for (int a = 1; a <= k; a++) {
        for (int b = 1; b <= k; b++) {
            for (int c = 1; c <= k; c++) {
                res += gcd(a, gcd(b, c));
            }
        }
    }
    cout << res << 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 <iostream>
#include <algorithm>
#define rep(i, n) for (int i = 1; i <= n; i++)
using namespace std;
using ll = long long;
using p = pair<int, int>;

int gcd(int a, int b) {
  int ret=1;
  int max = a < b ? b : a;
  for (int i = 1; i <= max; i++) {
    if (a%i==0 && b%i==0)
      ret = i;
  }
  return ret;
}
int gcd3(int a, int b, int c) {
  int ret = gcd(gcd(a, b), c);
  return ret;
}
int main() {
  int K, i, j, h, sum=0;
  cin >> K;
  rep(i, K) {
    rep(j, K) {
      rep(h, K) {
        sum += gcd3(i, j, h);
      }
    }
  }
  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 <bits/stdc++.h>
using namespace std;
 
 // a と b の最大公約数を返す関数
long long GCD(long long a, long long b) {
    if (b == 0) return a;
    else return GCD(b, a % b);
}

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

for(int a = 1; a <= K; a++){
for(int b = 1; b <= K; b++){
for(int c = 1; c <= K; c++){
int M = GCD(a, b);
    int N = GCD(M, c);
    sum += N;

}
    
}

}
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

#include <bits/stdc++.h>
#define int long long
#define all(c) (c).begin(),(c).end()
#define pii pair<long long,long long>
#define endl '\n'

using namespace std;

signed main(){
    std::ios::sync_with_stdio(false);
    int k;
    int ans=0;
    cin >> k;
    for(int i=1;i<=k;i++){
        for(int j=1;j<=k;j++){
            for(int l=1;l<=k;l++){
                ans+=__gcd(__gcd(i,j),l);
            }
        }
    }
    cout << ans;
}

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 <cstdio>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <sstream>
#include <cmath>
#include <functional>
#include <fstream>
#include <cstdlib>
typedef long long ll;
const ll MOD = 1e9+7;


#define REP(i, N) for (ll i = 0; i < (N); i++)
#define REPP(i, a, b) for (ll i = (a); i < (b); i++)
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define VSORT(c) sort((c).begin(),(c).end())
#define SZ(x) ((ll)(x).size())
//vvintを作る　マクロで　 #define vvint(N,M) vector<vector<ll>>

using namespace std;

int gcd(int a, int b , int c){
    if(b < c) swap(b,c);
    if(a < b) swap(a,b);
    if(b < c) swap(b,c);

    while(1) {
    if(a < c) swap(a, c);
    if(!c) break;
    a %= c;
  }
  while(1) {
    if(a < b) swap(a, b);
    if(!b) break;
    a %= b;
  }

  return a;

}

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

    int k;
    cin >> k;
    ll sum = 0;
    for(ll i = 1; i < k+1;i++){
        for(ll l = 1; l < k+1;l++){
            for(ll m = 1; m < k+1;m++){
              sum+=gcd(i,l,m);
            }
        }
    }
    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<bit/stdc++.h>
using namespace std;
typedef long long ll;
 
int main(){
  ll k,a,b,c,d,e,f;
  cin >> k;
  ans=0;
  for(a=1;a<=k;a++){
    for(b=1;b<=k;b++){
      for(c=1;c<=k;c++){
        ans+=_gcc(_gcc(a,b),c);
      }
    }
  }
  cout << ans;
} 

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

#inculde <iostream>
using namespace std;
typedef long long ll;
int main(){
  ll k,a=0;
  cin>>k;
  for(ll i=0;i<k;i++){
    for(ll j=0;j<k;j++){
      for(ll l=0;l<k;l++){
        a+=gcd(gcd(i,j),l);
      }
    }
  }
  cout << a<< endl;
}
 

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inculde; did you mean #include?
    1 | #inculde <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>k;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inculde <iostream>
a.cc:10:16: error: 'gcd' was not declared in this scope
   10 |         a+=gcd(gcd(i,j),l);
      |                ^~~
a.cc:10:12: error: 'gcd' was not declared in this scope
   10 |         a+=gcd(gcd(i,j),l);
      |            ^~~
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << a<< endl;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:15: error: 'endl' was not declared in this scope
   14 |   cout << a<< endl;
      |               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inculde <iostream>
Language: C

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

inline int read(){
	re int ans = 0;re bool f = 1;re char ch = getchar();
	while(ch<'0'||ch>'9'){if (ch=='-')f = 0;ch = getchar();}
	while(ch>='0'&&ch<='9'){
		ans = (ans<<3)+(ans<<1)+(ch^48);
		ch = getchar();
	}
	return f?ans:~(ans-1);
}
int mp[256][256];
int ggcd(int a,int b){
	return b==0?a:ggcd(b,a%b);
}
signed main(void){
	for(re int i=1;i<=212;++i){
		for(re int j=1;j<=212;++j){
			mp[i][j] = ggcd(i,j);
		}
	}
	int k = read();
	int ans = 0;
	for(re int i=1;i<=k;++i){
		for(re int j=1;j<=k;++j){
			for(re int h=1;h<=k;++h){
				ans+=mp[i][mp[j][h]];
				/*cout<<mp[i][mp[j][h]]<<' ';*/
				/*cout<<ans<<' ';*/
			}
		}
	}
	printf("%lld\n",ans);
	return 0;
}

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 <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int GCD(int i,int j,int l){
    int tmp=__gcd(i,j);
    tmp=__gcd(tmp,l);
    return tmp;
}
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=sum+GCD(i,j,l);
            }
        }
    }
    cout<<sum;
    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;

int gcd(int, int);

int main() {
	int n;
	cin >> n;
	long long 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(gcd(i, j), k);
			}
		}
	}
	cout << sum << "\n";
	return 0;
}

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

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

#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstdio>
#include<string>
#include<vector>
#include<cstring>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<algorithm>
// #include<bits/stdc++.h>
#define INF 0x7f7f7f7f //2139062143
#define INF1 0x3f3f3f3f //1061109567
#define INF2 2147483647
#define llINF 9223372036854775807
#define pi 3.141592653589793//23846264338327950254
#define ft first
#define sd second
#define pb push_back
#define ll long long
#define vec vector<ll>
#define mat vector<vector<ll>>
//cout<<fixed<<setprecision(6)<<
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
//ifstream f1("/Users/wangzichao/Documents/wzc.in");
//ofstream f2("/Users/wangzichao/Documents/wzc.out");
//ios::sync_with_stdio(false);
//cin.tie(0);cout.tie(0);
using namespace std;
#define local
#ifdef local
#endif
const ll maxn=6e5+7;
const double eps=1e-10;
const ll mod=1e9+7;
#define STDIN freopen("in.txt","r",stdin); freopen("out.txt","w",stdout);//************************************
#define Quick ios::sync_with_stdio(false);cin.tie(NULL);

// int main()
// {
//     STDIN
//     Quick
//     string s;
//     cin >> s;
//     string ans = "No";
//     for (int i = 0; i < 3; i++)
//     {
//         if (s[i] == '7')
//             {
//                 ans = "Yes";break;
//             }
//     }
//     cout << ans << endl;
//     return 0;
// }

// int main()
// {
//     STDIN
//     Quick
//     int n; cin >> n;
//     ll sum = 0;
//     for (int i = 1; i <= n; i++)
//     {
//         if (i%3 == 0 || i%5 == 0) continue;
//         sum += i;
//     }
//     cout << sum << endl;
// }
int gcd(int a, int b)
{
    return b?gcd(b, a%b):a;
}
int main()
{
    Quick;
    //STDIN;
    int k; cin >> k;
    ll 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(gcd(i, j), l);
            }
        }
    }
    cout << sum << endl;
}

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

#include<iostream>
using namespace std;

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

    return gcd(b, a % b); 
}
int main(int, char**)
{
    int n;

    cin >> n;

    long long result = 0;
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++)
            for (int k = 1; k <= n; k++)
                result += gcd(gcd(i, j), k);

    cout << result << 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;

using lli = long long int;

template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

template <class T>ostream &operator<<(ostream &o,const pair<T, T>&p)
{o<<"("<<p.first<<", "<<p.second<<")";return o;}

#define rep(i, n) for(lli i = 0; i < (lli)(n); i++)

const lli MOD = 1000000007LL;

lli modpow(lli a, lli n){
    lli res = 1;

    for(lli ai = a; n; n>>=1){
        if(1&n) res = (res*ai)%MOD;
        ai=(ai*ai)%MOD;
    }
    return res;
}

lli inv(lli n){
    return modpow(n, MOD-2);
}

lli modperm(lli n, lli k){
    lli res = 1;
    rep(i, k){
        res = (res*(n-i))%MOD;
    }
    return res;
}

lli modcomb(lli n, lli k){
    return (modperm(n, k)*inv(modperm(k, k)))%MOD;
}

lli posmod(lli n){
    lli res = n;
    res %= MOD;
    if(res < 0) res += MOD;
    return res;
}
lli k;
lli sum = 0;

int main(void){
    //int ti = clock();
    cin >> k;
    rep(i, k){
        rep(j, k){
            rep(m, k){
                sum += __gcd(__gcd(i+1, j+1), m+1);
            }
        }
    }
    cout << sum << endl;
    //cout << fixed << setprecision(10) << 1.0*(clock()-ti)/CLOCKS_PER_SEC << 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 <vector>
#include <string>
#include <set>

#define vi vector<int>;
#define vvi vector<vector<int>>;

using namespace std;

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

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

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

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

int main(){
    int k;
    ll sum = 0;
    cin >> k;
    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),c);
            }
        }
    }
    cout << sum;
}

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;
typedef pair<ll,ll> P;
int gcd(int a,int b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int main(void){
    int n; cin>>n;
    ll ans=0;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            for(int k=1;k<=n;k++){
                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;

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

int main() {
  int K;
  cin >> K;
  int S = 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++) {
        S += gcd(gcd(i, j), 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"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr long double EPS = 1e-8;

long long int N, M, K, L, R, H, W;
//int N, M, K, L, R, H, W;


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

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

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

using System;
using System.Linq;
using System.Collections.Generic;

using E = System.Linq.Enumerable;

public class Program
{
    public static void Main()
    {
        var k = int.Parse(Console.ReadLine());

        var sum = 0;
        for (int a = 0; a < k; ++a)
        for (int b = 0; b < k; ++b)
        for (int c = 0; c < k; ++c)
        {
            sum += FindGcd(FindGcd(a + 1, b + 1), c + 1);
        }

        Console.WriteLine(sum);
    }

    public static int FindGcd(int x, int y, int k = 0) => x < 1 ? y : FindGcd(y % x, x, k + 1);
}


Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
main.c:2:1: error: unknown type name 'using'
    2 | using System.Linq;
      | ^~~~~
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | using System.Linq;
      |             ^
main.c:3:1: error: unknown type name 'using'
    3 | using System.Collections.Generic;
      | ^~~~~
main.c:3:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | using System.Collections.Generic;
      |             ^
main.c:5:1: error: unknown type name 'using'
    5 | using E = System.Linq.Enumerable;
      | ^~~~~
main.c:5:17: error: request for member 'Linq' in something not a structure or union
    5 | using E = System.Linq.Enumerable;
      |                 ^
main.c:7:1: error: unknown type name 'public'
    7 | public class Program
      | ^~~~~~
main.c:7:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Program'
    7 | public class Program
      |              ^~~~~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
#define REP(i,x,n) for(int i=x;i<(int)n;i++)
#define rep(i,n) REP(i,0,n)
#define sp(p) cout<<setprecision(16)<<fixed<<p<<endl;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(a))
#define UNIQ(a) unique(all(a))
#define UNIQNUM(a) UNIQ(a)-a.begin()
#define UNIQIT(a) a.erase(UNIQ(a), a.end());
#define VOUT(v,i) rep(i,v.size())cout<<v[i]<<(i==v.size()-1?"\n":" ");
#define vout(v) VOUT(v,z);
#define vdbg(v,i) cout<<#v<<": ";for(int i=0;i<(int)v.size();i++){cout<<v[i]<<" ";}cout<<"\n";
#define vmin(v) *min_element(all(v))
#define vmax(v) *max_element(all(v))
#define vsum(v) accumulate(all(v), 0LL)
#define MOUT(m,r,c) rep(i,r){rep(j,c){cout<<m[i][j]<<" ";}cout<<endl;}
#define mout(m) MOUT(m,m.size(),m[0].size())
#define debg(a) cout<<#a<<": "<<a<<endl;
#define show(a) for(cont &y:a){for(cont &x:y){cout<<x<<" ";}cout<<endl;}
#define digit(a) to_string(a).length();
template<class T>inline int out(const T &t){ print(t); putchar('\n'); return 0; }
template<class T>inline T gcd(T a,T b){if(b==0)return a; return(gcd(b,a%b));}
template<class T>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
bool is_palindrome(string s){return s == string(s.rbegin(),s.rend());}
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef vector<ll> V;
typedef vector<vector<ll>> VV;
// const long long MOD=1000000007;
const long long INF = 1e18;
#define EPS (1e-7)
#define PI (acos(-1))
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) { a = b; return true; }
    return false;
}
template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) { a = b; return true; }
    return false;
}


void solve(long long K){
    ll sum=0;
    for (long long i = 1; i <= K; i++) {
        for (long long j = 1; j <= K; j++) {
            for (long long k = 1; k <= K; k++) {
                sum+=gcd(gcd(i,j),k);
            }
        }
    }
    cout << sum << endl;
}

int main(){
    long long K;
    scanf("%lld",&K);
    solve(K);
    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 sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
import numpy as np

K = INT()
sum = 0

for n in range(K):
  for m in range(K):
    for l in range(K):
      sum += gcd(n+1, gcd(m+1, l+1))

print(sum)

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import sys, re
      | ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'from'
    2 | from collections import deque, defaultdict, Counter
      | ^~~~
main.c:18:13: warning: multi-character character constant [-Wmultichar]
   18 | INF = float('inf')
      |             ^~~~~
Language: C

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

int main() {
    int n;
    cin >> n;
    
    int res = 0;
    for(int i = 1; i <= n; ++i){
        for(int j = i; j <= n; ++j){
            for(int k = j; k <= n; ++k){
                int x = __gcd(__gcd(i, j), k);
                if(i == j){
                    if(i == k){
                        res += x;
                    }else{
                        res += (3 * x);
                    }
                }else{
                    if(j == k){
                        res += (3 * x); 
                    }else{
                        res += (6 * x);
                    }
                }
            }
        }
    }
    
    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>
using namespace std;
int main()
{
  int  k, sum;
  cin >> k;
  sum = 0;
  for(int i = 1; i <= n; i++){
    for(int j = 1; j <= n; j++){
      for(int l = 1; l <= n; l++){
        sum = sum + gcd(gcd(i, j), l)
      }
    }
  }
  
  cout << sum <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: 'n' was not declared in this scope
    8 |   for(int i = 1; i <= n; i++){
      |                       ^
a.cc:11:38: error: expected ';' before '}' token
   11 |         sum = sum + gcd(gcd(i, j), l)
      |                                      ^
      |                                      ;
   12 |       }
      |       ~
Language: C

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

long long int gcd(long long int x,long long int  y,long long int z)
{
  return __gcd(x,__gcd(y,z));
}

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

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 <bits/stdc++.h>
typedef long long ll;
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;
    cin >> K;
    ll ans = 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++){
                ans += gcd(k,gcd(i, j));
            }
        }
    }

   cout << ans << 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>
using namespace std;

int main(){
  int N,g1,g2;
  long long ans=0;
  cin>>N;
  for(int i=1;i<=N;i++){for(int j=1;j<=N;j++){
    g1=gcd(i,j);
    for(int k=1;k<=N;k++){
      g2=gcd(g1,k);
      ans+=g2;
    }
  }}
  
  cout<<ans;
}

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

#include<stdio.h>

int gcd(int a,int b,int c){
	int d=1,min;
	
	a<b?min=a:min=b;
	min<c?:min=c;
	
	for(int i=0;i<min;i++){
		if(a%(i+1)==0&&b%(i+1)==0&&c%(i+1)==0){
			d=d*(i+1);
		}
	}
	return d;
}

int main(void){
	int k;
	int sum=0;
	scanf("%d",&k);
	for(int i=0;i<k;i++){
		for(int j=0;j<k;j++){
			for(int l=0;l<k;l++){
				sum+=gcd(i+1,j+1,l+1);
			}
		}
	}
	printf("%d",sum);
}

Compiler output:
main.c: In function 'gcd':
main.c:6:22: error: lvalue required as left operand of assignment
    6 |         a<b?min=a:min=b;
      |                      ^
main.c:7:19: error: lvalue required as left operand of assignment
    7 |         min<c?:min=c;
      |                   ^
Language: C

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

public class Solution {

	public static void main(String[] args) throws IOException {
		Scanner scn = new Scanner(System.in);
		int k = scn.nextInt();
		long ans = 0;
		for (int i = 1; i <= k; i++)
			for (int j = 1; j <= k; j++)
				for (int p = 1; p <= k; p++)
					ans += gcd(gcd(i, j), p);
		System.out.println(ans);
	}

	public static int gcd(int a, int b) {
		return (b == 0) ? a : gcd(b, a % b);
	}

	static class Scanner {

		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

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


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.*;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.*;
      |            ^
main.c:4:1: error: unknown type name 'public'
    4 | public class Solution {
      | ^~~~~~
main.c:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Solution'
    4 | public class Solution {
      |              ^~~~~~~~
Language: C

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

int gcd(int a, int b) {
  int r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}

int main() {
  int K, p, q, r;
  long result = 0;
  cin >> K;
  for (p = 1; p <= K; p++) {
    for (q = 1; q <= K; q++) {
      for (r = 1; r <= K; r++) {
        // cout << result << endl;
        result += gcd(p, gcd(q, r));
      }
    }
  }
  cout << result << 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>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())

const int MAX = 510000;
const int MOD = 1000000007;

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


int main(){

  ll K; cin>>K;
  ll ans = 0;

  repn(i,K){
    repn(j,K){
      repn(k,K){
        ans += gcd(gcd(i,j),k);
      }
    }
  }

  cout<<ans<<endl;
}


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

#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <string>
#include <cmath>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
//int A[4005]={0};
int gcd(int x,int y,int z){
  int m=min(x,min(y,z));
  while(!(x%m==0&&y%m==0&&z%m==0))m--;
  return m;
}


int main(){
  int k;
  cin>>k;
  ll 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,j,l);
      }
    }
  }
  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;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = 100000000;
#define rep(i, n) for (ll i=0; i<(n); 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;
#define ll long long
#define endl "\n"

ll gcd(ll a, ll b) { return b ? gcd(b,a % b) : a; }

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

    ll ans = 0;
    for (int a = 1; a <= K; ++a) {
        for (int b = 1; b <= K; ++b) {
            for (int c = 1; c <= K; ++c) {
                ans += gcd(a, gcd(b, c));
            }
        }
    }

    cout << ans << endl;
    return 0;
}


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<bits/stdc++.h>

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

typedef long long ll;

int gcd(int a,int b){
    int dividend = max(a,b);
    int divider = min(a,b);
    
    if (divider == 0) return dividend;

    while (dividend % divider != 0){
        int r = dividend % divider;
        dividend = divider;
        divider = r;
    }
    return divider ;


}

int main(){
    int k;
    cin >> k;
    ll count = 0;
    int num_gcd;
    rep(a,k){
        rep(b,k){
            rep(c,k){
                num_gcd = gcd(a+1,b+1);
                num_gcd = gcd(num_gcd,c+1);
                count += num_gcd;
            }

        }
    }
    cout << count << endl;

    return 0;
}


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

import math
K = int(input())
A = []
for i in range(K):
  for j in range(K):
    x = math.gcd(i+1,j+1)
    for k in range(K):
      A.append(math.gcd(x,k+1))
print(sum(A))

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import math
      | ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'K'
    2 | K = int(input())
      | ^
Language: C

#include <stdio.h>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <limits>
#include <numeric>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <iostream>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<long long> vll;
typedef queue<int, int> qii;
typedef pair<int, int> pii;
typedef pair<string, int> psi;

#define PI 3.14159265359
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rept(i,n) rep(i,0,n)

//int型を受け取ってその桁数を返す
int check_digits(int n,int m) {
	int digits = 0;
	while (n != 0) {
		n /= m;
		digits++;
	}
	return digits;
}

//int型を受け取ってその各桁の和を返す
int sum_digits(int n) {
	int sum=0;
	int N = n;
	while (N) {
		sum += N % 10;
		N /= 10;
	}
	return sum;
}


//最大公約数を返す関数
int gcd(int n, int m) {
	while (n != 0) {
		if (n < m) swap(n, m);
		n = n % m;
	}
	return m;
}


//2点間の距離を返す
float dis(int x1, int y1, int x2, int y2) {
	return sqrt(pow(abs(x1 - x2), 2) + pow(abs(y1 - y2), 2));
}


//入力された文字列が回文か判断してboolを返す
bool is_kaibun(string s) {
	string s_r(s.rbegin(), s.rend());
	return (s == s_r);
}


void yes() {cout << "Yes" << endl;}
void no() {cout << "No" << endl;}




//問題文を落ち着いて読む！
//型に注意！！
//出力例もちゃんと全部見る！！！！！
int main() {
	int k, sum = 0;
	cin >> k;

	int temp1, temp2;
	rep(i,1, k+1) {
		rep(j,1,k+1) {
			rep(m,1, k+1) {
				temp1 = gcd(i, j);
				temp2 = gcd(temp1, m);
				sum += temp2;
			}
		}
	}

	cout << sum << endl;
	//system("pause");
	return 0;
}

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


import java.util.*;

public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int k=sc.nextInt();
		long ans = 0;
		for(int a=1; a<=k; a++) {
			for(int b=1; b<=k; b++) {
				for(int c=1; c<=k; c++) {
					ans += gcd(a,b,c);
				}
			}
		}
		System.out.println(ans);
		sc.close();
	}

	private long gcd(long a, long b, long c) {
		return gcd(gcd(a,b), c);
	}

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


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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define MAX 128
#define fst first
#define sec second
#define pb push_back
#define mp make_pair
#define ALL(x) (x).begin(), (x).end()
#define debug(x) cerr << #x << ": " << x << '\n'
#define bit(n) (1LL << (n))
#define int long long
const double PI = 3.141593;
const int MOD = (int)1e9 + 7;
const int INF = 100100100;
const double EPS = 1e-9;
template <class T>
bool chmax(T &a, const T &b){if (a < b){a = b;return 1;}return 0;}
template <class T>bool chmin(T &a, const T &b){if (b < a){a = b;return 1;}return 0;}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } //最大公約数
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }     //最小公倍数
ll combination(ll n, ll r){if (r * 2 > n)r = n - r;ll dividend = 1;ll divisor = 1;for (ll i = 1; i <= r; ++i){dividend *= (n - i + 1);divisor *= i;}return dividend / divisor;}


signed main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int a, b, c, k,ans;
  ans = 0;
  cin >> k;
  rep2(i,1,k+1){
    rep2(j,1,k+1){
      rep2(l,1,k+1){
        ans+=gcd(gcd(i, j), l);
      }
      }
  }
  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 <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <numeric>
#include <math.h>
#include <set>
#include <bitset>
#include <stack>
#include <cmath>
#include <iomanip>

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;

typedef vector<ll> vecll;
typedef vector<ld> vecld;
typedef vector<bool> vecbl;
typedef vector<vector<ll> > matll;
typedef vector<vector<ld> > matld;
typedef vector<vector<bool> > matbl;
#define mp make_pair;

const ll prime = 1000000000 + 7;
const ld PI = 2 * acos(0.0);

/*
cout << fixed << setprecision(10);
*/

bool my_comp(pll a, pll b) {
	if (a.first != b.first) {
		return a.first < b.first;
	}

	return a.second < b.second;
}

// nのk乗(mod p = prime)
ll power(ll n, ll k) {
	ll p = prime;
	if (k == 1) {
		return n;
	}
	ll m = n * n;
	m %= p;
	if (k % 2 == 0) {
		return power(m, k / 2);
	}
	m = power(m, k / 2);
	m *= n;
	m %= p;
	return m;
}

// nCk(mod p = prime)
ll com(ll n, ll k) {
	// nCk
	ll p = prime;

	ll ans = 1;
	for (ll i = 1; i <= n; i++)
	{
		ans *= i;
		ans %= p;
	}

	for (ll i = 2; i <= k; i++)
	{
		ans *= power(i, p - 2);
		ans %= p;
	}

	for (ll i = 2; i <= n-k; i++)
	{
		ans *= power(i, p - 2);
		ans %= p;
	}

	return ans;
}

vector<pll> pfac(ll n) {
	// prime factorization
	ll m = n;
	vecll primes;
	for (ll i = 2; i <= n; i++)
	{
		if (m % i == 0) {
			while (true) {
				primes.push_back(i);
				m /= i;
				if (m % i == 0) {
					continue;
				}
				else {
					break;
				}
			}
		}
		if (m == 1) {
			break;
		}
	}

	vector<pll> primep;
	ll pre, now, index;
	pre = -1;
	index = 0;
	for (ll i = 0; i < primes.size(); i++)
	{
		now = primes[i];
		if (pre == now) {
			primep[index].second++;
		}
		else {
			index++;
			primep.push_back(make_pair(now, 1));
			pre = now;
		}
	}

	return primep;

}

vecll divisors(vector<pll> primep) {
	vecll primes, primes2;
	for (ll j = 0; j < primep[0].second; j++)
	{
		primes.push_back(pow(primep[0].first, j));
	}

	for (ll i = 1; i < primep.size(); i++)
	{
		primes2 = vecll();
		for (ll j = 0; j < primes.size(); j++)
		{
			for (ll k = 0; k < primep[i].second; k++)
			{
				primes2.push_back(primes[j] * pow(primep[i].first, k));
			}
		}
		primes = vecll();
		for (ll i = 0; i < primes2.size(); i++)
		{
			primes[i] = primes2[i];
		}
	}

	return primes;
}

int gcd(int a1, int b1) {
	int a, b;
	a = max(a1, b1);
	b = min(a1, b1);
	if (b == 0) {
		return a;
	}
	return gcd(b, a % b);
}

ll gcd(ll a, ll b, ll c) {
	return gcd(gcd(a, b), c);
}


int main() {
	//
	int K, gcd1, sum;
	sum = 0;
	cin >> K;
	for (int i = 1; i <= K; i++)
	{
		for (int j = 1; j <= K; j++)
		{
			gcd1 = gcd(i, j);
			if (gcd1 == 1) {
				sum += K;
				continue;
			}
			for (int k = 1; k <= K; k++)
			{
				sum += gcd(gcd1, k);
			}
		}
	}

	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 <iostream>
#include <vector>
#include <string>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

// MOD
const int MOD = 1000000007;

long long GCD(long long a, long long b) {
    if (b == 0) return a;
    else return GCD(b, a % b);
}

int sum = 0;

int main() {
    int K; cin >> K;
    for(int i=1; i<=K; i++){
        for(int j=1; j<=K; j++){
            for(int k=1; k<=K; k++){
                sum += GCD(GCD(i, j), k);
            }
        }
    }
    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>
using namespace std;

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

	int sum = 0;

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

	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:40: error: 'tripulGCD' was not declared in this scope
   17 |                                 sum += tripulGCD(a, b, c);
      |                                        ^~~~~~~~~
Language: C


/************************************
/ AUTHOR : YATHARTH GOSWAMI         /  
/ ALIAS : hacker_yg                 /
/ INSTITUTE : IIT Kanpur            /
************************************/
//          TEMPLATE                //

#include <bits/stdc++.h>

#define ll long long
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second

using namespace std;

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++){
                int s = min(a, min(b,c));
                for (int i = s; i >= 1; i--){
                    if ((a%i == 0)&&(b%i == 0)&&(c%i == 0)){
                        sum += i;
                        break;
                    }
                }
            }
        }
    }
    cout << sum;
    return 0;
}




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

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

int main(){
  int k;
  cin >> k;
  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(gcd(i,j),k);
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before ')' token
    9 |     for(int j=1;j<=k,j++){
      |                         ^
      |                         ;
Language: C

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define all(container) container.begin(),container.end()
#define fast ios::sync_with_stdio(0); cin.tie(0)
// #ifndef ONLINE_JUDGE
// #include "debug.cpp"
// #endif
#define int long long
const int mod = 1e9+7;  
int power(int a,int b) { if(b==0) return 1; int res = power(a,b/2); if(b&1) return res * res * a; else return res * res; }


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

  int sum = 0;

  for(int i=1;i<=k;i++){
    for(int j=1;j<=k;j++){
      for(int m=1;m<=k;m++){
        int g = __gcd(i,j);
        g = __gcd(g,m);
        sum+=g;
      }
    }
  }

  cout << sum << '\n';

  

  return 0;
}

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 <bits/stdc++.h>
using namespace std;
long long run(int x[],int num)
{
	int res;
	res=__gcd(x[0],x[1]);
	for(int i=1;i<=num-1;i++)
		res=__gcd(res,x[i]);
	return res;
}
long long check(int a,int b,int c)
{
	int x[5];
	x[0]=a;
	x[1]=b;
	x[2]=c;
	return run(x,3);
}
int main()
{
	int n,sum=0;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=n;j++)
		{
			for(int k=1;k<=n;k++)
				sum+=check(i,j,k);
		}
	}
	cout<<sum;

	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>
#include <algorithm>
#define rep(i, n) for (int i = 1; i <= n; i++)
using namespace std;
using ll = long long;
using p = pair<int, int>;

int gcd(int a, int b) {
  int ret=1;
  int max = a < b ? b : a;
  for (int i = 1; i <= max; i++) {
    if (a%i==0 && b%i==0)
      ret = i;
  }
  return ret;
}
int gcd3(int a, int b, int c) {
  int ret = gcd(gcd(a, b), c);
  return ret;
}
int main() {
  int K, i, j, h, sum=0;
  cin >> K;
  rep(i, K) {
    rep(j, K) {
      rep(h, K) {
        sum += gcd3(i, j, h);
      }
    }
  }
  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 le[201]={0,1,9,30,76,141,267,400,624,885,1249,1590,2208,2689,3411,4248,5248,6081,7485,8530,10248,11889,13687,15228,17988,20053,22569,25242,28588,31053,35463,38284,42540,46581,50893,55362,61824,65857,71247,76884,84388,89349,97881,103342,111528,120141,128047,134580,146316,154177,164817,174438,185836,194157,207927,218812,233268,245277,257857,268182,288216,299257,313635,330204,347836,362973,383709,397042,416448,434025,456967,471948,499740,515581,536073,559758,583960,604833,633651,652216,683712,709065,734233,754734,793188,818917,846603,874512,909496,933081,977145,1006126,1041504,1073385,1106467,1138536,1187112,1215145,1255101,1295142,1342852,1373253,1422195,1453816,1502376,1553361,1595437,1629570,1691292,1726717,1782111,1827492,1887772,1925853,1986837,2033674,2089776,2145333,2197483,2246640,2332104,2379085,2434833,2490534,2554600,2609625,2693919,2742052,2813988,2875245,2952085,3003306,3096024,3157249,3224511,3306240,3388576,3444609,3533637,3591322,3693924,3767085,3842623,3912324,4027884,4102093,4181949,4270422,4361548,4427853,4548003,4616104,4718640,4812789,4918561,5003286,5131848,5205481,5299011,5392008,5521384,5610705,5739009,5818390,5930196,6052893,6156139,6239472,6402720,6493681,6623853,6741078,6864016,6953457,7094451,7215016,7359936,7475145,7593865,7689630,7886244,7984165,8130747,8253888,8403448,8523897,8684853,8802826,8949612,9105537,9267595,9376656,9574704,9686065,9827097,9997134,10174780,10290813,10493367,10611772,10813692};
int main() {
	int k;
	cin>>k;
	cout<<le[k];

	return 0;
}


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

/*
susheel_7
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define INF 0x3f3f3f3f 
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)
#define ll long long int


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

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

#include<iostream>
using namespace std;
#include<cmath>
#include<algorithm>
#define int long long int
int32_t main()
{
	int k;
	cin>>k;
	int answer=0;
	int i,j,l;
	for(i=1;i<=k;i++)
	{
		for(j=1;j<=k;j++)
		{
			for(l=1;l<=k;l++)
			{
				int val=__gcd(i,__gcd(j,l));
				answer+=val;
			}
		}
	}
	cout<<answer<<endl;
}


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;


long long int gcd(long long int a, long long int b){
  while (a && b){
    (a < b) ? b %= a : a %= b;
  }
  return a + b;
}

int main(){
  int K;
  cin >> K;
  vector<vector<vector<int>>> dp(201, vector<vector<int>>(201, vector<int>(201, 0)));
  long long int ans = 0;
  for(int a=1; a<=K; a++){
    for(int b=1; b<=K; b++){
      for(int c=1; c<=K; c++){
        vector<int> z = {a, b, c};
        sort(z.begin(), z.end());
        if(dp[z[0]][z[1]][z[2]]==0){
          dp[z[0]][z[1]][z[2]] = gcd(gcd(a, b), c);
        }
        ans += dp[z[0]][z[1]][z[2]];
      }
    }
  }
  cout << ans << 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.