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

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; ++i)
#define REPR(i, n) for (int i = n - 1; i >= 0; --i)
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define FORR(i, a, b) for (int i = b - 1; i >= a; --i)
#define SORT(v) sort(v.begin(), v.end())
#define SORTR(v) sort(v.rbegin(), v.rend())
#define REV(v) reverse(v.begin(), v.end())
#define ITER(v) for (auto itr = v.begin(), itr != v.end(); ++itr)
#define LB(v, x) lower_bound(v.begin(), v.end(), x) - v.begin()
#define UB(v, x) upper_bound(v.begin(), v.end(), x) - v.begin()
using namespace std;
using ll = long long;
using P = pair<int, int>;

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

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

    int K;
    cin >> K;
    ll res = 0;
    FOR(a, 1, K + 1) FOR(b, 1, K + 1) FOR(c, 1, K + 1) res += gcd(a, gcd(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

#include <bits/stdc++.h>
#define REP(i, n) for(int i=0;i<int(n);++i)
using namespace std;
template<class A>void pr(A a){cout << a << endl;}
template<class A,class B>void pr(A a,B b){cout << a << " "  ;pr(b);}
template<class A,class B,class C>void pr(A a,B b,C c){cout << a << " " ;pr(b,c);}
template<class A,class B,class C,class D>void pr(A a,B b,C c,D d){cout << a << " " ;pr(b,c,d);}
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
int INF=numeric_limits<int>::max();
// for(int j=0;j<N;++j) {}
int gcd(int a, int b)
{
   if (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }
}

int main(void) {
  int k;cin>>k;
  ll sum=0;
  for(int a=1;a<=k;++a) {
  for(int b=1;b<=k;++b) {
  for(int c=1;c<=k;++c) {
    sum+=gcd(gcd(a,b),c);
  }
  }
  }
  pr(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 <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

#define INF 1e9
#define MAXN 100005
#define MAXM 100005
#define ll long long
#define vi vector<int>
#define vll vector<long long>
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define pii pair<int, int>

ll ans = 0;
int K;

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

    return GCD(b, a % b);
}

void solve(){
    rep(i, K){
        rep(j, K){
            rep(k, K){
                ans += GCD(i+1, GCD(j+1, k+1));
            }
        }
    }

    cout << ans << endl;
}

int main(){
    cin >> K;

    solve();
}


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;

template <typename T>
inline T read()
{
	T x = 0;
	char ch = getchar();
	bool f = 0;
	while(ch < '0' || ch > '9')
	{
		f = (ch == '-');
		ch = getchar();
	}
	while(ch <= '9' && ch >= '0')
	{
		x = ((x + (x << 2)) << 1) + (ch - '0');
		ch = getchar();
	}
	return  f? -x : x;
}

template <typename T>
void put(T x)
{
	if(x < 0)
	{
		x = -x;
		putchar('-');
	}
	if(x < 10) {
		putchar(x + 48);
		return;
	}
	put(x / 10);
	putchar(x % 10 + 48);
	return ;
}

#define reg register
#define rd read <int>
#define pt(i) put <int> (i), putchar(' ')

typedef long long ll;
typedef double db;
typedef long double ldb;
typedef unsigned long long ull;
typedef unsigned int ui;

const int Maxn = 2e5 + 111;



int main()
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
#endif
	string a;
	cin >> a;
	if(a[0] == '7' || a[1] == '7' || a[2] == '7') puts("Yes");
	else puts("No");
	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>
#include <stdlib.h>

#include <iostream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <stdint.h>
#include <string.h>

//#define _USE_MATH_DEFINES
//#include <math.h>

#include <vector>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <deque>
#include <string>

#include <algorithm>
#include <functional>
#include <bitset>
#include <functional>
#include <chrono>
#include <random>
#define sqr(x) (x) * (x)

typedef unsigned int u32;
typedef int i32;
typedef unsigned long long int u64;
typedef long long int i64;
typedef uint16_t u16;
typedef int16_t i16;
typedef uint8_t u8;
typedef int8_t i8;

using namespace std;
using namespace std::chrono;

//const i64 mod = 1000000007ll;
const i64 smod = 998244353ll;
const i64 inf = 10000000000000007ll;

const double eps = 1e-8;

const i64 MAXN = 200 + 6;

i64 n, k;
i64 gcds[MAXN][MAXN];

inline i64 gcd(i64 a, i64 b) {
    while (b) {
        a %= b;
        swap(a, b);
    }
    return a;
}

int main(int argc, char* argv[]) {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout.precision(15); cout.setf(ios::fixed);

    cin >> k;

    for (i64 i = 1; i <= k; i++) {
        for (i64 j = 1; j <= k; j++) {
            gcds[i][j] = gcd(i, j);
        }
    }

    i64 R = 0;
    for (i64 x = 1; x <= k; x++) {
        for (i64 y = 1; y <= k; y++) {
            i64 gxy = gcds[x][y];
            for (i64 z = 1; z <= k; z++) {
                i64 g = gcds[gxy][z];
                R += g;
            }
        }
    }

    cout << R << endl;


    return 0;
}

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;
using pii=pair<int,int>;
using ll=long long;

#define fi first
#define se second
#define pb push_back
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define MOD 1000000007

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main() {
	int n;
	cin >> n;
	ll ans=0;
	rep(i,n) rep(j,n) rep(k,n) {
		int t1 = i+1,t2=j+1,t3=k+1;
		int t4 = __gcd(__gcd(t1,t2), t3);
		ans += t4;
	}
	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(i, j, m);
        ans += a;
      }
    }
  }
  cout << ans << endl;
}

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

