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

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

int n;
long long fp;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin >> n;
	for(int i = 1; i <= n; ++i) {
		for(int j = 1; j <= n; ++j) {
			for(int k = 1; k <= n; ++k) {
				fp += __gcd(i, j, k);
			}
		}
	}
	cout << fp << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:44: error: no matching function for call to '__gcd(int&, int&, int&)'
   14 |                                 fp += __gcd(i, j, k);
      |                                       ~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   candidate expects 2 arguments, 3 provided
Language: C

int gcd(int p, int q){
while(q != 0){
  int r = p % q;
p = q;
q = r;
}
return p;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
int main()
{
    using namespace std;
    int K, 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++)
            {
                sum += gcd(gcd(a, b), c);
            }
        }
    }
    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:32: error: 'a' was not declared in this scope
   13 |                 sum += gcd(gcd(a, b), c);
      |                                ^
a.cc:13:35: error: 'b' was not declared in this scope
   13 |                 sum += gcd(gcd(a, b), c);
      |                                   ^
a.cc:13:39: error: 'c' was not declared in this scope
   13 |                 sum += gcd(gcd(a, b), c);
      |                                       ^
Language: C

from math import gcd
z=range(1,1+int(input()))
y=0
for a in z:
  for b in z:
    for c in z:
      y+=gcd(gcd(a,b),c)
print(y)


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

