Language: C

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
)

var (
	readString func() string
)

func init() {
	readString = newReadString(os.Stdin)
}

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

func GCD(a, b, c int) int {
	return gcd(gcd(a, b), c)
}

func main() {
	n := readInt()

	res := 0
	for a := 1; a <= n; a++ {
		for b := 1; b <= n; b++ {
			for c := 1; c <= n; c++ {
				res = res + GCD(a, b, c)
			}
		}
	}

	fmt.Println(res)
}

/*-------------------inputs-------------------*/

func readInt() int {
	return int(readInt64())
}

func readInt64() int64 {
	i, err := strconv.ParseInt(readString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readf() float64 {
	f, err := strconv.ParseFloat(readString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

/*-------------------utilities-------------------*/

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func subL(list []int) []int {
	sl := make([]int, len(list)-1)
	for i := range list {
		if i == len(list)-1 {
			continue
		}
		sub := list[i+1] - list[i]
		sl[i] = sub
	}
	return sl
}


Compiler output:
main.c:1:1: error: unknown type name 'package'
    1 | package main
      | ^~~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    3 | import (
      | ^~~~~~
main.c:19:1: error: unknown type name 'func'
   19 | func gcd(a, b int) int {
      | ^~~~
main.c:19:14: error: expected ')' before 'int'
   19 | func gcd(a, b int) int {
      |              ^~~~
      |              )
main.c:26:1: error: unknown type name 'func'
   26 | func GCD(a, b, c int) int {
      | ^~~~
main.c:26:17: error: expected ')' before 'int'
   26 | func GCD(a, b, c int) int {
      |                 ^~~~
      |                 )
main.c:30:1: error: unknown type name 'func'
   30 | func main() {
      | ^~~~
main.c: In function 'main':
main.c:31:12: error: expected expression before '=' token
   31 |         n := readInt()
      |            ^
main.c:31:14: error: implicit declaration of function 'readInt' [-Wimplicit-function-declaration]
   31 |         n := readInt()
      |              ^~~~~~~
main.c:34:21: error: 'a' undeclared (first use in this function)
   34 |         for a := 1; a <= n; a++ {
      |                     ^
main.c:34:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:26: error: 'n' undeclared (first use in this function)
   34 |         for a := 1; a <= n; a++ {
      |                          ^
main.c:34:32: error: expected ';' before '{' token
   34 |         for a := 1; a <= n; a++ {
      |                                ^~
      |                                ;
main.c: At top level:
main.c:47:1: error: unknown type name 'func'
   47 | func readInt() int {
      | ^~~~
main.c: In function 'readInt':
main.c:47:20: error: expected identifier or '(' before '{' token
   47 | func readInt() int {
      |                    ^
main.c:51:1: error: unknown type name 'func'
   51 | func readInt64() int64 {
      | ^~~~
main.c:51:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int64'
   51 | func readInt64() int64 {
      |                  ^~~~~
main.c:59:1: error: unknown type name 'func'
   59 | func readf() float64 {
      | ^~~~
main.c:59:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'float64'
   59 | func readf() float64 {
      |              ^~~~~~~
main.c:67:1: error: unknown type name 'func'
   67 | func newReadString(ior io.Reader) func() string {
      | ^~~~
main.c:67:20: error: unknown type name 'ior'
   67 | func newReadString(ior io.Reader) func() string {
      |                    ^~~
main.c:82:1: error: unknown type name 'func'
   82 | func abs(x int) int {
      | ^~~~
main.c:82:10: error: unknown type name 'x'
   82 | func abs(x int) int {
      |          ^
main.c:89:1: error: unknown type name 'func'
   89 | func subL(list []int) []int {
      | ^~~~
main.c:89:11: error: unknown type name 'list'
   89 | func subL(list []int) []int {
      |           ^~~~
main.c:100: error: expected '{' at end of input