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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll ,ll> pll;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)

const ll mod = 1000000009;
const ll INF = 1e18;//1*10^18

ll gcd(ll x, ll y) { return (x % y)? gcd(y, x % y): y; }
ll powll(ll a,ll n){
  if(n==0)
  {
    return 1;
  }
  return powll(a,n-1)*a;
}

int ReturnDigit(ll num)
{
  string number=to_string(num);
  return number.length();
}

int main() {
  ll i,j,k,l;
  ll n,ans=0;
  // cin >>n; 
  n=200;
  for(i=1; i<=n; i++)
  {
    for(j=1; j<=n; j++)
    {
      for(k=1; k<=n; k++)
      {
        if(i==j || j==k)
        {
          ans+=gcd(i,k);
        }else if(k==i)
        {
          ans+=gcd(k,j)
        }else
        {
          ans+=gcd(gcd(i,j),k); 
        }
      }
    }
  }
  
  // cout<<1.0 * (clock() ) / CLOCKS_PER_SEC<<endl;
  cout<< ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:24: error: expected ';' before '}' token
   44 |           ans+=gcd(k,j)
      |                        ^
      |                        ;
   45 |         }else
      |         ~
Language: C++

#include <stdio.h>
#include <algorithm>
#include <iostream>
using namespace std;

void gcd(int x,int y){
	int r;
   if(x<y)swap(x,y);
  
  while(y>0){
  r = x%y;
  x = y;
  y = r;
  }
  return x;
}

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




Compiler output:
a.cc: In function 'void gcd(int, int)':
a.cc:15:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
   15 |   return x;
      |          ^
a.cc: In function 'int main()':
a.cc:20:2: error: expected initializer before 'int'
   20 |  int K;
      |  ^~~
a.cc:21:7: error: 'K' was not declared in this scope
   21 |  cin>>K;
      |       ^
a.cc:22:6: error: 'i' was not declared in this scope
   22 |  for(i=1;i<=K;i++){
      |      ^
a.cc:23:13: error: 'j' was not declared in this scope
   23 |         for(j=1;j<=K;j++){
      |             ^
a.cc:24:21: error: 'k' was not declared in this scope
   24 |                 for(k=1;k<=K;k++){
      |                     ^
a.cc:27:10: error: 'c' was not declared in this scope
   27 |          c=k;
      |          ^
a.cc:28:10: error: 'sum' was not declared in this scope
   28 |          sum+=gcd(gcd(a,b),c);
      |          ^~~
a.cc:28:22: error: invalid use of void expression
   28 |          sum+=gcd(gcd(a,b),c);
      |                   ~~~^~~~~
a.cc:33:8: error: 'sum' was not declared in this scope
   33 |  cout<<sum;
      |        ^~~
Language: C++

#include <iostream>
using namespace std;

int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }
int main(){
int K;
cin>>K;
int A[K][K];
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    A[i][j]=gcd(i,j);
  }
}
int B[K][2K][K];
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    for (int k=0; k<=K; k++){
      B[i][j][k]=gcd(A[i][j],k);
    }
  }
}
  int sum=0;
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    for (int k=0; k<=K; k++){
      sum+=B[i][j][k];
    }}}
    
  
cout<<sum<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: fixed-point types not supported in C++
   14 | int B[K][2K][K];
      |          ^~
a.cc:18:7: error: 'B' was not declared in this scope
   18 |       B[i][j][k]=gcd(A[i][j],k);
      |       ^
a.cc:26:12: error: 'B' was not declared in this scope
   26 |       sum+=B[i][j][k];
      |            ^
Language: C

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