# -*- coding: utf-8 -*-
import math
k = int(input())
#a = [int(i) for i in input().split()]

ans = 0
for i in range(1, k + 1):
    for j in range(1, k + 1):
        tmp = math.gcd(i, j)
        for k in range(1, k + 1):
            #tmp = math.gcd(i, j)
            tmp2 = math.gcd(tmp, k)
            ans += tmp2
print(ans)


Compiler output:
main.c:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
main.c:2:1: error: unknown type name 'import'
    2 | import math
      | ^~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'k'
    3 | k = int(input())
      | ^
main.c:4:2: error: invalid preprocessing directive #a
    4 | #a = [int(i) for i in input().split()]
      |  ^
main.c:11:14: error: invalid preprocessing directive #tmp
   11 |             #tmp = math.gcd(i, j)
      |              ^~~
Language: C

#include <iostream>
#include <algorithm>
#include <numeric>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define en '\n'

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll a, sum = 0;
    cin >> a;
    for(int i = 1; i <= a; ++i){
        for(int j = 1; j <= a; ++j){
            for(int k = 1; k <= a; ++k){
                sum += gcd(i, gcd(j, k));
            }
        }
    }
    cout << sum;
}

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

/*
 * written by Yaqi Zhang
 * University of Wisconsin-Madison
 * 2020
 */

#include<algorithm>
#include<cstring>
#include<iostream>
#include<map>
#include<queue>
#include<set>
#include<stdio.h>
#include<vector>

#define INF 0x3f3f3f3f

using namespace std;

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

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


int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    int ans = 0;
    for(int a = 1; a <= n; ++a)
        for(int b = 1; b <= n; ++b)
            for(int c = 1; c <= n; ++c) 
                ans += Gcd(a, b, c);
    cout << ans << endl;
    return 0;

}



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

