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

#include<bits/stdc++.h>
#define io ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
typedef long long int ll;
using namespace std;
int gcd(int a,int b){
	if(b == 0)
		return a;
	else
		return gcd(b,a%b);
}
int g(int a,int b,int c){
	int d = gcd(a,b);
	return gcd(d,c);
}
int main(){
	io;
	int k;
	cin >> k;
	ll ans = 0;
	for(int i = 1;i <= k;++i){
		for(int j = 1;j <= k;++j){
			for(int t = 1;t <= k;++t){
				ans += g(i,j,t);
			}
		}
	}
	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;
using ll = long long;
const ll INF = ll(1e9) + 1;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define reps(i, n) for(int i = 1; i <= (int)(n); 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; }
// 最大公約数
ll gcd(ll a,ll b) { return b ? gcd(b, a%b) : a; }

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;

  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

from math import gcd
k=int(input())
ans=sum(range(1,k+1))
for a in range(1,k):
    for b in range(a+1,k+1):
        ans+=6*gcd(a,b)
for a in range(1,k-1):
    for b in range(a+1,k):
        for c in range(b+1,k+1):
            ans+=6*gcd(a,gcd(b,c))
print(ans)

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

#include <bits/stdc++.h>
#define ll long long int
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define vi vector<int>
#define pb emplace_back
#define all(x) (x).begin(), (x).end()
#define deb(x) cout << #x << " - " << x << endl;
const ll MOD = 1e9 + 7;
const ll INF = 1 << 29;
const ll MAX_N = 1e6 + 7;
using namespace std;

int main() {
    IOS;
    int n; cin>>n;
    ll sum=0;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            for(int k=1;k<=n;k++){
                sum+=__gcd(i,__gcd(j,k));
            }    
        }
    }
    cout<<sum;
    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 <math.h>
#include <algorithm>
#include <vector>

using namespace std;

// 最大公約数
long long gcd(long long a, long long b) {
    if (a < 0) a = -a;
    if (b < 0) b = -b;
    if (b == 0) return a;
    else return gcd(b, a % b);
}

// 最小公倍数
long long lcm(long long a, long long b) {
    long long g = gcd(a, b);
    return a / g * b;
}

