Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
//typedef  long long ll;
using ll = long long;
using ld = long double;
using uint = unsigned int ;
using ull = unsigned long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 
#define endl "\n"
#define ioss ios::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define eb emplace_back
#define mp make_pair
//#define all(x) x.begin(),x.end();
//#define fi first
//#define se second
 
double startTime;
double getCurrentTime()
{
    return ((double)clock()-startTime)/CLOCKS_PER_SEC;
}
 
int gcd(int a,int b)
{
 if(a==1||b==1)return 1;
  else if(b==0)return a;
  else if(a==0)return b;
  else return gcd(b%a,a);
  
}

void solve()
{
	int n;cin>>n;int flag=0;ll ans=0;
 for(int i=1;i<n;i++)
 {
   for(int j=1;j<n;j++)
   {
     for(int k=1;k<n;k++)
     {#include <bits/stdc++.h>
using namespace std;


//typedef  long long ll;
using ll = long long;
using ld = long double;
using uint = unsigned int ;
using ull = unsigned long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define endl "\n"
#define ioss ios::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define eb emplace_back
#define mp make_pair
//#define all(x) x.begin(),x.end();
//#define fi first
//#define se second

double startTime;
double getCurrentTime()
{
    return ((double)clock()-startTime)/CLOCKS_PER_SEC;
}

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

}

void solve()
{
    int n;cin>>n;int flag=0;ll ans=0;
 for(int i=1;i<=n;i++)
 {
   for(int j=1;j<=n;j++)
   {
     for(int k=1;k<=n;k++)
     {
       int temp=gcd(i,j);
       temp=gcd(temp,k);
       ans=ans+temp;
     }
   }
 }
  cout<<ans<<endl;
}


int main()
{
    startTime=(double)clock();
    //freopen("input.txt","r",stdin);
    //freopen("output.txt,"w",stdout);

    ioss
    //int t;scanf("%d",&t);
   // while(t--)
            solve();
    return 0;
}

       int temp=gcd(i,j);
       temp=gcd(temp,k);
       ans=ans+temp;
     }
   }
 }
  cout<<ans<<endl;
}
 
 
int main()
{
    startTime=(double)clock();
    //freopen("input.txt","r",stdin);
    //freopen("output.txt,"w",stdout);
 
    ioss
    //int t;scanf("%d",&t);
   // while(t--) 
            solve();
 
    return 0;
}

Compiler output:
a.cc:44:7: error: stray '#' in program
   44 |      {#include <bits/stdc++.h>
      |       ^
a.cc: In function 'void solve()':
a.cc:44:8: error: 'include' was not declared in this scope
   44 |      {#include <bits/stdc++.h>
      |        ^~~~~~~
a.cc:44:17: error: 'bits' was not declared in this scope
   44 |      {#include <bits/stdc++.h>
      |                 ^~~~
a.cc:44:22: error: 'stdc' was not declared in this scope; did you mean 'std'?
   44 |      {#include <bits/stdc++.h>
      |                      ^~~~
      |                      std
a.cc:45:1: error: expected primary-expression before 'using'
   45 | using namespace std;
      | ^~~~~
a.cc:65:22: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   65 | double getCurrentTime()
      |                      ^~
a.cc:65:22: note: remove parentheses to default-initialize a variable
   65 | double getCurrentTime()
      |                      ^~
      |                      --
a.cc:65:22: note: or replace parentheses with braces to value-initialize a variable
a.cc:66:1: error: a function-definition is not allowed here before '{' token
   66 | {
      | ^
a.cc:71:1: error: a function-definition is not allowed here before '{' token
   71 | {
      | ^
a.cc:80:1: error: a function-definition is not allowed here before '{' token
   80 | {
      | ^
a.cc:98:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   98 | int main()
      |         ^~
a.cc:98:9: note: remove parentheses to default-initialize a variable
   98 | int main()
      |         ^~
      |         --
a.cc:98:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:99:1: error: a function-definition is not allowed here before '{' token
   99 | {
      | ^