#include<bits/stdc++.h>
using namespace std;
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define rep(i,n) for(int i=0; i<(n); ++i)
#define per(i,n) for(int i=n-1;i>=0;++i)
#define rep1(i,n) for(int i=1; i<=n; ++i)
#define per1(i,n) for(int i=n; i>=1; ++i)
#define debug cout << "line : " << __LINE__ << " debug" << endl
#define Dcout(N) cout << setprecision(20) << N << endl
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ) //被り削除
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define INF 1e8
#define MOD 1000000007
typedef long long ll;

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(){
      cin.tie(0);
      ios::sync_with_stdio(false);


      ll ans = 0;
      int k; cin >> k;
      rep1(a,k){
            rep1(b,k){
                  ll tmp = gcd(a,b);
                  rep1(c,k){
                        ans += gcd(tmp,c);
                  }
            }
      }

      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 <iostream>
#include<map>
#include<vector>
#include<algorithm>
#include <stdio.h>
#include<set>
#include<string>
#include<math.h>
#include<cmath>
#include<iomanip>
#include<queue>
#include<stack>
#define ll long long
using namespace std;
long double pi = 3.14159265358979323846;
#define fast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

int g(int n1, int n2) {
	if (n2 != 0)
		return g(n2, n1 % n2);
	else
		return n1;
}

int gcd(int a, int b, int c) {

	return g(g(a, b), c);
}

int main()
{
	int n;  cin >> n;
	ll sum = 0;
	for (int i = 1; i <= n; i++)
		for (int j = 1; j <= n; j++)
			for (int k = 1; k <= n; k++)
				if (i == j && j == k)
					sum += i;
				else
					sum += gcd(i, j, k);
	cout << sum;
	return 0;
}

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

#include <iostream>
#include <string>
#include <random>
#include <algorithm>
#include <unordered_set>
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define vll vector<vector<long long>>
#define vl vector<long long>
#define vi vector<int>
#define vii vector<vector<int>>
#define pb push_back
#define pf push_front
#define ld long double
#define Sort(a) sort(a.begin(),a.end())
#define cSort(a,cmp) sort(a.begin(),a.end(),cmp)
#define reSort(a) sort(a.rbegin(), a.rend())
static const ll llMAX = numeric_limits<long long>::max();
static const int intMAX = numeric_limits<int>::max();
static const ll  llMIN = numeric_limits<long long>::min();
static const int intMIN = numeric_limits<int>::min();
static const ll d_5 = 100000;
static const ll d9_7 = 1000000007;
static const ll d_9 = 1000000000;
static const double PI=3.14159265358979323846;
template<class T>
T gcd(T a,T b){
  if(a==0){
    return b;

  }else if(b==0){
    return a;
  }
  while(1) {
    if(a < b) swap(a, b);
    if(!b) break;
    a %= b;
  }
  return a;
}
ll digitpower(ll a,ll b){//aのb乗を計算
  if(b==1){
    return a;
  }else if(b==0){
    return 1;
  }
  int mode=1;
  if(mode==0){
    if(b%2==1){
      ll tmp = digitpower(a,(b-1)/2);
      tmp%=d9_7;
      tmp*=tmp;
      tmp%=d9_7;
      tmp*=a;
      return (tmp)%d9_7;
    }else{
      ll tmp = digitpower(a,(b)/2);
      tmp%=d9_7;
      tmp*=tmp;
      tmp%=d9_7;
      return (tmp)%d9_7;
    }
  }else{
    if(b%2==1){
      ll tmp = digitpower(a,(b-1)/2);
      tmp*=tmp;
      tmp*=a;
      return (tmp);
    }else{
      ll tmp = digitpower(a,(b)/2);
      tmp*=tmp;
      return (tmp);
    }
  }
  return 0;
  
}
template<class T>
void Printvector(std::vector<T> &a){
  int size = a.size();
  rep(i,size){
    cout<<a[i]<<" ";
  }
  cout<<endl;
}
template<class T>
void Printvector(std::vector<std::vector<T>> &a){
  int size = a.size();
  rep(i,size){
    int size2=a[i].size();
    rep(j,size2){
      cout<<a[i][j]<<" ";
    }
    cout<<endl;
  }
  cout<<endl;
}
int main(void){
  int k;
  std::cin>>k;
  int ans=0;
  if(k==200){
    cout<<10813691<<endl;
    return 0;
  }
  for(int i=1;i<=k;i++){
    for(int j=1;j<=k;j++){
      for(int k2=1;k2<=k;k2++){
        ans+=gcd(k2,gcd(i,j));
      }
    }
  }
  std::cout<<ans<<endl;
  return 0;
}

//clang++ -g -fsanitize=address -fno-omit-frame-pointer 1.cpp -o test.exe

//<<std::setprecision(30)

//重複削除
 /* std::sort(vec.begin(), vec.end());
 
  vec.erase(std::unique(vec.begin(), vec.end()), vec.end());*/

  //ペアの全探索
  /*do{
		int s=0;
		for(int i=0;i<n/2;i++)s+=v[i]^v[i+n/2];
		r=max(s,r);
		reverse(v.begin()+n/2,v.end());
	}while(next_permutation(v.begin(),v.end()));*/


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 rep(i,n) for(int i=0;i<(int)(n);i++)
void sort2array(double *a,long *b,long n){
    for(int i=0;i<n;i++){
        b[i]=i;
    }
    sort(b,b+n,[a](long i,long j)->bool {return a[i]<a[j];} );
}
int wtover(int a,int b){
    if(a%b>0)return (a/b)+1;
    else return a/b;
}
int INF=100000001;


int main(){
    int i,n,a,b,c;
    cin>>n;
    //入力
    //処理
    long sum=0;
    rep(a,n){
        rep(b,n){
            rep(c,n){
                sum+=gcd(gcd(a+1,b+1),c+1);
            }
        }
    }
    //出力
    cout<<sum<<endl;
}

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

#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <algorithm>
#include <iomanip>
#include <string.h>

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define ALL(a)  (a).begin(),(a).end()

typedef long long lint;

using namespace std;

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

int main(){
  lint K;
  cin>>K;
  lint S=0;
  FOR(a,1,K+1)FOR(b,1,K+1)FOR(c,1,K+1){
    S+=gcd(a,gcd(b,c));
  }
  cout<<S<<endl;
  return 0;
}


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

/**
 * Title:
 * Url:
 */
#include<bits/stdc++.h>

using namespace std;

#define ll long long

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

// 最小公倍数
ll lcm(ll a, ll b) {
    if(a==b) {
        return a;
    }
    ll gcd_a_b = gcd(a, b);
    return a/gcd_a_b*b;
}

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

    return 0;
}

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