int main() {
    long int k;
    cin >> k;
    long long int r = 0;
    long int temp1;
    for (long int a = 1; a <= k; a++)
    {
        for (long int b = 1;b <= k;b++) {
            temp1 = gcd(a,b);
            for (long int c = 1;c <= k;c++) {
                r += gcd(c,temp1);
            }
        }
    }
    cout << r << 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 ll long long int
int main()
{
	ll n;
	cin>>n;
	ll total=0;
	for(ll i=1;i<=n;i++){
		for(ll j=1;j<=n;j++){
			ll g=__gcd(i,j);
			for(ll k=1;k<=n;k++){
				ll temp=g;
				temp=g(k,temp);
				total+=temp;
			}
		}
	}
	cout<<total<<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 <iostream>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <fstream>
#include <sstream>
#include <iomanip>
#define ll long long

using namespace std;

long long MOD = 1000000007;

long long gcd(long long N, long long M){
    while (true){
        if (min(N,M)==0){
            return max(N,M);
        }else if (N>M){
            N%=M;
        }else{
            M%=N;
        }
    }
}

int main(){
    int K;
    cin >> K;
    ll sum_=0;
    for(ll i=1; i<=K; i++){
        for(ll j=1; j<=K; j++){
            for(ll 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 memo[210][210];

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

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

    for (int i = 1; i < 210; i++) {
        for (int j = 1; j < 210; j++) {
            memo[i][j] = gcd(i, j);
        }
    }
    long long sum = 0;
    for (int i = 1; i <= K; i++) {
        for (int j = 1; j <= K; j++) {
            for (int k = 1; k <= K; k++) {
                sum += memo[memo[i][j]][k];
            }
        }
    }
    printf("%lld\n", 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>
using namespace std;
#define rep(i, n) for (int i=0; i < (int)(n); i++)
using ull = unsigned long long;
using ll = long long;

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; 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: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;
const ll INF = 1e18,MOD = 1e9 + 7;
const int INT_INF = 1e9,INT_MOD=1e9+7;
#define rep(i, N) for(int i = 0; i < N; i++)
typedef pair<int, int> Pi;
typedef pair<double, double> P;
int gcd(int a,int b){
    if(a < b) return gcd(b, a);
    int r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
signed main(){
    int n;cin>>n;
    ll sum=0;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            int ab=gcd(i,j);
            for(int k=1;k<=n;k++){
                sum+=gcd(ab,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>
#define rep(i,n) for(int i=0;i<n;i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define MAX(a,b) a=a>b?a:b
#define MIN(a,b) a=a<b?a:b
#define REP(i,x,n) for(int i=x;i<n;i++)
#define REPR(i,x,n) for(int i=n-1;i>=x;i--)
#define pb  push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLr(obj) (obj).rbegin(), (obj).rend()
#define endl "\n"
#define F first
#define S second
#define EN cout<<endl;
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll MOD = 1e9 + 7;

ll gcd(unsigned a, unsigned b) {
  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}

int main() {
    ll n,ans=0;
    cin>>n;
    rep(i,n){
        rep(j,n){
            rep(k,n){
                ans+=gcd(gcd(i+1,j+1),k+1);
            }
        }
    }
    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 <cmath>
#include <queue>
#include <iomanip>
#include <map>
#include <set>
#include <tuple>
#include <unordered_map>
#include <iterator>
#include <string>
#include <limits>

using namespace std;

using i64 = int64_t;
using P = pair<i64, i64>;
i64 mod = 1000000007;
int int_max = 2147483647;
int max_n = 1e5;


template<typename T>
T gcd(T a, T b) {
    if (a%b == 0) return b;
    return gcd(b, a%b);
}


int main(int argc, char **argv) {
    i64 k;
    cin >> k;

    i64 ans{0};

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

    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;  
typedef long long ll; 
typedef long double ld; 
const int INF = 0x3f3f3f3f;  
const int N = 200000 + 5;
int gcd(int a,int b){
	return b == 0?a:gcd(b,a%b);
}
int main()
{
	int n;
	cin >> n;
	ll sum = 0;
	for(int i = 1; i <= n; i++){
		for(int j = 1; j <= n; j++){
			int z = gcd(i,j);
			for(int k = 1; k <= n; k++){
				sum += gcd(z,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;
const ll MOD=1000000007;

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

int main() {
  int k;
  cin >> k;
  for(int i=0;i<=k;i++){
    for(int j=0;j<=k;j++){
      for(int l=0;l<=k;l++){
        ans +=gcd(gcd(a,b),c);
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |         ans +=gcd(gcd(a,b),c);
      |         ^~~
      |         abs
a.cc:23:23: error: 'a' was not declared in this scope
   23 |         ans +=gcd(gcd(a,b),c);
      |                       ^
a.cc:23:25: error: 'b' was not declared in this scope
   23 |         ans +=gcd(gcd(a,b),c);
      |                         ^
a.cc:23:28: error: 'c' was not declared in this scope
   23 |         ans +=gcd(gcd(a,b),c);
      |                            ^
a.cc:27:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C

#include<iostream>
using namespace std;
#define ll long long

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

int main()
{

    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    ll k;
  cin >> k;
  
 	ll g1, g2, sum=0;
  for(ll i=1; i<=k; i++){
    for(ll j=1; j<=k; j++){
      g1 = GCD(i,j);
      for(ll m=1; m<=k; m++){
        g2 = GCD(g1, m);
        sum += g2;
      }
    }
  }
  cout << sum;
  
    return 0;
}

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

#include<iostream>
#include<string>
#include <vector>
#include <algorithm>
using ll = long long;
using namespace std;
ll gcd(ll a, ll b) {
    return b ? gcd(b, a % b) : a;
}
int main() {
    int k;
    cin >>k;
    
    ll total = 0;
    for (int a = 1; a <= k; a++) {
        for (int b = 1; b <=k; b++) {
            for (int c = 1; c <= k; c++) {
                total += gcd(a, gcd(b, c));
            }
        }
    }
    cout << total << 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<algorithm>
#include<iostream>
#include<iomanip>
#include<cstring>
#include<cstdlib>
#include<utility>
#include<string>
#include<cstdio>
#include<vector>
#include<bitset>
#include<cmath>
#include<ctime>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
using namespace std;
const int inf=2147483647,dx[]={-1,0,1,0},dy[]={0,-1,0,1};// 上 左 下 右
const int N=100005,M=1000005,K=200005,mod=1000000007;
const long long llinf=9223372036854775807ll;
//int & long long
int n;
long long ans;
long long gcd(long long x,long long y)
{
	if(x%y==0)
		return y;
	return gcd(y,x%y);
}
long long g(long long a,long long b,long long c)
{
	return gcd(a,gcd(b,c));
}
long long c(int a,int b,int c)
{
	if(a==b&&b==c)
		return 1;
	if(a==b||b==c||a==c)
		return 3;
	return 6;
}
int main(){
	cin>>n;
	for(int i=1;i<=n;i++)
		for(int j=i;j<=n;j++)
			for(int k=j;k<=n;k++)
				ans+=c(i,j,k)*g(i,j,k);
	cout<<ans;
	return 0;
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Qc2 
{
	static long gcd(long a, long b) 
    { 
        if (a == 0) 
            return b; 
        return gcd(b % a, a); 
    } 
	
	static long GCD(long A, long B, long C)
	{
		long Result = A;
		Result = gcd(Result, B);
		Result = gcd(Result, C);
		return Result;
	}
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		long K = Long.parseLong(BR.readLine()), Sum = 0;
		for (long i = 1; i <= K; i++)
			for (long j = 1; j <= K; j++)
				for (long k = 1; k <= K; k++)
					Sum += GCD(i, j, k);
		System.out.println(Sum);
	}
}


Compiler output:
Main.java:5: error: class Qc2 is public, should be declared in a file named Qc2.java
public class Qc2 
       ^
1 error
Language: C

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define INF 100000000
using namespace std;
const int mod = 1000000007;

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

    int64_t N, ans = 0;
    cin >> N;
    //vector<int> A(N);
    //for(int i=0; i<N; i++){cin>>A[i];}
    //vector<vector<int>> A(N,vector<int>(M));
    for (int i = 1; i <= N; i++) {
        for (int j = 1; j <= N; j++) {
            for (int k = 1; k <= N; k++) {
                ans += gcd(gcd(i, j), k);
            }
        }
    }
    //sort(A.begin(),A.end());
    //for (int i = 0; i < N; i++) { maximum = max(maximum , A[i]);}
    //for (int i = 0; i < N; i++) { minimum = min(minimum , A[i]);}
    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>  
using namespace std;

#define all(x) x.begin(), x.end()
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef long long ll;

const int mod = 1e9 + 7;
const ll inf = 3e18 + 5;

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

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

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;
typedef long double ld;
#define F first
#define S second

int32_t main(){
//	ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	int k;
	int sum = 0;
	scanf("%d", &k);
	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);
			}
		}
	}
	printf("%d", 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

// atcoder/abc162/C/main.cpp
// author: @___Johniel
// github: https://github.com/johniel/

#include <bits/stdc++.h>

#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))

using namespace std;

template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first << "," << p.second << ")"; return os; }
template<typename P, typename Q> istream& operator >> (istream& is, pair<P, Q>& p) { is >> p.first >> p.second; return is; }
template<typename T> ostream& operator << (ostream& os, vector<T> v) { os << "("; for (auto& i: v) os << i << ","; os << ")"; return os; }
template<typename T> istream& operator >> (istream& is, vector<T>& v) { for (auto& i: v) is >> i; return is; }
template<typename T> ostream& operator << (ostream& os, set<T> s) { os << "#{"; for (auto& i: s) os << i << ","; os << "}"; return os; }
template<typename K, typename V> ostream& operator << (ostream& os, map<K, V> m) { os << "{"; for (auto& i: m) os << i << ","; os << "}"; return os; }

template<typename T> inline T setmax(T& a, T b) { return a = std::max(a, b); }
template<typename T> inline T setmin(T& a, T b) { return a = std::min(a, b); }

using lli = long long int;
using ull = unsigned long long;
using point = complex<double>;
using str = string;
template<typename T> using vec = vector<T>;

constexpr array<int, 8> di({0, 1, -1, 0, 1, -1, 1, -1});
constexpr array<int, 8> dj({1, 0, 0, -1, 1, -1, -1, 1});
constexpr lli mod = 1e9 + 7;

int main(int argc, char *argv[])
{
  std::ios_base::sync_with_stdio(0);
  std::cin.tie(0);
  std::cout.setf(std::ios_base::fixed);
  std::cout.precision(15);

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

#pragma region
#include <bits/stdc++.h>
using namespace std;
inline void ci(void){
  return;
}
template <typename First, typename... Rest>
void ci(First& first, Rest&... rest){
  cin >> first;
  ci(rest...);
  return;
}
inline void co(void){
  cout << "\n";
  return;
}
template <typename First, typename... Rest>
void co(First first, Rest... rest){
  cout << first << " ";
  co(rest...);
  return;
}
#define ll long long
#define ld long double
#define st string
#define dl double
#define wh while
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define tp tuple
#define ft first
#define sc second
#define ve vector
#define tos to_string
#define len length
#define rt return 0
#define br break
#define con continue
#define lcm(n, m) (n * m / gcd(n, m))
#define np next_permutation
#define repi(i, m, n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i, n) repi(i, 0, n)
#define repill(i, m, n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define repll(i, n) repill(i, 0, n)
#define revi(i, m, n) for(int i=(int)(m);i>(int)(n);i--)
#define rev(i, n) revi(i, 0, n)
#define revill(i, m, n) for(ll i=(ll)(m);i>(ll)(n);i--)
#define revll(i, n) revill(i, 0, n)
#define sz(v) ((int)(v).size()) 
#define each(i, n) for(auto&& i: n)
#define all(n) (n.begin(), n.end())
#define sp(n) cout << fixed << setprecision(n)
#pragma endregion
// sqrt ルート, int 2*10^9, gcd　最大公約数
// __builtin_popcount bitの個数

int main() {
  int K;
  ci(K);
  ll a = 0;
  rep(i, K){
    rep(j, K){
      rep(k, K){
        a += __gcd((i + 1), __gcd((j + 1), (k + 1)));
      }
    }
  }
  co(a);
}

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>
#define int long long
#define mod 1e18+10
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
int32_t main() {
	int k,i,j,l;
	cin>>k;
	int ans=0;
	for(i=1;i<=k;i++)
	for(j=1;j<=k;j++)
	for(l=1;l<=k;l++)
	{
		int gc=__gcd(i,j);
		ans+=__gcd(gc,l);
		
	}
	cout<<ans;
	
	
}


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 <iostream>
#include <algorithm>
#include <vector>
#include <string>

#define endl '\n'
#define ll long long

using namespace std;

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

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

	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(i, gcd(j, 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 <bits/stdc++.h>
using namespace std;
	#include <cstdio>
	#include <cstring>
	#include <cmath>
	#include <cstring>
	#include <chrono>
	#include <complex>
	#define endl "\n"
	#define ll long long int
	#define vi vector<int>
	#define vll vector<ll>
	#define vvi vector < vi >
	#define pii pair<int,int>
	#define pll pair<long long, long long>
	#define mod 1000000007
	#define inf 1000000000000000001;
	#define all(c) c.begin(),c.end()
	#define mp(x,y) make_pair(x,y)
	#define mem(a,val) memset(a,val,sizeof(a))
	#define eb emplace_back
	#define f first
	#define s second
	#define int long long 
	//using namespace std;
template<typename T> T gcd(T a, T b){ if(b == 0) return a; return gcd(b, a % b); }
	
	
	int gcd3(int a,int b,int c)
	{
		return gcd(gcd(a,b),c);
	}
	signed main()
	{
		std::ios::sync_with_stdio(false);
		int n;
		cin>>n;
		int sum = 0 ; 
		for(int i=1;i<=n;++i)
		{
			for(int j=1;j<=n;++j)
		{
			for(int k=1;k<=n;++k)
		{
			sum += gcd3(i,j,k) ;
		}
		}
		}
		cout<<sum ; 
		return 0;
	}


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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef set<int> si;
typedef map<string, int> msi;
typedef greater<int> gt;
typedef priority_queue<int, vector<int>, gt> minq;
typedef long long ll;
const ll INF = 1e18L + 1;
//clang++ -std=c++11 -stdlib=libc++ 
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}

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++) {
    ll left = gcd(i,j);
    ll right = gcd(left, k);
    sum+=right;
  }
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;
typedef long long ll;

#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define all(a) (a).begin(), (a).end()
#define all2(a, b) (a).begin(), (a).begin() + (b)
#define debug(vari) cerr << #vari << " = " << (vari) << endl;

int gcd(int a, int b)
{
    return b ? gcd(b, a % b) : a;
} //三項演算子を使ったgcd(最大公約数)

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++)
            {
                int a = gcd(i, j);
                int s = gcd(a, k);
                ans += s;
            }
        }
    }

    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;
long long ans=0;
int gcd(int x,int y)
{
    if(y==0) return x;
    return gcd(y,x%y);
}
int main()
{
    int i,j,k,n;
    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;
}


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

#include <bits/stdc++.h>
#define rep(i,n) for (ll i = 1; i < (n); ++i)
using namespace std;
using ll = long long;
using ull = long long unsigned;
using P = pair<int,int>;
const int INF=1001001001;
const int NMAX=8;
const int MOD=1000000007;
const int dbase=80*160;

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

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

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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll n,sum=0,i,i1,i2;
    cin>>n;
    for (i=1;i<=n;i++){
        for (i1=1;i1<=n;i1++){
            for (i2=1;i2<=n;i2++){
                sum+=__gcd(i,__gcd(i1,i2));
            }
        }
    }
    cout<<sum<<'\n';
}

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() {
    long long int n,tmp,ans=0;cin>>n;
    
    for(long long int i=1;i<=n;++i){
        for(long long int  j=1;j<=n;++j){
            for(long long int  k=1;k<=n;++k){
                tmp=__gcd(i,j);
                tmp=__gcd(tmp,k);
                ans+=tmp;
            }
        }
    }
    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 ;
 
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 ++ )  {
			int x= __gcd(i,j) ; 
			x = __gcd(x,k); 
			sum+= x; 
		}
	}
}
	 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 REP(i,n) for(int i=0;i<(n);++i)
using namespace std;
typedef long long LL;

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

int main() {
  int K;
  cin >> K;
  LL sum = 0;
  REP(a, K) {
    REP(b, K) {
      int g = gcd(a+1, b+1);
      REP(c, K) {
        sum += gcd(g, c+1);
      }
    }
  }
  cout << sum << endl;
} 

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

#define pb push_back
#define ff first
#define ss second
#define ll long long
#define maxn 100005
#define mod 1000000007
#include <bits/stdc++.h>
using namespace std;



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


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

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main() {
    int K;
    ll sum = 0;

    scanf("%d", &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);

    printf("%lld\n", 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<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#define f first
#define s second
#define pb push_back
using namespace std;
long long const inf=1e18+5;
int const maxn=1005;
typedef long long ll;
typedef pair<int,int>P;
vector<P>p;
char s[maxn];
int num[30];
ll solve(ll n,ll x){
	ll num = n/x;
	return (x+num*x)*num>>1;
}
int gcd(int a,int b){
	return b==0?a:gcd(b,a%b);
}
int main(){
	int n,res=0;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
			for(int k=1;k<=n;k++)
				res+=gcd((gcd(i,j)),k);
	printf("%d\n",res);
}


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>
#include <unordered_set>
using namespace std;
#define ll long long
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repeat(i,s,n) for(int (i)=s; (i)<(n); (i)++)
#define revrep(i,n) for(int (i)=(n)-1;i>=0; i--)

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

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<setprecision(std::numeric_limits<float>::max_digits10);
  cout<<fixed;
  ll k;cin>>k;
  ll s=0;
  repeat(a,1,k+1) {
    repeat(b,1,k+1) {
      repeat(c,1,k+1) {
	s+=gcd(a,gcd(b,c));
      }
    }
  }
  cout << s <<endl;
  return 0;
}


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

#pragma warning( disable : 6031)

#include <stdio.h>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <math.h>
int minimum(int a, int b) { return a < b ? a : b; }
int maximum(int a, int b) { return a > b ? a : b; }
//const long long mod = 1000000007;
const long long mod = 998244353;
using std::vector;
using std::pair;
using std::string;
using std::map;
int euclidean_gcd(int a, int b) {
	if (a < b) return euclidean_gcd(b, a);
	int r;
	while ((r = a % b)) {
		a = b;
		b = r;
	}
	return b;
}
int euclidean_gcd(int a, int b, int c) {
	return	euclidean_gcd(euclidean_gcd(a, b), c);
}
int main() {
	int K;
	scanf("%d", &K);
	int res = 0;
	for (int i = 0; i < K; i++) {
		for (int j = 0; j < K; j++) {
			for (int k = 0; k < K; k++) {
				res += euclidean_gcd(i + 1, j + 1, k + 1);
			}
		}
	}
	printf("%d", res);
	return 0;
}

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

#include <bits/stdc++.h>

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

typedef long long ll;

ll gcd(ll a,ll b)
{
	if (a%b==0)
	{
		return(b);
    }
	else
	{
		return(gcd(b,a%b));
    }
}
int main(int argc, char const *argv[])
{
    cin.tie(0);
   	ios::sync_with_stdio(false);
    ll K; cin >> K;
    ll res = 0;
    for (int i = 1; i <= K; i++) {
        for (int j = 1; j <= K; j++) {
            ll gcd_ij = gcd(i,j);
            for (int l = 1; l <= K; l++) {
                res += gcd(gcd_ij,l);
            }
        }
    }
    cout << res << endl;
    return 0;
}


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

//pragma
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>

#define YOU using
#define DONT namespace
#define SAY std

YOU DONT SAY;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<pll> vll;

#define REPP(i,a,b,d) for(int i=a;i<=b;i+=d)
#define REP(i,a,b) REPP(i,a,b,1)
#define REVV(i,a,b,d) for(int i=a;i>=b;i-=d)
#define REV(i,a,b) REVV(i,a,b,1)

#define FOR(i,a) for(int i=0; i<a; i++)
#define FORD(i,a) for(int i=(int)a-1; i>=0; i--)

#define pb push_back
#define F first
#define S second

const int OO = 1e9;
const ll INF = 1e18;

const int irand(int lo,int hi){
	return ((double)rand()/(RAND_MAX + 1.0)) * (hi-lo+1) + lo;
}

const ll lrand(ll lo,ll hi){
	return ((double)rand()/(RAND_MAX + 1.0)) * (hi-lo+1) + lo;
}

#define getc getchar
template<typename T>
T getnum(){
	int sign = 1;
	T ret = 0;
	char c;

	do{
		c = getc();
	}while(c == ' ' || c == '\n');
	if(c == '-')sign = -1;
	else ret = c-'0';
	while(1){
		c = getc();
		if(c < '0' || c > '9')break;
		ret = 10*ret + c-'0';
	}
	return sign * ret;
}

inline void ini(int& x){
	x = getnum<int>();
}

inline void scani(int& x){
	scanf("%d",&x);
}

//end of macro

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    #define endl '\n'
    cout.setf(ios::fixed);
    cout.setf(ios::showpoint);
    cout.precision(10);

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

    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){

	int n;
	cin >> n;
	long long sum =0;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 1; j <= n; j++)
		{	int x = __gcd(i,j);
			for(int k = 1; k <= n; k++)
			{
				sum += __gcd(k,x);
			}
		}
	}
	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 <iostream>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
#define pb push_back
#define fi first
#define se second
#define ALL(a) (a.begin(), a.end())
using ll = long long;
template<typename T> void Out(T x) { cout << x << endl; }
int gcd(int a, int b) {
  return (a % b) ? gcd(b, a%b) : b;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int k;
  cin >> k;
  unsigned long 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, gcd(b,c));
      }
    }
  }
  cout << res << endl;

}


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

#include <iostream>
using namespace std;
typedef long long int ll;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()

int gcd(ll a, ll b) {
  ll c;
  if (a > b) swap(a, b);
  while (b % a > 0) {
    c = b % a;
    b = a;
    a = c;
  }
  return a;
}
int main() {
  int k, 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 << endl;
}

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

#include<iostream>
using namespace std;
#define Endl '\n'
typedef long long int lli;
typedef pair<int, int> ii;
void solve();
int main(int argc, char const *argv[]){
 	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
  solve();
}

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

lli gcd(int a, int b, int c){
  return gcd(gcd(a, b), c);
}
void solve(){
  int k;
  cin>>k;
  lli 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(a, b, c);
      }
    }
  }
  cout<<sum<<Endl;
}


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

#include <iostream>

int _gcd(int a, int b)
{

    return (a % b == 0) ? b : _gcd(b, a % b);
}

int gcd(int a, int b)
{
    return (a < b) ? _gcd(b, a) : _gcd(a, b);
}

int main()
{

    int n;

    std::cin >> n;

    int sum = 0;

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

    std::cout << sum << std::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 rep(i, n) for (int i = 0; i < (int)(n); i++)
unsigned euclidean_gcd(unsigned a, unsigned b) {
  while(1) {
    if(a < b) swap(a, b);
    if(!b) break;
    a %= b;
  }
  return a;
}
int main(){
  int n;
  cin >> n;
  int ans=0;
  rep(i,n){
    rep(j,n){
      int gcd=euclidean_gcd(i+1,j+1);
      rep(q,n){
        int a=euclidean_gcd(gcd,q+1);
        ans+=a;
      }
    }
  }
  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

#define _GLIBCXX_DEBUG//TLEの原因になるので注意！！！！！！！！！！！
#include<cmath>
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
vector<int> arr;
stack<int> st;
queue<int> qu;
queue<pair<int,int> > qu2;
priority_queue<int> pq;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define rep2(i,n) for(int i=1; i<=(int)(n); i++)
#define mins(x,y) x=min(x,y)
#define maxs(x,y) x=max(x,y)
typedef set<int> set_t;
typedef set<string> set_g;
typedef complex<double> xy_t;
static const int NIL = -1;
static const int INF = 1000000007;
#define mp make_pair
#define sz(x) int(x.sise())
#define mod 1000000007
#define reps(i,s,n) for(int i = s; i < n; i++)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
deque<int> deq;
#define fi first
#define se second
//#define int long long

//cerrはコメントアウトしなくても通る//ただしTLEを引き起こすことがある

//const ll MOD = 998244353;
const ll MOD = (1e+9) + 7;
//const ll INF = 1LL << 60;
//typedef pair<ll,ll> P;
typedef pair<int, int> P;
bool chmx(int &a, int b) {
	if (b > a) {
		a = b;
		return true;
	}
	return false;
}

bool chmn(int &a, int b) {
	if (b < a) {
		a = b;
		return true;
	}
	return false;
}

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

ll lcm(ll a,ll b){
    if(a==0||b==0){
        return 0;
    }
    return a*b/gcd(a,b);
}

int main(){
    ll k;
    cin >> k;
    ll ans=0;
    rep2(a,k){
        rep2(b,k){
            rep2(c,k){
                ans+=gcd(a,gcd(b,c));
                //cerr<<a<<' '<<b<<' '<<c<<' '<<lcm(a,lcm(b,c))<<endl;
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}



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

#include<functional>
#include<algorithm>
#include<iostream>
#include<iomanip>
#include<cstring>
#include<cstdlib>
#include<utility>
#include<string>
#include<cstdio>
#include<vector>
#include<bitset>
#include<cmath>
#include<ctime>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
using namespace std;
const int inf=2147483647,dx[]={-1,0,1,0},dy[]={0,-1,0,1};// 上 左 下 右
const int N=100005,M=1000005,K=200005,mod=1000000007;
const long long llinf=9223372036854775807ll;
//int & long long
int n;
long long ans;
long long gcd(long long x,long long y)
{
	if(x%y==0)
		return y;
	return gcd(y,x%y);
}
long long g(long long a,long long b,long long c)
{
	return gcd(a,gcd(b,c));
}
long long c(int a,int b,int c)
{
	if(a==b&&b==c)
		return 1;
	if(a==b||b==c||a==c)
		return 3;
	return 6;
}
int main(){
	cin>>n;
	for(int i=1;i<=n;i++)
		for(int j=i;j<=n;j++)
			for(int k=j;k<=n;k++)
				ans+=c(i,j,k)*g(i,j,k);
	cout<<ans;
	return 0;
}

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

//#include <bits/stdc++.h>
#include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> VI;
typedef vector<VI> VVI;//例: VVI dp(10, vector<int>(10, INF);
typedef priority_queue<int, vector<int>, less<int> > QUE_int;
const int INF = 2 * pow(10, 9) + 1;//+1しないとREになるかも(out of rangeになるんかな?? )

vector<int> dx = { -1, 0, 1, 0, -1, -1, 1, 1 };
vector<int> dy = { 0, -1, 0, 1, -1, 1, -1, 1 };

ll max(ll a, ll b) { return (a > b) ? a : b; }
ll min(ll a, ll b) { return (a < b) ? a : b; }

////////////////////////////////////////////////////////////////

// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = pow(10, 9) + 7;
struct mint {
	ll x; // typedef long long ll;
	mint(ll x = 0) :x((x%mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};
// combination mod prime
// https://www.youtube.com/watch?v=8uowVvQ_-Mo&feature=youtu.be&t=1619
struct combination {
	vector<mint> fact, ifact;
	combination(int n) :fact(n + 1), ifact(n + 1) {
		assert(n < mod);
		fact[0] = 1;
		for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i;
		ifact[n] = fact[n].inv();
		for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
	}
	mint operator()(int n, int k) {
		if (k < 0 || k > n) return 0;
		return fact[n] * ifact[k] * ifact[n - k];
	}
};

template <typename TYPE>
void print_vec(const vector<TYPE>& v){
	for(int i=0; i<v.size(); i++){
		cout << v[i] << " ";
	}
	cout << endl;
}

ll gcd(ll a, ll b){//greatest common divider 最大公約数を求める
  if(b==0) return a;
  return gcd(b, a%b);
}

////////////////////////////////////////////////////////////////

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


	ll ans = 0;
	for(int i=1; i<=K; i++){
		for(int j=1; j<=K; j++){
			for(int z=1; z<=K; z++){
				int tmp = gcd(i, j);
				ans += gcd(tmp, z);
			
			}
		}
	}
	cout << ans << 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++

/*
                            ---| APOORVA MITTAL |---
*/
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define endl "\n"


// ====== Useful functions end ======

//--------------------------------------------------------------------------------------------------------------------------------
void solve()
{
   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++)
           {
               int g = __gcd(i,j);
               g = __gcd(g,k);
               sum+=g;
           }
       }
   }
   cout<<sum<<endl;

}
signed main()
{	
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);

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


Compiler output:
a.cc: In function 'int main()':
a.cc:38:9: error: 'speed' was not declared in this scope
   38 |         speed;
      |         ^~~~~
Language: C

//g++ -std=c++14 test.cpp -o test.out

#include <bits/stdc++.h>
 
// #include <string.h>
// #include <stdlib.h>
// #include <math.h>
// #include <algorithm>
// #include <functional>
// #include <iostream>
// #include <iomanip>
// #include <vector>
// #include <queue>
// #include <map> 
// #include <utility>
// #include <limits.h>
// #include <bitset>
// #include <set>
using namespace std;
 
#define LL long long int
const LL INF = (1LL<<60);
const int INF_INT = 2147483647-1e6-1;
const LL mod = 1000000007ll;
const int mod_int = 1000000007;

//計算量はどちらもO(logN)
LL gcd(LL a,LL b) { return b?gcd(b,a%b):a;}
LL lcm(LL a,LL b) { return a/gcd(a,b)*b;}
 
LL K;
 
LL ans = 0;
 
void solve(){
	for(LL a=1;a<=K;a++){
		for(LL b=1;b<=K;b++){
			for(LL c=1;c<=K;c++){
				ans += gcd(a,gcd(b,c));
			}
		}
	}
}
 
int main(){
    cin >> K;
 
    solve();
 
    cout << ans << endl;
    return 0;
}

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

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef long double lb;
#define rep(i,j,n) for (ll i = j; i < (n); i++)
#define repr(i,j,n) for(ll i = j; i >= (n); i--)
#define all(x) (x).begin(),(x).end()
#define CLR(mat,f) memset(mat, f, sizeof(mat))
#define IN(a, b, x) (a<=x&&x<b)
#define out(ans) cout << ans << endl
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
typedef pair<ll,ll>P;
const ll mod=1e9+7;
const ll INF = 1LL<<60;
const ll m=1LL<<32;

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

ll lcm(ll a, ll b){
   return a * b / gcd(a, b);
}

int main(){

  ll k;cin>>k;
  ll g[k+5][k+5];
  CLR(g,0);
  rep(i,1,k+1){
    rep(j,1,k+1){
      if(g[i][j]==0){
        g[i][j]=gcd(i,j);
        g[j][i]=gcd(i,j);
      }
    }
  }
  ll ans=0;
  rep(i,1,k+1){
    rep(j,1,k+1){
      rep(l,1,k+1){
        ans+=g[g[i][j]][l];
      }
    }
  }
  out(ans);


  return 0;
}


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