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

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

int ky(int x, int y) {
  int N=200;
  int max=0;
  for(int i=1;i<N;i++){
    if(x%i==0&&y%i==0){
      max=i;
    }
  }
  return max;
}
int gcd(int x,int y,int z){
  int N=200;
  int max=ky(x,y);
  if(max<ky(y,z)){
    max=ky(y,z);
  }
  return max;
}


int main() {
  int N;
  int64_t　ans=0;
  cin>>N;
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      for(int k=0;k<N;k++){
        ans=ans+gcd(i,j,k);
      }
    }
  }
}




Compiler output:
a.cc:26:3: error: extended character 　 is not valid in an identifier
   26 |   int64_t　ans=0;
      |   ^
a.cc: In function 'int main()':
a.cc:26:3: error: 'int64_t\U00003000ans' was not declared in this scope
   26 |   int64_t　ans=0;
      |   ^~~~~~~~~~~~
a.cc:31:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |         ans=ans+gcd(i,j,k);
      |         ^~~
      |         abs
Language: C

#include<stdio.h>
using namespace std;
 
int euclidean(int i, int j){
    int a, b, r;
 
    if(i >= j){
        a = i;
        b = j;
    }
    else{
        a = j;
        b = i;
    }
    
    while(1){
        if(a % b == 0) break;
        r = a % b;
        a = b;
        b = r;
    }
    
    return b;
}
 
int main(void){
    int K, e;
    long sum;
    
    scanf("%d", &K);
    
    sum = 0;
    for(int i = 1; i <= K; i++){
        for(int j = 1; j <= K; j++){
            e = euclidean(i, j);
            for(int k = 1; k <= K; k++){
                sum += euclidean(k, e);
            }
        }
    }
    
    printf("%ld\n", sum);
    return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int K;
    cin >> K;
    long int 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(gcd(a, b), gcd(b, c));
            }
        }
    }
    cout << total << endl;
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: 'gcd' was not declared in this scope
   11 |                 total += gcd(gcd(a, b), gcd(b, c));
      |                              ^~~
a.cc:11:26: error: 'gcd' was not declared in this scope
   11 |                 total += gcd(gcd(a, b), gcd(b, c));
      |                          ^~~
Language: C

#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <tuple>
#include <map>
#include <math.h>
#include <algorithm> // std::sort, std::min
#include <iomanip> // std::setprecision
#include <cmath> // std::ceil
#include <numeric>

int main() {
  long int K;
  std::cin >> K;

  long long 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 += std::gcd(std::gcd(i, j), k);
      }
    }
  }
  std::cout << sum << std::endl;
  
  return 0;
}


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

import math

K = int(input())
ans = 0

for i in range(1,K+1):
  for j in range(1,K+1):
    for k in range(1,K+1):
      temp = math.gcd(i, j)
      temp2 = math.gcd(temp, k)
      ans = temp2 + ans

print(ans)


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

#include <bits/stdc++.h>
using namespace std;
int gcd(int,int);
vector<int> waru(vector<int>);

int main() {
  int 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;
}

int gcd(int a,int b){
  int syou,amari;
  vector<int> vec={a,b};
  while(vec.at(1)==0){
    vec=waru(vec)
  }
  return vec.at(0);
}

vector<int> waru(vector<int> i(2)){
  vector<int> vec(2);
  int syou;
  vec.at(0) =i.at(1);
  syou=i.at(0)/i.at(1);
  vec.at(1) =i.at(0)-syou*i.at(1);
  return vec;
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:23:18: error: expected ';' before '}' token
   23 |     vec=waru(vec)
      |                  ^
      |                  ;
   24 |   }
      |   ~               
a.cc: At global scope:
a.cc:28:31: error: expected ',' or '...' before '(' token
   28 | vector<int> waru(vector<int> i(2)){
      |                               ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int read(){
	int sum=0,f=1;
	char s=getchar();
	while (s<'0' or s>'9'){
		if (s=='-')f=-1;
		s=getchar();
	}
	while (s>='0' and s<='9'){
		sum=sum*10+s-'0';
		s=getchar();
	}
	return sum*f;
}
int n;
int map1[201][201];
int gcd(int a,int b){
	if (a>b){
		int c=a;
		a=b,b=c;
	}
	if (map1[a][b])return map1[a][b];
	int x=a,y=b;
	while (a%b){
		int c=a%b;
		a=b;
		b=c;
	}
	map1[x][y]=b;
	return b;
}
int main(){
	n=200;
	long long sum=0;
	for (int i=1;i<=n;i++){
		for (int j=1;j<=n;j++){
			for (int k=1;k<=n;k++){
				sum+=gcd(gcd(i,j),k);
			}
		}
	}
	cout<<sum<<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(void) {
  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 a = i,b = j;
	if(a > b) {
          int tmp = a;
          a = b;
          b = tmp;
        }
        int r = a % b;
        while(r != 0) {
          a = b;
          b = r;
          r = a % b;
        }
        a = k;
        if(a > b) {
          int tmp = a;
          a = b;
          b = tmp;
        }
        r = a % b;
        while(r != 0) {
          a = b;
          b = r;
          r = a % b;
        }
        sum += b;
      }
    }
  }
  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

