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

#include<bits/stdc++.h>
using namespace std;
int gcd(a,b){
  if((a=a%b)==0)
    return b;
  else
    return gcd(b,a);
}
int main(){
  int K,i,j,k,A=0;
  cin >> K;
  for(i=1;i<=K;i++){
    for(j=i;j<=K;j++){
      for(k=j;k<=K;k++){
        if(k==i)
          A+=k;
        else if(k==j)
          A+=3*gcd(j,i);
        else if(j==i)
          A+=3*gcd(k,j);
        else
          A+=6*gcd(k,gcd(j,i));
      }
    }
  }
    
  cout << A;
}

Compiler output:
a.cc:3:9: error: 'a' was not declared in this scope
    3 | int gcd(a,b){
      |         ^
a.cc:3:11: error: 'b' was not declared in this scope
    3 | int gcd(a,b){
      |           ^
a.cc:3:12: error: expression list treated as compound expression in initializer [-fpermissive]
    3 | int gcd(a,b){
      |            ^
a.cc: In function 'int main()':
a.cc:18:16: error: reference to 'gcd' is ambiguous
   18 |           A+=3*gcd(j,i);
      |                ^~~
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: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
a.cc:3:5: note:                 'int gcd'
    3 | int gcd(a,b){
      |     ^~~
a.cc:20:16: error: reference to 'gcd' is ambiguous
   20 |           A+=3*gcd(k,j);
      |                ^~~
/usr/include/c++/14/numeric:173:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
a.cc:3:5: note:                 'int gcd'
    3 | int gcd(a,b){
      |     ^~~
a.cc:22:16: error: reference to 'gcd' is ambiguous
   22 |           A+=6*gcd(k,gcd(j,i));
      |                ^~~
/usr/include/c++/14/numeric:173:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
a.cc:3:5: note:                 'int gcd'
    3 | int gcd(a,b){
      |     ^~~
a.cc:22:22: error: reference to 'gcd' is ambiguous
   22 |           A+=6*gcd(k,gcd(j,i));
      |                      ^~~
/usr/include/c++/14/numeric:173:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn)'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
a.cc:3:5: note:                 'int gcd'
    3 | int gcd(a,b){
      |     ^~~
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int k = sc.nextInt(); //繰り返す回数
    int a;  //割られる数＿最大公約数
    int b;  //割る数
    int c;  //あまり
    int max;  //最大公約数
    int sum = 0;

    for(int i=1;i<=k;i++){
      for(int j=1;j<=k;j++){
        for(int l=1,l<=k;l++){
          if(i>j){
            a = i;
            b = j;
            c = 1;
          }else{
            a = j;
            b = i;
            c = 1;
          }       
          while(c!=0){
            c = a%b;
            a = b;
            b = c;
          }
          max = a;
          if(max>l){
            a = max;
            b = l;
            c = 1;
          }else{
            a = l;
            b = max;
            c = 1;
          }       
          while(c!=0){
            c = a%b;
            a = b;
            b = c;
          }
          max = a;
          sum = sum+max;
        }
      }
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:15: error: ';' expected
        for(int l=1,l<=k;l++){
                     ^
1 error
Language: C

#include <iostream>
using namespace std;
int main(void){
    int K,tmp,sum;
  	scanf("%d", &K);
	if(0<K && K<201){
	    for(int ak = 1; ak < K+1; ak++){
	        for(int bk = 1; bk < K+1; bk++){
	            for(int ck = 1; ck < K+1; ck++){
	                int a = ak;
	                int b = bk;
	                int c = ck;
	                  if(a<b){
	                      tmp = a;
	                      a = b;
	                      b = tmp;
	                  }
	                  int ab = a % b;
	                  while(ab!=0){
	                      a = b;
	                      b = ab;
	                      ab = a % b;
	                  }
	                  if(b<c){
	                      tmp = b;
	                      b = c;
	                      c = tmp;
	                  }
	                  int abc = b % c;
	                  while(abc!=0){
	                      ab = c;
	                      c = abc;
	                      abc = ab % c;
	                  }
	                  sum = sum + c;
	            }
	        }
	    }
	    printf("%d", sum);
	}
}

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

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

    for (int i=1; i<=K; i++) {
        for (int j=1; j<=K; j++) {
            for (int l=1; l<=k; l++) {
                if (i%l==0 && j%l==0) {
                    for (int k=1; k<=K; k++) {
                        int temp=0;
                        if (k%l==0) {
                            if (l>temp) ans+=l-temp;
                            temp=l;
                        }
                    }
                }
            }            
        }
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: 'k' was not declared in this scope
   12 |             for (int l=1; l<=k; l++) {
      |                              ^
Language: Java

mport java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int k = sc.nextInt(); //繰り返す回数
    int a;  //割られる数＿最大公約数
    int b;  //割る数
    int c;  //あまり
    int max;  //最大公約数
    int sum = 0;

    for(int i=1;i<=k;i++){
      for(int j=1;j<=k;j++){
        for(int l=1,l<=k;l++){
          if(i>j){
            a = i;
            b = j;
            c = 1;
          }else{
            a = j;
            b = i;
            c = 1;
          }       
          while(c!=0){
            c = a%b;
            a = b;
            b = c;
          }
          max = a;
          if(max>l){
            a = max;
            b = l;
            c = 1;
          }else{
            a = l;
            b = max;
            c = 1;
          }       
          while(c!=0){
            c = a%b;
            a = b;
            b = c;
          }
          max = a;
          sum = sum+max;
        }
      }
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
Main.java:15: error: ';' expected
        for(int l=1,l<=k;l++){
                     ^
2 errors
Language: C

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

int main() {
  ll K;
  cin >> K;
  ll sum =0;
  for(ll i=1;i<K+1;i++){
    for(ll j=i;j<K+1;j++){
      for(ll k=j;k<K+1;k++){
        if(i==k && i==j){
          sum += i;
            continue;
        }
        stack<int> s;
        for(ll l=1;l<i+1;l++){
          if(i%l==0) s.push(l);
        }
        ll G =0;
        while(!s.empty()){
          if(j%s.top()==0 && k%s.top()==0){
            G = s.top();
            break;
          }
          s.pop();
        }
        if(i==k || i==j || j==k) sum += 3*G;
        else sum += 6*G;
      }
    }
  }
  cout << sum;
}


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

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int main()
{
  long long ans;
  long long re = 0;
	long long p;
  cin>>p;
  for(int i = 1; i <=p ; i++ )
  {
    for ( int j = 1; j<=p ; j++ )
    {
      for ( int k = 1; k<=p; k++  )
      {
        int x;
        x = gcd(i, j);
        ans = gcd(x,k);
          re = re+ans;
         
      }
    }
  }
  cout<<ans;
    
}
long long gcd( long long a , long long b )
{
  while( a==0 || b==0 )
  {
  	if(a>=b)
  	{
    	a = a%b;
  	}
    else
    b = b%a;
  }  
  if(a!=0)
    return a;
  else
    return b
}

Compiler output:
a.cc: In function 'long long int gcd(long long int, long long int)':
a.cc:41:13: error: expected ';' before '}' token
   41 |     return b
      |             ^
      |             ;
   42 | }
      | ~
Language: C++

#include <iostream>
#include <cmath>
#include <math.h>


int gcd(int a, int b, int c) {
	int m = min(a, b);
  	m = min(m, c);
  	for(int n = m ; n > 0 ; n--) {
      if(a % n == b % n && b % n == c % n && c % n == 0)
        return n;
    }
    return 1;
}

int main() {
  
  int k;
  std::cin >> k;
  long long 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);
      }
    }
  }
  std::cout << sum;
 
  return 0;
  
}


Compiler output:
a.cc: In function 'int gcd(int, int, int)':
a.cc:7:17: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |         int m = min(a, b);
      |                 ^~~
      |                 std::min
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C

#include <iostream>
using namespace std;

int gcd(int a, int b)
{
	if(a == 0)
		return b;
	else if (b == 0)
		return a;
	else
		return gcd(b, a%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(i, gcd(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 <iostream>
#include <cmath>

int gcd(int a, int b, int c) {
	int m = min(a, b);
  	m = min(m, c);
  	for(int n = m ; n > 0 ; n--) {
      if(a % n == b % n && b % n == c % n && c % n == 0)
        return n;
    }
    return 1;
}

int main() {
  
  int k;
  std::cin >> k;
  long long 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);
      }
    }
  }
  std::cout << sum;
 
  return 0;
  
}

Compiler output:
a.cc: In function 'int gcd(int, int, int)':
a.cc:5:17: error: 'min' was not declared in this scope; did you mean 'std::min'?
    5 |         int m = min(a, b);
      |                 ^~~
      |                 std::min
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C

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

int main(){
    long long ans = 1,k;
    cin >> k;
    for(int a = 1 ; a <= k ; a += 1){
        for(int b = 1 ; b <= k ; b += 1){
            for(int c = 1 ; c <= k ; c += 1){
                ans += __gcd(a,__gcd(b,c));
            }
        }
    }
    cout << ans << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
   long long p=1,q=1,r=1,k,d=1,sum=0;
   cin>>k;
   for(int i=1;i<=k;i++)
   {
     if(i%d==0)
     {
       for(int j=1;j<k;j++)
       {
         if(j%d==0)
         {
           for(int l=1;l<k;L++)
           { if(l%d==0)
             { 
               sum=sum+d;
               d++;
             }
           }
         }
         
       }
     }   
   }
    cout<<sum<<endl
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: 'L' was not declared in this scope
   15 |            for(int l=1;l<k;L++)
      |                            ^
a.cc:27:20: error: expected ';' before '}' token
   27 |     cout<<sum<<endl
      |                    ^
      |                    ;
   28 | 
   29 | }
      | ~
Language: C++

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

int gcd(int a, int b) {
  int r;
  while (true) {
    if (a > b) {
      r = a % b;
      if (r == 0) {
        return min(a, b);
        break;
      }
      else {
        a = r;
    }
    else {
      r = b % a;
      if (r == 0) {
        return min(a, b);
        break;
      }
      else {
        b = r;
      }
    }
  }
}

int main() {
  int K, ans, a;
  cin >> K;
  for (int i = 1; i < K + 1; i++) {
    for (int j = 1; i < K + 1; j++) {
      for (int m = 1; m < K + 1; m++) {
        a = gcd(i, j);
        a = gcd(a, m);
        ans += a;
      }
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:16:5: error: expected '}' before 'else'
   16 |     else {
      |     ^~~~
a.cc:7:16: note: to match this '{'
    7 |     if (a > b) {
      |                ^
Language: C++

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

int gcd(int a, int b) {
  int r;
  while (true) {
    if (a > b) {
      r = a % b;
      if (r == 0) {
        return min(a, b);
        break;
      }
      else {
        a = r;
    }
    else {
      r = b % a;
      if (r == 0) {
        return min(a, b);
        break;
      }
      else {
        b = r;
    }
  }
}

int main() {
  int K, ans, a;
  cin >> K;
  for (int i = 1; i < K + 1; i++) {
    for (int j = 1; i < K + 1; j++) {
      for (int m = 1; m < K + 1; m++) {
        a = gcd(i, j);
        a = gcd(a, m);
        ans += a;
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:16:5: error: expected '}' before 'else'
   16 |     else {
      |     ^~~~
a.cc:7:16: note: to match this '{'
    7 |     if (a > b) {
      |                ^
a.cc:28:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   28 | int main() {
      |         ^~
a.cc:28:9: note: remove parentheses to default-initialize a variable
   28 | int main() {
      |         ^~
      |         --
a.cc:28:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:28:12: error: a function-definition is not allowed here before '{' token
   28 | int main() {
      |            ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:4:23: note: to match this '{'
    4 | int gcd(int a, int b) {
      |                       ^
Language: C++

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


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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> K;
      |         ^~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout << sum << endl;
      |         ^~~~
a.cc:21:24: error: 'endl' was not declared in this scope
   21 |         cout << sum << endl;
      |                        ^~~~
Language: C++

#include <iostream>
using namespace std;

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

int main() {

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: expected '}' at end of input
   23 |     return 0;
      |              ^
a.cc:9:12: note: to match this '{'
    9 | int main() {
      |            ^
Language: C++

for (a=i; a<=k; a++){
   for (b=i; b<=k; b++){
      for (c=i; c<=k; c++){
          sum+=gcd(a,b,c);
      }
   }
}
cout<<sum;

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'for'
    1 | for (a=i; a<=k; a++){
      | ^~~
a.cc:1:11: error: 'a' does not name a type
    1 | for (a=i; a<=k; a++){
      |           ^
a.cc:1:17: error: 'a' does not name a type
    1 | for (a=i; a<=k; a++){
      |                 ^
a.cc:8:1: error: 'cout' does not name a type
    8 | cout<<sum;
      | ^~~~
Language: C

#include <stdio.h>
int main(void){
  int k,r1,r2,s;
  scanf("%d",&k);
  for(int i=1;i<(k+1);k++){
    for(int j=1;j<(k+1);j++){
      for(int l=1;l<(k+1);l++{
        r1=i%j;
        while(r1!=0){
          i=j;
          j=r1;
          r1=i%j;
        }
        s=j;
        r2=l%s;
        while(r2!=0){
          l=s;
          s=r2;
          r2=l%s;
        }
      }
     }
    }
       return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:7:30: error: expected ')' before '{' token
    7 |       for(int l=1;l<(k+1);l++{
      |          ~                   ^
      |                              )
main.c:22:6: error: expected expression before '}' token
   22 |      }
      |      ^
Language: C

from math import gcd
k = int(input())
ans = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        for c in range(1, k+1):
            ans += gcd(gcd(a, 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 <iostream>
using namespace std ;

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

int main(){
	int k,temp;
	cin>>k;
	
	for(int i=1;i<=k;i++){
		for(int j=1;j<=k;j++){
			for(int l=1;l<=k;l++){
				temp+=g(i,g(j,l));
			}
		}
	}
	cout<<temp<<endl;
}

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

import java.util.*;


class Main {
  public static void main(String[] args) {
	Scanner scanner = new Scanner(System.in);
    
    int N = scanner.nextInt(); //next(文字列), nextDouble, nextLine(1行)とか
    int ans = 0;
    for (int i = 1; i <= N ; i++){
      for (int j = 1; j <= N; j++){
        for (int k = 1; k <= N; k++){
          ans += GCD(i,j,k);
        }
      }
    }
    System.out.println(ans);
  }

  public static int GCD(int x, int y, int z) {
    
    while (x != y){
      if (x > y){
        x = x-y;
      }else{
        y = y -x;
      }
    }
    
    while (x != z){
      if (x > z){
        x = x-z;
      }else{
        z = z -x;
      }
    }    
    return z;
  }


}




Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:9: error: expected ':' before 'static'
    5 |   public static void main(String[] args) {
      |         ^~~~~~~
      |         :
a.cc:5:27: error: 'String' has not been declared
    5 |   public static void main(String[] args) {
      |                           ^~~~~~
a.cc:5:36: error: expected ',' or '...' before 'args'
    5 |   public static void main(String[] args) {
      |                                    ^~~~
a.cc:20:9: error: expected ':' before 'static'
   20 |   public static int GCD(int x, int y, int z) {
      |         ^~~~~~~
      |         :
a.cc:41:2: error: expected ';' after class definition
   41 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'Scanner' was not declared in this scope
    6 |         Scanner scanner = new Scanner(System.in);
      |         ^~~~~~~
a.cc:8:13: error: 'scanner' was not declared in this scope
    8 |     int N = scanner.nextInt(); //next(文字列), nextDouble, nextLine(1行)とか
      |             ^~~~~~~
a.cc:17:5: error: 'System' was not declared in this scope
   17 |     System.out.println(ans);
      |     ^~~~~~
Language: C

from math import gcd

k = int(input())

ans = 0

for a in range(1, k+1):

    for b in range(1, k+1):

        for c in range(1, k+1):

            ans += gcd(gcd(a, 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>
using namespace std ;
int g(int x,int y){
	if(y==0){
		return x;
	}
	else{
		return g(y,x%y);
	}
}
int main(){
	int k,temp;
	cin>>k;
	
	for(int i=1;i<=k;i++){
		for(int j=1;j<=k;j++){
			for(int l=1;l<=k;l++){
				temp+=g(i,g(j,l));
			}
		}
	}
	cout<<temp<<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 <algorithm>
using namespace std;

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

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

#include <bits/stdc++.h>
using namespace std;
int gcd(int a,int b,int c){//これさえいければいける
  int N=1;
  int K=max(a,max(b,c));
  for(int i=K;K>=1;K--){
    if(a%K==0 &&b%K==0 &&c%K==0){
      N=K;
      break;
    }
  }
  return N;
  

}
int main() {
  int K;
  int sum=0;
  cin>>K;
  for(int a=1;a<=K;a++){
    for(int b=1;b<=K;b++){
      for(int c=1;c<=K;c++){
        sum+=gcd(a,b,c);
        
      }
    }
  }
	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;

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

int main(){
    int K,a,b,c;
    long sum = 0;
    cin >> K;
    for(a=1;a<=K;a++){
        for(b=1;b<=K;b++){
            for(c=1;c<=K;c++){
                sum += gcd(gcd(a,b),c);
            }
        }
    }
    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;
using ll= long long;
using vi= vector<int>;
using vvi= vector<vi>;
using vd= vector<double>;
using vvd= vector<vd>;
using vc= vector<char>;
using vb= vector<bool>;
using vl= vector<ll>;
#define rep(i,x,n) for(int i=x; i<n; i++)
#define all(x) x.begin(), x.end()

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

int main(){
  ll k,sum=0,a,b;
  cin >> k;
  rep(i,1,k+1){
    rep(j,1,k+1){
      rep(l,1,k+1){
        a= gcd(i,gcd(j,l));
        sum+= a;
        //printf("%d,%d,%d:%d\n",i,j,l,a);
      }
    }
  }
  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 ;
int g(int x,int y){
	if(y==0){
		return x;
	}
	else{
		return g(y,x%y);
	}
}
int main(){
	int k,temp;
	cin>>k;
	
	for(int i=1;i<=k;i++){
		for(int j=1;j<=k;j++){
			for(int l=1;l<=k;l++){
				temp+=g(i,g(j,l));
			}
		}
	}
	cout<<temp<<endl;
}

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

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

int find_gcd(int a, int b, int c) {
  int gcd;
  for (int i = a; i > 0; i--) {
    if (a % i == 0 && b % i == 0 && c % i == 0) {
      gcd = i;
      break;
    }
  }
  return gcd;
}

int main() {
  int K; cin >> K;
  
  int ans = 0;
  for (int i = 0; i <= K; i++) {
    for (int j = 0; j <= K; j++) {
      for (int k = 0; k <= K; k++) {
        ans += find_gcd(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;

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

/**
*    author:  Dooloper
*    created: 12.04.2020 20:51:07
**/

#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <utility>
#include <algorithm>

using namespace std;
typedef unsigned long ll;

ll GCD(int a, int b, int c){
    return __gcd(__gcd(a,b),c);
    // else return __gcd(__gc?d(a,b),c)*k;
}

int main() {
   cin.tie(0);
   int K;cin>>K;

   ll sum = 0;

    // sum += 1;
   int a = 1;
   int b = 1;
   int c = 1;


   for(; a != K || b != K || c != K ;){
    //    sum += __gcd(__gcd(a,b),c);
    // cout<<111111<<endl;
    //    cout<<a<<" "<<b<<" "<<c<<endl; 
        sum += GCD(a,b,c);
       c++;
       if(c > K) {
           c = 1;
           b ++;
           if( b > K){
               b = 1;
               a++;
           }
       }
   }
//    cout<<a<<" "<<b<<" "<<c<<endl;
    sum += GCD(K,K,K);
   cout<<sum <<endl;
   return 0;
}


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

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

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;
    cout << " Yesh" << endl;
  }
  return b;
}

int main(){
    int K;
    cin >> K;
    unsigned long long int sum = 0;
    for(int i=0; i<K; i++){
        for(int j=0; j<K; j++){
            for(int l=0; l<K; l++){
                int tmp;
                tmp =  euclidean_gcd(i+1,j+1);
                sum += euclidean_gcd(tmp, l+1);
                
            }
        }
    }

    cout << sum << endl;
}

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

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

int gcd(int a, int b, int c){
	int ans;
	ans = __gcd(a, __gcd(b, c));
	return ans;
}

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

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

	return 0;
}


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

#include <bits/stdc++.h>
using namespace std ;
int g(int x,int y){
	if(y==0){
		return x;
	}
	else{
		return g(y,x%y);
	}
}
int main(){
	int k,temp;
	cin>>k;
	
	for(int i=1;i<=k;i++){
		for(int j=1;j<=k;j++){
			for(int l=1;l<=k;l++){
				temp+=g(i,gcd(j,l));
			}
		}
	}
	cout<<temp<<endl;
}

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

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

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

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 maxCommon(ll a, ll b)
{
    ll tmp1,tmp2,r;
        if(a >= b)
        {
            tmp1 = a;
            tmp2 = b;
        }
        else
        {
            tmp1 = a;
            tmp2 = b;
        }

        r = tmp1 % tmp2;

        while(r != 0)
        {
            tmp1 = tmp2;
            tmp2 = r;
            r = tmp1 % tmp2;
        }
    return tmp2;
}

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

    for(ll i = 1; i <= N; i++)
    {
        for(ll j = 1; j <= N; j++)
        {
            for(ll k = 1; k <= N; k++)
            {
                ll tmp = maxCommon(i,j);
                tmp =  maxCommon(tmp,k);
                sum += tmp;
            }
        }
    }   
    cout << sum << endl;
}

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

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

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

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++){
        ans += gcd(i,gcd(j,k));
      }
    }
  }
  cout << ans << endl;
  return 0;
}

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

#include <bits/stdc++.h>
int main()
{
    using namespace std;
    int K, a, b, tmp, sum(0);
    cin >> K;
    for (int i = 1; i <= K; i++)
    {
        for (int j = i; j <= K; j++)
        {
            for (int k = j; k <= K; k++)
            {
                if (i == j && j == k)
                {
                    sum += i;
                }
                else
                {
                    a = gcd(i, k);
                    if (i != j && j != k && k != i)
                        sum += a * 6;
                    else
                    {
                        sum += a * 3;
                    }
                }
            }
        }
    }
    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;

int main{
	int k, g;
	cin >> k;
	for(int i=1;i<=k;i++){
		i+=g;
	}
	cout << g*3;
	return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:9: error: expected primary-expression before 'int'
    5 |         int k, g;
      |         ^~~
a.cc:5:9: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:9: error: 'cin' does not name a type
    6 |         cin >> k;
      |         ^~~
a.cc:7:9: error: expected unqualified-id before 'for'
    7 |         for(int i=1;i<=k;i++){
      |         ^~~
a.cc:7:21: error: 'i' does not name a type
    7 |         for(int i=1;i<=k;i++){
      |                     ^
a.cc:7:26: error: 'i' does not name a type
    7 |         for(int i=1;i<=k;i++){
      |                          ^
a.cc:10:9: error: 'cout' does not name a type
   10 |         cout << g*3;
      |         ^~~~
a.cc:11:9: error: expected unqualified-id before 'return'
   11 |         return 0;
      |         ^~~~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int main() {
    int K;
    cin >> K;
    int k[] = {K ,K ,K};

    long long tmp = 0;
    for (int a = 1; a <= K; a++) {
        for (int b = 1; b <= K; b++) {
            for (int c = 1; c <= K; c++) {
                tmp += __gcd(__gcd(a, b), c);
            }
        }
    }
    cout << tmp << endl;
    return 0;
}



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

#include <iostream>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <set>
#include <queue>
#include <deque>
#include <map>
#include <stack>
using namespace std;

#define mod 1000000007
#define ten5 100005
#define ten52 200005
#define ten6 1000005
#define PI 3.1415926
#define pb(x) push_back(x)
#define all(x) x.begin(),x.end()
#define mkpr(x1,x2) make_pair(x1,x2)
typedef long long int ll;

//ll num[50];
//ll num2[50];
//ll num[ten52];
//stack<char> stk;
//set<ll> sll;
//map<string,ll> mp,mp1;
//map<pair<ll,ll>,ll>::iterator iter;
//map<ll,ll> mp;
//deque<char> deq;
//vector<ll> vll;

ll gcd(ll n,ll m)
{
    if(m==0) return n;
    return gcd(m,n%m);
}

int main(void)
{
    double ans=0.0,d,d1,d2;
    //float f,g,h;
    long long int m,n,i,j,k=1;
    long long int a,a1,a2,a3,sum;
    string s,s1,s2;
    char c,c1;
    sum=a=a1=a2=a3=0;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=n;j++)
        {
            a=gcd(i,j);
            if(a==1) sum+=n;
            else if(a==2)
            {
                sum+=a*(n/2);
                sum+=n-n/2;
            }
            else if(a==3)
            {
                sum+=a*(n/3);
                sum+=n-n/3;

            }
            else
            {
                for(k=1;k<=n;k++)
                    sum+=gcd(a,k);
            }
        }
    }
    cout<<sum;
    return 0;
}





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

import math
from functools import reduce

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

def gcd_list(numbers):
    return reduce(math.gcd, numbers)
  
data=int(input())
result = [[i+1, j+1, k+1] for i in range(data) for j in range(data) for k in range(data)]

ans=0
#print(result)

for n in result:
  ans+=gcd(n[0],n[1],n[2])
  
print(ans)
  

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'
main.c:14:2: error: invalid preprocessing directive #print
   14 | #print(result)
      |  ^~~~~
Language: C

#include <iostream>
using namespace std;
 
int gcd(int a, int b, int c){
    int result;
    int init = a<b?(a<c?a:c):(b<c?b:c);
    for(int i = init; i >= 1; i--){
            if(a%i == 0 && b%i == 0 && c%i == 0){
                result = i;
                break;
            }
    }
    return result;
}
int main()
{
    ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    int k;
    int sum = 0;
    cin >> k;
 
    for(int i=1;i<=k;i++){
        for(int j=1;j<=k;j++){
            for(int l=1;l<=k;l++){
                sum += gcd(i, j, l);
            }
        }
    }
 
    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 <bits/stdc++.h>

using namespace std;
int ok(int a, int b, int c)
{
    return (__gcd(a, __gcd(b, c)));
}
int main()
{
    int n;
    long long res = 0;
    cin >> n;
    for (int a = 1; a <= n; a++)
        for (int b = 1; b <= n; b++)
            for (int c = 1; c <= n; c++) res += ok(a, b, c);
    cout << res;
    return 0;
}


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

#include <iostream>
using namespace std;


int gcd(int x, int y){
  a = max(x,y);
  b = min(x,y);
  c = a/b;
  d = a%b;
  if (d==0) return b;
  else return gcd(b, d);
}

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

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:6:3: error: 'a' was not declared in this scope
    6 |   a = max(x,y);
      |   ^
a.cc:7:3: error: 'b' was not declared in this scope
    7 |   b = min(x,y);
      |   ^
a.cc:8:3: error: 'c' was not declared in this scope
    8 |   c = a/b;
      |   ^
a.cc:9:3: error: 'd' was not declared in this scope
    9 |   d = a%b;
      |   ^
Language: C

#include <bits/stdc++.h>
using namespace std;
 
int gcd(int a, int b, int c){
    int result;
    int init = a<b?(a<c?a:c):(b<c?b:c);
    for(int i = init; i >= 1; i--){
            if(a%i == 0 && b%i == 0 && c%i == 0){
                result = i;
                break;
            }
    }
    return result;
}
int main()
{
    ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    int k;
    int sum = 0;
    cin >> k;
 
    for(int i=1;i<=k;i++){
        for(int j=1;j<=k;j++){
            for(int l=1;l<=k;l++){
                sum += gcd(i, j, l);
            }
        }
    }
 
    cout << sum << '\n';
 
    return 0;
}

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

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

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

	cout << sum;
	return 0;
}

int gcd(int a,int b,int c){
	int sum=0;
	
	if(a<b) swap(a,b);
	if(b<c) swap(b,c);
	
	for(i=2;i<=c;i++){
		if(a%i==0 && b%i==0 && c%i==0)
		sum=i;
		
		else
			continue;
	}
	
	return sum;
}

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

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

int main() 
{
	ll n1,s1=0;
	cin>>n1;
	for(int i=1;i<=n1;i++)
	{
	    for(int j=1;j<=n1;j++)
	    {
	        for(int k=1;k<=n1;k++)
	        {
	            s1+=(_gcd(i,_gcd(j,k)));
	        }
	    }
	}
	cout<<s1<<"\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: '_gcd' was not declared in this scope
   16 |                     s1+=(_gcd(i,_gcd(j,k)));
      |                                 ^~~~
a.cc:16:26: error: '_gcd' was not declared in this scope
   16 |                     s1+=(_gcd(i,_gcd(j,k)));
      |                          ^~~~
Language: C

#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#include <cmath>
#include <queue>
#include <tuple>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <random>
#include <set>
#include <stack>

//#include <bits/stdc++.h>
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define FORR(i,i0,n) for(int (i)=(n)-1; (i)>=(i0);(i)--)
#define SORT(x) sort(x.begin(),x.end())
#define SORTR(x) sort(x.begin(),x.end(),greater<int>())
#define rn return
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#include <time.h>
typedef std::pair<int,int> P;
using namespace std;
using ll = long long;



map<vector<int>,ll> solved;

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

ll GCD(vector<int> arr, int n)
{
    
    int result = arr[0];
    for (int i = 1; i < n; i++)
    {
        result = gcd(arr[i], result);
  
        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

int main(){
    int k;
    cin >> k;
    
    
    ll ans = 0;
    FOR(i,1,k+1){
        FOR(j,1,k+1){
            FOR(ij,1,k+1){
                ll a = GCD({i,j,ij},3);
                ans += a;
            }
        }
    }
    cout << ans;
    rn 0;
}

















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

#include<bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(i, n) for (int i=1; i<=n; i++)
using namespace std;
using f=float; using ll=long long; using ld=long double;
using ull=unsigned long long; using vi=vector<int>; using pii=pair<int, int>;

int gcd(int a, int b) {
    if ( b < a ) swap(a, b);
    int t;
    while ( b != 0 ) {
        t = a%b; a = b; b = t;
    }
    return a;
}
int gcd3(int a, int b, int c) {
    int d = gcd(a, b);
    return gcd(d, c);
}
int main() {
//    int a = gcd3(3, 6, 12);
    int n;
    cin >> n;
    ll sum = 0;
    REP(i, n ) {
        REP(j, n) {
            REP(k, n) {
                sum += gcd3(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

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

int gcd(int a, int b, int c){
    int result;
    int init = a<b?(a<c?a:c):(b<c?b:c);
    for(int i = init; i >= 1; i--){
            if(a%i == 0 && b%i == 0 && c%i == 0){
                result = i;
                break;
            }
    }
    return result;
}
int main()
{
    ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    int k;
    int sum = 0;
    cin >> k;

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

    cout << sum << '\n';

    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n,x=0,y;
	scanf("%lld",&n);
	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= n; j++)
		{
			y = __gcd(i, j);
			for (int k = 1; k <= n; k++)
			{
				x += __gcd(y, k);
			}
		}
	}
	printf("%lld\n", x);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:43: error: no matching function for call to '__gcd(long long int&, int&)'
   14 |                                 x += __gcd(y, k);
      |                                      ~~~~~^~~~~~
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:14:43: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
   14 |                                 x += __gcd(y, k);
      |                                      ~~~~~^~~~~~
Language: C

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

int gcd3(int a,int b,int c){
  // a>b>c の順に並べる
  if(c>b){swap(b,c);}
  if(b>a){swap(a,b);}
  if(a%c==0 && b%c==0){ return c;}    // ベースケース
  else{
    if (a%c==0){return gcd3(a,b%c,c);}
    else { return gcd3(a%c,b,c);}
    }
}

int main() {
  int K;cin >> K; // 周回数
  int Ans = 0;  // 回答：
  rep1(i,K){
    rep1(j,K){
      rep1(k,K){
        Ans += gcd3(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

import fractions
N=int(input())
ans=0
GCD=1
for i in range(1,N+1):
  for j in range(1,N+1):
    GCD=fractions.gcd(i,j)
    for n in range(1,N+1):
      ans+=fractions.gcd(GCD,n)

print(ans)

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

#include <iostream>
#include <bitset>
#include <iomanip>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <algorithm>

using namespace std;

#define ll long long
#define vecll vector<long long>
#define vec2ll vector<vector<long long>>
#define forll(s,a,b) for(long long s = a;s < b;s++)
#define forllde(s,a) for(long long s = a;s > 0;s--)

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

	return gcd(b, a%b);
}

int main()
{
	ll n,ans=0;
	string s;

	cin >> n;

	forll(i, 0, n)
	{
		forll(j, 0, n)
		{
			ll buf = gcd(max(i+1,j+1), min(i + 1,j + 1));

			forll(k, 0, n)
			{
				ans += gcd(max(buf, k + 1), min(buf, k + 1));
			}
		}
	}


	cout << ans << endl;

}

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

#include <bits/stdc++.h>
#include<utility>
#include<algorithm>

#define pan(i,n) for(int i=0;i<n;i++)
#define pans(i,n,a) for(int i=a;i<n;i++)
#define ll long long int
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define INF 1e9+7
#define PI 3.141592653
#define inf 200007
#define P pair<ll,ll>

using namespace std;

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

int main(){
    int n;
    cin>>n;
    ll ans=0;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            for(int k=1;k<=n;k++){
                // int p=gcd(i,j),q=gcd(j,k),r=gcd(i,k);
                ans+=gcd(i,gcd(j,k));
            }
        }
    }
    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.