int main()
{
  int K;
  cin >> K;
  int sum = 0;
  vector<int> A(K, 0);
  for(int i = 0; i < K; i++)
  {
    if(K % (i + 1) == 0)
    {
      A.at(i) = i + 1;
    }
  }
  for(int i = 0; i < K; i++)
  {
    if(A.at(i) != 0)
    {
      sum += (K / A.at(i)) * (K / A.at(i)) * (K / A.at(i));
    }
    else
    {
      sum += (K - i) * (K - i);
    }
  }
  
  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 <iostream>
using namespace std;

int main()
{
  int K;
  cin >> K;
  int sum = 0;
  vector<int> A(K, 0);
  for(int i = 0; i < K; i++)
  {
    if(K % (i + 1) == 0)
    {
      A.at(i) = i + 1;
    }
  }
  for(int i = 0; i < K; i++)
  {
    if(A.at(i) != 0)
    {
      sum += (K / A.at(i)) * (K / A.at(i)) * (K / A.at(i));
    }
    else
    {
      sum += (K - i) * (K - i);
    }
  }
  
  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 <stdio.h>
#include <algorithm>
using namespace std;

void gcd(int x,int y){
	int r;
   if(x<y)swap(x,y);
  
  while(y>0){
  r = x%y;
  x = y;
  y = r;
  }
  return x;
}

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


Compiler output:
a.cc: In function 'void gcd(int, int)':
a.cc:14:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
   14 |   return x;
      |          ^
a.cc: In function 'int main()':
a.cc:19:2: error: expected initializer before 'int'
   19 |  int K;
      |  ^~~
a.cc:20:2: error: 'cin' was not declared in this scope
   20 |  cin>>K;
      |  ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:20:7: error: 'K' was not declared in this scope
   20 |  cin>>K;
      |       ^
a.cc:21:6: error: 'i' was not declared in this scope
   21 |  for(i=1;i<=K;i++){
      |      ^
a.cc:22:13: error: 'j' was not declared in this scope
   22 |         for(j=1;j<=K;j++){
      |             ^
a.cc:23:21: error: 'k' was not declared in this scope
   23 |                 for(k=1;k<=K;k++){
      |                     ^
a.cc:26:10: error: 'c' was not declared in this scope
   26 |          c=k;
      |          ^
a.cc:27:10: error: 'sum' was not declared in this scope
   27 |          sum+=gcd(gcd(a,b),c);
      |          ^~~
a.cc:27:22: error: invalid use of void expression
   27 |          sum+=gcd(gcd(a,b),c);
      |                   ~~~^~~~~
a.cc:32:2: error: 'cout' was not declared in this scope
   32 |  cout<<sum;
      |  ^~~~
a.cc:32:2: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:8: error: 'sum' was not declared in this scope
   32 |  cout<<sum;
      |        ^~~
Language: C

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

int main() {
  int N,a,b,c;
  unsigned long s=0;
  cin >> N;

  for(a=1;a<=N;a++){
    for(b=1;b<=N;b++){
      for(c=1;c<=N;c++){
        s=s+gcd(gcd(a,b),c);
      }
    }
  }
  cout << s << endl;
}

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

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

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

  if (k == 1){
    cout << 1 << endl;
  }
  else{

    int sum = 0;
  for (int i = 2; i < k+1; i++){
    for (int j = 2; j < k+1; j++){
      if (i % j == 0 && i != j){
        sum = sum + 6*(i/j)*(j-1);
      }
      else if(i % j == 0 && i = j){
      sum = sum + (i/j)*(j-1);
      }
      else {
        sum = sum;
      }
    }
  }
   
    cout << k*k + sum << endl;
  }

  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: lvalue required as left operand of assignment
   19 |       else if(i % j == 0 && i = j){
      |               ~~~~~~~~~~~^~~~
Language: C

def getInput():
    return [int(i) for i in input().rstrip().split(' ')]

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

N = getInput()[0]
sums = 0
for i in range(1, N+1):
    for j in range(1, N+1):
        if i == j:
            n = i
        else:
            n = gcd(max(i, j), min(i,j))

        for k in range(1, N+1):
            if n == k:
                sums += n
            elif n == 1 or k == 1:
                sums += 1
            else:
                sums += gcd(max(n, k), min(n, k))

print(sums)


Compiler output:
main.c:1:1: error: unknown type name 'def'
    1 | def getInput():
      | ^~~
main.c: In function 'getInput':
main.c:1:15: error: expected declaration specifiers before ':' token
    1 | def getInput():
      |               ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int main(){
	int K;
	cin >> K;
	int s = 0;
	for(int i = 1; i <= K; i++) for(int j = 1; j <= K; j++) for(int m = 1; m <= K; m++) s += __gcd(i, __gcd(j, m));
	cout << s << "\n";
}

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

# def gcd(a, b):
# 	while a != 0 and b != 0:
# 		if a >= b:
# 			remain = a % b
# 			a = remain
# 		else:
# 			remain = b % a
# 			b = remain
# 	if a >= b:
# 		return a
# 	else:
# 		return b 

import math

k = int(input())
sum = 0

for i in range(1, k+1):
	for j in range(1, i+1):
		for l in range(1, j+1):
			if i == j and j == l:
				sum += i
			elif i == j or j == l:
				a = math.gcd(i, j)
				b = math.gcd(j,l)
				g = math.gcd(a,b)
				sum += g*3

			else:
				a = math.gcd(i, j)
				b = math.gcd(j,l)
				g = math.gcd(a,b)
				sum += g*6

print(sum)


Compiler output:
main.c:1:3: error: invalid preprocessing directive #def; did you mean #ifdef?
    1 | # def gcd(a, b):
      |   ^~~
      |   ifdef
main.c:2:9: error: invalid preprocessing directive #while
    2 | #       while a != 0 and b != 0:
      |         ^~~~~
main.c:3:26: error:  ':' without preceding '?'
    3 | #               if a >= b:
      |                          ^
main.c:6:21: warning: extra tokens at end of #else directive [-Wendif-labels]
    6 | #               else:
      |                     ^
main.c:7:25: error: invalid preprocessing directive #remain
    7 | #                       remain = b % a
      |                         ^~~~~~
main.c:8:25: error: invalid preprocessing directive #b
    8 | #                       b = remain
      |                         ^
main.c:9:18: error:  ':' without preceding '?'
    9 | #       if a >= b:
      |                  ^
main.c:11:13: warning: extra tokens at end of #else directive [-Wendif-labels]
   11 | #       else:
      |             ^
main.c:12:17: error: invalid preprocessing directive #return
   12 | #               return b
      |                 ^~~~~~
main.c:14:1: error: unknown type name 'import'
   14 | import math
      | ^~~~~~
main.c:16:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'k'
   16 | k = int(input())
      | ^
main.c:9: error: unterminated #else
    9 | #       if a >= b:
main.c:3: error: unterminated #else
    3 | #               if a >= b:
Language: C

def getInput():
    return [int(i) for i in input().rstrip().split(' ')]

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

def main():
    N = getInput()[0]
    sums = 0
    for i in range(1, N+1):
        for j in range(1, N+1):
            if i == j:
                n = i
            else:
                n = gcd(max(i, j), min(i,j))

            for k in range(1, N+1):
                if n == k:
                    sums += n
                elif n == 1 or k == 1:
                    sums += 1
                else:
                    sums += gcd(max(n, k), min(n, k))

    print(sums)

main()

Compiler output:
main.c:1:1: error: unknown type name 'def'
    1 | def getInput():
      | ^~~
main.c: In function 'getInput':
main.c:1:15: error: expected declaration specifiers before ':' token
    1 | def getInput():
      |               ^
Language: C++

#include<iostream>
#include<math.h>
#include<stdlib.h>
#include<algorithm>

using namespace std;

int main(){
    int c[200][200][200];
    int k,min1,max1,mid1,sum=0,mul=1,flag=0;
    cin >> k;
    for (int i=1; i<=k; i++){
        for (int j=1; j<=k; j++){
            for (int l=1; l<=k; l++){
                int i1 = i, j1 = j, l1 =l;
                min1 = min(i1,j1,l1);
                for (int m=1; m<=k; m++){
                    if(min1 % m == 0 && i1 % m == 0 && j1 % m == 0 && l1 % m == 0){
                        mul *= m;
                        m --;
                        i1 = i1 / m;
                        j1 = j1 / m;
                        l1 = l1 / m;
                    }
                    if(min1 < m) break;
                sum += mul;
                }
            }
        }
    }
    
    cout << sum << endl;
    return 0;
}


Compiler output:
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: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:16:27:   required from here
   16 |                 min1 = min(i1,j1,l1);
      |                        ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C

#include"bits/stdc++.h"
using namespace std;
struct _ { ios_base::Init i; _() { cin.sync_with_stdio(0); cin.tie(0); } } _;

#define pii pair<int,int>
#define ff first
#define ss second
#define endll '\n'

using ll = long long int;

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,__gcd(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 <iostream>
using namespace std;

int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }
int main(){
int K;
cin>>K;
int A[210][210];
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    A[i][j]=gcd(i,j);
  }
}
int B[210][210][210];
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    for (int k=0; k<=K; k++){
      B[i][j][k]=gcd(A[i][j],k)
    }
  }
}
  int sum=0;
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    for (int k=0; k<=K; k++){
      sum+=B[i][j][k];
    }}}
    
  
cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: expected ';' before '}' token
   18 |       B[i][j][k]=gcd(A[i][j],k)
      |                                ^
      |                                ;
   19 |     }
      |     ~
