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

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <random>
#include <chrono>
#include <queue>
#include <math.h>
#include <string>
#include <sstream>
#include <stack>
#include <deque>
#define pb push_back
#define make make_pair
#define kaku(a) cout << a << endl
#define isort(a) sort(a.begin(),a.end())
 
using namespace std;
 
#define ll long long
#define rep(i,n) for(ll i=0;i<n;i++)
#define PI 3.14159265359
long long gcd(long long a,long long b){ return b==0?a:gcd(b,a%b);}
long long lcm(long long a,long long b){ return a/gcd(a,b)*b;}
 
typedef pair<ll,ll> Pair;
const ll inf =1000000007;



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



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 int
#define ld              long double
#define ff              first
#define ss              second
#define pb              push_back
#define endl            "\n"

#define vi              vector <int>
#define pii             pair <int, int>
#define vpii            vector <pii>
#define mii             map <int, int>
#define que_max         priority_queue <int>
#define que_min         priority_queue <int, vi, greater<int>>

#define loop(i,s,e)     for(int i=s;i<e;i++)
#define rloop(i,e,s)    for(int i=e;i>=s;i--)
#define mset(a,f)       memset(a,f,sizeof(a))

#define M               1000000007
#define sz(x)           ((int) x.size())
#define all(p)          p.begin(), p.end()

#define bug(...)        __f (#__VA_ARGS__, __VA_ARGS__)
#define print(a)        for (auto x : a) cout << x << " "; cout << endl
#define Print(a,x,y)    for (int i=x; i<y; i++) cout<< a[i]<< " "; cout << endl

inline int power(int a, int b)
{
	int x = 1;
	while (b)
	{
		if (b & 1) x *= a;
		a *= a;
		b >>= 1;
	}
	return x;
}

template <typename Arg1>
void __f (const char* name, Arg1&& arg1) { cout << name << " : " << arg1 << endl; }
template <typename Arg1, typename... Args>
void __f (const char* names, Arg1&& arg1, Args&&... args)
{
	const char* comma = strchr (names + 1, ',');
	cout.write (names, comma - names) << " : " << arg1 << " | "; __f (comma + 1, args...);
}

const int N = 2e5 + 7;



