Language: C

package main

import (
	"bufio"
	"fmt"
	"log"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)
var buff []byte

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(buff, bufio.MaxScanTokenSize*1024)
	log.SetFlags(log.Lshortfile)
}

func main() {
	n := nextInt()
	m := nextInt()
	a := nextInts(m)
	fmt.Println(n - sum(a))
}

func nextString() string {
	sc.Scan()
	return sc.Text()
}

func nextFloat64() float64 {
	sc.Scan()
	f, err := strconv.ParseFloat(sc.Text(), 64)
	if err != nil {
		panic(err)
	}
	return f
}

func nextInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func nextInts(n int) (r []int) {
	r = make([]int, n)
	for i := 0; i < n; i++ {
		r[i] = nextInt()
	}
	return r
}

var dy = []int{0, 1, 0, -1}
var dx = []int{1, 0, -1, 0}
var MAX = math.MaxInt32

func pow(a, b int) int {
	return int(math.Pow(float64(a), float64(b)))
}

func lcm(a, b int) int {
	return a * b / gcd(a, b)
}
func gcd(a, b int) int {
	if a < b {
		a, b = b, a
	}
	for b != 0 {
		a, b = b, a%b
	}
	return a
}
func max(a ...int) int {
	r := a[0]
	for i := 0; i < len(a); i++ {
		if r < a[i] {
			r = a[i]
		}
	}
	return r
}
func min(a ...int) int {
	r := a[0]
	for i := 0; i < len(a); i++ {
		if r > a[i] {
			r = a[i]
		}
	}
	return r
}
func sum(a []int) (r int) {
	for i := range a {
		r += a[i]
	}
	return r
}
func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

type Pair struct {
	a, b int
}

type Pairs []Pair

func (p Pairs) Len() int {
	return len(p)
}
func (p Pairs) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func (p Pairs) Less(i, j int) bool {
	if p[i].a == p[j].a {
		return p[i].b < p[j].b
	}
	return p[i].a < p[j].a
}


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:21:1: error: unknown type name 'func'
   21 | func main() {
      | ^~~~
main.c: In function 'main':
main.c:22:12: error: expected expression before '=' token
   22 |         n := nextInt()
      |            ^
main.c:22:14: error: implicit declaration of function 'nextInt' [-Wimplicit-function-declaration]
   22 |         n := nextInt()
      |              ^~~~~~~
main.c: At top level:
main.c:28:1: error: unknown type name 'func'
   28 | func nextString() string {
      | ^~~~
main.c: In function 'nextString':
main.c:28:19: error: expected declaration specifiers before 'string'
   28 | func nextString() string {
      |                   ^~~~~~
main.c:33:1: error: unknown type name 'func'
   33 | func nextFloat64() float64 {
      | ^~~~
main.c:33:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'float64'
   33 | func nextFloat64() float64 {
      |                    ^~~~~~~
main.c:42:1: error: unknown type name 'func'
   42 | func nextInt() int {
      | ^~~~
main.c:42:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
   42 | func nextInt() int {
      |                ^~~
main.c:51:1: error: unknown type name 'func'
   51 | func nextInts(n int) (r []int) {
      | ^~~~
main.c:51:15: error: unknown type name 'n'
   51 | func nextInts(n int) (r []int) {
      |               ^
main.c:59:1: error: unknown type name 'var'
   59 | var dy = []int{0, 1, 0, -1}
      | ^~~
main.c:59:1: error: parameter 'dy' is initialized
main.c:59:10: error: expected expression before '[' token
   59 | var dy = []int{0, 1, 0, -1}
      |          ^
main.c:60:1: error: unknown type name 'var'
   60 | var dx = []int{1, 0, -1, 0}
      | ^~~
main.c:60:1: error: parameter 'dx' is initialized
main.c:60:10: error: expected expression before '[' token
   60 | var dx = []int{1, 0, -1, 0}
      |          ^
main.c:61:1: error: unknown type name 'var'
   61 | var MAX = math.MaxInt32
      | ^~~
main.c:61:1: error: parameter 'MAX' is initialized
main.c:61:11: error: 'math' undeclared (first use in this function)
   61 | var MAX = math.MaxInt32
      |           ^~~~
main.c:61:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:63:1: error: expected ',' or ';' before 'func'
   63 | func pow(a, b int) int {
      | ^~~~
main.c:67:1: error: unknown type name 'func'
   67 | func lcm(a, b int) int {
      | ^~~~
main.c:67:14: error: expected ')' before 'int'
   67 | func lcm(a, b int) int {
      |              ^~~~
      |              )
main.c:70:1: error: unknown type name 'func'
   70 | func gcd(a, b int) int {
      | ^~~~
main.c:70:14: error: expected ')' before 'int'
   70 | func gcd(a, b int) int {
      |              ^~~~
      |              )
main.c:79:1: error: unknown type name 'func'
   79 | func max(a ...int) int {
      | ^~~~
main.c:79:11: error: expected ')' before '...' token
   79 | func max(a ...int) int {
      |           ^~~~
      |           )
main.c:88:1: error: unknown type name 'func'
   88 | func min(a ...int) int {
      | ^~~~
main.c:88:11: error: expected ')' before '...' token
   88 | func min(a ...int) int {
      |           ^~~~
      |           )
main.c:97:1: error: unknown type name 'func'
   97 | func sum(a []int) (r int) {
      | ^~~~
main.c:97:10: error: unknown type name 'a'
   97 | func sum(a []int) (r int) {
      |          ^
main.c:103:1: error: unknown type name 'func'
  103 | func abs(a int) int {
      | ^~~~
main.c:103:10: error: unknown type name 'a'
  103 | func abs(a int) int {
      |          ^
main.c:110:1: error: unknown type name 'type'; did you mean 'typeof'?
  110 | type Pair struct {
      | ^~~~
      | typeof
main.c:110:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct'
  110 | type Pair struct {
      |           ^~~~~~
main.c:114:1: error: unknown type name 'type'; did you mean 'typeof'?
  114 | type Pairs []Pair
      | ^~~~
      | typeof
main.c:114:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Pair'
  114 | type Pairs []Pair
      |              ^~~~
main.c:119:1: error: expected declaration specifiers before 'func'
  119 | func (p Pairs) Swap(i, j int) {
      | ^~~~
main.c:123:1: error: expected declaration specifiers before 'func'
  123 | func (p Pairs) Less(i, j int) bool {
      | ^~~~
main.c:61:5: error: declaration for parameter 'MAX' but no such parameter
   61 | var MAX = math.MaxInt32
      |     ^~~
main.c:60:5: error: declaration for parameter 'dx' but no such parameter
   60 | var dx = []int{1, 0, -1, 0}
      |     ^~
main.c:59:5: error: declaration for parameter 'dy' but no such parameter
   59 | var dy = []int{0, 1, 0, -1}
      |     ^~
main.c:129: error: expected '{' at end of input