Language: C++

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

int main() {
 int k;
 cin >> k;
 long long int kot=0 ;
 int ans=1  ;
 for(int a=1 ; a<k+1 ; a++){
   for(int b=1 ; b<k+1 ; b++){
     for(int c=1 ; c<k+1 ; c++){
for( int i=1 ; i<max(a,max(b,c))+1 ; i++){
  if(a%i==0 && b%i==0 &&c%i ==0){
    ans =i ;
  }
   
  
}
    
   kot +=ans ;  }
   }
 }

  cout << kot << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:2: error: 'cin' was not declared in this scope
    6 |  cin >> k;
      |  ^~~
a.cc:12:24: error: 'max' was not declared in this scope
   12 | for( int i=1 ; i<max(a,max(b,c))+1 ; i++){
      |                        ^~~
a.cc:12:18: error: 'max' was not declared in this scope
   12 | for( int i=1 ; i<max(a,max(b,c))+1 ; i++){
      |                  ^~~
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << kot << endl;
      |   ^~~~
a.cc:24:18: error: 'endl' was not declared in this scope
   24 |   cout << kot << endl;
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

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

int K;
cin>>K;
int A[210][210];
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    A[i][j]=gcd(i,j);
  }
}
int B[210][210][210];
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    for (int k=0; k<=K; k++){
      B[i][j][k]=gcd(A[i][j],k)
    }
  }
}
  int sum=0;