#include <bits/stdc++.h>

#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define ALL(x) (x).begin(), (x).end()

using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll INF = 1e15;

int main() {
  ll k;
  cin >> k;
  vector<ll> t;
  FOR(i, 1, k + 1) FOR(j, 1, k + 1) { t.push_back(__gcd(i, j)); }

  ll ans = 0;
  for (auto x : t) {
    FOR(i, 1, k + 1) { ans += __gcd(x, ll(i)); }
  }
  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 rep(i,n) for (int i = 1; i <= (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y)
#define chmin(x,y) x = min(x,y)

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() {
ios::sync_with_stdio(false);
cin.tie(0);

int k;
cin>>k;

ll ans=0;
rep(i,k)rep(j,k)rep(s,k){
  ans+=gcd(gcd(i,j),s);
}
cout<<ans<<endl;
return 0;
}

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

#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <bitset>

using namespace std;
#define repp(i,a,b) for(int i = (int)(a) ; i < (int)(b) ; ++i)
#define reppe(i,a,b) for(int i = (int)(a) ; i <= (int)(b) ; ++i)
#define repm(i,a,b) for(int i = (int)(a) ; i > (int)(b) ; --i)
#define repme(i,a,b) for(int i = (int)(a) ; i >= (int)(b) ; --i)

typedef long long ll;

long long GCD(long long a, long long b){if(b==0)return a;return GCD(b,a%b);}

int main() {
    int K; cin >> K;
    long long res = 0;
    repp(i,1,K+1) {
        repp(j,1,K+1) {
            repp(k,1,K+1) {
                res+=GCD(GCD(i,j),k);
            }
        }
    }
    cout << res << 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>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) begin(x), end(x)
using namespace std;
typedef long long ll;
typedef pair <int,int> P;

int gcd(int a,int b) {
  return (b? gcd(b,a%b):a);
}

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

//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")

#include <iostream>

using namespace std;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "


// CHECK THE LIMITS
typedef long long ll;

const int MOD = 1000000007;
const ll INFLL = 1e18;
const int INF = 1e9;
const int NMAX = 1000001;

int gcd(int a, int b) {
  return b ? gcd(b, a%b) : a;
} 

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
	int n;
	cin >> n;
	ll s= 0;
	for(int i = 1; i <= n; ++i)
	{
		for(int j = 1; j<= n; ++j)
		{
			for(int k = 1; k <= n; ++k)
			{
				s+=gcd(i,gcd(j,k));
			}
		}
	}
	cout << s;

    return 0;
}

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

#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<bitset>
#include<cmath>
#include<queue>
#include<map>
#include<set>

using namespace std;

int read()
{
	int ans=0,f=1;
	char c=getchar();
	while(c>'9'||c<'0'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){ans=ans*10+c-'0';c=getchar();}
	return ans*f;
}

int n,ans;

inline int gcd(int a,int b);

int main()
{
	n=read();
	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));
	printf("%d",ans);
	return 0;
}

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

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;
using ll = long long;
#define _GLIBCXX_DEBUG
#define rep(i, c) for (int i = 1; i < (int)c; i++)
#define debug(x) cout << #x << " is " << endl

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

    ll ans = 0;
    rep(a, K + 1)
    {
        rep(b, K + 1)
        {
            rep(c, K + 1)
            {
                // cout << __gcd(__gcd(a, b), c) << endl;
                ans += __gcd(__gcd(a, b), c);
            }
        }
    }

    cout << ans << endl;
}


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

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <assert.h>
#include <numeric>

using namespace std;

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

int gcd(int a, int b)
{
  if (a < b)
  {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  return b ? gcd(b, a % b) : a;
}

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


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;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define INF (1LL<<50)
#define MOD 1000000007

int main(){
    int K;
    cin >> K;
    ll ans = 0;
    for(int a=1;a<=K;a++){
        for(int b=1;b<=K;b++){
            for(int c=1;c<=K;c++){
                ans+= __gcd(a,__gcd(b,c));
            }
        }
    }
    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 F first
#define S second
#define pb push_back
#define mp make_pair
#define full(a) a.begin(),a.end()
#define rfull(a) a.rbegin(),a.rend()

using namespace std;
const double pi=acos(-1.0);
const double pii=2*pi;
const double eps=1e-6;
const long long MOD=1e9+7;

void solve(){
    int n;
    cin>>n;
    long long ans=0;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            for(int k=1;k<=n;k++){
                ans+=__gcd(i,__gcd(j,k));
            }
        }
    }
    cout<<ans<<"\n";
}

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(NULL);
    std::cout.tie(NULL);

    solve();
    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 <cstdio>
