criyle/codenet-compile-errors huggingface dataset:
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;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rept(i,k,n) for(int i = (k); i < (int)(n); i++)

#define mod 1000000007
typedef long long ll;

int main() {
    ll ans=0,k;
    cin>>k;
    rept(i,1,k+1){
        rept(j,1,k+1){
            rept(h,1,k+1){
                ans+=gcd(i,gcd(j,h));
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}


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

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

int main() {
  int K, ans, a;
  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(int i, int j, int m);
        ans += a;
      }
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before 'int'
    9 |         a = gcd(int i, int j, int m);
      |                 ^~~
a.cc:9:24: error: expected primary-expression before 'int'
    9 |         a = gcd(int i, int j, int m);
      |                        ^~~
a.cc:9:31: error: expected primary-expression before 'int'
    9 |         a = gcd(int i, int j, int m);
      |                               ^~~
Language: C

 <?php   
    $sum=0;
    fscanf(STDIN,"%d",$K);

    for($i=1;$i<=$K;$i++){
        for($j=1;$j<=$K;$j++){
            for($k=1;$k<=$K;$k++){
                $ij = gmp_gcd($i, $j);
                $gcd = gmp_gcd($ij,$k);
                $sum += $gcd;
              

            }
        }
    }

    echo $sum."\n";


Compiler output:
main.c:1:2: error: expected identifier or '(' before '<' token
    1 |  <?php
      |  ^
main.c:3:18: error: expected ')' before string constant
    3 |     fscanf(STDIN,"%d",$K);
      |                  ^~~~
      |                  )
main.c:5:5: error: expected identifier or '(' before 'for'
    5 |     for($i=1;$i<=$K;$i++){
      |     ^~~
main.c:5:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
    5 |     for($i=1;$i<=$K;$i++){
      |                ^~
main.c:5:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    5 |     for($i=1;$i<=$K;$i++){
      |                       ^~
main.c:17:5: error: unknown type name 'echo'
   17 |     echo $sum."\n";
      |     ^~~~
main.c:17:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   17 |     echo $sum."\n";
      |              ^
Language: C++

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

int main() {
  int K, ans, a;
  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(int i,int j,int m);
        ans += a;
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before 'int'
    9 |         a = gcd(int i,int j,int m);
      |                 ^~~
a.cc:9:23: error: expected primary-expression before 'int'
    9 |         a = gcd(int i,int j,int m);
      |                       ^~~
a.cc:9:29: error: expected primary-expression before 'int'
    9 |         a = gcd(int i,int j,int m);
      |                             ^~~
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>
#include<stdio.h>

using namespace std;

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

int main(){
	int K;
	int ans = 0;
	int i, j, q;
	scanf("%d", &K);

	for(i=1; i <=K; i++){
        for(j=1; j <=K; j++){
            for(q=1; q <=K; q++) ans = ans + gcd(i, gcd(j, q));
        }
	}

	printf("%d",ans);
}


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

#include <stdio.h>
int kouyakusuu(int a,int b);
int main(){
    int a,b,c,ans1;
    scanf("%d %d %d",&a,&b,&c);
    ans1=kouyakusuu(a,b);
    ans1=kouyakusuu(ans1,c);
    ans1=ans1*a*b*c;
    printf("%d\n",ans1);
}
int kouyakusuu(int a,int b){
    /* 自然数 a > b を確認・入替 */
     if(a<b){
       tmp = a;
       a = b;
       b = tmp;
     }
     /* ユークリッドの互除法 */
     r = a % b;
     while(r!=0){
       a = b;
       b = r;
       r = a % b;
     }
     /* 最大公約数を出力 */
    return b;
}


Compiler output:
main.c: In function 'kouyakusuu':
main.c:14:8: error: 'tmp' undeclared (first use in this function)
   14 |        tmp = a;
      |        ^~~
main.c:14:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:6: error: 'r' undeclared (first use in this function)
   19 |      r = a % b;
      |      ^
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 sum=0;
for (int i = 1; i <=K; i++) {
 for (int j = 1; j <=K; j++) {
  for(int l = 1; l <=K; l++) {
    t=j;
    for(int m=1; m<i;m++){
      t=gcd(t,l);
    }
  sum+=t;}}}
  cout<<sum<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 't' was not declared in this scope
   12 |     t=j;
      |     ^
Language: C++

signed main() {
	int k;
	cin >> k;
	ll ans = 0;
	for (int a = 1; a < k+1; a++)
	{
		for (int b = 1; b < k+1; b++)
		{
			for (int c = 1; c < k+1; c++)
			{
				ans += gcd(a, gcd(b, c));
			}
		}
	}
	puts(ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> k;
      |         ^~~
a.cc:4:9: error: 'll' was not declared in this scope
    4 |         ll ans = 0;
      |         ^~
a.cc:11:33: error: 'ans' was not declared in this scope
   11 |                                 ans += gcd(a, gcd(b, c));
      |                                 ^~~
a.cc:11:47: error: 'gcd' was not declared in this scope
   11 |                                 ans += gcd(a, gcd(b, c));
      |                                               ^~~
a.cc:11:40: error: 'gcd' was not declared in this scope
   11 |                                 ans += gcd(a, gcd(b, c));
      |                                        ^~~
a.cc:15:14: error: 'ans' was not declared in this scope
   15 |         puts(ans);
      |              ^~~
a.cc:15:9: error: 'puts' was not declared in this scope
   15 |         puts(ans);
      |         ^~~~
Language: C++

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


void solve(long long K){

    long long a, b, c;
    long long gcd_ab, gcd_abc;
    long long N = 0;

    for(long long i = 1; i <= K; i++){
        for(long long j = 1; j <= K; j++){
            gcd_ab = __gcd(i, j);
            //cout << "gcd_ab: (" << i << ", " << j << ") " << gcd_ab << endl;
            for(long long k = 1; k <= K; k++){
                gcd_abc = __gcd(gcd_ab, k);
                //cout << "gcd_abc: (" << i << ", " << j << ", " << k << ") " << gcd_abc << endl;
                N += gcd_abc;
            }
        }
    }

    cout << N << endl;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long K;
    scanf("%lld",&K);
    solve(K);
    return 0;
}


Compiler output:
a.cc: In function 'void solve(long long int)':
a.cc:14:22: error: '__gcd' was not declared in this scope
   14 |             gcd_ab = __gcd(i, j);
      |                      ^~~~~
Language: C

#include <bits/stdc++.h>
#include<stdio.h>

using namespace std;

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

int main(){
	int K;
	int ans = 0;
	int i, j, q;
	scanf("%d", &K);

	for(i=1; i <=K; i++){
        for(j=1; j <=K; j++){
            for(q=1; q <=K; q++) ans = ans + gcd(i, gcd(j, q));
        }
	}

	printf("%d",ans);
}


	printf("%d",ans);
}

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

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

int kobaisu(int x, int y, int z)
{
    int p = max(x, y);
    int q = min(x, y);
    int n, m;
    while (p % q != 0)
    {
        n = q;
        q = p % q;
        p = n;
    }
    int r = max(q, z);
    int s = min(q, z);
    while (r % s != 0)
    {
        m = s;
        s = r % s;
        r = m;
    }
    return s;
}

int main()
{
    int K;
    cin >> K;
    int64_t count = 0;

    for (int i = 2; i <= K; i++)
    {
        for (int j = 2; j <= K; j++)
        {
            for (int k = 2; k <= K; k++)
            {
                count += kobaisu(i, j, k);
            }
       }
    }

    count += (3 * K * K - 3 * K + 1);
    cout << count;
}

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) { return (x % y)? gcd(y, x % y): y; }
int main() {
int K;
  cin>>K;
int sum=0;
for (int i = 1; i <=K; i++) {
 for (int j = 1; j <=K; j++) {
   t=j;
  for(int l = 1; l <=K; l++) {
    for(int m=1; m<i;m++){
      t=gcd(t,l);
    }
  sum+=t;}}}
  cout<<sum<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:4: error: 't' was not declared in this scope
   11 |    t=j;
      |    ^
Language: C

#include <iostream>

using namespace std;

int gcd(int x,int y)
{
    int r;
    while(r = x%y)
    {
        x = y;
        y = r;
        r = x%y;
    }
    return y;
}

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

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

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


int gcd(int a,int b,int c){
    int x=min(min(a,b),c);
        for(int y=x;y>0;y--){
            if(a%y==0 && b%y==0 && c%y==0){
                sum=sum+y;
                break;
            }
        }
    }

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

Compiler output:
a.cc: In function 'int gcd(int, int, int)':
a.cc:10:17: error: 'sum' was not declared in this scope
   10 |                 sum=sum+y;
      |                 ^~~
a.cc:14:5: warning: no return statement in function returning non-void [-Wreturn-type]
   14 |     }
      |     ^
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 K;
   cin >> K;
  int q = 0;
  int w = 0;
  for(int a = 1; a < K + 1; a++) {
    for(int b = 1; b < K + 1; b++) {
      for(int c = 1; c < K + 1; c++) {
        q -= q;
        q += gcd(a, b);
        w += gcd(q, c);
      }
    }
  }
  cout << w << endl;
}

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

#include <iostream>
#include <vector>

using namespace std;

int gcd(int x, int y) {
    if(x < y) {
        swap(x, y);
    }

    while(y > 0) {
        int r = x % y;
        x = y;
        y = r;
    }

    return x;
}

int gcd_cache(int x, int y, int z, int ***cache) {
    if(y < x) {
        swap(x, y);
    }
    if(y < z) {
        swap(y, z);
        if(y < x) {
            swap(x, y);
        }
    }

    if(cache[x][y][z] == -1) {
        int n = gcd(x, y);
        cache[x][y][z] = gcd(n, z);
    }
    return cache[x][y][z];
}

int main() {
    int n;
    cin >> n;
    if(n > 200) {
        return;
    }

    int ***cache = new int **[n + 1];
    for(int i = 0; i <= n; i++) {
        cache[i] = new int *[n];
        for(int j = 0; j <= n; j++) {
            cache[i][j] = new int[n];
            for(int k = 0; k <= n; k++) {
                cache[i][j][k] = -1;
            }
        }
    }

    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_cache(i, j, k, cache);
            }
        }
    }
    cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   42 |         return;
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <stdio.h>
#include <cstdlib>

using namespace std;

int main() {
    int k = 0;
    int a, b, c, d;
    long int cnt = 0;
    cin >> k;
    for (int a = 1; a =< k ; a++){
        for (int b = 1; b <= k; b++){
            for (int c = 1; c <= k; c++){
                d = gcd(a,b);
                cnt = cnt + gcd(d,c);
            }
        }
    }
    cout << cnt;
}
function gcd($aa, $bb) {
    if ($bb === 0)
        return $aa;

    return gcd($bb, $aa % $bb);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected primary-expression before '<' token
   13 |     for (int a = 1; a =< k ; a++){
      |                        ^
a.cc: At global scope:
a.cc:23:14: error: '$aa' was not declared in this scope
   23 | function gcd($aa, $bb) {
      |              ^~~
a.cc:23:19: error: '$bb' was not declared in this scope
   23 | function gcd($aa, $bb) {
      |                   ^~~
a.cc:23:24: error: expected ',' or ';' before '{' token
   23 | function gcd($aa, $bb) {
      |                        ^
Language: C

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

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

int main(){
    int K;
    cin >> K;
    int i,j,k, r;
    long long r_sum = 0;
    for(i=1; i<= K; i++){
        for(j=1; j<= K; j++){
            for(k = 1; k <= K; k++){
                r = gcd(gcd(i,j),k);
                r_sum += r;
            }
        }
    }
    cout << r_sum << endl;
    return 0;
}

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

#include <bits/stdc++.h>
#define mod 1000000007

using namespace std;

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

int main(){
    int i , j ,l;
    int ij;
    int K;
    cin >> K;
    int sum = 0;
    for(i=1; i<=K; i++){
        for(j=1; j<=K; j++){
            ij = gcd(i, j);
            for(l=1; l<=K; l++){
                sum += gcd(l, ij);
            }
        }
    }
    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: Java

import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;


public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        List<Integer> listA = Stream.iterate(1 , i -> i+1)
                .limit(k)
                .collect(Collectors.toList());
        int[] ar1 = new int[listA.size()];
        int[] ar2 = new int[listA.size()];
        int[] ar3 = new int[listA.size()];
        ar1 = toArray(listA);
        ar2 = toArray(listA);
        ar3 = toArray(listA);
        long sum = 0;
        for(int n1 : ar1){
            for(int n2 : ar2){
                for(int n3 : ar3){
                    int[] array = {n1, n2, n3};
                    sum +=gcd(array);
                }
            }
        }
        System.out.println(sum);


    }

    private static int gcd(int[] args){
        return IntStream.of(args)
                .mapToObj(BigInteger::valueOf) // 型変換
                .reduce(BigInteger::gcd) // Python版のreduce(math.gcd)とほぼ同じですね
                .orElse(BigInteger.ZERO) // ↑はOptional<BigInteger>を返すので
                .intValue();
    }

    public static int[] toArray(List<Integer> target) {

        final int[] result = new int[target.size()];
        for (int i=0; i<result.length; i++) {
            result[i] = target.get(i);
        }

        return result;
    }


Compiler output:
Main.java:52: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include<iostream>
using namespace std;
int gcd(int a, int b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 
int main(){
  int n;
  long 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,gcd(j,l));
      }
     }
   }
   cout<<sum;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'k' was not declared in this scope
   12 |   cin>>k;
      |        ^
a.cc:15:27: error: expected ')' before '{' token
   15 |       for(int l=1;l<=k;l++{
      |          ~                ^
      |                           )
Language: C++

//#include <bits/stdc++.h>
#include <iostream>
#include <vector>

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

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

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

    ll sum=0;
    int last_min = 0;
    int ret_gcd=0;

    for (int i=1; i<= n; ++i){
        for (int j=1; j<= n; ++j){
            for (int k=1; k<= n; ++i){
                if(last_min < min({i,j,k})){ //min更新
                    last_min = min({i,j,k});
                    ret_gcd = gcd(gcd(i,j), k); //真gcdの計算
                }
                sum += ret_gcd;
            }
        }
    }
    cout<<sum<<endl;

} // end of main

//実行は、Opt + Ctl + N

Compiler output:
a.cc: In function 'int main()':
a.cc:32:34: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   32 |                 if(last_min < min({i,j,k})){ //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:2:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:33:35: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   33 |                     last_min = min({i,j,k});
      |                                ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

#define get(a) scanf("%lld", &a);
#define print(a) printf("%lld",a)
#define println(a) printf("%lld\n",a)

#define do(i,a) for(long long i = 0; i < a; i++)
#define loop() for(;;) 
#define done return 0
long long n,ans;

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

int main() {
    get(n);
    do(i,n) do(j,n) do(k,n) {
        ans += gcd(gcd(i,j),k);
    }
    print(ans);
}

Compiler output:
a.cc:1:10: fatal error: stdc++.h: No such file or directory
    1 | #include "stdc++.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

import math
from functools import reduce

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

x = 0
n = int(input())+1

for i in range(1,n):
    for j in range(1, n):
        for k in range(1, n):
            x += int(gcd(i,j,k))
print(x)

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

#iclude<stdio.h>

int gcd(int num1, int num2, int num3){
  	int sma_num;
  
	if((num1 - num2) < 0 && (num1 - num3) < 0){
    	sma_num = num1;
    } else if ((num2 - num3) < 0){
    	sma_num = num2;
    } else {
    	sma_num = num3;
    }
  
  	for(int i = sma_num; i >= 0; i--){
    	if((num1 % i) == 0 && (num2 % i) == 0 && (num3 % i) == 0){
        	return i;
        } else {
        	continue;
        }
    }
}

int main(void){
  	int k, result;
  	int sum = 0;
  
	scanf("%d", &k);
  
  	for(int a = 1; a <= k; a++){
    	for(int b = 1; b <= k; b++){
        	for(int c = 1; c <= k; c++){
  				result = gcd(a, b, c);
              	sum += result;
            }
        }
    }
  
  printf("%d", sum);
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:27:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   27 |         scanf("%d", &k);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #iclude<stdio.h>
main.c:27:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   27 |         scanf("%d", &k);
      |         ^~~~~
main.c:27:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:38:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   38 |   printf("%d", sum);
      |   ^~~~~~
main.c:38:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:38:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:38:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

void solve(){
    int k;
    cin >> k;
    int gcd[300][300];
    for(int i=1; i<300; i++)
        for(int j = 1; j<300; j++)
            gcd[i][j] = __gcd(i, j);
    ll s = 0;
    for(int i=1; i<=k; i++)
        for(int j=1; j<=k; j++)
            for(int z = 1; z<=k; z++)
                s += gcd[gcd[i][j]][z];
    cout << s;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll t = 1, i = 1;
    //cin >> t;
    while(t--){
        solve();
        ++i;
    }
    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++

import math


def get_gcd(n_1, n_2, n_3):
    string_n = str(n_1) + " " + str(n_2)+" "+str(n_3)
    a = list(map(int, string_n.split()))
    N = 3
    ans = a[0]
    for i in range(1, N):
        ans = math.gcd(ans, a[i])
    return ans


sum = 0
k = int(input())
for i in range(1, k+1):
    for j in range(1, k + 1):
        for l in range(1, k + 1):
            sum += get_gcd(i, j, l)
print(sum)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

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

			}
		}
	}
	printf("%lld\n", sum);

}

Compiler output:
a.cc:10:11: error: '::main' must return 'int'
   10 | long long int main(void)
      |           ^~~
a.cc: In function 'int main()':
a.cc:21:33: error: 'll' was not declared in this scope
   21 |                                 ll oof = gcd(j, o);
      |                                 ^~
a.cc:22:52: error: 'oof' was not declared in this scope
   22 |                                 sum = sum + gcd(i, oof);
      |                                                    ^~~
Language: C

def my_gcd(p, q):
    if p < q:
        tmp = q
        q = p
        p = tmp
    r = p % q
    while r > 0:
        p = q
        q = r
        r = p % q
    return q

k = int(input())
gcd_list = [[my_gcd(m + 1, n + 1) for n in range(k)] for m in range(k)]
sum = 0
for a in range(k):
    for b in  range(k):
        for c in range(k):
            sum += gcd_list[a][gcd_list[b][c] - 1]
print(sum)

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

#include<bits/stdc++.h>
#define ll          long long int
#define lld          long double
#define pb          push_back
#define pii         pair<ll,ll>
#define mi          map<ll,ll>
#define vec         vector<ll>
#define all(a)     (a).begin(),(a).end()
#define F           first
#define S           second
#define mod         1000000007
#define rep(i,a,b)	for(ll  i=a;i<b;i++)
#define repi(i,a,b)	for(ll  i=a;i<=b;i++)
#define per(i,a,b)  for(ll i=a;i>=b;i--)
#define mp          make_pair
#define mit         map<ll,ll>::iterator
#define sit         set<ll>::iterator
#define xy          exit(0);
#define pit         pair<ll,ll>::iterator
#define tr(container, it) for(__typeof(container.begin()) it = container.begin(); it != container.end(); it++)
using namespace std;
ll xo(ll x, ll y) 
{ 
   return (x | y) & (~x | ~y); 
}  
ll bin_Expo(ll x,ll n)
{
		if(x==0)
		return 0;
    if(n==0)
        return 1;
    else if(n%2 == 0)        //n is even
        return bin_Expo(x*x,n/2);
    else                             //n is odd
        return x*bin_Expo(x*x,(n-1)/2);
}
ll mod_Expo(ll x,ll n,ll M)
{
		if(x==0)
		return 0;
    if(n==0)
        return 1;
    else if(n%2 == 0)        //n is even
        return mod_Expo((x*x)%M,n/2,M);
    else                             //n is odd
        return (x*mod_Expo((x*x)%M,(n-1)/2,M))%M;
 
}
ll NcR(int n, int r) 
{ 
    ll p = 1, k = 1; 
    if (n - r < r) 
        r = n - r; 
  
    if (r != 0) { 
        while (r) { 
            p *= n; 
            k *= r; 
            ll m=__gcd(p, k); 
            p /= m; 
            k /= m; 
            n--; 
            r--; 
        } 
    } 
    else
        p = 1; 
    return p;
}
bool prime_check(ll x)
{
    bool prime = (x >= 2);
    for (ll i = 2; i * i <= x; i++) 
    {
        if (x % i == 0) 
        {
            prime = false;
            break;
        }
    }
    return prime;
}
ll logg(ll base,ll x)
{
    return (ll)(log(x)/log(base));
}
ll gc(ll a,ll b,ll c)
{
	ll x=__gcd(a,b);
	return __gcd(x,c);
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int TESTS=1;
//	cin>>TESTS;
    while(TESTS--)
    {
    	ll i,j,m,b,d,x,a,h,l,r,n,p,q,c,ans;
    	cin>>n;
    	b=0;
    	repi(i,1,n)
    	{
    		repi(j,1,n)
    		{
    			repi(k,1,n)
    			b+=gc(i,j,k);
			}
		}
    	cout<<b;
    	
    	
    	
    }
	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;
	scanf("%lld",&n);
	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= n; j++)
		{
			for (int k = 1; k <= n; k++)
			{
				x += gcd__(i, j, k);
			}
		}
	}
	printf("%lld\n", x);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:38: error: 'gcd__' was not declared in this scope
   13 |                                 x += gcd__(i, j, k);
      |                                      ^~~~~
Language: C

import math
from functools import reduce

def gcd(nums):
    return reduce(math.gcd, nums)

K = int(input())

a = []
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            a.append([i,j,k])

ans = 0
for i in a:
    ans += gcd(i)

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'
Language: C++

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


Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:9:21: error: expected ';' before 'else'
    9 |  if(a%b==0) return b
      |                     ^
      |                     ;
   10 |    else return gcd(b,a%b)
      |    ~~~~              
a.cc:10:26: error: expected ';' before '}' token
   10 |    else return gcd(b,a%b)
      |                          ^
      |                          ;
   11 | }
      | ~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
  int p,q,r,k,int a[100000],s=0;
  cin>>k;
  for(p=1;p<k+1;p++)
    for(q=1;q<k+1;q++)
      for(r=1;r<k+1;r++)
      { s=(__gcd(__gcd(q,r),p))+s;
      }
  cout<<s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected unqualified-id before 'int'
    6 |   int p,q,r,k,int a[100000],s=0;
      |               ^~~
a.cc:11:9: error: 's' was not declared in this scope
   11 |       { s=(__gcd(__gcd(q,r),p))+s;
      |         ^
a.cc:13:9: error: 's' was not declared in this scope
   13 |   cout<<s;
      |         ^
Language: C

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
int fg(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
signed main(){
  int N;
  cin>>N;
  int sum=0;
  rep(a,N){
    rep(b,N){
      rep(c,N){
       int x=__gcd(a,b);
       int y=__gcd(c,x);
       sum+=y;
      }
    }
  }
  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: Java

import java.util.Scanner;
public class Main_3{
    public static void main(String[] args) {
                Scanner s = new Scanner(System.in);
                int a = s.nextInt();
                int sum = 0;
                for(int i = 0; i < a; i++){
                    for(int j = 0; j < a; j++){
                        for(int k = 0; k < a; k++){
                            sum = sum + gcd(gcd(i+1,j+1),k+1);
                        }
                    }
                }
                System.out.println(sum);
    }
    public static int gcd(int a, int b){
        int tmp;
        while ((tmp = a % b) != 0) {
            a = b;
            b = tmp;
        }
        return b;
    }
}

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

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
int fg(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
signed main(){
  int N;
  cin>>N;
  int sum=0;
  rep(a,N){
    rep(b,N){
      rep(c,N){
       int x=__gcd(a,b);
       int y=__gcd(c,x);
       sum+=y
      }
    }
  }
  cout<<sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: expected ';' before '}' token
   33 |        sum+=y
      |              ^
      |              ;
   34 |       }
      |       ~
Language: C

#include<stdio.h>

int gcd(int, int);

int main() {
	int K;
	int x = scanf("%d", &K);
	long long int sum = 0;
	for (int i = 1;i <= K;++i) {
		for (int j = 1;j <= K;++j) {
			for (int k = 1;k <= K;++k) {
				sum += gcd(gcd(i, j), k);
			}
		}	
	}
	
	printf("%lld\n", sum);
	return 0;
}

int gcd(int x, int y) {
	int a = x, b = y;
	while (true) {
		if (a == b) {
			return a;
		}
		else if (a < b) {
			int t = a;
			a = b;
			b = t;
		}

		a -= b;
	}
}


Compiler output:
main.c: In function 'gcd':
main.c:23:16: error: 'true' undeclared (first use in this function)
   23 |         while (true) {
      |                ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:23:16: note: each undeclared identifier is reported only once for each function it appears in
   23 |         while (true) {
      |                ^~~~
Language: C

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

int gcd(int x,int y,int z){
   	int r;
   	r=x%y;
   	if(r==0)
   	   r=n;
   	   r=n%z;
   	   if(r==0) return z;
   	   else return gcd(z,r);
   	else
   	   return gcd(y,r);
   }
int main(){
	int a,b,c;
	int k,sum=0;
	cin>>k;
	
	for (a=1; a<=k; a++){
   		for (b=1; b<=k; b++){
      		for (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 main(){
  int k;
  cin>>k;
  ll sum = 0;
  for(int i = 1; i<=k; i++){
    for(int j = 1; j<=k; j++){
      for(int l = 1; l<=k; l++){
        sum+=__gcd(i,__gcd(j,l));
      }
    }
  }
  cout<<sum<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll sum = 0;
      |   ^~
a.cc:10:9: error: 'sum' was not declared in this scope
   10 |         sum+=__gcd(i,__gcd(j,l));
      |         ^~~
a.cc:14:9: error: 'sum' was not declared in this scope
   14 |   cout<<sum<<endl;}
      |         ^~~
Language: C

#include <iostream>

using ll = long long;
#define rep(inc, bgn, end) for (int inc = bgn; inc < end; ++inc)
#define repe(inc, bgn, end) for (int inc = bgn; inc <= end; ++inc)

using namespace std;

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

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

    ll sum = 0;
    // 3つ同じ
    repe(val, 1, n) {
        // printf("(%d, %d, %d) : %d", val, val, val, val);
        sum += val;
    }

    // 2つ同じ
    ll tsum = 0;
    repe(val1, 1, n) {
        repe(val2, val1 + 1, n) { tsum += gcd(val1, val2); }
    }

    sum += 6 * tsum;

    // 全部違う
    tsum = 0;
    repe(val1, 1, n) {
        repe(val2, val1 + 1, n) {
            repe(val3, val2 + 1, n) { tsum += gcd(gcd(val1, val2), val3); }
        }
    }
    sum += 6 * tsum;

    cout << sum << endl;

    return 0;
}


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

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

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

int main() {

    int K;

    cin >> K;

    int res=0;

    for(int l=1; l<K+1; l++){
        for(int m=1; m<K+1; m++){
            for(int n=1; n<K+1; n++){

                res=res+gcd(gcd(l,m),n);
            }
        }
    }
    cout << res << endl;
}


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

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

int n;
long long g[222][222];

int main(){
	scanf("%d", &n);
	for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++) g[i][j] = __gcd(i, j);
	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 += g[i][g[j][k]];
	printf("%lld\n", sum); 
	return 0;
}

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

package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)

	sum := 0

	var gcd int
	for a := 1; a <= n; a++ {
		for b := a; b <= n; b++ {
			for c := b; c <= n; c++ {
				gcd = clacGcd(a, b, c)
				//fmt.Println(a, b, c, gcd)
				if a == b && b == c {
					sum += gcd
				} else if (a == b && b != c) || (a != b && b == c) {
					sum = sum + gcd*3
				} else {
					sum = sum + gcd*6
				}
				//fmt.Println(sum)
			}
		}
	}

	fmt.Println(sum)
}

func clacGcd(a int, b int, c int) int {
	var gcd int
	var tmp int
	for {
		if a%b != 0 {
			tmp = a % b
			a = b
			b = tmp
		} else {
			break
		}
	}
	for {
		if b%c != 0 {
			tmp = b % c
			b = c
			c = tmp
		} else {
			gcd = c
			break
		}
	}
	return gcd
}


Compiler output:
main.c:1:1: error: unknown type name 'package'
    1 | package main
      | ^~~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    3 | import (
      | ^~~~~~
main.c:34:1: error: unknown type name 'func'
   34 | func clacGcd(a int, b int, c int) int {
      | ^~~~
main.c:34:14: error: unknown type name 'a'
   34 | func clacGcd(a int, b int, c int) int {
      |              ^
main.c:34:21: error: unknown type name 'b'
   34 | func clacGcd(a int, b int, c int) int {
      |                     ^
main.c:34:28: error: unknown type name 'c'
   34 | func clacGcd(a int, b int, c int) int {
      |                            ^
Language: C

#include<iostream>
#include<algorithm>
using namespace std;

int main(){
  int N,g1,g2;
  long long ans=0;
  cin>>N;
  for(int i=1;i<=N;i++){for(int j=1;j<=N;j++){
    g1=__gcd(i,j);
    for(int k=1;k<=N;k++){
      g2=__gcd(g1,k);
      ans+=g2;
    }
  }}
  
  cout<<ans;
}

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

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

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

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

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


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

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

int main() {
  int n;
  cin>>n;
  int x=0;
  for(int i=1;i<n+1;i++){
    for(int j=1;j<n+1;j++){
      for(int k=1;k<n+1;k++){
        int a=min(i,j);
        int b=min(a,k);
        int m=0;
        for(int l=1;l<a+1;l++){
          int gcd=0;
          int ma,mi,mu;
          ma=i%l; mi=j%l; mu=k%l;
          if(ma==0||mi==0||mu==0){
            gcd=l;
          }
          }
        x+=gcd;
      }
     }
  }
  cout<<x<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: overloaded function with no contextual type information
   22 |         x+=gcd;
      |            ^~~
Language: C

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

 
int main() {
  int a=1,b=1,c=1,gcd,k,i,sum=0;
  cin >> k;
  for(a=1;a<=k;a++){
    for(b=1;b<=k;b++){
      for(c=1;c<=k;c++){
        for(i=1;i<=k;i++){
          if(a%i==0&&b%i==0){
            if(c%i==0){
              gcd=i;
            }
          }
        }
        sum+=gcd;
      }
    }
  }
  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 (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }
}


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

  int a, b, c; cin >> a >> b >> c;

  int ab, abc;
  int sum = 0;
  
  for (int i=1;i<=K;i++){
    for (int j=1;j<=K;j++){
      for (int k=1;k<=K;k++){
  	  ab = gcd(i, j);
	  abc = gcd(ab, k);
      sum += abc; 
      }
    }
  }
  
  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 p = pair<int, int>;

int		gcd(int a, int b);
int		gcdr(int a, int b);

int		main(void){
	int k;
	cin >> k;
	int a, b, c;
	a = 1;
	int		gcdt;
	int		sum;

	sum = 0;
	while (a <= k)
	{
		b = 1;
		while (b <= k)
		{
			gcdt = gcd(a, b);
			c = 1;
			while (c <= k)
			{
				sum += gcd(gcdt, c);
				c++;
			}
			b++;
		}
		a++;
	}		
	cout << sum << endl;
}

int		gcd(int a, int b)
{
	if (a < b)
		return (gcdr(b, a));
	return (gcdr(a, b));
}

int		gcdr(int a, int b)
{
	if (!b)
		return (a);
	return (gcdr(b, a % b));
}


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.*;
import java.lang.*;
public class Main{
public static int hcf(int a, int b) {
		if (b == 0)
			return a;
		else
			return hcf(b, a % b);}
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
  int a=sc.nextInt();
    ArrayList<Integer> val = new ArrayList<Integer>()
    for (int i=1;i<a;i++){
      if(a%i==0){
      val.add(i);
      }}
    long total=0;
    for(int i=0;i<val.size();i++){
    for(int j=0;j<val.size();j++){
    for(int k=0;k<val.size();k++){
    total+=hcf(hcf(i,j),k);
    }
    }
    }
          System.out.println(total);
  }
}


Compiler output:
Main.java:13: error: ';' expected
    ArrayList<Integer> val = new ArrayList<Integer>()
                                                     ^
1 error
Language: C

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>

using namespace std;

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

int gcd3(int x, int y, int z) {

  for (int i = 1; i < z; i++) {
    x = gcd(x, y);
  }
  
  return x;
}

int main(){
    int N;
    long ans;

    ans = 0;

    cin >> N;

    for(int a=1; a<N+1;a++){
        for(int b=a; b<N+1;b++){
            for(int c=b; c<N+1;c++){
                if((a != b) && (b != c)){
                    ans += 6*gcd3(a,b,c);
                }
                else if((a == b) && (b != c)){
                    ans += 3*gcd3(a,b,c);
                }
                else if((a != b) && (b == c)){
                    ans += 3*gcd3(a,b,c);
                }
                else{
                    ans += gcd3(a,b,c);
                }
//                cout << a << b << c << gcd3(a,b,c) << ans << endl;
            }
        }
    }
    cout << ans << endl;

    return 0;
}

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