Language: C

package main

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

var (
	readString func() string
)

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

func main() {
	n := readInt()

	var res int64
	for i := 1; i <= n; i++ {
		switch {
		case i%15 == 0:
			continue
		case i%3 == 0:
			continue
		case i%5 == 0:
			continue
		default:
			res = res + int64(i)
		}
	}

	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 main() {
      | ^~~~
main.c: In function 'main':
main.c:20:12: error: expected expression before '=' token
   20 |         n := readInt()
      |            ^
main.c:20:14: error: implicit declaration of function 'readInt' [-Wimplicit-function-declaration]
   20 |         n := readInt()
      |              ^~~~~~~
main.c:23:21: error: 'i' undeclared (first use in this function)
   23 |         for i := 1; i <= n; i++ {
      |                     ^
main.c:23:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:26: error: 'n' undeclared (first use in this function)
   23 |         for i := 1; i <= n; i++ {
      |                          ^
main.c:23:32: error: expected ';' before '{' token
   23 |         for i := 1; i <= n; i++ {
      |                                ^~
      |                                ;
main.c: At top level:
main.c:41:1: error: unknown type name 'func'
   41 | func readInt() int {
      | ^~~~
main.c: In function 'readInt':
main.c:41:20: error: expected identifier or '(' before '{' token
   41 | func readInt() int {
      |                    ^
main.c:45:1: error: unknown type name 'func'
   45 | func readInt64() int64 {
      | ^~~~
main.c:45:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int64'
   45 | func readInt64() int64 {
      |                  ^~~~~
main.c:53:1: error: unknown type name 'func'
   53 | func readf() float64 {
      | ^~~~
main.c:53:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'float64'
   53 | func readf() float64 {
      |              ^~~~~~~
main.c:61:1: error: unknown type name 'func'
   61 | func newReadString(ior io.Reader) func() string {
      | ^~~~
main.c:61:20: error: unknown type name 'ior'
   61 | func newReadString(ior io.Reader) func() string {
      |                    ^~~
main.c:76:1: error: unknown type name 'func'
   76 | func abs(x int) int {
      | ^~~~
main.c:76:10: error: unknown type name 'x'
   76 | func abs(x int) int {
      |          ^
main.c:83:1: error: unknown type name 'func'
   83 | func subL(list []int) []int {
      | ^~~~
main.c:83:11: error: unknown type name 'list'
   83 | func subL(list []int) []int {
      |           ^~~~
main.c:94: error: expected '{' at end of input