#include <climits>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <string>
#include <cstdio>
#include <climits>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <utility>
#include <queue>
#include <cstring>
#include <set>
#include <map>
#include <complex>
#define rep(i, n) for (int i = 0; i < int(n); i++)
using namespace std;
long long MOD = 998244353;
long long INF = 1000000000000000; //10^15
typedef long long ll;
typedef unsigned long long ull;


ll powMod(ll x, ll n, ll mod) {
  if (n == 0) return 1;
  ll t = powMod(x, n/2, mod);
  t = t * t % mod;
  if (n & 1) return t * x % mod;
  return t;
}

ll gcd(ll a, ll b) {
  if (a == 0 || b == 0) return a + b;
  if (b > a) return gcd(b, a);
  return gcd(b, a % b);
}

int main(void) {

  ll k, s;
  cin >> k;

  ll ans = 0;
  for (ll i = 1; i <= k; i++) {
    for (ll j = 1; j <= k; j++) {
      for (ll t = 1; t <= k; t++) {
	
	ans += (gcd(i, gcd(j, t)));
      }
    }
  }

  cout << ans << endl;
}


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

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

vector<int>v;
double EPS=1e-9;
//ll pre[500010],a[500010],res[1000001];
const ll mod=1e9+7;
ll fastpow(ll a, ll n)
{
    if(n == 0) return 1;
    ll x = fastpow(a, n/2);
    ll ans = x * x % mod;
    if(n % 2 == 1) ans = ans *a % mod;
    return ans%mod;
}

ll C(ll n,ll m) {
    if(n < m) return 0;
    ll res = 1;
    for(ll i=1; i<=m; i++) {
        ll a = (n+i-m)%mod;
        ll b = i%mod;
        res = res*(a*fastpow(b,mod-2)%mod)%mod;
    }
    return res;
}

ll Lucas(ll n,ll m) {
    if(m == 0) return 1;
    return C(n%mod, m%mod) * Lucas(n/mod,m/mod)%mod;
}
vector <ll> v1,v2;

