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

//#include<bits\stdc++.h>
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cstring>
#include<string>
#include<ctime>
#include<cmath>
#include<cctype>
#include<cstdlib>
#include<queue>
#include<deque>
#include<stack>
#include<vector>
#include<algorithm>
#include<utility>
#include<bitset>
#include<set>
#include<map>
#define ll long long
#define db double
#define INF 2000000000
#define inf 10000000000000000ll
#define ldb long double
#define pb push_back
#define get(x) x=read()
#define gt(x) scanf("%d",&x)
#define put(x) printf("%d\n",x)
#define putl(x) printf("%lld\n",x)
#define gc(a) scanf("%s",a+1)
#define rep(p,n,i) for(RE ll i=p;i<=n;++i)
#define go(x) for(ll i=lin[x],tn=ver[i];i;tn=ver[i=nex[i]])
#define fep(n,p,i) for(RE ll i=n;i>=p;--i)
#define pii pair<ll,ll> 
#define mk make_pair
#define RE register
#define P 1000000007
#define S second
#define gf(x) scanf("%lf",&x)
#define pf(x) ((x)*(x))
#define ull unsigned long long
#define S second
#define F first
#define l(p) t[p].l
#define r(p) t[p].r
#define sum(p) t[p].sum
#define tag(p) t[p].tag
#define zz p<<1
#define yy p<<1|1
#define mod 1000000007
using namespace std;
char buf[1<<15],*fs,*ft;
inline char getc()
{
    return (fs==ft&&(ft=(fs=buf)+fread(buf,1,1<<15,stdin),fs==ft))?0:*fs++;
}
inline ll read()
{
    RE ll x=0,f=1;char ch=getc();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getc();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getc();}
    return x*f;
}
const ll MAXN=100010;
ll n,k,ans;
ll f[MAXN],c[MAXN];
inline ll ksm(ll b,ll p)
{
	ll cnt=1;
	while(p)
	{
		if(p&1)cnt=cnt*b%mod;
		p=p>>1;b=b*b%mod;
	}
	return cnt;
}
signed main()
{
	//freopen("1.in","r",stdin);
	n=3;get(k);
	fep(k,1,i)
	{
		ll ww=k/i;
		f[i]=ksm(ww,n);
		for(int j=i+i;j<=k;j+=i)f[i]=(f[i]-f[j])%mod;
		ans=(ans+f[i]*i)%mod;
	}
	putl((ans+mod)%mod);
	return 0;
}


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

/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author aajisaka
 */

#include<bits/stdc++.h>

using namespace std;

void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

#define SPEED ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

using ll = long long;
using P = pair<ll, ll>;

constexpr long double PI = 3.14159265358979323846264338327950288L;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

class CSumOfGcdOfTuplesEasy {
public:
    void solve(istream& cin, ostream& cout) {
      SPEED;
      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;
    }
};

signed main() {
  CSumOfGcdOfTuplesEasy solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}

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

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

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

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

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
const int INF = 100000000;
const int MAX_N = 100;
typedef pair<int , int> P;
typedef long long ll;
 