#include<bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define mod 1000000007
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
int main(){
FASTIO  
ll k;
cin>>k;
ll ans=0;
for(ll i=1;i<=k;i++){
  for(ll j=1;j<=k;j++){
     for(ll p=1;p<=k;p++){
        ans+=(ll)(__gcd(i,__gcd(j,p)));
     }
  }
}
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 <iostream>
#include <cstdio>
using namespace std;

int n, g, ans;

int gcd(int p, int q) {return q ? gcd(q, p%q) : p;}

int main() {
	int i, j, k;
	cin >> n;
	for(i=1; i<=n; i++) for(j=1; j<=n; j++) {
		g = gcd(i, j);
		for(k=1; k<=n; k++) ans += gcd(g, k);
	}
	cout << ans;
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
typedef long long ll;
#define rep(i,a,n) for(int i=a;i<n;i++)
#define rrep(i,n,a) for(int i=n;i>=a;i--)
#define FOR(i,n) for(int i=0;i<n;i++)
#define all(s) s.begin(),s.end()
#define lla(s) s.rbegin(),s.rend()
#define pcnt(b) __builtin_popcount(b)
#define vi vector<int>
#define vvi vector<vector<int>>
const int MOD = 1e9 + 7;
//const int MOD = 998244353;
const ll INF = 1e18;


signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int k;
    cin>>k;
    int ans =0;
    rep(i,1,k+1){
        rep(j,1,k+1){
          rep(l,1,k+1){
            ans+=__gcd(l,__gcd(abs[j],i));
          }
        }
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:35: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
   28 |             ans+=__gcd(l,__gcd(abs[j],i));
      |                                   ^
Language: C

#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
typedef long long ll;
#define rep(i,a,n) for(int i=a;i<n;i++)
#define rrep(i,n,a) for(int i=n;i>=a;i--)
#define FOR(i,n) for(int i=0;i<n;i++)
#define all(s) s.begin(),s.end()
#define lla(s) s.rbegin(),s.rend()
#define pcnt(b) __builtin_popcount(b)
#define vi vector<int>
#define vvi vector<vector<int>>
const int MOD = 1e9 + 7;
//const int MOD = 998244353;
const ll INF = 1e18;


signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int k;
    cin>>k;
    int ans =0;
    rep(i,1,k+1){
        rep(j,1,k+1){
          rep(l,1,k+1){
            ans+=__gcd(l,__gcd(abs[j],i));
          }
        }
    }
    cout<<ans<<endl;
}


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

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

int gcd(int p, int q){
  if(p%q == 0) return q;
  return gcd( q, p%q);
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: expected ';' before ')' token
   18 |         sum += gcd(gcd(i,j), l));
      |                                ^
      |                                ;
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
 int K;
  cin>>K;
  int sum=1;
  for(int i=1;i<=N;i++){
  for(int j=1;j<=N;j++){
  for(int k=1;k<=N;k++){
  sum+=gcd(gcd(i,j),k);
  }
  }
  }cout>>sum;
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>
#define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define MP make_pair
#define EB emplace_back
#define ALL(v) (v).begin(), (v).end()
#define debug(x) cerr << #x << " is " << x << endl

using namespace std;

typedef long long ll;
typedef pair<int, int> pi;
typedef V<int> vi;

const int INF = 1e9 + 7;

signed main()
{
	IO_OP;
	int ans = 0;
	int n;
	cin >> n;
	for(int i=1;i<=n;i++) {
		for(int j=1;j<=n;j++) {
			int g = __gcd(i, j);
			for(int k=1;k<=n;k++)
				ans += __gcd(g, k);
		}
	}
	cout << ans << endl;
	
}





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

#include <cstdio>
#include <cstring>
#include <cmath>
#include <utility>
#include <iostream>
#include <functional>
#include <bitset>
#include <algorithm>
#include <vector>
#include <forward_list>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <tuple>
#include <numeric>
#define rep(i, s, g) for ((i) = (s); (i) < (g); ++(i))
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = (1ll << 60);

int main(void)
{
    int k;
    ll ans = 0;

    cin >> k;

    for (int a = 1; a <= k; a++)
    {
        for (int b = 1; b <= k; b++)
        {
            for (int c = 1; c <= k; c++)
            {
                ans += gcd(gcd(a, b), c);
            }
        }
    }

    cout << ans << endl;
}


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

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

public class Main {
  public static void main(String[] args) {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int k = Integer.parseInt(br.readLine());

    int sum = 0;
    for (int i = 1; i <= k; i++) {
      for (int j = 1; j <= k; j++) {
        for (int s = 1; s <= k; s++) {
          sum += gcd(i, j, s);
        }
      }
    }
  }
  
  private static int gcd(int i, int j, int s) {
  	return gcdTwo(gcdTwo(i, j), s);
  }
  
  private static int gcdTwo(int i, int j) {
  	if (j == 0) {
      return i;
    }
    int r = i % j;
    return gcdTwo(j, r);
  }
}

Compiler output:
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
    int k = Integer.parseInt(br.readLine());
                                        ^
1 error
Language: C

#include <stdio.h>
#define LIST_LENGTH_MAX 10000

int disorvor(int table[LIST_LENGTH_MAX], int n) {
	int idx = 0;
	for (int i = 1; i <= n; i++) {
		if (n % i == 0) {
			table[idx] = i;
			idx++;
		}
	}
	return table, idx;
}

int ans;

int AnswerResponce(int _i_table[LIST_LENGTH_MAX], int _j_table[LIST_LENGTH_MAX], int _k_table[LIST_LENGTH_MAX], int _i_idx, int _j_idx, int _k_idx) {
	while (1) {
		if (_i_table[_i_idx] == _j_table[_j_idx] &&
			_j_table[_j_idx] == _k_table[_k_idx]) {
			//printf("%d\n ", _i_table[_i_idx]);
			return _i_table[_i_idx];
		}
		else if (_i_table[_i_idx] <= 1 || _j_table[_j_idx] <= 1 || _k_table[_k_idx] <= 1) {
			//printf("1\n");
			return 1;
		}
		else if (_i_idx == 0 || _j_idx <= 0 || _k_idx <= 0) {
			//printf("1\n");
			return 1;
		}
		else {
			if (_i_table[_i_idx] >= _j_table[_j_idx] &&
				_i_table[_i_idx] >= _k_table[_k_idx]) {
				_i_idx--;
			}
			else if (_j_table[_j_idx] >= _i_table[_i_idx] &&
					 _j_table[_j_idx] >= _k_table[_k_idx]) {
					 _j_idx--;
			}
			else if (_k_table[_k_idx] >= _j_table[_j_idx] &&
					 _k_table[_k_idx] >= _i_table[_i_idx]) {
					 _k_idx--;
			}
		}
	}
}
int main() {
	int K;
	scanf_s("%d", &K);
	long long int ans = 0;
	for (int i = 1; i < K + 1; i++) {
		int i_table[LIST_LENGTH_MAX];
		int i_idx = 0;
		i_table, i_idx = disorvor(i_table, i);
		for (int j = 1; j < K + 1; j++) {
			int j_table[LIST_LENGTH_MAX];
			int j_idx = 0;
			j_table, j_idx = disorvor(j_table, j);
			for (int k = 1; k < K + 1; k++) {
				int k_table[LIST_LENGTH_MAX];
				int k_idx = 0;			
				k_table, k_idx = disorvor(k_table, k);

				//printf("i ");
				//for (int checker = 0; checker <= i_idx - 1; checker++)
				//	printf("%d, ", i_table[checker]);
				//printf("\t");

				//printf("j ");
				//for (int checker = 0; checker <= j_idx - 1; checker++)
				//	printf("%d, ", j_table[checker]);
				//printf("\t");

				//printf("k ");
				//for (int checker = 0; checker <= k_idx - 1; checker++)
				//	printf("%d, ", k_table[checker]);
				//printf("\t");

				ans += AnswerResponce(i_table, j_table, k_table, i_idx-1, j_idx-1, k_idx-1);
			}
		}
	}
	printf("%d", ans);
}

Compiler output:
main.c: In function 'main':
main.c:50:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   50 |         scanf_s("%d", &K);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

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

int gcd2(int a,int b,int c){
  int t;
  t=gcd(a,b);
  return gcd(t,c);
}

int main(void){
  int n,i,j,k,t=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)
    for(j=0;j<n;j++)
      for(k=0;k<n;k++)
        t+=gcd(i,j,k);
  
  printf("%d",t);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:21:12: error: too many arguments to function 'gcd'
   21 |         t+=gcd(i,j,k);
      |            ^~~
main.c:3:5: note: declared here
    3 | int gcd(int a,int b){
      |     ^~~
Language: C

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <memory>

#define int long long

using namespace std;

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

void Main()
{
	int k;
	cin >> k;

	int ans = 0;
	for (int a = 1; a <= k; a++) {
		for (int b = 1; b <= k; b++) {
			int gcd_ab = gcd(a, b);
			for (int c = 1; c <= k; c++) {
				ans += gcd(gcd_ab, c);
			}
		};
	}

	cout << ans << endl;
}

int32_t main()
{
	Main();
	return 0;
}



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

#include<bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define MOD	1000000007
#define int	long long
#define pii pair<int,int> 
#define vi vector<int>
using namespace std;

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

	return 0;
}



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

/*   ꧁༒☬महाकाल☬༒꧂ ꧁༒ঔमहाकालঔ༒꧂
                   
                   ঔৣ۝महाकालᴳᵒᵈ۝ঔৣ            
 
 */ 
#include<bits/stdc++.h>
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//template <typename T, typename cmp=less<T>> using oset =tree<T, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
#define ll long long 
#define mod 1000000007
#define inf 100000000000000000
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define _it iterator
#define all(_x) _x.begin(),_x.end()
#define f first
#define s second
#define pb push_back
void mahakal(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	freopen("error.txt","w",stderr);
	#endif
}
int main(){
	//mahakal(),fast;
	
	ll n ;
	cin>> n ;
	ll ans=0;
	for(ll i=1;i<=n ;i++){
		for(ll j=1;j<=n ;j++){
			for(ll k=1;k<=n ;k++){
				ans += __gcd(i,__gcd(j,k));
			}
		}
	}
	cout<<ans<<endl;

	return 0;
}

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

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

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


int main(void){
  int K;
  cin >> K;
  long long sum = 0;
  for(int a = 1; a <= K; a++){
    for(int b = 1; b <= K; b++){
      for(int c = 1; c <= K; c++){
        sum += gcd_th(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 <stdio.h>
int gcd(int a,int b){
	int r;
	int temp;
	if(b > a){
		temp = a;
		b = temp;
		a = b;}
	r = a % b;
	while(r > 0){
		a = b;
		b = r;
		r = a % b;
		}
	return r;
}
int main(void){
	int a,b,c;
	int k;
	int sum = 0;
	scanf("%d",&k)
	for(a = 1;a < k ;a++){
		for (b = 1;b < k;b++){
			for (c = 1;c < k;c++){
				sum += gcd((gcd(a,b)),c);
						}
					}
				}
	printf("%d",sum);
	return 0;
}	

Compiler output:
main.c: In function 'main':
main.c:21:23: error: expected ';' before 'for'
   21 |         scanf("%d",&k)
      |                       ^
      |                       ;
   22 |         for(a = 1;a < k ;a++){
      |         ~~~
Language: Java

class Main{
	public static void main(String[] args){
    	Scanner scanner = new Scanner(System.in);
        int n = (int) scanner.nextInt();
        int ans = 0;
      	for (int i = 1; i <= n; i++){
        for (int j = 1; j <= n; j++){
        for (int k = 1; k <= n; k++){
          int c = gcd(i, j);		
          ans+= gcd(k, c);
        }
        }
        }
      System.out.println(ans);
      
    }
  	
  	int gcd(int a, int b){
    	while(a != b){
        	if (a >= b){
            	a-=b;
            }else{
            	b-=a;
            }
        }
      return a;
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
    	Scanner scanner = new Scanner(System.in);
    	^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    	Scanner scanner = new Scanner(System.in);
    	                      ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: non-static method gcd(int,int) cannot be referenced from a static context
          int c = gcd(i, j);		
                  ^
Main.java:10: error: non-static method gcd(int,int) cannot be referenced from a static context
          ans+= gcd(k, c);
                ^
4 errors
Language: Java

class Main{
	public static void main(String[] args){
    	Scanner scanner = new Scanner(System.in);
        int n = (int) scanner.nextInt();
        int ans = 0;
      	for (int i = 1; i <= n; i++){
        for (int j = 1; j <= n; j++){
        for (int k = 1; k <= n; k++){
          int c = gcd(i, j);		
          ans+= gcd(k, c);
        }
        }
        }
      System.out.println(ans)
      
    }
  	
  	int gcd(int a, int b){
    	while(a != b){
        	if (a >= b){
            	a-=b;
            }else{
            	b-=a;
            }
        }
      return a;
    }
}

Compiler output:
Main.java:14: error: ';' expected
      System.out.println(ans)
                             ^
1 error
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
 int N;
  cin>>N;
  int sum=0;
  for(int i=1;i<=N;i++){
  for(int j= 1;j<=N;j++){
  for(int k=1;k<=N;k++){
   int s;
    for(int l=1;l<=N;l++){
    if(i%l==0 && j%l==0 && k%l==0) s=l;
    
    }
    sum+=s;
  
  
  
  
  }
  
  
  }
  
} cout<<sum<<endl;


 return 0;
}

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

#include <iostream>

using namespace std;

int g[201][201][201];

int gcd(int a, int b);

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

	long long ans = 0;
	for (int i = 1; i <= k; i++) {
		for (int j = 1; j <= k; j++) {
			for (int l = 1; l <= k; l++) {
				ans += gcd(i, gcd(j, l));
			}
		}
	}
	cout << ans << endl;

	return 0;
}

int gcd(int a, int b)
{
	if (a < b) {
		int t = a;
		a = b;
		b = t;
	}

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

	return b;
}


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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int max = sc.nextInt();
      	int sum = 0;
        
      for(int a=1;a<=max;a++){
        for(int b=1;b<=max;b++){
          for(int c=1;c<=max;c++){
            int tmp = gcd(b,c);
            sum += gcd(a,tmp);
          }
         
        }
      }
      System.out.println(sum);
	}
  
  	 private static int gcd(int x,int y) {
        int tmp;
        while ((tmp = x % y) != 0) {
            x = y;
            y = tmp;
        }
       return y;
    }
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:2:1: error: unknown type name 'public'
    2 | public class Main {
      | ^~~~~~
main.c:2:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    2 | public class Main {
      |              ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <functional>
#include <ctime>
#include <cmath>
#include <limits>
#include <numeric>
#include <type_traits>
unsigned __gcd(unsigned a, unsigned b) {
    while (1) {
        if (a < b) swap(a, b);
        if (!b) break;
        a %= b;
    }
    return a;
}
using namespace std;

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

Compiler output:
a.cc: In function 'unsigned int __gcd(unsigned int, unsigned int)':
a.cc:26:20: error: 'swap' was not declared in this scope
   26 |         if (a < b) swap(a, b);
      |                    ^~~~
a.cc:26:20: note: suggested alternatives:
In file included from /usr/include/c++/14/functional:65,
                 from a.cc:18:
/usr/include/c++/14/array:384:5: note:   'std::swap'
  384 |     swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete;
      |     ^~~~
In file included from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
/usr/include/c++/14/bits/exception_ptr.h:229:5: note:   'std::__exception_ptr::swap'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
Language: C

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <functional>
#include <ctime>
#include <cmath>
#include <limits>
#include <numeric>
#include <type_traits>
using namespace std;

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

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

#include <bits/stdc++.h>

using namespace std;

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

    int K;
    cin>>K;

    unsigned 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(i,j,k);

    printf("%llu\n",sum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: no matching function for call to '__gcd(int&, int&, int&)'
   16 |                 sum+=__gcd(i,j,k);
      |                      ~~~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   candidate expects 2 arguments, 3 provided
Language: Java

import java.io.*;
import java.util.*;
public class GCD_Triplets
{

    static int gcd=1;
    static int get_GCD(int a, int b, int c){
        int minimum=(Math.min(a,b)==Math.min(a,c))? a: Math.min(b,c);
        for(int i=1;i<=minimum;i++)
        {
            if (a%i==0 && b%i==0 && c%i==0)
                gcd=i;
        }
        return gcd;
    }
        public static void main(String []args)throws IOException
        {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int n=Integer.valueOf(br.readLine());
            int sum=0;
            for(int i=1;i<=n;i++)
            {
                for(int j=1;j<=n;j++)
                    {
                    for(int k=1;k<=n;k++)
                          sum+=get_GCD(i,j,k);
                        }
                    }
                    System.out.println(sum);           
                        
        }
    }


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

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <utility>
#include <numeric>

using namespace std;

using ll = long long;
using ull = unsigned long long;

const ll inf = 1ll << 60;
const ll mod = (ll)1e9 + 7;

#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()

#define print(s) cout << s;
#define println(s) cout << s << endl;
#define printd(s, f) cout << fixed << setprecision(f) << s << endl;

// 最大公約数を求める
template<typename T> T gcd(T a, T b)
{
	return b > 0 ? gcd(b, a % b) : a;
}

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

	ull res = 0;
	vector<vector<ll>> g(210, vector<ll>(210));
	for (ll i = 1; i <= n; i++)
	{
		for (ll j = 1; j <= n; j++)
		{
			g[i][j] = gcd(i, j);
			for (ll k = 1; k <= n; k++)
			{
				res += gcd(k, g[i][j]);
			}
		}
	}

	println(res);
}

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

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

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

#include <bits/stdc++.h>

using namespace std;

const int M = 1e9 + 7;

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

int main() {
  int n ; cin>>n;
  int ans = 0;
  for(int i = 1 ; i <= n; ++i){
    for(int j = 1 ; j <= n; ++j){
      for(int k = 1 ; k <= n; ++k){
        ans += gcd(i , j , k);
      }
    }
  }
  cout<<ans<<"\n";
}

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

#include <bits/stdc++.h>
 
using namespace std;
 
#define REP(i,n)   for(int i=0; i<(int)(n); i++)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); i++)
#define TRAV(a, x) for(const auto& a : x)
#define ALL(x) x.begin(), x.end()
#define NEXT_PERM(x) while(next_permutation(ALL(x))) // 순열 알고리즘(오름)
#define PREV_PERM(x) while(prev_permutation(ALL(x))) // 순열 알고리즘(내림)
#define PRINT(x) cout << x
#define PRINT_LN(x) cout << x << endl;
#define DUMP(a, n) REP(_i, n) printf("%d%c", a[_i], _i + 1 == n ? '\n' : ' ')
#define DUMP2D(a, n, m) REP(_i, n) REP(_j, m) printf("%d%c", a[_i][_j], _j + 1 == m ? '\n' : ' '); puts("")
 
typedef long long int ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<char> vc;
 
void solve() {
  int n;
  cin >> n;
  int result = 0;
  REP(i,n){
    REP(j,n){
      REP(k,n){
        result += gcd(i+1, gcd(j+1, k+1));
      }
    }
  }
  cout << result;
}
 
int main() {
  solve();
  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;

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

int main(int argc, const char *argv[]) {
  int K;
  long int res = 0;
  cin >> K;

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


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

import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    int k = sc.nextInt();
    int m = 0;
    List<Integer> list = new ArrayList<>();
    for(int i = 1; i < k + 1; i++){
        for(int j = 1; j < k + 1; j++){
            for(int l = 1; l < k + 1; l++){
                m = gcd(i,j);
                list.add(gcd(m,l));
            }
        }
    }
    int sum = 0;
    for(int i = 0 ; i < k*k*k ; i++){
        sum += list.get(i);
    }
    System.out.println(sum);
    
}

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


}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.BufferedReader;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.BufferedReader;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.*;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.util.*;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.util.*;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.util.ArrayList;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.util.ArrayList;
      |            ^
main.c:5:1: error: unknown type name 'import'
    5 | import java.util.Iterator;
      | ^~~~~~
main.c:5:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 | import java.util.Iterator;
      |            ^
main.c:6:1: error: unknown type name 'import'
    6 | import java.util.List;
      | ^~~~~~
main.c:6:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    6 | import java.util.List;
      |            ^
main.c:7:1: error: unknown type name 'import'
    7 | import java.util.Collections;
      | ^~~~~~
main.c:7:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    7 | import java.util.Collections;
      |            ^
main.c:8:1: error: unknown type name 'public'
    8 | public class Main {
      | ^~~~~~
main.c:8:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    8 | public class Main {
      |              ^~~~
Language: C

#include <iostream>

using namespace std;

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

int main(int argc, const char *argv[]) {
  int K;
  long int res = 0;
  cin >> K;

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


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

K = int(input())
sum = 0
class gcd:
    def __init__(self,a,b,c):
        self.a=a
        self.b=b
        self.c=c
        
    def gcds(self):
        if self.a>self.b:
            x=self.a
            y=self.b
        else:
            x=self.b
            y=self.a
            
        while x % y!=0:
            tem_y = y
            y = x % y 
            x = tem_y
       
        gcd_1 = y
        
        if gcd_1>self.c:
            x=gcd_1
            y=self.c
        else:
            x=self.c
            y=gcd_1
            
        while x % y!=0:
            tem_y = y
            y = x % y 
            x = tem_y
       
        return int(y)

for i in range(1,K+1):
    for j in range(i,K+1):
        for l in range(j,K+1):
            if i==j and j==l:
                sum = sum + gcd(i,j,l).gcds()
            elif i != j and j==l:
                sum = sum + gcd(i,j,l).gcds()*3
            elif i==j and j!= l:
                sum = sum + gcd(i,j,l).gcds()*3
            elif i!=j and j!=l:
                sum = sum + gcd(i,j,l).gcds()*6         
            
print(sum)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | K = int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'K' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
    1 | K = int(input())
      |     ^~~
Language: C

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

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


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

k=int(input())
import fractions
x=0
c=0
d=0
for i in range(1,k+1):
  for j in range(i,k+1):
    for k in range(j,k+1):
      d=fractions.gcd(i,j)
      c=fractions.gcd(d,k)
      if i!=j and j!=k:
        x+=6*c
      elif i==j==k:
        x+=c
      else:
        x+=3*c
print(x)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | k=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | k=int(input())
      |   ^~~
Language: C

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

int gcd(int p, int q){
	while(q != 0){
    	int r = p % q;
      	p = q;
      	q = r;
    }
  	return p;
}

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

	cout << ans << endl;  
}

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

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

int gcd(int p, int q){
	while(q != 0){
    	int r = p % q;
      	p = q;
      	q = r;
    }
  	return p;
}

int main(){
	int n;
  	cin >> n;
  
  	ll ans = 0;
  	for(int i = 1; i <= n; i++){
    	for(int j = 1; j <= n; j++){
          	for(int k = 1; k <= n; k++){}
				if(gcd(gcd(i, j), k)) ans++;
        }
    }

	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 p, int q) {
    if (p % q == 0) {
        return q;
    }
    return gcd(q, p % q);
}

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

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

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

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

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

print(sum)

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

import java.io.*;

class Calc{
    public static int gcd(int a, int b, int c)  {
        int r;
        while (b > 0) {
            r = a % b;
            a = b;
            b = r;
        }
        while (c > 0) {
            r = a % c;
            a = c;
            c = r;
        }
        return a;
    }
}

class Main{

    public static void main(String args[])
    {
        String buf;
        int num;
        int ans;
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            buf = br.readLine();
            num = Integer.parseInt(buf);
            for(int i = 1; i <= num; i++){
                for(int j = 1; i <= num; j++){
                    for(int k = 1; i <= num; k++){    
                        ans += Calc.gcd(i,j,k);
                    }
                }
            }
            
            System.out.println(Integer.toString(ans));
        } catch(Exception e) {}
  }
}

Compiler output:
Main.java:34: error: variable ans might not have been initialized
                        ans += Calc.gcd(i,j,k);
                        ^
Main.java:39: error: variable ans might not have been initialized
            System.out.println(Integer.toString(ans));
                                                ^
2 errors
Language: C

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define in insert
#define b_s binary_search
#define rev reverse
#define all(x) (x).begin(),(x).end()
#define pf push_front
#define pob pop_back
#define pof pop_front
#define u_b upper_bound
#define l_b lower_bound
#define ios ios_base::sync_with_stdio(0);cin.tie();cout.tie();
#define mod 998244353
#define Max 100005

using namespace std;

int main()
{
    int k;
    cin >> k;
    ll ans = 0, g, temp;
    for(int i = 1; i <= k; i++)
    {
        for(int j = 1; j <= k; j++)
        {
            g = __gcd((ll)i, (ll)j);
            temp = g;
            for(int s = 1; s <= k; s++)
            {
                g = __gcd(g, (ll)s);
                ans += g;
                g = temp;
            }
        }
    }
    cout << ans << endl;
}


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

#include <bits/stdc++.h>

using namespace std;

#define ALL(x) (x).begin(), (x).end()
#define DUMP(xs) for (auto x:xs) cout<<x<<' ';cout<<endl
#define DUMPP(xs) for (auto x:xs) cout<<'('<<x.first<<','<<x.second<<')'<<' ';cout<<endl
#define FOR(i,a,b) for (ll i=(ll)(a);i<(ll)(b);++i)
#define OUT(x) cout<<x<<endl
#define OUTP(x) cout<<'('<<x.first<<','<<x.second<<')'<<endl;
#define REP(i,n) FOR(i,0,n)
#define YES(cond) cond ? OUT("YES") : OUT("NO")
#define Yes(cond) cond ? OUT("Yes") : OUT("No")

template<class T> T gcd(const T x,const T y){if(!y){return x;}return gcd(y,x%y);}
template<class T> T lcm(const T x,const T y){return x/gcd(x,y)*y;};
template<class T> T modpow(T x,T n,const T mod) {
  T res=1;while(n>0){if(n%2)res=res*x%mod;x=x*x%mod;n/=2;};return res;
}
template<class T> T modinv(T x,const T mod){return modpow(x,mod-2,mod);}
template<class T> bool alltrue(const T &a){return all_of(ALL(a),[](bool x){return x;});}
template<class T> bool anytrue(const T &a){return any_of(ALL(a),[](bool x){return x;});}
template<class T> bool contain(const T &a,const T &b){for(auto x:b){if (a.find(x)==a.end()){return false;}}return true;}
template<class T> bool mmax(T &m,const T q){ if (m < q) {m = q; return true;} else return false; }
template<class T> bool mmin(T &m,const T q){ if (m > q) {m = q; return true;} else return false; }
template<class T> int siz(const T &a) {return (int)a.size();}
template<class T> set<T> devisers(T n) {
  set<T> res;for(T i=1;i<(T)sqrt(n)+1;i++){if(n%i==0){res.insert(i);res.insert(n/i);}}return res;
}
template<class T> void concat(T &a, const T &b){a.insert(a.end(),ALL(b));}
template<class T> void getand(const T &a,const T &b,T &c) {
  set_intersection(ALL(a),ALL(b),inserter(c,c.end()));
}
template<class T> void getor(const T &a,const T &b,T &c) {
  set_union(ALL(a),ALL(b),inserter(c,c.end()));
}
template<class T> void getdiff(const T &a,const T &b,T &c) {
  set_difference(ALL(a),ALL(b),inserter(c,c.end()));
}
template<class T> T deg2rad(T deg) {return deg*2*M_PI/360;}
template<class T> T rad2deg(T rad) {return rad*360/(2*M_PI);}

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

const ll MOD=1e9+7;
const ll MAX=5e6;

int main() {
  int K;cin>>K;
  ll ans = 0;
  FOR(i,1,K+1)FOR(j,1,K+1)FOR(k,1,K+1) {
    ans += gcd(gcd(i,j), k);
  }
  OUT(ans);

  return 0;
}

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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
int 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)) ;
      }
    }
  }
  cout << ans <<endl ;
  }
  return 0;
}

Compiler output:
a.cc:22:3: error: expected unqualified-id before 'return'
   22 |   return 0;
      |   ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
int 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))
      }
    }
  }
  cout << ans <<endl ;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:32: error: expected ';' before '}' token
   16 |         ans += gcd(a, gcd(b,c))
      |                                ^
      |                                ;
   17 |       }
      |       ~                         