int a[200010],vis[200010],suf[200010];
ll gcd(ll n,ll k)
{
    if(k==0)return n;
    else return gcd(k,n%k);
}
int main()
{
    ll n;
cin>>n;
/*bool p=0;
while(n>0)
{
    ll temp=n%10;
    if(temp==7){p=1;}
    n/=10;
}
if(p==1)cout<<"Yes";
else cout<<"No";*/
  /*  ll sum=0;
    for(int i=1;i<=n;i++)
{
    if(i%3!=0&&i%5!=0)sum+=i;
}
cout<<sum;*/ll sum=0;
for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++)
    for(int k=1;k<=n;k++)
{
    sum+=gcd(__gcd(i,j),k);
}
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;
typedef long long LL;
typedef pair<int,int> pii;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define debug(x)  do{cerr<<#x<<": "<<x<<"\n";}while(0)
#define debugv(x) do{cerr<<#x<<": ";for(auto&e: (x))cerr<<e<<" ";cerr<<"\n";}while(0)
#define all(x) (x).begin(), (x).end()
#define fori(i, n) for (int i = 0; i < (int)(n); ++i)
#define ford(i, n, e) for (int i = (int)(n); i >= (int)(e); --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
template<typename T> bool mmax(T &m, const T q) { if (m < q) {m = q; return true;} else return false; }
template<typename T> bool mmin(T &m, const T q) { if (m > q) {m = q; return true;} else return false; }
#define RETURN(x) do{cout << (x) << '\n'; return 0;}while(0)

const int MOD = 1e9+7;
const int MAXN = 5e5+3;
const int INF = 1e9;


int main(int argc, char **argv) {
#ifdef OJ
    freopen("input.txt", "rt", stdin);
    //freopen("output.txt", "wt", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);

    function<int(int,int)> gcd = [&](int a, int b) {
        if (b == 0) return a;
        return gcd(b,a%b);
    }; 

    int k; cin >> k;
    int ans = 0;
    fore(a,1,k) 
        fore(b,1,k) {
            int g = gcd(a,b);
            fore(c,1,k) ans += gcd(g,c);
        }

    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;
typedef long long ll;

int main()
{
    ll n, i, sum=0, j, k;

    scanf("%lld",&n);

    for(i=1; i<=n; i++)
    {
        for(j=1; j<=n; j++)
        {
            for(k=1; k<=n; k++)
            {
                sum+=__gcd(i,__gcd(j,k));
            }
        }
    }
    printf("%lld\n",sum);

}

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

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

// マクロ //
#define rep(i,N) for(int i = 0; i < N; i++)
#define all(x) x.begin(), x.end()
#define sort(x) sort(all(x))
#define uniq(x) x.erase(unique(all(x)), x.end())
#define vsum(x) accumulate(all(x), 0)
#define cou(x) cout << x << endl
#define y() cout << "Yes" << endl
#define n() cout << "No" << endl
#define Y() cout << "YES" << endl
#define N() cout << "NO" << endl
#define x2(x) (x) * (x)

// 型エイリアス //
using lint = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vli = vector<lint>;
using vc = vector<char>;
using vs = vector<string>;
using vb = vector<bool>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvc = vector<vc>;
using vpii = vector<pii>;
using msi = map<string, int>;

// 関数 //
template<class T, class Q> lint gcd(T a, Q b) {
    int t;
    while (b != 0) {
        t = a % b;
        a = b;
        b = t;
    }
    return a;
}

template<class T> lint lcm(T a, T b) {
    return a * b / gcd(a, b);
}

double distance(pii a, pii b) {
    double dist;
    dist = sqrt(x2(a.first - b.first) + x2(a.second - b.second));
    return dist;
}

lint perm(int a) {
    lint perm = 1;
    for (int i = a; i >= 1; i--) {
        perm *= i;
    }
    return perm;
}

lint combination(int n, int m) {
    long double c = 1;
    for (int i = n, k = 1; i > m; i--, k++) {
        c *= i;
        c /= k;
    }
    return (lint)c;
}

template<class T, class Q> inline bool chmin(T& a, Q b) {
    if (a > b) { 
        a = b;
        return true; 
    }
    return false;
}

template<class T, class Q> inline bool chmax(T& a, Q b) {
    if (a < b) { 
        a = b; 
        return true; 
    }
    return false;
}

// 定数 //
#define pi acos(-1)
#define mod 1000000007
#define MOD 998244353
#define inf ((1LL << 62) - 1 + (1LL << 62))

// キーワード //
#define elif else if

// End of Template //



int main() {

    cin.tie(0);
    ios::sync_with_stdio(false);

    int N;
    cin >> N;
    lint sum = 0;
    rep(i, N) {
        rep(j, N) {
            rep(k, N) {
                sum += gcd((i + 1), gcd((j + 1), (k + 1)));
            }
        }
    }

    cou(sum);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:110:40: error: call of overloaded 'gcd(int, int)' is ambiguous
  110 |                 sum += gcd((i + 1), gcd((j + 1), (k + 1)));
      |                                     ~~~^~~~~~~~~~~~~~~~~~
a.cc:33:33: note: candidate: 'lint gcd(T, Q) [with T = int; Q = int; lint = long long int]'
   33 | template<class T, class Q> lint gcd(T a, Q b) {
      |                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:2:
/usr/include/c++/14/numeric:173:5: note: candidate: 'constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn) [with _Mn = int; _Nn = int; common_type_t<_Mn, _Nn> = int]'
  173 |     gcd(_Mn __m, _Nn __n) noexcept
      |     ^~~
Language: C

#include <bits/stdc++.h>
using namespace std;
#define ll          long long
#define vl          vector<ll>
#define vi          vector<int>
#define pi          pair<int,int>
#define pl          pair<ll,ll>
#define all(a)      a.begin(),a.end()
#define mem(a,x)    memset(a,x,sizeof(a))
#define pb          push_back
#define mp          make_pair
#define F           first
#define S           second
#define trace(x)     cerr<<#x<<":"<<x<<endl;
#define trace2(x,y) cerr<<#x<<":"<<x<<"|"<<#y<<":"<<y<<endl;
#define trace3(x,y,z) cerr<<#x<<":"<<x<<"|"<<#y<<":"<<y<<"|"<<#z<<":"<<z<<endl;
#define fast_io     std::ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
const int maxn = 1e5+7;
int main(){
	fast_io;
	int n;
	cin>>n;
	ll ans = 0;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			for(int k=1;k<=n;k++){
				int g1 = __gcd(i,j);
				int g2 = __gcd(g1,k);
				ans += g2;
			}
		}
	}
	cout<<ans;

	
	// cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\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>
int main()
{
  long long sum=0;
  int n;
  scanf("%d",&n);
  for(int i=1;i<=n;i++)
    for(int j=1;jM=n;j++)
      for(int k=1;k<=n;k++)
      {
        sum+=std::__gcd(i,std::__gcd(j,k));
      }
  printf("%lld\n",sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'jM' was not declared in this scope; did you mean 'j'?
    8 |     for(int j=1;jM=n;j++)
      |                 ^~
      |                 j
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1; i <= (int)(n); i++)
#define ll long long
int in() {int x; cin>>x; return x;}
ll lin() {ll x; cin>>x; return x;}
string sin() {string x;cin>>x;return x;}
using graph = vector<vector<int>>;
using graph2 = vector<vector<pair<int, int>>>;

bool ifprime(int x){
    if(x==1)return false;
    if(x==2)return true;
    if(x%2==0)return false;
    for(int i=2;i*i<=x;i++){if(x%i==0)return false;}
    return true;
}
ll mod(ll x, ll y){if(x>=0||x%y==0) return x%y;return y+x%y;} //mod including minus
ll dv0(ll x, ll y){if(x>=0||x%y==0)return x/y;return x/y-1;} //rnd down
ll dv1(ll x, ll y){if(x%y==0) return dv0(x,y);return dv0(x,y)+1;} //rnd up

//Start from Here
int main(){
    int K=in();
    ll sum=0;
    int m;
    rep2(i, K){
        rep2(j, K){
            rep2(k, K){
                m=gcd(i, j);
                sum+=gcd(m, k);
            }
        }
    }
}

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 int n,ans=0,num=0;
  long long int sum=0;
  scanf("%d",&n);
  long int i,j,k;
  for(i=1;i<=n;++i)
    {
        for(j=1;j<=n;++j)
          {
              for(k=1;k<=n;++k)
                 {
                     num=__gcd(i,j);
                     ans=__gcd(k,num);
                     sum+=ans;
                 }
          }
    }
         
   cout<<sum;
  
}

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

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

// Type alias
using ll=long long;
using ld=double;

using pi=pair<int,int>;
using pll=pair<ll,ll>;
using pld=pair<ld,ld>;
using ti3=tuple<int, int, int>;

using vi=vector<int>;
using vll=vector<ll>;
using vld=vector<ld>;
using vpi=vector<pi>;
using vpll=vector<ll>;
using vpld=vector<ld>;
using vti3=vector<ti3>;

// Constants
const double EPS = 1e-9;
const int inf = numeric_limits<int>::max();

// Macro
#define rep(i,n) for(int i=0;i<int(n);++i)
#define rrep(i,n) for(int i=int(n-1);i>=0;--i)
#define REP(i,a,b) for(int i=int(a);i<int(b);++i)
#define RREP(i,a,b) for(int i=int(b-1);i>=int(a);--i)
#define SHOW(a) cout << #a << " = " << a << endl
#define ARR(a,n) for(int i=0;i<int(n);++i) cout << #a << "[" << i << "]" << " = " << a[i] << endl

#define ALL(a) a.begin(),a.end()

// Funtcions
ll pow(ll base, ll i, ll mod){
  ll a = 1;
  while(i){
    if (i & 1) {
      a *= base;
      a %= mod;
    }
    base *= base;
    base %= mod;
    i >>= 1;
  }
  return a;
}
ll gcd(ll a, ll b){
  while(b){
    ll c = a % b;
    a = b;
    b = c;
  }
  return a;
}
ll lcm(ll a, ll b){
  return a / gcd(a, b) * b;
}


void solve(){
  int K;
  ll sum = 0;
  cin >> K;
  REP(i, 1, K+1){
    REP(j, 1, K+1){
      REP(k, 1, K+1){
        ll g = gcd(i, j);
        ll e = gcd(g, k);

        sum += e;
      }
    }
  }
  cout << sum << endl;
}

int main(){
  // FastIO
  //ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  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>
#define int int64_t
using namespace std;

const int M = 1e9+7;

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int k;
    cin >> k;
    int res = 0;
    for(int a = 1; a <= k; a++) {
        for(int b= 1; b <= k; b++) {
            for(int c = 1; c <= k; c++) {
                res += __gcd(a , __gcd(b , c));
            }
        }
    }
    cout << res << '\n';
    return 0;
}


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

#include<iostream>
#include<algorithm>
#include<functional>
#include<cmath>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<map>
#include<deque>
using namespace std;
#define ll long long
const int mod = 1000000007;
const ll INF = 1000000000000000000;

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

int main()
{
	int K;
	cin >> K;
	ll ans = 0;
	for (int i = 1; i <= K; i++) {
		for (int j = 1; j <= K; j++) {
			if (gcd(i, j) == 1) {
				ans += K;
			}
			else {
				int num = gcd(i, j);
				for (int k = 1; k <= K; k++) {
					ans += gcd(num, k);
				}
			}
		}
	}
	cout << ans << endl;
}


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

#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<algorithm>
#include<map>
#include<set>
#include<cmath>
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;

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

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, gcd(j, k));
			}
		}
	}
	cout << ans << endl;
}

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"
#define int long long
#define endl '\n'
using namespace std;
 