import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int K = sc.nextInt();
    
    int sum = 0;
    
    for(int i=1;i<K+1;i++) {
      for(int j=1;j<K+1;j++){
        for(int k=1;k<K+1;k++) sum += gcd(i, j, k);
      }
    }
    
    System.out.println(sum);
  }
  public static int gcd(int a, int b) {
    if (a < b) {
        int tmp = a;
        a = b;
        b = tmp;
    }
    int r = -1;
    while (r != 0) {
        r = a % b;
        a = b;
        b = r;
    }
    return a;
  }
  public static int gcd(int a, int b, int c) {
    return gcd(gcd(a, b), c);
  }
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
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

#include<stdio.h>
int gcd(int a,int b);
int main(void){
  int a,b,c,k,i,ans;
  
  scanf("%d",&k);
  ans = 0;
  
  for(a=1;a<=k;a++){
    for(b=1;b<=k;b++){
      for(c=1;c<=k;c++){
        ab = gcd(a,b);
        ans += gcd(ab,c);
      }
    }
  }
  
  printf("%d\n",ans);
  
  return 0;
}

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

Compiler output:
main.c: In function 'main':
main.c:12:9: error: 'ab' undeclared (first use in this function); did you mean 'b'?
   12 |         ab = gcd(a,b);
      |         ^~
      |         b
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <tuple>
#include <map>
#include <math.h>
#include <algorithm> // std::sort, std::min
#include <iomanip> // std::setprecision
#include <cmath> // std::ceil
#include <numeric>

int main() {
  long int K;
  std::cin >> K;

  long long 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 += std::gcd(std::gcd(i, j), k);
      }
    }
  }
  std::cout << sum << std::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>
using namespace std;

int main () {
  int N;
  cin >> N;
  long long ans = 0;
  for (int i = 1;i <= N; i++){
    for (int j = 1;j <= N; j++){
      for (int k = 1;k <= N; k++){
        int a = min (i, j);
        int b = min (a, k);
        for (int l = b; l >= 1; l--){
          bool plus = true;
          if (i%l != 0) plus = false;
          if (j%l != 0) plus = false;
          if (k%l != 0) plus = false;
          if (plus){
            ans += l;
            break;
          }
        }
      }
    }
  }
  cout << ans << endl;
}

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

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

typedef long long ll;

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