int main () {
  int N;
  cin >> N;
  ll ans = 0;
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      for (int k = 0; k < N; ++k) {
        int tmp = gcd(i, j);
        ans += gcd(tmp, k);
      }
    }
  }
  printf("%lld\n"< ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |   printf("%lld\n"< ans);
      |          ~~~~~~~~^~~~~
a.cc:21:18: error: cannot convert 'bool' to 'const char*'
   21 |   printf("%lld\n"< ans);
      |          ~~~~~~~~^~~~~
      |                  |
      |                  bool
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <iomanip>
#include <cassert>
#include <functional>


using namespace std;


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

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

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

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

def count_section_by_zero(data):
  count = 0
  flg = False
  start = 0
  for i, d in enumerate(data):
    if flg is False and d != 0:
      count += 1
      flg = True
      
    if d == 0:
      flg = False
  return count

def input_list():
  return list(map(int, input().split()))

def input_list_str():
  return list(map(str, input().split()))

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

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

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

# 2で割り切れる回数
def divide_two(arg):
  c = 0
  while True:
    if c >= 2:
      break
    if arg % 2 != 0:
      break
    arg //= 2
    c += 1
  return c

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def main():
  n = int(input())
  l = 0
  for a in range(1, n+1):
     for b in range(1, n+1):
        for c in range(1, n+1):
          l += gcd_list([a,b,c])
  print(l)
import math
import fractions
import collections
import itertools
from functools import reduce
main()

Compiler output:
main.c:1:1: error: unknown type name 'def'
    1 | def count_section_by_zero(data):
      | ^~~
main.c: In function 'count_section_by_zero':
main.c:1:32: error: expected declaration specifiers before ':' token
    1 | def count_section_by_zero(data):
      |                                ^
main.c:35:3: error: "2で割り切れる回数" after # is not a positive integer
   35 | # 2で割り切れる回数
      |   ^~~~~~~~~~~~~~~~~
main.c:47:3: error: invalid preprocessing directive #\U00007d20\U000056e0\U00006570\U00005206\U000089e3
   47 | # 素因数分解
      |   ^~~~~~~~~~
main.c:1:5: error: type of 'data' defaults to 'int' [-Wimplicit-int]
    1 | def count_section_by_zero(data):
      |     ^~~~~~~~~~~~~~~~~~~~~
Language: C


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

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


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

using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define INF 1000000000000000000
#define all(x) x.begin(), x.end()

int main() {
    int N;
    cin >> N;
    ll sum = 0;
    rep(i, N) {
        if (i % 3 == 0 && i % 5 == 0)
            continue;
        else if (i % 3 == 0)
            continue;
        else if (i % 5 == 0)
            continue;
        else
            sum += (ll)i;
    }
    cout << sum << endl;
}


Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using namespace std;
      | ^~~~~
main.c:1:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    1 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:9:5: error: 'cin' undeclared (first use in this function)
    9 |     cin >> N;
      |     ^~~
main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:5: error: 'cout' undeclared (first use in this function)
   21 |     cout << sum << endl;
      |     ^~~~
main.c:21:20: error: 'endl' undeclared (first use in this function)
   21 |     cout << sum << endl;
      |                    ^~~~
Language: C

#pragma region template
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const long long MOD = 1e9 + 7, MAX = 1e18, larg = 1e5, INF = -1e9;
long long A, B, C, D, E, F, G, H, I, J, K, L, N, M, O, P, Q, R, S, T, U, V, W, x, y, z;
long long max_value = INF, max_index = -1;
long long min_value = MAX, min_index = -1;
typedef long long ll;
typedef pair<ll, ll> Pa;

int dp[201][201] = {0};

int gcd(int a, int b){
	if(dp[a][b] != 0) return dp[a][b];
	if(dp[b][a] != 0) return dp[b][a];
    if(b == 0) {
		dp[a][b] = a;
		dp[b][a] = a;
		return a;
	}
	dp[a][b] = gcd(b, a%b);
	dp[b][a] = gcd(b, a%b);
    return gcd(b, a%b);
}

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


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

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REP1(i,n) for(int i = 1; i < n+1 ;i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
#define SZ(x) ((int)(x).size())
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
typedef long long ll;
using p = pair<int, int>;
using P = pair<ll, ll>;
using V = vector<int>;
using VV = vector<vector<int>>;
using VVV = vector<vector<vector<int>>>;
using VL = vector<ll>;
using VVL = vector<vector<ll>>;
using VVVL = vector<vector<vector<ll>>>;
using Graph = VV;
int gcd(int a, int b)
{
   if (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }
}


int main(){
    ios::sync_with_stdio(false); cin.tie(0);
    int k;
    cin >> k;
    ll ans = 0;
    REP1(i,k){
        REP1(j,k){
            REP1(l,k){
                ans+=gcd(gcd(i,j),l);
            }
        }
    }
    cout << ans << endl;
}


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

#include<stdio.h>
int gcd(int x, int y){
  if(x<y){
    int w=x;
x=y;
y=w;
}
if(x%y!=0)return gcd(y,x%y);
else return y;
}
int main(void){
  int k,sum=0;
scanf("%d",&k);
for(int a=1;a<=k;a++){
	for(int b=1;b<=k;b++){
      for(int c=1;c<=k;c++){
int ab=gcd(a,b);
sum+=gcd(ab,c);
}



Compiler output:
main.c: In function 'main':
main.c:19:1: error: expected declaration or statement at end of input
   19 | }
      | ^
main.c:19:1: error: expected declaration or statement at end of input
main.c:19:1: error: expected declaration or statement at end of input
Language: C

#include <bits/stdc++.h>

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

using namespace std;

ll findGCD(ll x, ll y, ll z)
{
    ll result = __gcd(x, y);
    result = __gcd(result, z);
    return result;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    ll N, sum = 0;
    cin>>N;

    for(ll i=1;i<=N;++i)
    {
        for(ll j=1;j<=N;++j)
        {
            for(ll k=1;k<=N;++k)
                sum += findGCD(i,j,k);
        }
    }

    cout<<sum<<'\n';

    return 0;
}

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

#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
using namespace std;

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

int main()
{
	int K;
	long long int res = 0;

	cin >> K;

	for(int i=1; i<=K; i++){
		res += i;
	}

	if(K == 1){
		cout << res;
		return 0;
	}

	for(int i=1; i<=K; i++){
		for(int j=i+1; j<=K; j++){
			res += (calcGcd(i, j) * 6);
		}
	}

	if(K == 2){
		cout << res;
		return 0;
	}

	for(int i=1; i<=K; i++){
		for(int j=i+1; j<=K; j++){
			for(int k=j+1; k<=K; k++){
				res += (calcGcd(calcGcd(i, j), k) * 6);
			}
		}
	}
	
	cout << res;

	cin >> K;

	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;
 
/*iamsorry*/

#define thegamebegins   ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define fileio          freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define int             long long
#define float           long double
#define test            int T; cin>>T; while(T--)
#define in(a,n)         for(int i=0; i<n; ++i)  cin>>a[i]
#define r0              return 0
#define E               "\n"
#define S               " "
#define elif            else if 
#define M               1000000007
#define fi(i,x,y)       for(int i=x; i<y; ++i)
#define fa(i,s)         for(auto i:s)
#define fp(i,s)         for(auto i=(s).begin(); i!=(s).end(); ++i)
#define sz(s)           (int)(s).size()
#define vi              vector <int>
#define vpii            vector <pair <int,int> >
#define mii             map <int,int>
#define pii             pair <int,int>
#define seti            set <int>
#define setd            set <int,greater <int> >
#define all(s)          (s).begin(),(s).end()
#define sortd(a,n)      sort(a, a+n, greater<int>())
#define pb              push_back
#define fr              first
#define sc              second
#define lb              lower_bound
#define ub              upper_bound
#define er              equal_range
 
const int INF = 0x3f3f3f3f;

signed main()
{
    thegamebegins

    int n;  cin>>n;
    int ans=0LL;
    fi(i,1,n+1) fi(j,1,n+1) fi(k,1,n+1)     ans+=__gcd(i,__gcd(j,k));
    cout<<ans;
    r0;
}


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 <cstring>
using namespace std;
#define MAXH 101
#define MAXW 101
#define INF 1000
#define MAXN 100001

int N, M;

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

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


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

    printf("%lld\n", sum);
    
    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 int
int main()
{
	ll n;
	cin>>n;
	ll total=0;
	for(ll i=1;i<=n;i++){
		for(ll j=1;j<=n;j++){
			ll g=__gcd(i,j);
			for(ll k=1;k<=n;k++){
				ll temp=g;
				temp=g(k,temp);
				total+=temp;
			}
		}
	}
	cout<<total<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:39: error: 'g' cannot be used as a function
   14 |                                 temp=g(k,temp);
      |                                      ~^~~~~~~~
Language: C

#include <iostream>
using namespace std;

typedef long long ll;
int dp[201][201][201];

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

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

  int tmp;
  ll ans = 0L;
  for(int i=1;i<=l;i++){
    for(int j=i;j<=l;j++){
      for(int k=j;k<=l;k++){
        tmp = gcd(i, gcd(j,k));
        dp[i][j][k] = tmp;
        dp[i][k][j] = tmp;
        dp[j][i][k] = tmp;
        dp[j][k][i] = tmp;
        dp[k][i][j] = tmp;
        dp[k][j][i] = tmp;
      }
    }
  }

  for(int i=1;i<=l;i++){
    for(int j=1;j<=l;j++){
      for(int k=1;k<=l;k++){
        ans += dp[i][j][k];
      }
    }
  }

  cout << ans << 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;
int main() {
  int K;
  cin >> K;
  long 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(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

#pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#if __cplusplus >= 201103L
#include <chrono>
using namespace std::chrono;
#endif
using namespace std;
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define CASET int ___T; scanf("%d", &___T); for(int cs=1;cs<=___T;cs++)
#ifdef LOCAL
#define prln(x) (cout << #x << ' ' << x << endl)
#define pr(x) (cout << #x << ' ' << x << ' ' )
#define prv(x) (cout << x << ' ')
#else
#define prln(x) 
#define pr(x)
#define prv(x)
#endif
#define clr(x) memset((x), 0, sizeof((x)))
#define clr1(x) memset((x), -1, sizeof((x)))
#define endl "\n"
#define pi acos(-1)
#define rep(i, st, ed) for (int i = (st); i <= (ed); ++i)
#define rep0(i, st, ed) for (int i = (st); i < (ed); ++i)
#define per0(i, st, ed) for (int i = (st); i > ed; --i)
#define per(i, st, ed) for (int i = (st); i >= ed; --i)
#define chmin(a, b) (a = a > b ? b : a)
#define chmax(a, b) (a = a < b ? b : a)
template<class T> void _sf(T &x) {cin >> x;}
void _sf(int &x) {scanf("%d", &x);}
void _sf(ll &x) {scanf("%lld", &x);}
void _sf(double &x) {scanf("%lf", &x);}
void _sf(char &x) {scanf(" %c", &x);}
void _sf(char *x) {scanf("%s", x);}
void sf() {}
template <class T, class...U> void sf(T & head, U&... tail) { _sf(head); sf(tail...);}
template<class T> void _out(const T &x) { cout << x; }
void _out(const int &x) { printf("%d", x); }
void _out(const ll &x) { printf("%lld", x); }
void _out(const double &x) { printf("%.16f", x); }
void _out(const char &x) { putchar(x); }
void _out(const char *x) { printf("%s", x); }
template<class T,class U> void _out(const pair<T,U> &x) {_out(x.F); putchar(' '); _out(x.S);}
template<class T> void _out(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _out(*i++)) if (i != x.cbegin()) putchar(' '); }
void out() {}
template<class T, class... U> void out(const T &head, const U &... tail) { _out(head); putchar(sizeof...(tail) ? ' ' : '\n'); out(tail...); }
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;

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


int main(){
    #ifdef LOCAL
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    #endif
    int k = read();
    ll ans = 0;
    for (int a = 1; a <= k; ++a) {
        for (int b = 1; b <= k; ++b) {
            if (__gcd(a, b) == 1) {
                ans += k;
                continue;
            }
            for (int c = 1; c <= k; ++c) {
                // pr(a);pr(b);pr(c);
                int t =__gcd(a, __gcd(c, b)); 
                // prln(t);
                ans += t;
            }
        }
    }
    cout << ans << endl;
    return 0;
}

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

#include <sstream>
#include <fstream>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <list>
#include <map>
#include <unordered_map>
#include <functional>
#include <utility>
#include <bitset>
#include <cstdlib>
#include <ctime>
#include <cstdio>


#include <stdlib.h>
#include <iostream>
#include <chrono> //clock
#include <vector>
#include <string>
#include <iomanip>  //setprecision function
#include <cmath>	//math
#include <cstdio>
#include <vector>	//vector array
#include <algorithm>	//STL algorithm
#include <set> //STL library set
#include <sstream> // for stringstream


using namespace std;
using namespace std::chrono; 

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


int main() {
	stringstream ss;
	//ss<<"akhil";
	//cout<<ss.str()<<endl;
	cout<<setprecision(16);
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	
	 // TESTCASE KO DEKH KA BHAUT SARA CONDITION GENERATE MAT KRO 
	 // PAPER PD CONFIRM HO JAO THORA JADA TIME HI KYU NA LGA
	
	int K;
	cin>>K;
	int sum=0;
	for(int i=1;i<=K;i++){
		for(int j=1;j<=K;j++){
			for(int l=1;l<=K;l++){
				int tgcd=gcd(i,j);
				sum+=gcd(tgcd,l);
			}
		}
	}
		
	cout<<sum<<endl;
	return 0;
}





























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

//============================================================================
// Name        : template.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <algorithm>
#include <set>
#include <map>
#include <set>
#include <vector>
#include <string.h> // for memset in CF judge.
using namespace std;
#define _CRT_SECURE_NO_DEPRECATE // suppress some compilation warning messages (for VC++ users)
// Shortcuts for "common" data types in contests
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef set<int> si;
typedef map<string, int> msi;
// To simplify repetitions/loops, Note: define your loop style and stick with it!
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) // a to b, and variable i is local!
#define forn(i,n) \
for (int i =0; i<(n); i++)
#define TRvi(c, it) \
for (vi::iterator it = (c).begin(); it != (c).end(); it++)
#define TRvii(c, it) \
for (vii::iterator it = (c).begin(); it != (c).end(); it++)
#define TRmsi(c, it) \
for (msi::iterator it = (c).begin(); it != (c).end(); it++)
#define INF 2000000000 // 2 billion
// If you need to recall how to use memset:
#define MEMSET_INF 127 // about 2B
#define MEMSET_HALF_INF 63 // about 1B
//memset(dist, MEMSET_INF, sizeof dist); // useful to initialize shortest path distances
//memset(dp_memo, -1, sizeof dp_memo); // useful to initialize DP memoization table
//memset(arr, 0, sizeof arr); // useful to clear array of integers

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++) {
                  ll ans = __algo_gcd(__algo_gcd(j, k), __algo_gcd(j,i));
                  sum += ans;
            }
        }
    }
    cout << sum;
return 0;
}


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

#pragma GCC optimize("O3", "unroll-loops")
//#pragma GCC target("avx2")
#pragma optimize("fast-math")

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

using namespace std;
#define endl '\n'
#define ull unsigned long long
#define si short int
#define ll long long
#define ld long double
#define pb push_back
#define pii pair<int, int>
#define pdd pair<double, double>
#define pil pair<int, ll>
#define pli pair<ll, int>
#define pll pair<ll, ll>
#define piii pair<pair<int, int>, int>
#define all(vec) (vec).begin(), (vec).end()
#define piiii pair<pair<int, int>, pair<int, int>>


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

ll lcm(ll a, ll b) {
    return a / gcd(a, b) * b;
}

ll gcdex(ll a, ll b, ll &x, ll &y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    ll xx, yy;
    ll gc = gcdex(b, a % b, yy, xx);
    x = xx;
    y = yy - (a / b) * xx;
    return gc;
}

ll dp[300][300];

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

void testcases(int n) {
    n = 1 - n;
    if (!n) cin >> n;
    for (int i = 0; i < n; i++) {
        solve();
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    //freopen("C:\\Users\\Maximus\\CLionProjects\\Codeforces\\BestTeam\\output.txt", "r", stdin);
    //f=fopen("C:\\Users\\Maximus\\CLionProjects\\Codeforces\\BestTeam\\output.txt", "w");
    //freopen("C:\\Users\\Maximus\\CLionProjects\\Codeforces\\BestTeam\\output.txt", "w", stdout);

    unsigned int beg_time = clock();
    testcases(0);
    // 0 - no t, 1 - with t

    unsigned int end_time = clock();
    //cout << endl << endl << end_time - beg_time;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007

ll dep(ll a,ll b){
	if(b==0){
		return a;
	}
	dep(b,a%b);
	return a;
}
ll gcd (unsigned int n1, unsigned int n2) {
    return (n2 == 0) ? n1 : gcd (n2, n1 % n2);
}
int main() {
	ll n;
	cin>>n;
	ll ans=0;
	for(ll i=1;i<=n;i++){
		for(ll j=1;j<=n;j++){
			for(ll k=1;k<=n;k++){
				//cout << "k";
				ll now=gcd(max(k,j),min(k,j));
			//	cout << "k";
				ans+=gcd(max(now,i),min(now,i));
			}
		}
	}
	cout <<ans;
	// your code goes here
	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 <algorithm>
using namespace std;


long long int gcd(long long int a, long long int b){
  while (a && b){
    (a < b) ? b %= a : a %= b;
  }
  return a + b;
}

int main(){
  int K;
  cin >> K;
  vector<vector<vector<int>>> dp(201, vector<vector<int>>(201, vector<int>(201, 0)));
  long long int ans = 0;
  for(int a=1; a<=K; a++){
    for(int b=1; b<=K; b++){
      for(int c=1; c<=K; c++){
        vector<int> z = {a, b, c};
        sort(z.begin(), z.end());
        if(dp[z[0]][z[1]][z[2]]==0){
          dp[z[0]][z[1]][z[2]] = gcd(gcd(a, b), c);
        }
        ans += dp[z[0]][z[1]][z[2]];
      }
    }
  }
  cout << ans << 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 ld long double
#define mod 1000000007
#define f(i,a,b) for(ll i=a;i<b;i++)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ii pair<ll,ll>
#define vii vector<ii>
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define MAX 1e9
 
ll modpow(ll base, ll exp, ll modulus) {base %= modulus;ll result = 1;while (exp > 0) {if (exp & 1) result = (result * base) % modulus;base = (base * base) % modulus;exp >>= 1;}return result;}
const ld pi=acos(-1);


int main(){
    IOS;
    ll n;cin>>n;
    ll sum=0;
    f(i,1,n+1){
        f(j,1,n+1){
            ll gc=__gcd(i,j);
           // cout<<"gc"<<gc<<endl;
            f(k,1,n+1){
                ll x=__gcd(gc,k);
                //cout<<i<<" "<<j<<" "<<k<<" "<<x<<"\n";
                sum+=x;
            }
        }
    }
    cout<<sum;
    return 0;  
} 





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

#include <bits/stdc++.h>

#define endl '\n'

using namespace std;

int gcd(int a, int b) {
    if(b > a)
        return gcd(b, a);
    if(b == 0)
        return a;
    else
        return 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 k;
    long long sum = 0;
    cin >> k;
    for(int i = 1; i <= k; i++) {
        for(int j = 1; j <= k; j++) {
            for(int l = 1; l <= k; l++) {
                sum += gcd(i, j, l);
            }
        }
    }
    cout << sum << 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 ll long long int 
#define f first
#define s second
#define pb push_back
#define mod 1000000007
#define mp make_pair
#define fast 
#define f first
#define s second
#define endl "\n"
#define pie 3.1415926535

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






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

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

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

int main(){
  ll N, i, j, k, ans = 0;
  cin >> N;
  for (i = 1; i < N + 1; i++){
    for(j = 1; j < N + 1; j++){
      for(k = 1; k < N + 1; k++){
        ans += gcd(lcm(a, b), 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 <string>
using namespace std;
int gcd(int a, int b){
    if(b==0) return a;
    return gcd(b, a%b);
}
int main(){
    int n;
    cin >> n;
    long long sum=0;
    int i,j,k;
    for(i=1;i<=n;i++){
        for(j=1;j<=i;j++){
            for(k=1;k<=j;k++){
                int gcd1 = gcd(i,j);
                int gcd2 = gcd(gcd1,k);
                int mt = 1;
                if((j==i)&&(k==j)){
                    mt=1;
                }else if((j==i)||(k==j)){
                    mt=3;
                }else{
                    mt=6;
                }
                sum += mt * gcd2;
            }
        }
    }
    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;

int64_t gcd(int64_t a, int64_t b){
  int64_t buf;
  while(b > 0){
    buf= a;
    a= b;
    b= buf%b;
  }
  return a;
}

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

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

  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: 'k' was not declared in this scope
   21 |       for(int i=1; i<=K; k++){
      |                          ^
Language: C

#include <cstdio>
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <cmath>
#include <iomanip>
#include <deque>
#include <queue>
#include <unordered_map>
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;
ll intpow(ll N, ll P){
    if(P==0) return 1;
    if(P%2==0){
        ll t = intpow(N, P/2);
        return t*t;
    }
    return N * intpow(N, P-1);
}
ll modpow(ll N, ll P,ll k){
    if(P==0) return 1;
    if(P%2==0){
        ll t = modpow(N, P/2,k)%k;
        return t*t%k;
    }
    return N * modpow(N, P-1,k)%k;
}
ll modkai(ll n,ll m,ll k){//n*(n-1)*(n-2)*...(m+1)%k
    if(n == m)return 1;
    return modkai(n-1,m,k)*n%k;
}
ll mod_cnb(ll n,ll m,ll k){//nCm%k,kは十分大きい素数
  int m_=modkai(m,0,k);
  return modkai(n,n-m,k)*modpow(m_,k-2,k)%k;
}
ll gcd(ll n,ll m){
    ll n_ = max(n,m);
    ll m_ = min(n,m);
    if(n_%m_ == 0)return m_;
    return gcd(m_,n_%m_);
}
ll lcm(ll n,ll m){
    return n*m/gcd(n,m);
}
int main(){
    int n;cin>>n;
    ll sum=0;
    for(ll i=0;i<n;i++)sum+=i+1;
    for(ll i=0;i<n;i++){
        for(ll j=0;j<n;j++){
            if(i==j)continue;
            sum+=gcd(i+1,j+1)*3;
        }
    }
    for(ll i=1;i<=n;i++){
        for(ll j=i+1;j<=n;j++){
            for(ll k=j+1;k<=n;k++){
                sum+=gcd(i,gcd(j,k))*6;
            }
        }
    }
    cout<<sum<<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;

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

int main() {
  int K;
  cin >> K;
  long long ans=0;
  
  int A, B;
  for (int i=1; i<=K; i++){
    for (int j=1; j<=K; j++){
      for (int k=1; k<=K; k++){
        A = gcd(j,k);
        B = gcd(i,A);
        ans += B;
      }
    }
  }
  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>

using namespace std;
typedef long long ll;
typedef vector<ll> vl ;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;

#define rep(i,N) for(int i=0; i < (int)N; i++)
#define all(v) (v).begin(),(v).end()

const int INF = 100000002;
int gcd_2(int a, int b){
	if(b == 0) return a;
	return gcd_2(b, a%b);
}

int gcd_3(int a, int b, int c){
	int tmp = gcd_2(a, b);
	return gcd_2(tmp, c);
}

int main(){
	ll ans = 0;
	int k; cin >> k;
	for (int i=1; i<=k; i++){
		for (int j=1; j<=k; j++){
			for (int h=1; h<=k; h++){
				ans += gcd_3(i, j, h);
			}
		}
	}
	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<iomanip>
#include<string>
#include<queue>
#include<vector>
#include<algorithm>
#include<tuple>
#include<numeric>
#include<map>
#include<cmath>
#define ll long long
#define rep(i,n) for(int i=1;i<=(int) (n);i++)
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;}
using namespace std;
int main(){
  int n,val=0;
  cin>>n;
  rep(i,n){
    rep(j,n){
      int a=gcd(i,j);
      rep(k,n)val+=gcd(a,k);
    }
  }

  cout<<val;
  return 0;
}


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>
#include <math.h>

using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
using Graph = vector<vector<int>>;
typedef long long ll;
typedef pair<int, int> P;

const int MOD = 1000000007;
const int INF_32 = 1LL << 30;
const int64_t INF_64 = 1LL << 60;

// 最大公約数
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    else
        return gcd(b, a % b);
}

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

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

#include <bits/stdc++.h>
#include <string>
using namespace std;
#define ll long long
#define endl "\n"
#define print_array(name,n) for(ll o=0;o<n;o++) cout<<name[o]<<" "
#define fr(i,f,t) for(ll i=(f);i<t;i++)
#define fb(i,f,t) for(ll i=(f);i>=t;i--)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define inf 2e18
bool sortbysecond(const pair<int,int> &a,const pair<int,int> &b){
	return (a.ss>b.ss);
}
template <typename T>
string NumberTostring(T Number )
{
	ostringstream ss;
	ss<<Number;
	return ss.str();
}

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

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

    int k;
    cin>>k;

    ll sum = 0;

    for(int i=1;i<=k;i++){
    	for(int j=1;j<=k;j++){
    		for(int c=1;c<=k;c++){
    			sum += gcd(gcd(i,j),c);
    		}
    	}
    }
    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 <algorithm>
#include <cstdio>
#include <utility>
#include <vector>
using namespace std;

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

int main() {
  int n, ans = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      int g = gcd(i, j);
      for (int k = 1; k <= n; k++) {
        ans += gcd(g, k);
      }
    }
  }
  printf("%d\n", ans);
}

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

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

int yakusuu(int a, int b){
    int r, tmp;
    if(a < b){
        tmp = a;
        a = b;
        b = tmp;
    }
    r = a % b;
    while(r!=0){
        a = b;
        b = r;
        r = a % b;
    }

    return b;
}
int main(){

    int n, i, j, k;
    long int sum=0;
    cin >> n;

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

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


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

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

#include <vector>
#include <boost/integer/common_factor_rt.hpp>
using namespace std;
int main() {
  int K;
  cin >> K;
  vector<int> v(3);
  total=0;
  for(int c=1;c<k;c++){
  for(int b=1;b<k;b++){
  for(int a=1;a<k;a++){
    v[0] = a;
    v[1] = b;
    v[2] = c;
  	total+= boost::integer::gcd_range(v.begin(), v.end()).first;
  }
  cout << total << endl;
  return 0;
}

Compiler output:
a.cc:2:10: fatal error: boost/integer/common_factor_rt.hpp: No such file or directory
    2 | #include <boost/integer/common_factor_rt.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C

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

int main() {
  int k; cin >> k;
  long long int out = 0;
  for(int i = 1; i <= k; i++) out += i;
  for(int i = 1; i < k; i++){
    for(int j = i + 1; j <= k; j++){
      int ti = i, tj = j;
      while(tj % ti != 0){
        int tmp = tj;
        tj = ti;
        ti = tmp % ti;
      }
      out += 2 * ti;
    }
  }
  for(int i = 1; i < k - 1; i++){
    for(int j = i + 1; j < k; j++){
      for(int l = j + 1; l <= k; l++){
        int ti = i, tj = j, tl = l;
        while(tl % tj != 0){
          int tmp = tl;
          tl = tj;
          tj = tmp % tj;
        }
        if(tj < ti){
          int tmp = ti;
          ti = tj;
          tj = tmp;
        }
        while(tj % ti != 0){
          int tmp = tj;
          tj = ti;
          ti = tmp % ti;
        }
        out += 6 * ti;
      }
    }
  }
  cout << out;
}

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>

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

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

Compiler output:
main.c: In function 'main':
main.c:31:13: error: called object 'gcm' is not a function or function pointer
   31 |         gcm=gcm(i,j);
      |             ^~~
main.c:18:13: note: declared here
   18 |   long long gcm;
      |             ^~~
main.c:32:13: error: called object 'gcm' is not a function or function pointer
   32 |         gcm=gcm(gcm,k);
      |             ^~~
main.c:18:13: note: declared here
   18 |   long long gcm;
      |             ^~~
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
	int a=1,b=1,c=1;
	int i=1;
	int k;
	cin>>k;
	int sum;
	for (a=i; a<=k; a++){
   		for (b=i; b<=k; b++){
      		for (c=i; c<=k; c++){
          		sum+=__gcd(a,__gcd(b,c));
      		}
   		}
	}
	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;
long long gcd(int a,int b){ return b==0?a:gcd(b,a%b); }
int main(){
	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<<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> // cout, endl, cin
#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;

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

    return gcd(b, a % b);
}

void Main()
{
    int64_t K;
    cin >> K;
    
    int64_t result = 0;
    for(int64_t i = 1; i <= K; ++i)
    {
        for(int64_t j = 1; j <= K; ++j)
        {
            for(int64_t k = 1; k <= K; ++k)
            {
                result += gcd(gcd(i, j), k);
            }
        }
    }

    cout << result << endl;
}

int main()
{
    Main();
}


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

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

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

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


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

#include <bits/stdc++.h>
#include <stdio.h>
#include <math.h>
#include <cmath>
using namespace std;
#define vsort(vec) sort(vec.begin(), vec.end())
#define vreverse(vec) reverse(vec.begin(), vec.end())
using ll =long long;
using ull =unsigned long long;
const ll INF =1001001001;

//10億7。　　　100000007

//最大公約数
ll gcd(ll a, ll b){
   if (a%b==0){
       return(b);
   }else{
       return(gcd(b,a%b));
   }
}
//最小公倍数
ll lcm(ll a, ll b){
   return a*b/gcd(a,b);
}


int main(){
cout<<fixed<<setprecision(10);
//cin.tie(0); ios::sync_with_stdio(false);

int K;
  cin>>K;
  ll sum=0;
  for(int i=1;i<K+1;i++){
    for(int j=1;j<K+1;j++){
      for(int m=1;m<K+1;m++){
        sum+=gcd(i,gcd(j,m));
      }
    }
  }
  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.