void solve()
{
	int k;
	cin >> k;
	int sum = 0;
	loop(a, 1, k + 1)
	{
		loop(b, 1, k + 1)
		{
			loop(c, 1, k + 1)
			{
				sum += __gcd(a, __gcd(b, c));
			}
		}
	}
	cout << sum;
	return;
}
int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);



	cout << setprecision(9) << fixed;

	int t = 1;
	//cin >> t;
	while (t--)
	{
		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;
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
typedef long long ll;
typedef pair<int,int> pii;

const int p = 100003;


int main(){
    int k;
    cin>>k;
    ll ans=0;
    REP(p,k){
        REP(q,k){
            REP(r,k){
                ans+=__gcd(r,__gcd(p,q));
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}

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

#include <stdio.h>
using namespace std;
 
long long N;
long long ans;

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

int main(void){
	int a, b, c,d,tmp,K;
	long ans;
	cin >> K;
	for(a=1;a<=K;a++){
		for(b=1;b<=K;b++){
			for(c=1;c<=K;c++){
				if(a<b){
					tmp = a;
					a = b;
					b = tmp;
				}
				d=gcd(a, b);
				if(c<d){
					tmp = c;
					c = d;
					d = tmp;
				}
				ans += gcd(c, d);
			}
		}
	}
	cout >> ans + "\n";
	return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:21:9: error: 'cin' undeclared (first use in this function)
   21 |         cin >> K;
      |         ^~~
main.c:21:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:40:9: error: 'cout' undeclared (first use in this function)
   40 |         cout >> ans + "\n";
      |         ^~~~
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int K = sc.nextInt();
		int sum = 0;
		for(int i = 1; i <= K; i ++) {
			for(int j = 1; j <= K; j ++) {
				for(int k = 1; k <= K; k ++) {
					sum += gcd(gcd(i, j), k);
				}
			}
		}
		System.out.println(sum);
	}
	
	public static int gcd(int a, int b) {
		int ret = 0;
		int max = Math.max(a, b);
		int min = Math.min(a, b);
		int amari = 0;
		while(true) {
			amari = max % min;
			if(amari == 0) {
				ret = min;
				break;
			}
			max = min;
			min = amari;
		}
		return ret;
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>

using namespace std;
#define ALL(a) (a).begin(), (a).end()
#define FOR(i, n) for (size_t i = 0; i < (n); i++)
#define REP(n) FOR(i, n)
#define cinv(v, n) REP(n) {cin>>(v)[i];}
#define nvec(T, v, n) vector<T> v(n); cinv(v, n)
#define npairs(T1, T2, v, n) vector<pair<T1, T2>> v(n); REP(n){cin>>v[i].first>>v[i].second;}
#define ntuples(T1, T2, T3, v, n) vector<tuple<T1, T2, T3>> v(n); REP(n){cin>>get<0>(v[i])>>get<1>(v[i])>>get<2>(v[i]);}

#define min_index(v) size_t( min_element(all(v)) - (v).begin() )
#define max_index(v) size_t( max_element(all(v)) - (v).begin() )
#define min_e(v) *min_element(ALL(v))
#define max_e(v) *max_element(ALL(v))

#define count_le(v, a) size_t( upper_bound(ALL(v), a) - (v).begin() )
#define count_lt(v, a) size_t( lower_bound(ALL(v), a) - (v).begin() )
#define count_ge(v, a) size_t( (v).end() - lower_bound(ALL(v), a) )
#define count_gt(v, a) size_t( (v).end() - upper_bound(ALL(v), a) )

#define order(neq_sl) [](const auto s, const auto l){return neq_sl;}
#define make_lr(v,type,l,r) vector<type> l(n+1),r(n+1);FOR(i,n){l[i+1]=l[i]+v[i];r[i+1]=r[i]+v[n-1-i];}

#define acm accumulate
#define pub push_back
#define pof pop_front
#define SUM(v) accumulate(ALL(v), 0l)
#define SORT(v) sort(ALL(v))

#define GCD(v) gcd(ALL(v), 0l)

template <typename T>
T gcd(T a, T b) {
    if (a > b) swap(a, b);
    if (a == 0) return b;
    return gcd(b%a, a);
}
template <typename InputItr, typename T>
T gcd(InputItr first, InputItr last, T init) {
    for (; first != last; ++first) init = gcd(init, *first);
    return init;
}



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






/* きょむ〜 */

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

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

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

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

#include <bits/stdc++.h>
using namespace std;
long extgcd( long a)
{
  //拡張ユークリッドの互除法でaのmod b(prime)での逆元をもとめる
  long b = (long)1E9+7;
  long u, v, q, tmp; 
  long x = 1;
  long y = 0; u = 0; v = 1;
  while ( b > 0 ) {
	q = a / b; 
	tmp = u; u = x - q * u; x = tmp;
	tmp = v; v = y - q * v; y = tmp;
	tmp = b; b = a - q * b; a = tmp;
  }
  x %= (long int)1E9+7;
  while (x<0)
	x+=(long)1E9+7;
  return x;
}
long gcd(long a,long b)
{
 long r;
 if(a<b)
	swap(a,b);
  r = a % b;
  while(r!=0){
	a = b; b = r;
	r = a % b;
  }
  return b;
}

int ab[204][204];

int main(){
  	long  k;
	cin >> k;
  	for(int i = 1; i <= k; i++){
    	for(int j = 1; j <= k; j++) {
        	//for(int l = 1; l <= k; l++) {
            ab[i][j] = -1;	
            //}
        }
    }
	long long total=0;
  	for(int i = 1; i <= k; i++) {
      	for(int j = 1; j <= k; j++) {
   			if(ab[i][j] == -1) {
            	ab[i][j] = gcd(i,j); 
            }
          	for(int l = 1; l <= k; l++) {
            	if(ab[i][j] < 200 && ab[ab[i][j], l] != -1) {
                	n += ab[ab[i][j], l];  
                } else {
              		n += gcd(ab[i][j], l); 
                }
            }
        }
    }
  	
  	cout << n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:54: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   53 |                 if(ab[i][j] < 200 && ab[ab[i][j], l] != -1) {
      |                                      ~~~~~~~~~~~~~~~~^~~~~
a.cc:54:25: error: 'n' was not declared in this scope
   54 |                         n += ab[ab[i][j], l];
      |                         ^
a.cc:56:25: error: 'n' was not declared in this scope
   56 |                         n += gcd(ab[i][j], l);
      |                         ^
a.cc:62:17: error: 'n' was not declared in this scope
   62 |         cout << n << endl;
      |                 ^
Language: C

#include<iostream>
#include<string>

using namespace std;

int gcd(int a, int b);

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

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

int gcd(int a, int b) {
    if (b==0) return a;
    else return 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>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define pb push_back
#define sz(x) (int)(x).size()
#define PQ(T) priority_queue<T, v(T), greater<T>>
#define bn(x) ((1 << x) - 1)
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int mod = 1000000007;

int gcd(int a, int b){
    if(a < b){
        int tmp = a;
        a = b;
        b = tmp;
    }
    while(true){
        //printf("(%d, %d)\n", a, b);
        a = a % b;
        if(a == 0) break;
        int tmp = a;
        a = b;
        b = tmp;
    }

    return b;
}

int main(){
    int k;
    cin >> k;
    ll ans=0;
    rrep(a, k){
        rrep(b, k){
            int tmp = gcd(a, b);
            rrep(c, k){
                ans += gcd(tmp, 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>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define int long long
#define pbds tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define _ ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#define mod 1000000007
#define deb(x) cerr << "\n" \
					<< #x << "=" << x << "\n";
#define deb2(x, y) cerr << "\n"                   \
						<< #x << "=" << x << "\n" \
						<< #y << "=" << y << "\n";
#define w(x)  \
	int x;    \
	cin >> x; \
	while (x--)

int32_t main()
{

	int n;
	cin >> n;

	int sum = 0;

	for (int i = 1; i <= n; i++)
	{
		for (int j = i; j <= n; j++)
		{
			for (int k = j; k <= n; k++)
			{
				int temp = __gcd(i, __gcd(j, k)) * 6;

				if (i == j && i == k)
					temp /= 6;
				else
				{
					if (i == j || j == k || k == i)
						temp /= 2;
				}
				sum += temp;
			}
		}
	}
	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 <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <map>
#include <functional>
#include <cmath>
#include <cstdint>
#include <mutex>
#include <thread>
#include <bitset>
#include <utility>

using namespace std;

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

int main()
{
	int a;
    unsigned long long int sum = 0;
	cin >> a;

    for (int i = 1; i <= a; i++)
    {
        for (int j = 1; j <= a; j++)
        {
            int gcd2 = gcd(i, j);
            for (int k = 1; k <= a; k++)
            {
                sum += unsigned long long int(gcd(gcd2, k));
            }
        }
    }
    cout << sum;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:24: error: expected primary-expression before 'unsigned'
   42 |                 sum += unsigned long long int(gcd(gcd2, k));
      |                        ^~~~~~~~
Language: C

#include<bits/stdc++.h>
#define fo(i,a,b) for(int i=(a);i<(b);i++)
#define qi queue<int>
#define vi vector<int>
#define ll long long
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define pii pair<int,int>
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define fi first
#define se second 
#define prq priority_queue
#define foreach(it,c) for(__typeof((c).begin()) it=c.begin();it!=c.end();it++)
//#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
inline ll read(){
	ll x=0;
	int f=1;
	char c=getchar();
	for(;!isdigit(c);c=getchar()) if(c=='-')f=-f;
	for(;isdigit(c);c=getchar())x=x*10+(c-'0');
	return x*f;
}
inline void out(int x){
	if(x>=10)out(x/10);
	putchar(x%10+'0');
}
int n;
int gcd(int x,int y){
	return (y==0?x:gcd(y,x%y));
}
int main(){
	//freopen("a.in","r",stdin);
	//freopen("a.out","w",stdout);
	cin>>n;
	int ans=0;
	fo(i,1,n+1) fo(j,1,n+1) fo(k,1,n+1)ans+=gcd(gcd(i,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 <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <string>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define Sort(a) sort(a.begin(), a.end())
const int INF = 1<<30;
const ll MOD = 1000000007;

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

int main(void) {

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

    cout << sum << endl;


    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 ll long long
#define rep(i, n) for (ll i = 0; i < n; i++)


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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:27: error: no matching function for call to 'gcd(long long int, long long int, long long int)'
   18 |                 sum += gcd(i + 1, j + 1, h + 1);
      |                        ~~~^~~~~~~~~~~~~~~~~~~~~
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

#include <bits/stdc++.h>

#define rep(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define pii pair<int,int>
#define vi vector<int>
#define vit vector<int>::iterator it
#define mii map<int,int>
#define mis map<int,string>
#define msi map<string,int>
#define X first
#define Y second
#define all(a) a.begin(), a.end()
#define pb push_back
#define mp make_pair
#define sz(v) (int)(v.size())
#define si set<int>
#define ms(a,f) memset((a),(f),sizeof (a))

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const int inf=0x7f7f7f7f;
const int N=1e5+10;
int n;
int main() {
	ll ans=0;
	cin>>n;
	rep(i,1,n) rep(j,1,n) rep(k,1,n) ans+=__gcd(i,__gcd(j,k)); 
	cout<<ans<<endl;
	return 0;
}

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

#include<bits/stdc++.h>

using namespace std;

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

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

    cin >> n;

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

    cout << sum << endl;

    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int k;
ll ans=0;
ll gcd(ll a,ll b) {
	if(b==0) return a;
	return gcd(b,a%b);
}
int main()
{
	scanf("%d",&k);
	for(ll i=1;i<=k;++i)
		for(ll j=1;j<=k;++j)
			for(ll l=1;l<=k;++l)
				ans+=gcd(gcd(i,j),l);
	printf("%lld",ans);
	return 0;
}

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

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

using namespace std;

int gcd(int a,int b){
    int tmp,r;
    if(b>a){
        tmp=a;
        a=b;
        b=tmp;
    }

    while ((r=a%b)) {
        a = b;
        b = r;
    }

    return b;
}

int main(){
    int n=0;
    long long ans=0;
    //char s[200];
    //bool flag = false;
    //vector<int> a(N,0);

    cin >> n;

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

    cout << ans << endl;
    //cout << ( (flag) ? "Yes" : "No" ) << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
int gcd1(int m,int n){
	if(m%n==0) return n;
	return gcd1(n,m%n);
}
int gcd(int a,int b,int c){
	return gcd1(gcd1(a,b),c);
}
int main(){
	int k,sum=0;
	scanf("%d",&k);
	for(int i=1;i<=k;i++){
		for(int j=1;j<=k;j++){
			for(int x=1;x<=k;x++){
				sum+=gcd(i,j,x);
			}
		}
	}
	printf("%d",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>
using namespace std;
int gcd(int a, int b)
{
   if (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }
}

int main() {
  int k;
  cin >> k;
  int sum = 0;
  for(int i = 1; i <= k; i++) {
    for(int j = 1; j <= k; j++) {
      for(int l = 1; l <= k; l++) {
        sum += gcd(gcd(i,j),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;
#define ll unsigned long long

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

    ll n;
  	cin >> n;
  	ll sum=0ll;
  	for(ll i=1; i<=n; i++){
      if(n%3 != 0 && n%5!=0) sum += i;
    }
  	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>

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

int main(){
    int K;
    std::cin >> K;
    int sum=0;
    int num=0;
    
    for(int i=1;i<=K;++i){
        for(int j=1;j<=K;++j){
            num=gcd(i,j);
            for(int h=1;h<=K;++h){
                sum+=gcd(num,h);
            }
        }
    }
    std::cout << sum << std::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 <algorithm>
using namespace std;
typedef long long ll;
//template<class itr> void cins(itr first, itr last){ for(auto i = first; i != last; i++){ cin >> (*i); } }
/*
string S_str[H];
cins(S_str, S_str + H);
S_str[i][j];
*/
inline int at(ll x, int k){ return (x >> k) & 1; }
#define rep(i, n) for(int i = 0; i < n; i++)


int main(){
  ll k;
  cin >>k;
  ll sum =0;
  rep(i,k){
    rep(j,k){
      rep(m,k){
        sum += __gcd(__gcd(i+1, j+1),k+1);
      }
    }
  }
  cout << sum<< endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:21: error: no matching function for call to '__gcd(int, ll)'
   22 |         sum += __gcd(__gcd(i+1, j+1),k+1);
      |                ~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:22:21: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('int' and 'long long int')
   22 |         sum += __gcd(__gcd(i+1, j+1),k+1);
      |                ~~~~~^~~~~~~~~~~~~~~~~~~~~
Language: C

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


int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    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)
            {
                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>
#ifdef HIRO
#define d(f_, ...) printf((f_), ##__VA_ARGS__)
#else
#define d(f_, ...)
#endif

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pllll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector< pair<int, int> > vii;
typedef vector< pair<long long, long long> > vllll;
typedef map<int, int> mii;
typedef map<long long, long long> mllll;
typedef queue<int> qi;
typedef queue< pair<int, int> > qp;
#define mp make_pair
#define pi 3.14159265358979323846
#define MAX max_element
#define MIN min_element
#define all(v) v.begin(), v.end()
#define gt(T) greater<T>()
#define sum(v) accumulate(v.begin(), v.end(), 0ll)
#define uni(v) do{ \
  sort(v.begin(), v.end()); \
  decltype(v)::iterator result = unique(v.begin(), v.end()); \
  v.erase(result, v.end()); \
}while(0)
#define fi(init, n) for(int i = init; i < n; ++i)
#define fj(init, n) for(int j = init; j < n; ++j)
#define fk(init, n) for(int k = init; k < n; ++k)
#define zero(x) memset(x, 0, sizeof(x))
#define negative(x) memset(x, ~0, sizeof(x))
#define bitsum(x) __builtin_popcount(x)
const ll MOD = 1e9 + 7;
const int INF = 1e9;
const int di[] = { 0, 1, 0, -1 };
const int dj[] = { 1, 0, -1, 0 };

template<typename T>
T gcd(T a, T b) {
	return b ? gcd(b, a % b) : a;
}
template<typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}
template<typename T>
int finder(vector<T> vec, T number) {
	auto itr = find(vec.begin(), vec.end(), number);
	size_t index = distance(vec.begin(), itr);
	if (index != vec.size()) return 1;
	else return 0;
}
ll frac(ll n){
	if (n == 0) return 1;
	return (n * frac(n - 1)) % MOD;
}
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

int main(int argc, char** argv) {
#ifdef HIRO
  string quiz(argv[1]);
  string id(argv[2]);
  string filename("input/" + quiz + "/" + id + ".txt");
  ifstream fin(filename);
  if (fin.peek() == ifstream::traits_type::eof()) {
    cout << "No input.";
    return 0;
  }
  ifstream cin(filename);
  std::cin.rdbuf(cin.rdbuf());
#endif
  ll ans = 0;
  ll n;
  cin >> n;
  // ll n, m;
  // cin >> n >> m;
  // ll n, m, k;
  // cin >> n >> m >> k;
  fi(1, n + 1)
    fj(1, n + 1)
    fk(1, n + 1)
    ans += gcd(i, gcd(j, k));
  cout << ans << endl;
  return 0;
}



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

#include <stdio.h>
using namespace std;
 
long long N;
long long ans;

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

int main(void){
	int a, b, c,d,tmp,K;
	long ans;
	
	for(a=1;a<=K;a++){
		for(b=1;b<=K;b++){
			for(c=1;c<=K;c++){
				if(a<b){
					tmp = a;
					a = b;
					b = tmp;
				}
				d=gcd(a, b);
				if(c<d){
					tmp = c;
					c = d;
					d = tmp;
				}
				ans += gcd(c, d);
			}
		}
	}
	return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
Language: C

#include <iostream>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <float.h>
#include <stdlib.h>
#include <functional>
#include <limits>
#include <numeric>
#include <type_traits>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 1; i <= (int)(n); i++)
#define in cin >>
#define out cout <<
#define sort(v) sort(v.begin(),v.end())
#define reverse(v) reverse(v.begin(),v.end())
#define all(v) v.begin(),v.end()
typedef long long ll;
unsigned gcd(unsigned a, unsigned b) {
  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
ll modpow(ll a,ll n,ll mod){
    ll res=1;
    while(n>0){
        if(n&1)res=a*res%mod;
        a=a*a%mod;
        n>>=1;
    }
    return res;
}
void comb(vector<vector <long long int> > &v){
  for(int i = 0;i <v.size(); i++){
    v[i][0]=1;
    v[i][i]=1;
  }
  for(int k = 1;k <v.size();k++){
    for(int j = 1;j<k;j++){
      v[k][j]=(v[k-1][j-1]+v[k-1][j]);
    }
  }
}


int main(){
    int n;
    cin >> n;
    ll ans=0;
    rep(i,n){
        rep(j,n){
            rep(l,n){
                ans=ans+gcd(i,gcd(j,l));
            }
        }
    }
    cout << ans;
}


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;
 using pii = pair<int, int>;
 using ll = long long;
 #define rep(i, j, n) for(int i = j; i < (int)(n); i++)
 const ll MOD = 1000000007;
 const ll INF = 1LL << 60;

 int main() {
   ll K, ans = 0;

   cin >> K;

   vector<vector<ll>> memo(K + 1, vector<ll>(K + 1));
   vector<ll> ab;

   for (ll i = 1; i <= K; i++) {
     for (ll j = 1; j <= K; j++) {
       memo.at(i).at(j) = __gcd(i, j);
       ab.emplace_back(__gcd(i, j));
     }
   }

   for (ll v : ab) {
     for (ll i = 1; i <= K; i++) {
       ans += __gcd(v, i);
     }
   }

   cout << ans << endl;
 }


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

#include <iostream>
#include <vector>
#include <algorithm>
#define INF 99999999
using namespace std;

int main() {
    int k,tmp;
    long long ans = 0;
    cin >> k;
    for (int i = 1; i <= k; ++i) {
        for (int j = 1; j <= k; ++j) {
            for (int l = 1; l <= k; ++l) {
                tmp = std::__algo_gcd(i,j);
                tmp = std::__algo_gcd(tmp,l);
                ans += tmp;
            }

        }

    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: '__algo_gcd' is not a member of 'std'
   14 |                 tmp = std::__algo_gcd(i,j);
      |                            ^~~~~~~~~~
a.cc:15:28: error: '__algo_gcd' is not a member of 'std'
   15 |                 tmp = std::__algo_gcd(tmp,l);
      |                            ^~~~~~~~~~
Language: C++

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

int main(){
    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(a,b,c);
            }
        }
    }
    cout << sum << endl;
}


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

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

int main(){
    int K,count = 0;
    cin >> K;
    for(int i = 1; i <= K; i++){
        for(int j = 1; j <= K; j++){
            for (int k = 1; k <= K; k++){
                count += __gcd(i,__gcd(j,k));
            }
        }
    }
    cout << count << 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 <fstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <cmath>
#include <climits>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <numeric>

#define rep(i,n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())

using namespace std;
typedef long long ll;

int main() {
#ifdef RUN_LOCAL
  ifstream in("../input.txt");
  cin.rdbuf(in.rdbuf());
#endif

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

  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) {
        sum += gcd(gcd(i, j), k);
      }
    }
  }

  cout << sum << endl;


  return 0;
}


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

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
ll gcd(ll a,ll b){
  if(a<b) return gcd(b,a);
  if(b==0) return a;
  else return gcd(a%b,b);
}

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

#define _USE_MATH_DEFINES
#include<iostream>
#include<fstream>
#include<vector>
#include<string>
#include<algorithm>
#include<climits>
#include<numeric>
#include<cmath>
#include<cstring>
#include<deque>
#include<map>
#include<iomanip>

#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 VSORT(v) sort(v.begin(), v.end());
#define VE vector<int>
#define VEP vector<pair<int,int>>
#define ll long long
#define pb(a) push_back(a)
using namespace std;
const vector<VE> DIR{ {-1,0},{1,0},{0,-1},{0,1} };
const ll MOD = 1000000007;
long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}

int main() {
	int n;
	cin >> n;
	ll ans = 0;
	REP(i, n) {
		REP(k, n) {
			int gcd_a = GCD(i + 1, k + 1);
			REP(m, n) {
				ans += GCD(m + 1, gcd_a);
			}
		}
	}
	cout << ans << endl;
	return 0;
}


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

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

#define f first
#define s second

#define pb push_back
#define pp pop_back
#define mp make_pair

#define sz(x) (int)x.size()
#define sqr(x) ((x) * 1ll * (x))
#define all(x) x.begin(), x.end()
#define clr(a,v) memset(a, v, sizeof(a))

#define rep(i, l, r) for (int i = (l); i <= (r); i++)
#define per(i, l, r) for (int i = (l); i >= (r); i--)
#define reflex ios_base::sync_with_stdio(false)

#define nl '\n'
#define ioi exit(0);


#define PI 3.14159265

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
//~ const int N= (int)2e5 + 7;
const int inf = (int)1e9 + 7;
const int mod = (int)1e9 + 7;
//const int mod = 1000000007;
const ll linf = (ll)1e18 + 7;

const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int kx[] = {-1,1,2,2,1,-1,-2,-2};
const int ky[] = {2,2,1,-1,-2,-2,-1,1};
  
int main() 
{ 
	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(__gcd(a,b),c);
			}
		}
	}
	cout<<sum;
	return 0;
} 




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

#include<bits/stdc++.h>
#define int long long

using namespace std;

signed 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++){
                sum += __gcd(__gcd(i,j),k);
            }
        }
    }
    cout<<sum;
}

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

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

ll gcd(ll l, ll m){
    ll tmp;
    // cout << l << m << endl;
    if(m > l){
        tmp = m;
        m = l;
        l = tmp;
    }
    while ((1)){
        ll s;
        s = l % m;
        if(s == 0) return m;
        tmp = m;
        m = s;
        l = tmp;
    }
}

    
ll gcd3(ll l, ll m, ll n){
    return gcd(gcd(l,m),n);
}

int main() {
    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 += gcd3(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<string>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'k' was not declared in this scope
   17 |     sum += gcd(i,j,k);
      |                    ^
a.cc:17:12: error: 'gcd' was not declared in this scope
   17 |     sum += gcd(i,j,k);
      |            ^~~
a.cc:22:14: error: expected ';' before 'return'
   22 |   cout << sum
      |              ^
      |              ;
   23 |   return 0
      |   ~~~~~~
Language: C

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

long long GCD(long long x, long long y) {
    if (y == 0) return x;
    else return GCD(y, x%y);
}

int main() {
    ll k,ans=0;
    cin >> k;
    for(ll a=1;a<=k;a++){
        for(ll b=1;b<=k;b++){
            ll hoge = GCD(a,b);
            for(ll c=1;c<=k;c++){
                ans+=GCD(hoge,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 <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <queue>
#include <map>
#include <stack>
#include <bitset>
#include <numeric> //lcm
#include <iomanip> //double精度 setprecision

using namespace std;

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = n-1; i >= 0; --i)
#define rep1(i,n) for(int i = 1; i <= (n); ++i)
#define rrep1(i,n) for(int i = (n); i >= 1; --i)
#define REP(i,n,m) for(int i = (n); i < (m); ++i)
#define all(vec) (vec).begin(),(vec).end()

#define debug(vec) for(auto v : vec) cerr << v << " "; cerr << endl;
#define debug2D(vec2D) for(auto vec : vec2D) { for (auto v : vec) cerr << v << " "; cerr << endl; } 
#define debugP(vec) for(auto v : vec) cerr << "(" << v.first << "," << v.second << ") "; cerr << endl;
#define debug2DP(vec2D) for(auto vec : vec2D) { for (auto v : vec) cerr << "(" << v.first << "," << v.second << ") "; cerr << endl; } 

typedef long long ll;

constexpr ll INF = 1000000000; //10^10
//const ll MOD = 998244353;
constexpr ll MOD = 1000000007;

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

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

int main() {
	int n; cin >> n;
	ll ans = 0;
	rep1(i,n) rep1(j,n) rep1(k,n) 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 <iostream>
#include<numeric>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

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






int main() {

	int N;
	cin >> N;
	long long s = 0;
	rep(i, N) {
		rep(j, N) {
			rep(k, N) {
				s += gcd(i + 1, gcd(j + 1, k + 1));
			}
		}
	}
		cout << s << 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;

#define FAST_IO ios_base::sync_with_stdio(0); cin.tie(nullptr)
#define FOR(i, a, b) for(int i = (a); i <= (b); i++)
#define REP(n) FOR(O, 1, (n))
#define pb push_back
#define f first
#define s second
typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, pii> piii;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<piii> viii;

const int MAXN = 500100, MAXK = 30;
const ll MOD = 998244353;
const int INF = 1e8;
const ld PI = asin(1) * 2;

void setIO () {
    FAST_IO;
}

void setIO (string s) {
    setIO();
 	freopen((s+".in").c_str(),"r",stdin);
	freopen((s+".out").c_str(),"w",stdout);
}

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

int main() {
	setIO();

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

	return 0;
}




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

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

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

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

    ll sum=0;
    rep(i,n){
        rep(j,n){
            rep(h,n){
                sum += gcd(i,gcd(j,h));
            }
        }
    }

    cout << sum << endl;

    return 0;
}



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

#include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(),x.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template<class T> inline bool chmax(T&a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T&a,T b){if(a>b){a=b;return 1;}return 0;}
using ll = long long;
using P = pair<int,int>;

ll n,m,sum;
string s,t;

int main() {
  cin >> n;
  rep(i,n)rep(j,n)rep(k,n){
    sum+=__gcd(i+1,__gcd(j+1,k+1));
  }
  cout << sum << endl;
}

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

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

using namespace std;

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

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

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

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int INF=1e10;
int MOD=1e9+7;
signed main(){
  int a;
  cin>>a;
  int b=0;
  rep1(i,a)rep1(j,a)rep1(k,a){
  b+=__gcd(i,__gcd(j,k));
  }
  cout<<b<<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 <stdio.h>
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <limits>
#include <numeric>
#include <queue>
#include <set>
#include <bitset>
#include <map>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<long long> vll;
typedef queue<int, int> qii;
typedef pair<int, int> pii;
typedef pair<string, int> psi;

#define PI 3.14159265359
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rept(i,n) rep(i,0,n)

//int型を受け取ってその桁数を返す
int check_digits(int n,int m) {
	int digits = 0;
	while (n != 0) {
		n /= m;
		digits++;
	}
	return digits;
}

//int型を受け取ってその各桁の和を返す
int sum_digits(int n) {
	int sum=0;
	int N = n;
	while (N) {
		sum += N % 10;
		N /= 10;
	}
	return sum;
}


//最大公約数を返す関数
int gcd(int n, int m) {
	while (n != 0) {
		if (n < m) swap(n, m);
		n = n % m;
	}
	return m;
}


//2点間の距離を返す
float dis(int x1, int y1, int x2, int y2) {
	return sqrt(pow(abs(x1 - x2), 2) + pow(abs(y1 - y2), 2));
}


//入力された文字列が回文か判断してboolを返す
bool is_kaibun(string s) {
	string s_r(s.rbegin(), s.rend());
	return (s == s_r);
}


void yes() {cout << "Yes" << endl;}
void no() {cout << "No" << endl;}




//問題文を落ち着いて読む！
//型に注意！！
//出力例もちゃんと全部見る！！！！！
int main() {
	int k, sum = 0;
	cin >> k;

	int temp1, temp2;
	rep(i,1, k+1) {
		rep(j,1,k+1) {
			rep(m,1, k+1) {
				temp1 = gcd(i, j);
				temp2 = gcd(temp1, m);
				sum += temp2;
			}
		}
	}

	cout << sum << endl;
	//system("pause");
	return 0;
}

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