for (int i=0; i<=K; i++){
  for (int j=0; j<=K; j++){
    for (int k=0; k<=K; k++){
      sum+=B[i][j][k];
    }}}
    
  
cout<<sum<<endl;
}


Compiler output:
a.cc:7:1: error: 'cin' does not name a type
    7 | cin>>K;
      | ^~~
a.cc:9:1: error: expected unqualified-id before 'for'
    9 | for (int i=0; i<=K; i++){
      | ^~~
a.cc:9:15: error: 'i' does not name a type
    9 | for (int i=0; i<=K; i++){
      |               ^
a.cc:9:21: error: 'i' does not name a type
    9 | for (int i=0; i<=K; i++){
      |                     ^
a.cc:15:1: error: expected unqualified-id before 'for'
   15 | for (int i=0; i<=K; i++){
      | ^~~
a.cc:15:15: error: 'i' does not name a type
   15 | for (int i=0; i<=K; i++){
      |               ^
a.cc:15:21: error: 'i' does not name a type
   15 | for (int i=0; i<=K; i++){
      |                     ^
a.cc:23:1: error: expected unqualified-id before 'for'
   23 | for (int i=0; i<=K; i++){
      | ^~~
a.cc:23:15: error: 'i' does not name a type
   23 | for (int i=0; i<=K; i++){
      |               ^
a.cc:23:21: error: 'i' does not name a type
   23 | for (int i=0; i<=K; i++){
      |                     ^
a.cc:30:1: error: 'cout' does not name a type
   30 | cout<<sum<<endl;
      | ^~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int process(int a,int b,int c){
    return(_gcd(a,_gcd(b,c)));
}
int main(){
    int i;
    cin>>i;
    // for(int i=1;i<=k;i++){
        int count=0;
        vector<vector<int>> vec(i+1,vector<int>(i+1));
            for(int b=1;b<=i;b++){
                for(int c=1;c<=i;c++){
                    vec[b][c]=_gcd(b,c);
                }
            }
                for(int a=1;a<=i;a++){
                    for(int b=1;b<=i;b++){
                        for(int c=1;c<=i;c++){
                            count+=vec[vec[b][c]][c];
                        }
                    }
                }
        cout<<i<<" : "<<count<<endl;
    // }
}

Compiler output:
a.cc: In function 'int process(int, int, int)':
a.cc:4:19: error: '_gcd' was not declared in this scope
    4 |     return(_gcd(a,_gcd(b,c)));
      |                   ^~~~
a.cc:4:12: error: '_gcd' was not declared in this scope
    4 |     return(_gcd(a,_gcd(b,c)));
      |            ^~~~
a.cc: In function 'int main()':
a.cc:14:31: error: '_gcd' was not declared in this scope
   14 |                     vec[b][c]=_gcd(b,c);
      |                               ^~~~
Language: C++

#include <iostream>
using namespace std;

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


int main(void){
    // Your code here!
    int N = 0;
    int temp = 0;#include <iostream>
using namespace std;

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


int main(void){
    // Your code here!
    int N = 0;
    int temp = 0;
    int sum = 0;
    cin >> N;
    // cout << N <<endl;
    int i,j,k;
    for (i = 1; i <= N; i++) {
        for (j = 1; j <= N; j++) {
            temp = 0;
            if (j > i) {
                temp = gcd(j,i);
            } else {
                temp = gcd(i,j);
            }
            for (k = 1; k <= N; k++) {
                //cout << temp <<endl;
                if (temp > k) {
                    sum += gcd(temp,k);
                } else {
                    sum += gcd(k,temp);
                }
            }
        }
    }
    cout << sum <<endl;
    
    return 0;
}

    int sum = 0;
    cin >> N;
    // cout << N <<endl;
    int i,j,k;
    for (i = 1; i <= N; i++) {
        for (j = 1; j <= N; j++) {
            temp = 0;
            if (j > i) {
                temp = gcd(j,i);
            } else {
                temp = gcd(i,j);
            }
            for (k = 1; k <= N; k++) {
                //cout << temp <<endl;
                if (temp > k) {
                    sum += gcd(temp,k);
                } else {
                    sum += gcd(k,temp);
                }
            }
        }
    }
    cout << sum <<endl;
    
    return 0;
}


Compiler output:
a.cc:17:18: error: stray '#' in program
   17 |     int temp = 0;#include <iostream>
      |                  ^
a.cc: In function 'int main()':
a.cc:17:19: error: 'include' was not declared in this scope
   17 |     int temp = 0;#include <iostream>
      |                   ^~~~~~~
a.cc:17:36: error: expected primary-expression before '>' token
   17 |     int temp = 0;#include <iostream>
      |                                    ^
a.cc:18:1: error: expected primary-expression before 'using'
   18 | using namespace std;
      | ^~~~~
a.cc:20:23: error: a function-definition is not allowed here before '{' token
   20 | int gcd(int a, int b) {
      |                       ^
a.cc:30:15: error: a function-definition is not allowed here before '{' token
   30 | int main(void){
      |               ^
Language: C

#include<bits/stdc++.h>
using namespace std;
int a=1,b=1,c=1,n,ans;
int gcd(int a,int b)
    {
        if(a==0)
        {
            return b;
        }else
        {
            return gcd(b % a,a);
        }
    }
int main(){
	cin>>n;
	for(a=1;a<=n;a++)for(b=1;b<=n;b++)for(c=1;c<=n;c++){
		ans+=gcd(a,gcd(b,c));
	}
	cout<<ans;
	return 0;
}

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

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

int main() {
 int k;
 cin >> k;
 long long int kot=0 ;
 int ans=1  ;
 for(int a=1 ; a<k+1 ; a++){
   for(int b=1 ; b<k+1 ; b++){
     for(int c=1 ; c<k+1 ; c++){
for( int i=#1 ; i<max(a,max(b,c))+1 ; i++){
  if(a%i==0 && b%i==0 &&c%i ==0){
    ans =i ;
  }
   
  
}
    
   kot +=ans ;  }
   }
 }

  cout << kot << endl;
}


Compiler output:
a.cc:12:12: error: stray '#' in program
   12 | for( int i=#1 ; i<max(a,max(b,c))+1 ; i++){
      |            ^
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:2: error: 'cin' was not declared in this scope
    6 |  cin >> k;
      |  ^~~
a.cc:12:25: error: 'max' was not declared in this scope
   12 | for( int i=#1 ; i<max(a,max(b,c))+1 ; i++){
      |                         ^~~
a.cc:12:19: error: 'max' was not declared in this scope
   12 | for( int i=#1 ; i<max(a,max(b,c))+1 ; i++){
      |                   ^~~
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << kot << endl;
      |   ^~~~
a.cc:24:18: error: 'endl' was not declared in this scope
   24 |   cout << kot << endl;
      |                  ^~~~
Language: C

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

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

int main() {
  int n;
  long long ans=0;
  long long tmp;

  cin >> n;

  for(int i=1;i<=n;i++) {
    for(int j=1;j<=n;j++) {
      tmp=gcd(i,j);
      for(int k=1;k<=n;k++) {
        ans+=gcd(tmp,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 <stdio.h>
using namespace std;

void gcd(int x,int y){
	int r;
   if(x<y)swap(x,y);
  
  while(y>0){
  r = x%y;
  x = y;
  y = r;
  }
  return x;
}

int main(){
 int a,b,c
 int K;
 cin>>K;
 for(i=1;i<=K;i++){
	for(j=1;j<=K;j++){
		for(k=1;k<=K;k++){
         a=i;
         b=j;
         c=k;
         sum+=gcd(gcd(a,b),c); 
		}
	}
}
  
 cout<<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;
      |                 ^~~
main.c: In function 'gcd':
main.c:6:11: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    6 |    if(x<y)swap(x,y);
      |           ^~~~
main.c:13:10: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |   return x;
      |          ^
main.c:4:6: note: declared here
    4 | void gcd(int x,int y){
      |      ^~~
main.c: In function 'main':
main.c:18:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
   18 |  int K;
      |  ^~~
main.c:19:2: error: 'cin' undeclared (first use in this function)
   19 |  cin>>K;
      |  ^~~
main.c:19:2: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:7: error: 'K' undeclared (first use in this function)
   19 |  cin>>K;
      |       ^
main.c:20:6: error: 'i' undeclared (first use in this function)
   20 |  for(i=1;i<=K;i++){
      |      ^
main.c:21:13: error: 'j' undeclared (first use in this function)
   21 |         for(j=1;j<=K;j++){
      |             ^
main.c:22:21: error: 'k' undeclared (first use in this function)
   22 |                 for(k=1;k<=K;k++){
      |                     ^
main.c:25:10: error: 'c' undeclared (first use in this function)
   25 |          c=k;
      |          ^
main.c:26:10: error: 'sum' undeclared (first use in this function)
   26 |          sum+=gcd(gcd(a,b),c);
      |          ^~~
main.c:26:19: error: invalid use of void expression
   26 |          sum+=gcd(gcd(a,b),c);
      |                   ^~~~~~~~
main.c:31:2: error: 'cout' undeclared (first use in this function)
   31 |  cout<<sum;
      |  ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int process(int a,int b,int c){
    return(_gcd(a,_gcd(b,c)));
}
int main(){
    int i;
    cin>>i;
    // for(int i=1;i<=k;i++){
        int count=0;
        vector<vector<int>> vec(i+1,vector<int>(i+1));
            for(int b=1;b<=i;b++){
                for(int c=1;c<=i;c++){
                    vec[b][c]=__gcd(b,c);
                }
            }
                for(int a=1;a<=i;a++){
                    for(int b=1;b<=i;b++){
                        for(int c=1;c<=i;c++){
                            count+=vec[vec[b][c]][c];
                        }
                    }
                }
        cout<<i<<" : "<<count<<endl;
    // }
}

Compiler output:
a.cc: In function 'int process(int, int, int)':
a.cc:4:19: error: '_gcd' was not declared in this scope
    4 |     return(_gcd(a,_gcd(b,c)));
      |                   ^~~~
a.cc:4:12: error: '_gcd' was not declared in this scope
    4 |     return(_gcd(a,_gcd(b,c)));
      |            ^~~~
Language: C

#include <stdio.h>
#include <algorithm>
using namespace std;

void gcd(int x,int y){
	int r;
   if(x<y)swap(x,y);
  
  while(y>0){
  r = x%y;
  x = y;
  y = r;
  }
  return x;
}

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

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

#include<bits/stdc++.h>
#include<numeric>
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 k = 1; k <= K; k++)
      {
        sum += gcd(i, gcd(j, k))
      }
      
    }
    
  }

  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: expected ';' before '}' token
   16 |         sum += gcd(i, gcd(j, k))
      |                                 ^
      |                                 ;
   17 |       }
      |       ~
Language: C

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
ll gcd(ll a, ll b) 
{ 
    // Everything divides 0  
    if (a == 0) 
       return b; 
    if (b == 0) 
       return a; 
   
    // base case 
    if (a == b) 
        return a; 
   
    // a is greater 
    if (a > b) 
        return gcd(a-b, b); 
    return gcd(a, b-a); 
} 
int main () {
	ll k;cin>>k;
	ll dp[k+1][k+1];ll i,j,k1;
	for(i=1;i<=k;i++)
	{
		for(j=1;j<=k;j++)
		dp[i][j]=gcd(i,j);
	}
	ll s=0;
	for(i=1;i<=k;i++)
	{
		for(j=1;j<=k;j++)
		{
			for(k1=1;k1<=k;k1++)
			{
				s+=gcd(i,dp[j][k1]);
			}
		}
	}
	cout<<s<<endl;
	return 0;
}



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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'sum' was not declared in this scope
   17 |   sum = 0
      |   ^~~
a.cc:18:18: error: 'i' was not declared in this scope
   18 |   for (int i = 1;i <=N;i++) {
      |                  ^
Language: C

K = inpit()
k = int(K)
a =0
for i in range (k+1):
    l = k//i
    a+= i*(l**3)
print(a)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | K = inpit()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'K' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'inpit' [-Wimplicit-function-declaration]
    1 | K = inpit()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'k'
    2 | k = int(K)
      | ^
Language: C

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

int main() {
  int n;
  cin >> n;
  
  ll ans=0;
  for(int i=1; i<n-1; i++){
   for(int j=i+1; j<n; j++){
     for(int k=j+1; k<n+1; k++){
       int I=i,J=j,K=k;
       int x=1;
       for(int l=I; l>1; l--){
         if(I%l==0 && J%l==0 && K%l==0){
           I/=l;
           J/=l;
           K/=l;
           x*=l;
           break;
         }
       }
       
       for(int l=I; l>1; l--){
        if(I%l==0 && J%l==0){
          I/=l;
          J/=l; 
          x*=l;
          l=I+1;
        }
         else if(I%l==0 && K%l==0){
          I/=l;
          K/=l;
          x*=l;
          l=I+1;
        }
       }
       
       for(int l=J; l>1; l--){
        if(I%l==0 && J%l==0){
          J/=l;
          K/=l; 
          x*=l;
          break;
        }
       }
       
       ans+=I*J*K*x*6;
     }
   }
  }
  
  for(int i=1; i<n; i++){
   for(int j=1; j<n+1; j++){
     if(i==j) continue;
       int I=i,J=i,K=j;
       int x=1;
       for(int l=I; l>1; l--){
         if(I%l==0 && J%l==0 && K%l==0){
           I/=l;
           J/=l;
           K/=l;
           x*=l;
           break;
         }
       } 
      ans+=I*J*K*x*3;
   }
  }
  

  
    for(int i=1; i<n+1; i++){
       ans+=i;
   }
  cout << ans << endl;
}


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

#include <iostream>
using namespace std;

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

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

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

import java.util.Scanner;

public class C {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());

		int sum = 0;

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

		System.out.println(sum);

		sc.close();
	}

	public static int gcd(int x, int y) {
        int biggerNum = Math.max(x, y);
        int smallerNum = Math.min(x, y);

        // 大きい方から小さい方を割った余を求める
        int surplus = biggerNum % smallerNum;

        // 割り切れていれば、それを返す
        if (surplus == 0) {
            return smallerNum;
        }
        // 割り切れなければ再帰的に自信を呼び出す
        surplus = gcd(smallerNum, surplus);

        return surplus;
	}

}

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

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

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

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

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:4:46: error: expected ')' before ':' token
    4 | int gcd(int x,int y){return (x%y) ? gcd(y,x%y : y;}
      |                                        ~     ^~
      |                                              )
a.cc:4:50: error: expected ':' before ';' token
    4 | int gcd(int x,int y){return (x%y) ? gcd(y,x%y : y;}
      |                                                  ^
      |                                                  :
a.cc:4:50: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
using namespace std;

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

int main() {
  int a, b, c;
  int K;
  cin>>K;
for (int a=1;a<=K;a++){
    for (int j=1;j<=K;j++){b=j;
      for (int k=1;k<=K;k++){c=k;
                             for (int i=1;i<a;i++){
    b = gcd(b, c);
  }}
  sum+=b;}}
  
cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'sum' was not declared in this scope
   16 |   sum+=b;}}
      |   ^~~
a.cc:18:7: error: 'sum' was not declared in this scope
   18 | cout<<sum<<endl;
      |       ^~~
Language: C

#include <stdio.h>
int main()
{
    int a,b,c,K,gcd;

    printf("Enter three integers: ");
    scanf("%d%d%d",&a,&b,&c);

    for(K=1;1≤K≤200;K<=a&&K<=b&&K<=c;++K)
    {
        if(a%K==0&&b%K==0&&c%K==0)
            gcd = K;
    }

    printf("G.C.D of %d and %d and %d is %d",a,b,c,gcd);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: stray '\342' in program
    9 |     for(K=1;1<U+2264>K<U+2264>200;K<=a&&K<=b&&K<=c;++K)
      |              ^~~~~~~~
main.c:9:14: error: expected ';' before 'K'
    9 |     for(K=1;1≤K≤200;K<=a&&K<=b&&K<=c;++K)
      |              ^~
      |              ;
main.c:9:16: error: stray '\342' in program
    9 |     for(K=1;1<U+2264>K<U+2264>200;K<=a&&K<=b&&K<=c;++K)
      |                       ^~~~~~~~
main.c:9:37: error: expected ')' before ';' token
    9 |     for(K=1;1≤K≤200;K<=a&&K<=b&&K<=c;++K)
      |        ~                            ^
      |                                     )
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'sum' was not declared in this scope
   17 |   sum = 0
      |   ^~~
a.cc:18:14: error: 'i' was not declared in this scope
   18 |   for (int i;i < N;i++) {
      |              ^
Language: C++

#include <bits/stdc++.h>
#include <cmath>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REP1(i,n) for(int i = 1; i < n+1 ;i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
typedef long long ll;
int main(){
  int p;
  cin >> p;
  int i,j,k,sum1 = 0;
  for (i = 1; i < p+1 ; i ++) {
    for (j = 1; j < p+1; j ++) {
      int temp1,more,less;
      if (i < j){
        more = j;
        less = i;
      }else{
        more = i;
        less = j;
      }
      while (more % less != 0){
        temp1 = less;
        less = more % less;
        more = temp2;
      }
      for (k = 1; k < p+1; k ++){
        int temp2,more1,less1;
        if (j < k){
          more1 = k;
          less1 = j;
        }else{
          more1 = j;
          less1 = k;
        }
        while(more1 % less1 !=0){
          temp2 = less1;
          less1 = more1 % less1;
          more1 = temp2;
        }
        sum1 += less1;
      }
    }
  }
  cout << sum1 << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: 'temp2' was not declared in this scope; did you mean 'temp1'?
   29 |         more = temp2;
      |                ^~~~~
      |                temp1
Language: C++

#include<iostream>
 using namespace std;
 int main()
 {

     int k,p,d;long long intsum=0;
     cin>>k;

     for(int i=1;i<=k;i++)
     {
         for(int j=1;j<=k;j++)
         {
             for(int c=1;c<=k;c++)
             {

                  p=1;
                  d=1;
                while(p<=i&&p<=j&&p<=c)
                  {
                if(i%p==0&&j%p==0&&c%p==0)
                       {
                          d=p;
                          p++;
                        }
                     }
                     sum=sum+d;
             }

         }
     }
     cout<<sum;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: 'sum' was not declared in this scope
   26 |                      sum=sum+d;
      |                      ^~~
a.cc:31:12: error: 'sum' was not declared in this scope
   31 |      cout<<sum;
      |            ^~~
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):
      ans += math.gcd(math.gcd(i,j),k)

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 'K'
    2 | K = int(input())
      | ^
Language: C++

#include <iostream>
using namespace std;

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

int main() {
  int a, b, c;
  int K;
  cin>>K;
for (int a=1;a<=K;a++){
    for (int j=1;j<=K;j++){b=j;
      for (int k=1;k<=K;k++){c=k;
                             for (int i=1;i<a;i++){
    b = gcd(b, c);
  }}}
  sum+=b;
  
cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'sum' was not declared in this scope
   16 |   sum+=b;
      |   ^~~
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

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

int main() {
  int a, b, c;
  int K;
  cin>>K;
for (int a=1;a<=K;h++){
    for (int j=1;j<=K;j++){b=j;
      for (int k=1;k<=K;k++){c=k;
                             for (int i=1;i<a;i++){
    b = gcd(b, c);
  }}}
  sum+=b;
  
cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'h' was not declared in this scope
   10 | for (int a=1;a<=K;h++){
      |                   ^
a.cc:16:3: error: 'sum' was not declared in this scope
   16 |   sum+=b;
      |   ^~~
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <numeric>

int main(){
  int K;
  std::cin>>K;
  int ans=0;
  for(int a=0;a<K;a++){
    
    for(int b=0;b<K;b++){
      
      for(int i=0;i<K;i++){
        int x =std::gcd(a+1,b+1);
        int y =std::gcd(x,i);
        ans=ans+y;
      }
    }
  }
  



    std::cout << ans << std::endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:23:35: error: expected '}' at end of input
   23 |     std::cout << ans << std::endl;
      |                                   ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

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

int main() {
  int a, b, c;
for (int a=1;a<=K;h++){
    for (int j=1;j<=K;j++){b=j;
      for (int k=1;k<=K;k++){c=k;
                             for (int i=1;i<a;i++){
    b = gcd(b, c);
  }}}
  sum+=b;
  
cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'K' was not declared in this scope
    8 | for (int a=1;a<=K;h++){
      |                 ^
a.cc:8:19: error: 'h' was not declared in this scope
    8 | for (int a=1;a<=K;h++){
      |                   ^
a.cc:14:3: error: 'sum' was not declared in this scope
   14 |   sum+=b;
      |   ^~~
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C

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

int max_my(int x,int y,int z){
  int answer = x;
  if (x < y){
    answer = y;
    if (y < z){
      answer = z;
    }
  }
  else if (x < z){
    answer = z;
  }
  return answer;
}

int gcd(int a,int b,int c){
  int G = 1;
  for (int i = 1; i < max_my(a, b, c) + 1; i++){
    if (a % i == 0 && b % i == 0 && c % i == 0){
      G = i;
    }
  }
  return G;
}
    
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++){
      for (int k = 1; k < K + 1; k++){
        sum += 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 <iostream>
#include <cmath>
#include <math.h>
#include <algorithm>

int gcd(int a, int b, int c) {
	int m = std::min(a, b);
  	m = std::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++) {
   	      int gcd1 = std::__gcd(a, b);
          int gcd2 = std::__gcd(a, c);
          int gcd3 = std::__gcd(c, d);
          int minGCD = std::min(std::min(gcd1, gcd2), gcd3);
          sum += minGCD;
      }
    }
  }
  std::cout << sum;
 
  return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:36: error: 'd' was not declared in this scope
   26 |           int gcd3 = std::__gcd(c, d);
      |                                    ^
Language: C

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

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

int main() {
  int N,sum;
  cin >> N;
  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(j,k),gcd(i,j));
      }
    }
  }
  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: Java

import java.util.Scanner;

public class at {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int k = sc.nextInt();
		long sum = 0;
		for(int i = 1; i < k+1; i++) {
			for (int m = 1; m < k+1; m++) {
				for(int l = 1; l <k+1; l++) {
					sum +=yu(yu(i,m),l);
				}
			}
		}
		System.out.println(sum);
		
	}
	static int yu(int a, int b) {
		int c;
		while(true) {
			if(b==0) {
				a =0;
				break;
			}
			c = a%b;
			a = b;
			b = c;
			if(c == 0) {
				break;
			}
			
		
		}
		return a;
	}
	
}


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

#include <bits/stdc++.h>
#include <string>
#include <iostream>
#include <iomanip>
using namespace std;
#define rep(i, N) for (ll i = 0; i < (N); i++)
typedef long long ll;

int gcd2(int a, int b)
{
    if (a % b == 0)
    {
        return b;
    }
    else
    {
        return gcd2(b, a % b);
    }
}
int gcd3(int a, int b, int c)
{
    a = gcd2(a, b);
    return gcd2(a, c);
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int k;
    cin >> k;
    ll sum = 0;
    for (int i = 1; i <= k; i++)
    {
        for (int l = 1; l <= k; l++)
        {
            for (int g = 1; g <= k; g++)
            {
                sum += gcd3(i, l, g);
            }
        }
    }
    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;
    cin>>k;
    long long int  count=0;
    for ( int  i = 1; i <= k; i++)
    {
        
      for (int h = 1; h <= k; h++)
      {
          for (int o = 1; o <= k; o++)
          {
              if(i==1 || h==1 || o==1){
                  count+=1;
                  
              }else{
              int a=i;int b= h; int c=o;
              while (b) { a %= b; swap(a, b); } 
              while (c) { a %= c; swap(a, c); } 
              count+=a;}
          }
          
        
      }
      
    }
    cout<< count <<endl;

}

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