int main(){
    ll K;
    cin >> K ;
    ll ans = 0;
    for(ll i = 1; i <= K; i++){
        for(ll j = i; j <= K; j++){
            for(ll k = j; k <= K; k++){
                ll tmp = gcd(i,j);
                tmp = gcd(tmp, k);
                if(i == j && j == k){
                    ans += tmp;
                } else if(i ==j || j == k || i == k){
                    ans += tmp * 3;
                } else { 
                    ans += tmp * 6;
                }
            }
        }
    }
    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 gcd(int a, int b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 

int main()
{
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
    int a,b,c,result;
    long sum=0;
    cin>>a;
    for(int i=1;i<=a;i++)
    {
    	for(int j=1;j<=a;j++)
    	{
    		for(int k=1;k<=a;k++)
    		{
    			sum+=gcd(gcd(i,j),k);

    		}
    	}
    }
    cout<<sum;

}

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

#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 

long long int main(void)
{
	long long int sum= 0;
	long long int k;
	scanf("%lld", &k); 
	for(long long int i=1;i<=k;i++)
	{
		for(long long int j=1;j<=k;j++)
		{
			for(long long int o=1;o<=k;o++)
			{
				sum = sum + gcd(i, (gcd(j, o)));

			}
		}
	}
	prlong long intf("%lld\n", sum);

}

Compiler output:
a.cc:10:11: error: '::main' must return 'int'
   10 | long long int main(void)
      |           ^~~
a.cc: In function 'int main()':
a.cc:26:9: error: 'prlong' was not declared in this scope; did you mean 'ulong'?
   26 |         prlong long intf("%lld\n", sum);
      |         ^~~~~~
      |         ulong
Language: C++

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

typedef long long ll;
typedef pair<ll,ll> P;

const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;

#define rep(i, a, b) for(ll (i) = (a); (i) < (b);++i)

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

int main() {
	ll A;
	cin >> A;
	ll sum = 0;
	A++;
	rep(i,1,A) {
		rep(j,1,A){
			rep(k,1,A){
				sum += gcd(gcd(A, B), C);
			}
		}
	}
	cout << sum << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:51: error: 'B' was not declared in this scope
   30 |                                 sum += gcd(gcd(A, B), C);
      |                                                   ^
a.cc:30:55: error: 'C' was not declared in this scope
   30 |                                 sum += gcd(gcd(A, B), C);
      |                                                       ^
Language: C

#include<iostream>
#include<algorithm>
#include "ソース.h"
using namespace std;
int gcd(int a, int b) {
    int kouyaku = 1;
    for (int i =1; i <= a; i++) {
        if (a % i == 0 && b % i == 0) {
            kouyaku = i;
        }
    }
    return kouyaku;
}

int main() {
    long long k, sum = 1;
    cin >> k;

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

    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>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<time.h>
#include<string>
#include<cmath>
#include<stack>
#include<map>
#include<set>
//ios::sync_with_stdio(false);
#define ull unsigned long long
#define endl "\n"
#define int long long
#define double long double
using namespace std;
#define PI  3.1415926535898
#define eqs 1e-17
const long long max_ = 5000 + 7;
//haxi = 137， haximod = 998244353;
const int mod = 998244353;
const int inf = 1e9 + 7;
const long long INF = 1e18;
int read() {
	int s = 0, f = 1;
	char ch = getchar();
	while (ch<'0' || ch>'9') {
		if (ch == '-')
			f = -1;
		ch = getchar();
	}
	while (ch >= '0'&&ch <= '9') {
		s = s * 10 + ch - '0';
		ch = getchar();
	}
	return s * f;
}
inline void write(int x) {
	if (x < 0) {
		putchar('-');
		x = -x;
	}
	if (x > 9)
		write(x / 10);
	putchar(x % 10 + '0');
}
inline int min(int a, int b) {
	return a < b ? a : b;
}
inline int max(int a, int b) {
	return a > b ? a : b;
}
int main(){
 int n;
 cin>>n;
 for(int i=1;i<=n;i++)
   for(int j=1;j<=n;j++)
      g[i][j]=__gcd(i,j);
 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+=g[g[i][j]][k]; 
 cout<<ans<<endl;
 return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:59:7: error: 'g' was not declared in this scope
   59 |       g[i][j]=__gcd(i,j);
      |       ^
a.cc:64:12: error: 'g' was not declared in this scope
   64 |       ans+=g[g[i][j]][k];
      |            ^
Language: C++

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

Compiler output:
a.cc:6:3: error: extended character 　 is not valid in an identifier
    6 |   　int K;
      |   ^
a.cc: In function 'int main()':
a.cc:6:3: error: '\U00003000int' was not declared in this scope
    6 |   　int K;
      |   ^~~~~
a.cc:7:11: error: 'K' was not declared in this scope
    7 |    cin >> K;
      |           ^
Language: C

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

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

int threegcd(int x, int y, int z){
  int k=gcd(x,y);
  int l= gcd(k,z);
  return(l);
}

int main() {
  int K;
  cin >> K;    
  long ans=0;
  for(int i=1;i<(K+1); i++){
    for(int j=1; j<(K+1); j++){
      for(int m=1;m<(K+1); m++){
        
        ans = ans + threegcd(i,j,m); 
      }
    }
  }
  cout << ans << endl;
  
  return 0;
  
}
    

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

#include<iostream>
using namespace std;

int euclidean(int i, int j){
    int a, b, r;

    if(i >= j){
        a = i;
        b = j;
    }
    else{
        a = j;
        b = i;
    }
    
    while(1){
        if(a % b == 0) break;
        r = a % b;
        a = b;
        b = r;
    }
    
    return b;
}

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

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

def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)


n = int(input())
ans = 0
if n > 2:
    for i in range(1, n-1):
        for j in range(i + 1, n):
            for k in range(j + 1, n + 1):
                tmp = gcd(i, j)
                ans += gcd(tmp, k) * 6
if n > 1:
    for i in range(1, n):
        for j in range(i + 1, n + 1):
            ans += gcd(i, j) * 6
ans += n*(1+n)//2
print(ans)


Compiler output:
main.c:1:1: error: unknown type name 'def'
    1 | def gcd(a, b):
      | ^~~
main.c: In function 'gcd':
main.c:1:14: error: expected declaration specifiers before ':' token
    1 | def gcd(a, b):
      |              ^
main.c:1:5: error: type of 'a' defaults to 'int' [-Wimplicit-int]
    1 | def gcd(a, b):
      |     ^~~
main.c:1:5: error: type of 'b' defaults to 'int' [-Wimplicit-int]
Language: C

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

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

int main()
{
    int k;
    cin >> k;
    long long ans = 0;

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

    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

import math

K = int(input())
total = 0

for i in range(1,K+1):
    for j in range(1, K+1):
        gcd1 = math.gcd(i, j)
        for k in range(1, K+1):
            total += math.gcd(gcd1, k)
print(total)

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

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int gcm(int a, int b) {
	int tmp;
	if (b > a) {
		tmp = a;
		a = b;
		b = tmp;
	}
	while (1) {
		tmp = a % b;
		if (tmp ==0) {
			break;
		}
		else {
			a = b;
			b = tmp;
		}
	}

	return b;
}

int gcm3(int a, int b, int c) {
	return gcm(gcm(a, b), c);
}

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

	cout << sum << "\n";

	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<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<time.h>
#include<string>
#include<cmath>
#include<stack>
#include<map>
#include<set>
//ios::sync_with_stdio(false);
#define ull unsigned long long
#define endl "\n"
#define int long long
#define double long double
using namespace std;
#define PI  3.1415926535898
#define eqs 1e-17
const long long max_ = 5000 + 7;
//haxi = 137， haximod = 998244353;
const int mod = 998244353;
const int inf = 1e9 + 7;
const long long INF = 1e18;
int read() {
	int s = 0, f = 1;
	char ch = getchar();
	while (ch<'0' || ch>'9') {
		if (ch == '-')
			f = -1;
		ch = getchar();
	}
	while (ch >= '0'&&ch <= '9') {
		s = s * 10 + ch - '0';
		ch = getchar();
	}
	return s * f;
}
inline void write(int x) {
	if (x < 0) {
		putchar('-');
		x = -x;
	}
	if (x > 9)
		write(x / 10);
	putchar(x % 10 + '0');
}
inline int min(int a, int b) {
	return a < b ? a : b;
}
inline int max(int a, int b) {
	return a > b ? a : b;
}int main(){
 int n;
 cin>>n;
 for(int i=1;i<=n;i++)
   for(int j=1;j<=n;j++)
      g[i][j]=gcd(i,j);
 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+=g[g[i][j]][k]; 
 cout<<ans<<endl;
 return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:58:7: error: 'g' was not declared in this scope
   58 |       g[i][j]=gcd(i,j);
      |       ^
a.cc:58:15: error: 'gcd' was not declared in this scope
   58 |       g[i][j]=gcd(i,j);
      |               ^~~
a.cc:59:2: error: 'LL' was not declared in this scope
   59 |  LL ans=0;
      |  ^~
a.cc:63:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   63 |       ans+=g[g[i][j]][k];
      |       ^~~
      |       abs
a.cc:63:12: error: 'g' was not declared in this scope
   63 |       ans+=g[g[i][j]][k];
      |            ^
a.cc:64:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   64 |  cout<<ans<<endl;
      |        ^~~
      |        abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector < vector <int> > dp(n+1,vector <int> (n+1,0));
  for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++)
      dp[i][j]=__gcd(i,j);
  long long 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+=dp[i][dp[j][[k]];
      }
   cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: two consecutive '[' shall only introduce an attribute before '[' token
   14 |         ans+=dp[i][dp[j][[k]];
      |                         ^
a.cc:14:25: error: expected ']' before '[' token
   14 |         ans+=dp[i][dp[j][[k]];
      |                         ^
      |                         ]
a.cc:14:25: error: two consecutive '[' shall only introduce an attribute before '[' token
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
 
int main() {
	int n,k; long long ans=0;
	string s;
	cin>>k;
	for(int i=1;i<=k;i++){
	    for(int i2=1;i2<=k;i2++){
	        for(int i3=1;i3<=k;i3++){
	            ans+=gcd(i,gcd(i2,i3))
	        }
	    }
	}
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:32: error: 'gcd' was not declared in this scope
   16 |                     ans+=gcd(i,gcd(i2,i3))
      |                                ^~~
a.cc:16:26: error: 'gcd' was not declared in this scope
   16 |                     ans+=gcd(i,gcd(i2,i3))
      |                          ^~~
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 pair<int,int> P;

// 最小公倍数を求める
int euqlid (int a, int b){
  int temp;
  temp = a % b;
  if(temp == 0)return b;
  return euqlid(b,temp);
}
ll conbination(ll a,ll b){
  ll u = 1;
  ll d = 1;
  while(b != 0){
    u *= a;
    d *= b;
    a--;
    b--;
  }
  return u / d;
}

int main(){
  int n;
  ll sum = 0;
  cin >> n;
  for(int i = 1;i<n+1;i++){
    for(int j = 1;j<n+1;j++){
      for(int k = 1;k<n+1;k++){
        // puts("a");
        sum += euqlid(i,euqlid(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>
using namespace std;
typedef long long ll;

int gcd( int x, int y )
{
    return (x % y)? gcd(y, x % y): y;
}
int main()
{
    int k;
    cin >> k;
    ll sum = 0;
    for( int a = 1; a <= k; a++ ){
        for( int b = 1; b <= k; b++ ){
            for( int c = 1; c <= k; c++ ){
                int gcd_1 = gcd( a, b );
                int gcd_2 = gcd( c, gcd_1 );
                sum = sum + gcd_2;
            }
        }
    }
    cout << sum << 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<iomanip>
#include<math.h>
using namespace std;
int gcd(int a,int b){
    int g;

    while(a!=b){
        if(a>b){
            a-=b;
        }
        else{
            b-=a;
        }
    }

    return a;
    
}

int main(){
    int n;
    int i,j,k;//preparation for
    int64_t s;

    cin>>n;
    s=0;

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

    cout<<s;
    
    return 0;
}

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

#include<stdio.h>
#include<math.h>
#include<string>
#include<cmath>
#include<vector>
//最小公倍数
int gcd(int m, int n){
 int M=m,N=n; 

    int temp;
    while(m%n!=0){
        temp=n;
        n=m%n;
        m=temp;
    }
    return (int)n;
 }


int main(void){
    int k;
    long long int ans=0;
    scanf("%d",&k);
    for(int m=1;m<=k;m++){
        for(int n=1;n<=m;n++){
            for(int s=1;s<=n;s++){
                int pre=gcd(gcd(m,n),s);
                if((m==n)||(n==s)){
                    if(m==s){
                        ans+=pre;
                    }else{
                        ans+=pre*3;
                    }
                }else{
                    ans+=pre*=6;
                }
            }
        }
    }
    printf("%lld",ans);
      
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector < vector <int> > dp(n+1,vector <int> (n+1,0));
  for(int i=1;i<=n;i++)
    for(int ij=1;j<=n;j++)
      dp[i][j]=__gcd(i,j);
  long long 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+=dp[i][dp[j][[k]];
      }
   cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'j' was not declared in this scope; did you mean 'ij'?
    8 |     for(int ij=1;j<=n;j++)
      |                  ^
      |                  ij
a.cc:14:25: error: two consecutive '[' shall only introduce an attribute before '[' token
   14 |         ans+=dp[i][dp[j][[k]];
      |                         ^
a.cc:14:25: error: expected ']' before '[' token
   14 |         ans+=dp[i][dp[j][[k]];
      |                         ^
      |                         ]
a.cc:14:25: error: two consecutive '[' shall only introduce an attribute before '[' token
Language: C++

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


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

#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
 
int main() {
	int n,k;
    long long ans=0;
	string s;
	cin>>k;
	for(int i=1;i<=k;i++){
	    for(int i2=1;i2<=k;i2++){
	        for(int i3=1;i3<=k;i3++){
	            ans+=gcd(i,gcd(i2,i3))
	        }
	    }
	}
	cout<<ans;
	return 0;
}
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)

int main() {
	long long n,k,ans=0;
	string s;
	cin>>k;
	for(int i=1;i<=k;i++){
	    for(int i2=1;i2<=k;i2++){
	        for(int i3=1;i3<=k;i3++){
	            ans+=gcd(i,gcd(i2,i3))
	        }
	    }
	}
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: 'gcd' was not declared in this scope
   17 |                     ans+=gcd(i,gcd(i2,i3))
      |                                ^~~
a.cc:17:26: error: 'gcd' was not declared in this scope
   17 |                     ans+=gcd(i,gcd(i2,i3))
      |                          ^~~
a.cc: At global scope:
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main() {
      |     ^~~~
a.cc:9:5: note: 'int main()' previously defined here
    9 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:39:32: error: 'gcd' was not declared in this scope
   39 |                     ans+=gcd(i,gcd(i2,i3))
      |                                ^~~
a.cc:39:26: error: 'gcd' was not declared in this scope
   39 |                     ans+=gcd(i,gcd(i2,i3))
      |                          ^~~
Language: C

import math
from functools import reduce

k = int(input())
kl = [i for i in range(1, k+1)]


def gcd(*numbers):
    return reduce(math.gcd, numbers)


total = 0
for i in kl:
    for j in kl:
        for k in kl:
            total += gcd(i, j, k)


print(total)


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

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

int main(){
	int k;
  cin>>k;
  	long long sum=0;
  	for(int i=1;i<=k;i++){
    	for(int j=1;j<=k;j++){
        	for(int n=1;n<=k;n++){
            	long long g=__gcd(i,j);
              	long long s=__gcd(g,n);
              	sum+=s;
            }
          
        }          

    }
  
  cout<<sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: no matching function for call to '__gcd(long long int&, int&)'
   12 |                 long long s=__gcd(g,n);
      |                             ~~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:12:34: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
   12 |                 long long s=__gcd(g,n);
      |                             ~~~~~^~~~~
Language: C

#include<bits/stdc++.h>
using namespace std;
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: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 = 1; i <= (int)(n); i++)
const int inf = 1000000000; 

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

int main(){
    int k;
    cin >> k;
    ll ans = 0;
    rep(i,k){
        rep(j,k){
            rep(l,k){
                ans += ll(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

int gcm(int a, int b) {
	int tmp;
	if (b > a) {
		tmp = a;
		a = b;
		b = tmp;
	}
	while (1) {
		tmp = a % b;
		if (tmp ==0) {
			break;
		}
		else {
			a = b;
			b = tmp;
		}
	}

	return b;
}

int gcm3(int a, int b, int c) {
	return gcm(gcm(a, b), c);
}

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

	cout << sum << "\n";

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:9: error: 'cin' undeclared (first use in this function)
   29 |         cin >> n;
      |         ^~~
main.c:29:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:38:9: error: 'cout' undeclared (first use in this function)
   38 |         cout << sum << "\n";
      |         ^~~~
Language: C

#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <numeric>
#include <cstdlib>
#include <map>
#include <set>
#include <algorithm>
#include <math.h>
 
using namespace std;

int gcd(int i, int j) {
    int a = i;
    int b = j;

    int r = a % b;

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

    return b;
}
 
int main(){
    int N;
    cin >> N;

    long long sum = 0;

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

    cout << sum << 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>
//#define ll long long long long int 
using namespace std;
long long int gcd(long long int a, long long int b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 
long long int findGCD(long long int arr[], long long int n) 
{ 
    long long int result = arr[0]; 
    for (long long int i = 1; i < n; i++) 
        result = gcd(arr[i], result); 
  
    return result; 
}
long long int main(void)
{
	long long int sum= 0;
	long long int k;
	scanf("%d", &k); 
	for(long long int i=1;i<=k;i++)
	{
		for(long long int j=1;j<=k;j++)
		{
			for(long long int o=1;o<=k;o++)
			{
				sum = sum + gcd(i, (gcd(j, o)));

			}
		}
	}
	prlong long intf("%d\n", sum);

}

Compiler output:
a.cc:18:11: error: '::main' must return 'int'
   18 | long long int main(void)
      |           ^~~
a.cc: In function 'int main()':
a.cc:34:9: error: 'prlong' was not declared in this scope; did you mean 'ulong'?
   34 |         prlong long intf("%d\n", sum);
      |         ^~~~~~
      |         ulong
Language: C

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

int gojoho(int a,int b){
    while(1){
        int r=a%b;
        if(r==0)
            return b;
        else{
            a=b;
            b=r;
        }
    }
}

int main() {
    int l;
    int tmp;
    int sum=0;
    cin >> l;
    for (int i=1;i<=l;i++){
        for(int j=1;j<=l;j++){
            for (int k=1;k<=l;k++){
                tmp = gojoho(i,j);
                tmp = gojoho(tmp,k);
                sum+=tmp;
            }
        }
    }
    cout << sum << endl;
    // int test =gojoho(2,3);
    // cout << test << 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 ll long long
ll gcd(ll a,ll b){
		if(a==0)return b;
		return gcd(b%a,a);
}
int main()
{
  ll n;
  cin >> n;
  ll s=0;
  for(ll a=1;a<=n;a++)
  {
      for(ll b=1;b<=n;b++)
      {
          for(ll c=1;c<=n;c++)
          {
              s=s+gcd(gcd(a,b),c);
          }
          
      }
  }
  cout <<s;
}

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

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll fun(ll x){
    return x*(x+1)/2;
}
int gcd(int x,int y ,int z){
    int gc = __gcd(x,y);
    return __gcd(gc,z);
}
int main (){
    ll 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,j,k);
            }
        }
    }
    cout<<sum<<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

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

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]C - Sum of gcd of Tuples (Easy)
            int K = int.Parse(Console.ReadLine());
            var nums = new List<int[]>();

            for(int i = 1; i <= K; i++)
            {
                for (int j = 1; j <= K; j++)
                {
                    for (int k = 1; k <= K; k++)
                    {
                        var arr = new int[3];
                        arr[0] = i;
                        arr[1] = j;
                        arr[2] = k;
                        nums.Add(arr);
                    }
                }
            }

            long ans = 0;

            foreach(var n in nums)
            {
                ans += GetGcd(n);
            }

            Console.WriteLine(ans);
        }

        static long GetGcd(int[] nums)
        {
            var a = (long)nums[0];
            var b = (long)nums[1];
            var c = (long)nums[2];

            var lib = new Library.Gcd();
            var gcd = lib.GetGcd(a, b);
            return lib.GetGcd(gcd, c);
        }
    }
}

namespace Library
{
    public class Gcd
    {
        public long GetGcd(long a, long b)
        {
            //[summary]a,b2つの数の最大公約数を求める
            //Gcd: Greatest Common Divisor
            //以下リンクを参考に実装
            //https://qiita.com/gushwell/items/e9614b4ac2bea3fc6486

            if (a < b)
            {
                //引数を入れ替えて自分を呼び出す
                return GetGcd(b, a);
            }
            else
            {
                while (b > 0)
                {
                    long remainder = a % b;

                    a = b;
                    b = remainder;
                }

                return a;
            }
        }
    }
}

Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
main.c:2:1: error: unknown type name 'using'
    2 | using System.Collections.Generic;
      | ^~~~~
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | using System.Collections.Generic;
      |             ^
main.c:3:1: error: unknown type name 'using'
    3 | using System.Linq;
      | ^~~~~
main.c:3:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | using System.Linq;
      |             ^
main.c:5:1: error: unknown type name 'namespace'
    5 | namespace AtCoder
      | ^~~~~~~~~
main.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    6 | {
      | ^
main.c:53:1: error: unknown type name 'namespace'
   53 | namespace Library
      | ^~~~~~~~~
main.c:54:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   54 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using V = vector<int>;
using VV = vector<vector<int>>;
using VVV = vector<vector<vector<int>>>;
using VL = vector<ll>;
using VVL = vector<vector<ll>>;
using VVVL = vector<vector<vector<ll>>>;
using pq = priority_queue<int>;
template<class T>
using P = pair<T, T>;
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define REP(i,k,n) for(int i=(k);i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define output(x,y) cout << fixed << setprecision(y) << x << endl;
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; }
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; }
int under = (1 << 31);
int upper = under - 1;
ll UNDER = (1LL << 63);
ll UPPER = UNDER - 1;
const int MOD = 1e9 + 7;
const long double pi = 3.141592653589793;
vector<bool> P(300, false);
void eratos(int x) {
	V is_P(x + 100, true);
	is_P[0] = is_P[1] = false;
	for (int i = 2; i <= x; i++) {
		if (is_P[i]) {
			for (int j = i + i; j <= x; j += i) is_P[j] = false;
			P[i] = true;
		}
	}
	return;
}
int main(){
	int n;
	cin >> n;
	int sum = 0;
	rep1(i, n) rep1(j, n) {
		int tmp = gcd(i, j);
		if (tmp == 1) sum += n;
		else {
			rep1(k, n) {
				sum += gcd(tmp, k);
			}
		}
	}
	cout << sum << endl;
	return 0;
}

Compiler output:
a.cc:29:15: error: 'std::vector<bool> P' redeclared as different kind of entity
   29 | vector<bool> P(300, false);
      |               ^
a.cc:13:7: note: previous declaration 'template<class T> using P = std::pair<_FIter, _FIter>'
   13 | using P = pair<T, T>;
      |       ^
a.cc: In function 'void eratos(int)':
a.cc:36:32: error: alias template deduction only available with '-std=c++20' or '-std=gnu++20'
   36 |                         P[i] = true;
      |                                ^~~~
Language: C

int gcm(int a, int b) {
	int tmp;
	if (b > a) {
		tmp = a;
		a = b;
		b = tmp;
	}
	while (1) {
		tmp = a % b;
		if (tmp ==0) {
			break;
		}
		else {
			a = b;
			b = tmp;
		}
	}

	return b;
}

int gcm(int a, int b, int c) {
	return gcm(gcm(a, b), c);
}

int main() {
	int i, j, k, n;
	long long sum = 0;
	std::cin >> n;
	for (i = 1; i <= n; i++) {
		for (j = 1; j <= n; j++) {
			for (k = 1; k <= n; k++) {
				sum += gcm(i, j, k);
			}
		}
	}

	std::cout << sum << "\n";

	return 0;
}

Compiler output:
main.c:22:5: error: conflicting types for 'gcm'; have 'int(int,  int,  int)'
   22 | int gcm(int a, int b, int c) {
      |     ^~~
main.c:1:5: note: previous definition of 'gcm' with type 'int(int,  int)'
    1 | int gcm(int a, int b) {
      |     ^~~
main.c: In function 'gcm':
main.c:23:20: error: too few arguments to function 'gcm'
   23 |         return gcm(gcm(a, b), c);
      |                    ^~~
main.c:22:5: note: declared here
   22 | int gcm(int a, int b, int c) {
      |     ^~~
main.c:23:16: error: too few arguments to function 'gcm'
   23 |         return gcm(gcm(a, b), c);
      |                ^~~
main.c:22:5: note: declared here
   22 | int gcm(int a, int b, int c) {
      |     ^~~
main.c: In function 'main':
main.c:29:9: error: 'std' undeclared (first use in this function)
   29 |         std::cin >> n;
      |         ^~~
main.c:29:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:12: error: expected ';' before '::' token
   29 |         std::cin >> n;
      |            ^~
      |            ;
main.c:38:12: error: expected ';' before '::' token
   38 |         std::cout << sum << "\n";
      |            ^~
      |            ;
Language: C

#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
 
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = s; i < (int)(n); i++)
#define print(a) cout << (a) << endl; 
typedef long long ll;
const int MOD = 1000000007; 

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

int main() {
    int K; 
    cin >> K;
    int ret = 0;
    REP(a, K) {
        REP(b, K) {
            REP(c, K) {
                int g = GCD(a+1, GCD(b+1, c+1));
                ret += g;
            }
        }
    } 
    cout << ret << 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

/* 162-C.cpp
 *     Created on : Apr 12, 2020 
 *     Time       : 6:08:49 PM
 *     Author     : null_ptr
 */
#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)
				sum+=__gcd(__gcd(i,j),k);

	cout<<sum;
}





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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 1; i <= (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define m0(x) memset(x,0,sizeof(x))
const int INF = 1000000001;

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

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

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

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bound(all(v),k)-v.begin())
#define fi first
#define se second
#define pi M_PI
#define PQ(T) priority_queue<T>
#define SPQ(T) priority_queue<T,vector<T>,greater<T>>
using ll=long long;
using P=pair<ll,ll>;
using PP=tuple<ll,ll,ll>;
using S=multiset<ll>;
using vi=vector<ll>;
using vvi=vector<vi>;
using vvvi=vector<vvi>;
const ll inf=1001001001001001;
const int INF=1001001001;
const int mod=1000000007;
const double eps=1e-10;
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';}
template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);}
template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;}
void decimal(int x){cout<<fixed<<setprecision(x);}
vi calc(ll x){vi res;while(x>0){res.eb(x%10);x/=10;}reverse(all(res));return res;}

void solve() {
  int m;
  cin>>m;
  ll n=0;
  REP(i,1,m+1)REP(j,1,m+1)REP(k,1,m+1){
    int p=gcd(i,j);
    n+=gcd(p,k);
  }
  out(n);
}

signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
}


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