Language: C++

#include <bits/stdc++.h>                                                                                                                                                                            using namespace std;                                                                                                                                                                                int dp[201][201];                                                                                                                                                                                                                                                                                     void build() {                                                                                        for (int i=1; i<=200; i++)                                                                            for (int j=i+1; j<=199; j++)                                                                              dp[i][j] = __gcd(i,j);                                                            }                                                                                                                                                                                                                                                                                                     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 h=1; h<=k; h++) {                                                                            int a = i;                                                                                        int b = j;                                                                                        int c = h;                                                                                                                                                                                          int x = dp[max(a,b)][min(a,b)];                                                                   int y = dp[max(x,c)][min(x,c)];                                                                                                                                                                     ans = ans + y;                                                                                }                                                                                         cout << ans << endl;                                                                          }                                                              

Compiler output:
a.cc:1:197: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h>                                                                                                                                                                            using namespace std;                                                                                                                                                                                int dp[201][201];                                                                                                                                                                                                                                                                                     void build() {                                                                                        for (int i=1; i<=200; i++)                                                                            for (int j=i+1; j<=199; j++)                                                                              dp[i][j] = __gcd(i,j);                                                            }                                                                                                                                                                                                                                                                                                     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 h=1; h<=k; h++) {                                                                            int a = i;                                                                                        int b = j;                                                                                        int c = h;                                                                                                                                                                                          int x = dp[max(a,b)][min(a,b)];                                                                   int y = dp[max(x,c)][min(x,c)];                                                                                                                                                                     ans = ans + y;                                                                                }                                                                                         cout << ans << endl;                                                                          }
      |                                                                                                                                                                                                     ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status