a.cc: At global scope:
a.cc:22:3: error: expected unqualified-id before 'return'
   22 |   return 0;
      |   ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C

#include<bits/stdc++.h>
#define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define MOD 1000000007
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(),v.end()
#define sz(x) (ll)x.size()
#define F first
#define S second
#define FOR(i,a,b) for(ll i=a;i<=b;++i)
#define ROF(i,a,b) for(ll i=a;i>=b;--i)
typedef long long ll;
using namespace std;

int main(){
    IOS
    int k;
    cin >> k;
    ll sum = 0;
    FOR(i,1,k){
        FOR(j,1,k){
            FOR(l,1,k){
                sum += __gcd(__gcd(i,j),l);
            }
        }
    }
    cout << sum;
    return 0;
}

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

#include<iostream>
#include<algorithm>

using namespace std;

int gcd(int &p, int &q)
{
	if(p % q == 0)return q;
 	return gcd(q, p % q);
 }

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


Compiler output:
a.cc: In function 'int gcd(int&, int&)':
a.cc:9:25: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
    9 |         return gcd(q, p % q);
      |                       ~~^~~
a.cc:6:22: note:   initializing argument 2 of 'int gcd(int&, int&)'
    6 | int gcd(int &p, int &q)
      |                 ~~~~~^
a.cc: In function 'int main()':
a.cc:16:18: error: 'k' was not declared in this scope
   16 |   for(int a=1;a<=k;a++)
      |                  ^
a.cc:20:25: error: too many arguments to function 'int gcd(int&, int&)'
   20 |         {       sum+=gcd(a,b,c);
      |                      ~~~^~~~~~~
a.cc:6:5: note: declared here
    6 | int gcd(int &p, int &q)
      |     ^~~
Language: C

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

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

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

#include <bits/stdc++.h>
#define maxn 100005
#define MOD 1000000007
#define INF 1000000000000000000
#define lim 20

using namespace std;

#define ll long long
#define pii pair<ll, ll>
#define piii pair<pii, ll>
#define ft first
#define sd second

void fast(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
}


void solve(){
    ll n;
    cin >> n;
    ll s = 0;
    for(ll i = 0; i < n; i++){
        for(ll j = 0; j < n; j++){
            for(ll k = 0; k < n; k++){
                s += __gcd(__gcd(i+1, j+1), (k+1));
            }
        }
    }
cout << s;

}
int main()
{
    fast();
    ll t = 1;
    //cin >> t;
    while(t--){
        solve();
    }
}


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

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

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

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

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

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


int main(){
    int n,ans=0;
    cin>>n;

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

    cout<<ans<<endl;
    return 0;
}



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