typedef long long ll;
#define db(x) cerr << #x << ": " << x << '\n';
#define read(a) int a; cin >> a;
#define readb(a, b) int a, b; cin >> a >> b;
#define readc(a, b, c) int a, b, c; cin >> a >> b >> c;
#define readarr(a, n) int a[(n) + 1] = {}; FOR(i, 1, (n)) {cin >> a[i];}
#define readmat(a, n, m) int a[n + 1][m + 1] = {}; FOR(i, 1, n) {FOR(j, 1, m) cin >> a[i][j];}
 
#define print(a) cout << a << endl;
#define printarr(a, n) FOR (i, 1, n) cout << a[i] << " "; cout << endl;
#define printv(v) for (int i: v) cout << i << " "; cout << endl;
#define printmat(a, n, m) FOR (i, 1, n) {FOR (j, 1, m) cout << a[i][j] << " "; cout << endl;} cout << endl;
#define all(v) v.begin(), v.end()
#define sz(v) (int)(v.size())
#define rz(v, n) v.resize((n) + 1);
#define pb push_back
#define fi first
#define se second
#define vi vector <int>
#define pi pair <int, int>
#define vpi vector <pi>
#define vvi vector <vi>
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORD(i, a, b) for (int i = (a); i >= (b); i--)
const ll inf = 1e18;
const ll mod = 1e9 + 7;
const ll N = 2e4 + 1;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 
signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	read(n);
	int sum = 0;
	FOR (i, 1, n)
    	FOR (j, 1, n)
    	    FOR (k, 1, n)
    	        sum += __gcd(i, __gcd(j, k));
    	        
	cout << sum;
        
}














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

