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

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

int gcd(int x,int y){
 int tmp;
 int r;
 if(x > y){
    tmp = x;
    x = y;
    y = tmp;
  }
  r = y % x;
  while(r!=0){
    y = x;
    x = r;
    r = y % x;
  }
  return x;
}

int main(){
    int K;
    cin >> K;
    int i,j,k,l,m;
    int ans =0;
    for(i=1;i<K+1;i++){
        for(j=1;j<K+1;j++){
            l=gcd(i,j);
            for(k=1;k<K+1;k++){
                m=gcd(k,l);
                ans += m;
            }
        }
    }
    cout << ans << 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>
using namespace std;

int gcd(int a, int b, int c){
  int min=max(a,max(b,c));
  int n=1;
  for (int i=0;i<min;i++) {
    if (a%(i+1)==0 && b%(i+1)==0 && c%(i+1)==0) n=i+1;
  }
  return n;
}
int main() {
  int K;
  cin >> K;
  int count=0;
  for (int i=0; i<a; i++) {
    for (int j=0; j<b; j++) {
      for (int k=0; k<c; k++) {
        count+=gcd(i+1,j+1,k+1);
      }
    }
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: 'a' was not declared in this scope
   16 |   for (int i=0; i<a; i++) {
      |                   ^
a.cc:17:21: error: 'b' was not declared in this scope
   17 |     for (int j=0; j<b; j++) {
      |                     ^
a.cc:18:23: error: 'c' was not declared in this scope
   18 |       for (int k=0; k<c; k++) {
      |                       ^
Language: C

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

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

int main(){
	int K;
	cin >> K;
	ll 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(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;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
#define all(x) (x).begin(),(x).end()
#define rp(i,s,e) for(int i=(s);i<(e);++i)
#define irp(i,s,e) for(int i=(s);i>(e);--i)
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;}
// #define NMAX 1000000000
ll K;

ll solve(){
	ll ans = 0;
	rp(a,1,K+1){
		rp(b,1,K+1){
			rp(c,1,K+1){
				ll g = gcd(a,b);
				g = gcd(g,c);
				ans += g;
			}
		}
	}
	return ans;
}

int main(){
	cin>>K;
	cout<< solve() <<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;
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:2:10: fatal error: bits/stdc++.h: No such file or directory
    2 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long  n;
	cin>>n;
	long long ans=0;
	for(long long i=1;i<=n;i++){
		for(long long  j=1;j<=n;j++){
			for(long long  l=1;l<=n;l++){
				long long  q=__gcd(l,j);
				ans+=__gcd(q,i);
			}
		}
	}
	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 <functional>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <queue>
using namespace std;
typedef long long ll;
// static const int max_n = 110;
// static const llong max_cost = 2000000000000000;
// // vector<vector<llong>> matrix(max_n, vector<llong>(max_n, 0));
// // vector<vector<llong>> adj_matrix(max_n, vector<llong>(max_n, max_cost));
// vector<vector<pair<llong, int>>> adj_list(max_n);
// vector<llong> distance_table(max_n, max_cost);
// set<pair<llong, int>> points_sort_x;
// set<pair<llong, int>> points_sort_y;

// int N;

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



int main(){
    // int u, v;
    // bool updated = false;
    ll N, M, cost, total_num;
    scanf("%lld", &N);
    total_num = 0;
    for(ll i=1;i<=N;i++){
        for(ll j=1;j<=N;j++){
            ll gcd1 = gcd(i, j);
            for(ll k=1;k<=N;k++){
                ll gcd2 = gcd(gcd1, k);
                total_num += gcd2;
            }
        }
    }

    printf("%lld\n", total_num);


    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 <string>
#include <algorithm>
#include <cmath>
#include <map>

using namespace std;

int _gcd(int a,int b) {
  int r;
  if(a < b) swap(a,b);
  while(b > 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}

int main() {
  int k;
  cin >> k;
  long long ans = 0;
  for(int i = 1; i <= k; i++) {
    for(int j = 1; j <= k; j++) {
      for(int l = 1; l <= k; l++) {
        long long tmp = _gcd(i,j);
        ans += _gcd(tmp,l);
      }
    }
  }
  cout << ans << 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;

int dgcd(int a,int b){
	int tmp;
	if(a < b){
		tmp = a;
		a = b;
		b = tmp;
	}
	while(a%b != 0){
		tmp = a % b;
		a = b;
		b = tmp;
	}
	return b;
}
int gcd(int a,int b,int c){
	int ab = dgcd(a,b);
	int re = dgcd(ab,c);
	return re;
}
int main(void)
{
	int k;
	cin>>k;
	long 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);
			}
		}
	}
	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

#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <deque>
#include <queue>
#include <set>
#include <functional>
#include <cmath>
#include <set>
#include <map>


//マクロ
#define REP(i,n) for(int i=0; i<(int)(n); ++i)
#define REPS(i,n) for(int i=1; i<=(int)(n); ++i)
#define RREP(i,n) for(int i=(int)(n)-1; i>=0; --i)
#define RREPS(i,n) for(int i=(int)(n); i>0; --i)
#define FOR(i,s,e) for(int i=(int)(s); i<(int)(e); ++i)
#define RFOR(i,s,e) for(int i=(int)(e)-1; i>=(int)(s); --i)
#define All(a) (a).begin(),(a).end()
#define RAll(a) (a).rbegin(),(a).rend()
#define dump(x)  cerr << #x << " = " << (x) << endl;

//定数
#define INF 1e9
#define INFL 1e18
#define MOD (int)(1e9+7)

typedef long long ll;
typedef unsigned long long ull;
/*
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
//*/
using namespace std;
using Graph = vector<vector<int>>;

//とりあえず書いておく変数
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0,1,0,-1 };

//今回の変数

//使用する関数
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 (a > b) { a = b; return 1; }
	return 0;
}
ll gcd(ll a, ll b) {
	if (a < b)return gcd(b, a);
	if (b == 0)return a;
	return gcd(b, a%b);
}
ll gcd3(ll a, ll b, ll c) {
	return gcd(gcd(a, b), c);
}



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

	int k;
	cin >> k;
	ll ans = 0;
	REPS(i, k) {
		FOR(j, i, k + 1) {
			FOR(l, j, k + 1) {
				int cnt = 0;
				ll res = gcd3(i, j, l);
				if (i == j)cnt++;
				if (j == l)cnt++;
				if (cnt == 2)ans += res;
				if (cnt == 1)ans += res * 3;
				if (cnt == 0)ans += res * 6;
			}
		}
	}
	cout << ans << endl;
}

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

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <iomanip>
#include <queue>
#include <deque>
#include <unordered_map>
#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
using namespace std;
typedef long long ll;

template<class T>T gcd(T a, T b){if(a<b){a^=b;b^=a;a^=b;}return b?gcd(b,a%b):a;}
template<class T>T lcm(T a, T b){return a/gcd(a,b)*b;}

int K;

int main(){
    cin>>K;

    int ans=0;
    repn(i,K){
        repn(j,K){
            repn(l,K){
                ans+=gcd(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>
#include<queue>
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(int i=1;i<=n;i++)

typedef long long int ll;
typedef pair<int,int> P;
typedef pair<ll,ll> Pll;
typedef pair<string,string> Pstring;
typedef pair<double,double> Pdouble;



int main() {

  ll s;
  cin >> s;
  ll sum = 0;
  REP1(i,s){
    REP1(j,s){
      REP1(k,s){
        ll a = gcd(i,j);
        ll b = gcd(a,k);
        sum += b;
      }
    }
  }

  
  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>

using namespace std;

typedef long long int li;
typedef long double ld;
typedef vector<li> vi;
typedef pair<li,li> pi;
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define B begin()
#define E end()
#define f(i,l,r) for(li i=l;i<=r;++i)
#define fr(i,l,r) for(li i=l;i>=r;--i)
#define u_map unordered_map
#define endl "\n"

li fastpow(li base,li exp,li M) 
{
    li res=1;
    while(exp>0) {
        if(exp&1)
            res=(res*base)%M;

        base=(base*base)%M;
        exp>>=1;
    }
    return res;
}

int main()
{    
    

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

    li k;

    cin>>k;

    li ans=0;

    f(i,1,k)
    {
        f(j,1,k)
        {
            f(l,1,k)
            {
                ans+=__gcd(i,__gcd(j,l));
            }
        }
    }

    cout<<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;
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define pi pair<int, int>
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define deb(x) cout << #x << ":" << x << endl;
/* freopen("input.txt", "r", stdin); */
/* freopen("output.txt", "w", stdout); */
const ll inf = 1e17 + 7, MOD = 1e7 + 9;


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

int main() {
	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(i, gcd(j, l));
	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

#define _USE_MATH_DEFINES
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
#define rep(i, n) REP(i, 0, n)
#define repr(i, n) for (int i = (n); i >= 0; i--)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;

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

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

    ll s = 0;
    for (int i = 1; i <= K; i++)
    {
        for (int j = 1; j <= K; j++)
        {
            for (int k = 1; k <= K; k++)
            {
                s += gcd(i, gcd(j, k));
            }
        }
    }
    OP(s);
    return 0;
}

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

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

int main(){
	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;
   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 ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int inf = 1000000000; 

ll GCD (ll x, ll y){
  ll a = max(x,y);
  ll b = min(x,y);
  if(a%b == 0) return b;
  return GCD(b,a%b);
}

int main(){
    int k;
    ll ans = 0;
    rep(i,k){
        rep(j,k){
            rep(l,k){
                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 <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define Sort(Array) sort(Array.begin(), Array.end())
#define Reverse(a) reverse(a.begin(), a.end())
#define out(ans) cout << ans << endl;
const int MOD = 1000000007;
const int INF = 2147483647;

//------------↓------------- M -------------- E ---------------- M --------------- O ---------------↓--------------//
// コンパイル 
// g++ -std=c++1z
//
// -------型変換--------
// int を string に変換
// string s = to_string(n);
// string を int に変換
// int n = stoi(s);
//
// -------二分探索---------
// k以上の値が最初に現れる時のイテレータ
// lower_bound(data.begin(), data.end(), k)
// kより大きい値が最初の現れる時のイテレータ O(logN)
// upper_bound(data.begin(), data.end(), k)
// kがdataに存在するかをtrue or falseで返す O(logN)
// binary_search(data.begin(), data.end(), k)
// 
//
//
//
//
//
// 
//------------↑------------- M -------------- E ---------------- M --------------- O ---------------↑--------------//


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




int main() {

    int k; cin >> k;
    int 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));
            }
        }
    }
    out(ans);


    return 0;
}






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

/*
          .  .
          |\_|\
          | a_a\
          | | "]
      ____| '-\___
     /.----.___.-'\
    //        _    \
   //   .-. (~v~) /|
  |'|  /\:  .--  / \
 // |-/  \_/____/\/~|
|/  \ |  []_|_|_] \ |
| \  | \ |___   _\ ]_}
| |  '-' /   '.'  |
| |     /    /|:  |
| |     |   / |:  /\
| |     /  /  |  /  \
| |    |  /  /  |    \
\ |    |/\/  |/|/\    \
 \|\ |\|  |  | / /\/\__\
  \ \| | /   | |__
       / |   |____)
       |_/
*/

#include<bits/stdc++.h>

#define iamabatman ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define precision cout.precision(10); cout << fixed;
#define endl '\n'

#define ll long long int
#define ull unsigned long long int
#define ld long double
const int INF = 1<<29;
#define MAX 1e9
#define MIN -1e9
#define mod 1000000007
#define pii pair<int,int>
#define vi vector<int>
#define vs vector<string>
#define vvi vector<vector<int>>
#define mii map<int,int>
#define msi map<string,int>
#define mis map<int,string>

#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

#define debug(x) cerr<<#x<<'='<<(x)<<endl;
using namespace std;

int gcd(int a, int b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 
void solve()
{
  int n,ans=0;
  cin>>n;
  for(int i=1;i<=n;i++)
  {
    for(int j=1;j<=n;j++)
    {
      for(int k=1;k<=n;k++)
      {
        ans+=gcd(k,gcd(i,j));
      }
    }
  }
  cout<<ans;

}


int main()
{

  iamabatman
  precision

  int t=1;
  //cin>>t;
  for(int ha=1;ha<=t;ha++)
  {
    //cout<<"Case #"<<ha<<": ";
    solve();
  }
  return 0;
}



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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define ALL(a) (a).begin(), (a).end()
typedef vector<ll> vi;
typedef vector<vector<ll>> vvi;
typedef pair<ll, ll> pii;
const ll INF = 1LL << 58;
const ll MOD = 1000000007;
typedef vector<pii> vpii;
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;
}

/* a と b の最大公約数を返す関数 */
long long GCD(long long a, long long b)
{
    if (b == 0)
        return a;
    else
        return GCD(b, a % b);
}

/* a と b の最小公倍数を求める */
long long LCM(long long a, long long b)
{
    long long g = GCD(a, b);
    return a / g * b;
}

signed main()
{
    //  以降 cin の入力元が 'input.txt' になる
    //std::ifstream in("input.txt");
    //std::cin.rdbuf(in.rdbuf());
    int N;
    cin >> N;

    int ans = 0;
    REP(a, N)
    {
        REP(b, N)
        {
            REP(c, N)
            {
                ans += GCD(GCD(a + 1, b + 1), c + 1);
            }
        }
    }
    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>
#include<numeric>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<map>
#include<utility>
#include<cmath>
#include<tuple>
#include<string>
#include<bitset>
#include<set>
#include<queue>
#include<stack>
#include<cstdio>
using namespace std;
typedef long long ll;

ll gcd(int x,int y){
    if(x%y==0)
}

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,gcd(j,l));
            }
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'll gcd(int, int)':
a.cc:21:1: error: expected primary-expression before '}' token
   21 | }
      | ^
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
Language: C

#include <iostream>
#include <algorithm>
using namespace std;
 
int gcd(int a, int b) {
    return b == 0? a:gcd(b, a%b);
}

int gcdt(int a, int b, int c) {
    return gcd(a, gcd(b, c));
}

int main()
{
    int a, b, c;
    int k;
    cin >> k;
    long long sum = 0;
    for (a = 1; a <= k; ++a)
        for (b = 1; b <= k; ++b)
            for (c = 1; c <= k; ++c){
                sum += gcdt(a, b, c);
            }
            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;
#define FIN ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
 
typedef long long ll; 

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

int main() {FIN
	
	ll i, j, k, t, n, sum = 0;
	cin >> n;
	for (i = 1; i <= n; i++) {
		for (j = 1; j <= n; j++) {
			t = gcd(i, j);
			for (k = 1; k <= n; k++)
				sum += gcd(t, k);
		}
	}
	cout << sum << "\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 <bits/stdc++.h>

using namespace std;
long long int arr[500005];
long long int size1[500005];
long long int m = 1000000007;
long long int fin(long long int node)
{
    if (node == arr[node])
        return node;
    node = arr[arr[node]];
}

void union1(long long int x, long long int y)

{
    long long int node1 = fin(x);
    long long int node2 = fin(y);

    if (size1[node1] > size1[node2])
    {
        size1[node1] += size1[node2];
        arr[node2] = node1;
    }
    else
    {
        size1[node2] += size1[node1];
        arr[node1] = node2;
    }
}
long long int fastexpo(long long int a, long long int b)
{
    long long int ans = 1;
    while (b)
    {
        if (b & 1)
            ans = (ans * a) % m;
        b = b / 2;
        a = (a * a) % m;
    }
    return ans;
}
int main()
{
    int n;
    cin >> n;
    long long 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(k, __gcd(i, j));
            }
        }
    }
    cout << sum << "\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;
#define long long long

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

int main(){
  int K;
  cin >> K;
  long ans =0;
  for(int i=1; i<=K; i++){
    for(int j=1; j<=K; j++){
      for(int k=1; k<=K; k++){
        ans += gcd(gcd(i,j),k);
      }
    }
  }
  cout << ans << 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;
typedef	long long ll;

// int/long:		-2,147,483,648 - 2,147,483,647 (-2^31 <= int < 2^31)
// long/long long:	-9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 (-2^63 <= long < 2^63)

// lower_bound(A.begin(), A.end(), N)
// upper_bound(...

// A.erase(unique(A.begin(), A.end()), A.end())

// bit: &/and, |/or, ^/xor, ~/not

// getline(cin, String)
// while (getline(cin, S)) {}

// #include <cstdio>
// int a;
// scanf("%d", &a);
// printf("%d\n", a);
//
// for (int i=0; i<n; ++i)
// 	scanf("%d", &a[i]);
//
// char c;
// scanf(" %c", &c);
//
// cout << "\n";

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

// priority_queue<int> q;
// priority_queue<int, vector<int>, less<int>> q; // Default: vector, less
// priority_queue<vector<int>, vector<vector<int>>, greater<vector<int>>> q;

// Graph
// Warshall-Floyd: Distance between each node, N^3
// Dijkstra: Distance from the start node, N^2
// DFS(Depth-First Search)

//
// Notes
//
// When specified less than N, try full scan.
// RE: empty vector
// Check Qs
// long/int
// xor -> count each bit
// Check values
// 	1,000,000 -> Loop
// 	100,000	-> vector(int:400KB, long:800KB) 

#define	INF (1<<30)
//1,073,741,824
//= 536,870,912 *2

#define	MOD 1000000007

/*
ll	myPow(ll x, ll n) {
	if (0==n)
		return 1;
	if (0==n%2)
		return myPow(x*x%MOD, n/2);
	else
		return x*myPow(x, n-1)%MOD;
}
*/
ll	myPow(ll x, ll n) {
	ll r=1;
	while(n>0)
		if (0==n%2) {
			x *=x;
			x %=MOD;
			n /=2;
		} else {
			r *=x;
			r %=MOD;
			n--;
		}
	return r;
}

#define	Rep0(i, n)	for (ll i=0; i<n; i++)
#define	Rep1(i, n)	for (ll i=1; i<=n; i++)
#define Sort(P)	sort(P.begin(), P.end())
#define Rev(P)	reverse(P.begin(), P.end())

ll	gcd(ll A, ll B) {
	while (0!=B) {
		A %=B;
		swap(A, B);
	}
	return A;
}

int	main() {
	ll K;
	cin >>K;
	ll S=0;
	Rep1(i, K)
		Rep1(j, K) {
			if (1==gcd(i, j)) {
				S+=K;
				continue;
			}
			ll G=gcd(i, j);
			Rep1(k, K)
				S+=gcd(G, k);
		}
	cout <<S <<endl;
	return 0;
}



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

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int K = s.nextInt();
        long 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, b, c);
                }
            }
        }
        System.out.println(res);
    }
    private static int gcd(int a, int b, int c) {
        return gcd(gcd(a, b), c);
    }
    private static int gcd(int a, int b) {
        if( a == 0) {
            return b;
        }
        return gcd(b%a, a);
    }
}

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

///mAAria...
#include<bits/stdc++.h>
 
using namespace std;
 
#define int long long
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define ld long double
#define ff first
#define ss second
#define pb push_back
#define pii pair<int,int>
#define pi 3.1415926535897932384626433832
#define mod 1000000007
//#define mod 998244353
#define inf 1000000000
#define pr1(a) cout << a << "\n"
#define pr2(a,b)cout << a <<  " " <<b<< "\n"
#define pr3(a,b,c) cout << a <<" " << b << " " << c << "\n"

const long double PI = acos(-1);

int powm(int a, int b) {
    int res=1;
    while(b) {
        if(b&1)
            res=(res*a)%mod;
        a=(a*a)%mod;
        b>>=1;
    }
    return res;
}

int gcd(int a, int b){
    if(b==0)return a;
    gcd(b,a%b);
}
const int maxn = 2*1e5 + 10;

void solve(){

    int n;
    cin >> n;
    int 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;

} 

signed main() 
{   
    IOS;
    int t = 1;
    // cin >> t;

    for(int i = 1;i<=t;i++){
        solve();
    }
    return 0;
} 

 

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

#include <bits/stdc++.h>
using namespace std;
#define itn int
#define nibu(K,x) binary_search(K.begin(),K.end(),x)
#define rep(i,n) for(int i=0;i<n;i++)
#define all(x) x.begin(),x.end()
#define sz(x) x.size()
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define out(x) cout<<x<<endl
#define put(x) out(x)
#define in(x) cin>>x
#define maxx(a,b,c) max(a,max(b,c))
#define minn(a,b,c) min(a,min(b,c))
using ll = long long;
using vl = vector<ll>;
using vs = vector<string>;
const double pi = 3.14159265358979;

int main() {
  int K;
  in(K);
  int ans =0;
  rep(i,K){
   rep(j,K){
    rep(g,K){
      ans += minn(__gcd(i+1,j+1),__gcd(j+1,g+1),__gcd(i+1,g+1));
    }
   }
  }
  out(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<cstdio>
#include<algorithm>
using namespace std;
int gcd(int a,int b)
{
    return a==0?b:gcd(b%a,a);
}
int GCD(int a,int b,int c)
{
    return gcd(a,gcd(b,c));
}
int main()
{
    int n;
    scanf("%d",&n);
    int 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,j,k);
    printf("%d\n",ans);
    return 0;
}


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

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

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

int main() {
    int k;
    cin >>  k;
    ll total = 0;

    rep2(a,1,k+1){ rep2(b,1,k+1) {rep2(c,1,k+1){
       // cout << "e";
        int tmp = gcd(a,b);
        total += gcd(tmp,c);
    }}}

    

    cout << total;

    
}

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

/*
    Author:zeke
    
    pass System Test!
    GET AC!!
*/
#include <iostream>
#include <queue>
#include <vector>
#include <iostream>
#include <vector>
#include <string>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <map>
#include <iomanip>
#include <utility>
#include <stack>
#include <bitset>
using ll = long long;
using ld = long double;
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define rep3(var, min, max) for (ll(var) = (min); (var) < (max); ++(var))
#define repi3(var, min, max) for (ll(var) = (max)-1; (var) + 1 > (min); --(var))
#define Mp(a, b) make_pair((a), (b))
#define F first
#define S second
#define Icin(s) \
    ll(s);      \
    cin >> (s);
#define Scin(s) \
    ll(s);      \
    cin >> (s);
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;
}
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef vector<V> VV;
typedef vector<P> VP;
ll mod = 1e9 + 7;
ll MOD = 1e9 + 7;
ll INF = 1e18;
long long GCD(long long a,long long b){
    if(b==0)return a;
    return GCD(b,a%b);
}
long long LCM(long long a,long long b){
    return a*b/GCD(a,b);
}
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin>>n;
    ll sum=0;
    rep3(i,1,n+1){
        rep3(j,1,n+1){
            rep3(k,1,n+1){
                sum+=GCD(i,GCD(j,k));
            }
        }
    }
    cout<<sum<<endl;
}


Compiler output:
main.c:7:10: fatal error: iostream: No such file or directory
    7 | #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+1).at(j+1)).at(k+1);
				cout << s << endl;
			}

	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 <bits/stdc++.h>
#include <iostream>
#include <functional>

using namespace std;
typedef long long LL;
typedef pair<int,int> pii;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define debug(x)  do{cerr<<#x<<": "<<x<<"\n";}while(0)
#define debugv(x) do{cerr<<#x<<": ";for(auto&e: (x))cerr<<e<<" ";cerr<<"\n";}while(0)
#define all(x) (x).begin(), (x).end()
#define fori(i, n) for (int i = 0; i < (int)(n); ++i)
#define ford(i, n, e) for (int i = (int)(n); i >= (int)(e); --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
template<typename T> bool mmax(T &m, const T q) { if (m < q) {m = q; return true;} else return false; }
template<typename T> bool mmin(T &m, const T q) { if (m > q) {m = q; return true;} else return false; }
#define RETURN(x) do{cout << (x) << '\n'; return 0;}while(0)

const int MOD = 1e9+7;
const int MAXN = 5e5+3;
const int INF = 1e9;


int main(int argc, char **argv) {
#ifdef OJ
    freopen("input.txt", "rt", stdin);
    //freopen("output.txt", "wt", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);

    function<int(int,int)> gcd = [&](int a, int b) {
        if (b == 0) return a;
        return gcd(b,a%b);
    }; 

    int k; cin >> k;
    int ans = 0;
    fore(a,1,k) 
        fore(b,1,k) {
            int g = gcd(a,b);
            fore(c,1,k) ans += gcd(g,c);
        }

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


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

#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define rrep(i, a, b) for (int i = a; i >= (b); i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
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;
}
void hr() {
   cerr << "--------------" << endl;
}
const int INF = 1001001001;
const int MOD = 1000000007;

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

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

   int k;
   cin >> k;
   int ans = 0;
   rep(a, 1, k + 1) rep(b, 1, k + 1) rep(c, 1, k + 1) {
      ans += gcd(gcd(a, b), c);
   }
   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

/* Dsingh_24 */

#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define	endl		'\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define hell        1000000007
#define rep(i,a,b)	for(ll int i=a;i<b;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define ios	    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;

#define N  100005

int main()
{
	ios
	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(i,__gcd(j,k)));
	}
	cout<<ans;
	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>
#define rep(i,n) for (int i=1;i<=(n);i++)
using namespace std;
typedef long long ll;
int gcd(int x, int y,int z) {
  int temp=0;
  temp = __gcd(x, y);
  return __gcd(temp,z);
}
int main(){
  int n;
  int ans=0;
  cin >> n;
  rep(i,n){
    rep(j,n){
      rep(k,n){
        ans+= gcd(i,j,k);
      }
    }
  }
  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 <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define INF 1000000000000000000
#define all(x) x.begin(), x.end()

/* a と b の最大公約数を返す関数 */
long long GCD(long long a, long long b) {
    if (b == 0)
        return a;
    else
        return GCD(b, a % b);
}

int main() {
    ll K;
    ll sum = 0;
    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: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

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

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

  int 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(__gcd(a,b), c);
      }
    }
  }

  cout<<ans<<endl;

  return 0;
}

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

#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <set>
#include <queue>
#include <map>
#include <numeric>
#include <functional>
#include <math.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;

#define INF ((int)1e9)
#define INFLL ((ll)1e18)
#define MOD (1000000007LL)

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

int main(int argc, const char * argv[]) {
    ios_base::sync_with_stdio(false);
    int K;
    cin >> K;
    
    ll Sum = 0;
    for (int a = 1; a <= K; ++a) {
        for (int b = 1; b <= K; ++b) {
            int Temp = gcd(a, b);
            for (int c = 1; c <= K; ++c) {
                Sum += gcd(Temp, c);
            }
        }
    }
    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

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
// ll mod=1000000007;
 
int main(){
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
    cout.tie(NULL);
    ll t,i,j,k,temp,temp2,n,m,x,y,sum=0;
    cin >> t;
    for(i=1;i<=t;i++){
        for(j=1;j<=t;j++){
            for(k=1;k<=t;k++){
                sum+= __gcd(__gcd(i,j),k);
            }
        }
    }
    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;

#define rep(i,p,q) for(ll i = p; i < q; i++)

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

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

int main(void){
    ll k;
    cin >> k;
    k++;
    ll ans = 0;
    rep(i,1,k){
        rep(j,1,k){
            rep(m,1,k){
                ans += gcd(i,j,m);
            }
        }
    }
    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>
#define ll long long
using namespace std;

int main()
{
	int n;
	scanf("%d",&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(k,j));
			}
		}
	}
	printf("%lld\n",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

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define repr(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define invrepr(i,a,b) for(int i=b-1;i>=a;i--)
#define invrep(i,n) invrepr(i,0,n)
#define repitr(itr,a) for(auto itr=a.begin();itr!=a.end();++itr)
const int MOD=1e9+7;

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

int main() {
    ios_base::sync_with_stdio(false);
    int k;
    cin >> k;
    ll ans=0;
    rep(a,k) {
        rep(b,k) {
            rep(c,k) ans+=gcd(a+1,gcd(b+1,c+1));
        }
    }
    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>
#include <string>
#include <vector>
#include <algorithm>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using ll = long long;
using namespace std;
int gcd(int a, int b)
{
	if (b == 0)	return a;
	return gcd(b, a % b);
}
int main()
{
	int k;
	cin >> k;
	ll ans = 0;
	int ab;
	for (int a = 1; a <= k; ++a) {
		for (int b = 1; b <= k; ++b) {
			for (int c = 1; c <= k; ++c) {
				ab = gcd(a, b);
				ans += gcd(ab, c);
			}
		}
	}
	cout << ans << 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>
#include <vector>
#include <map>
#include <set>
#include <math.h>
#include <queue>
using namespace std;
typedef long long ll;

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

  return gcd(b, a % b);
}

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

  ll sum = 0;
  for (int a = 1; a <= N; a ++) {
    for (int b = 1; b <= N; b ++) {
      for (int c = 1; c <= N; c ++) {
        sum += gcd(gcd(a, b), c);
      }
    }
  }
  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 <cstdio>
using namespace std;

inline int gcd(int a, int b) {while(b ^= a ^= b ^= a %= b); return a;}

int main(int argc, char** argv)
{
	int k, s = 0;
	scanf("%d", &k);
	k ++;
	for(int a=1; a<k; a++)
		for(int b=1; b<k; b++)
			for(int c=1; c<k; c++)
				s += gcd(gcd(a, b), c);
	printf("%d\n", s);
	return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

#define U unsigned
#define L long
#define LL long long 
#define LLU long long unsigned
#define rarr(arr, n) for(int aab = 0; aab < n; aab++){cin >> arr[aab];}
#define parr(arr, n) for(int aab = 0; aab < n; aab++){cout << arr[aab] << " ";}
#define swap(a, b, tip) tip tempswap = a;a = b;b = tempswap;
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define debug(x) cout << #x << " = " << x << "\n";

#define freopen freopen("in.txt", "r", stdin);freopen("out.txt", "w", stdout);
	
int main(){
	unsigned long long 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 += __gcd(__gcd(i, j), k);
			}
		}
	}
	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;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define all(v) v.begin(), v.end()

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 a=1; a<K+1; a++){
        for(int b=1; b<K+1; b++){
            for(int c=1; c<K+1; c++){
                ans += gcd(a,gcd(b,c));
            }
        }
    }
    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<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define f(i,a,b) for(register int i = a;i <= b; ++i)

const int N = 5e6+10, B1=37,P1=19260817,B2=137,P2=998244353;
int n,ans;
int gcd(int a,int b) {if(a>b)a^=b^=a^=b;return a?gcd(b%a,a):b;}
int main() {
	cin>>n;
	f(i,1,n) f(j,1,n) f(k,1,n) ans+=gcd(i,gcd(j,k));
	cout<<ans;
}

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 <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
#include <array>
#include <iomanip>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<long double> VD;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<VD> VVD;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

template<typename T> void chmin(T &a, T b) { if (a > b) a = b; }
template<typename T> void chmax(T &a, T b) { if (a < b) a = b; }

int in() { int x; scanf("%d", &x); return x; }
ll lin() { ll x; scanf("%lld", &x); return x; }
#define INF 1LL<<60


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++) {
                sum += GCD(GCD(a, b), c);
            }

    cout << sum << endl;

    return 0;
}

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