#include<bits.stdc++.h>
#define rp(i,n) for(int i=0; i<n; i++)
using namespace std;
using ll=long long;
int main(){
    int k;
    cin >> k;
    int ans=0;
    for(int a=1; a<=k; a++){
        for(int b=1;b<=k;b++){
            for(int c=1;c<=k;c++){
                ans += gcd(gcd(a,b),c);
            }
        }
    }
    cout << ans << endl;
    return 0;
}

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

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define Mod  1000000007
ll fast(ll n,ll a,ll M)
{
    if(n==0)
        return 1;
    else if(n==1)
        return a;
    else
    {
        ll res=fast(n/2,a,M);
        if(n%2==0)
        {
            return ((res%M)*(res%M))%M;
        }
        else
        {
            return (((((res%M)*a)%M)*res)%M);
        }
    }
}
int main()
{
    ll K;
    cin>>K;
    ll ans=0;
    ll i,j,k;
    for(i=1;i<=K;i++)
    {
       for(j=1;j<=K;j++)
       {
           for(k=1;k<=K;k++)
           {
               ll p=__gcd(i,j);
               p=__gcd(p,k);
               ans+=p;
           }
       }
    }
    cout<<ans;
}


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

#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <bitset>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <iomanip>
#include <string>
#include <chrono>
#include <random>
#include <cmath>
#include <cassert>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <sstream>

using namespace std;

int main(int argc, char** argv) {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    cin >> n;

    auto gcd = [&](int x, int y) {
        while (x != 0) {
            y %= x;
            swap(x, y);
        }
        return y;
    };

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

    cout << res << "\n";

    return 0;
}

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


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



int main(){
	//freopen("output.txt","r",stdin);

	int t;
	cin>>t;
	long int sum = 0;
	for(int i=1;i<=t;i++){
		for(int j=1;j<=t;j++){
			for(int k=1;k<=t;k++){
				int temp = __gcd(k,j);
				sum += __gcd(temp,i);
			}
		}
	}

	cout<<sum<<endl;
}

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

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = Integer.parseInt(sc.next());
        // String s = sc.next();
        // int[] a = new int[n];
        // for (int i = 0; i < n; i++) {
        // a[i] = Integer.parseInt(sc.next());
        // }
        long ans = 0;
        for (int x = 1; x <= k; x++) {
            for (int y = 1; y <= k; y++) {
                for (int z = 1; z <= k; z++) {
                    int tmp = gcd(x, y);
                    tmp = gcd(tmp, z);
                    ans += tmp;
                }
            }
        }

        System.out.println(ans);
        sc.close();
    }

    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.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main {
      |              ^~~~
Language: C

#include <iostream>
using namespace std;
template <class T>
T gcd(T a, T b){
    T m, n, r;
    if(a > b){
        m = a;
        n = b;
    }else{
        m = b;
        n = a;
    }
    
    while(n != 0){
        r = m % n;
        m = n;
        n = r;
    }
    
    return m;
}

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

    long long int res = 0;

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

    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

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

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

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


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