Language: C++

// ProblemURL : https://atcoder.jp/contests/abc070/tasks/abc070_c
// ---------------------------------------------
package main

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

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}
func larger(a, b int) int {
	if a > b {
		return a
	}
	return b
}
func smaller(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func largest(a, b, c int) (lgst int) {
	if a > b {
		lgst = a
	} else {
		lgst = b
	}
	if c > lgst {
		lgst = c
	}
	return
}
func smallerst(a, b, c int) (slst int) {
	if a < b {
		slst = a
	} else {
		slst = b
	}
	if c < slst {
		slst = c
	}
	return
}
func max(a []int) (idx, val int) {
	if len(a) == 0 {
		panic("func max: argument slice length must not be zero")
	}
	val = a[0]
	for i, aa := range a {
		if aa > val {
			idx, val = i, aa
		}
	}
	return
}
func min(a []int) (idx, val int) {
	if len(a) == 0 {
		panic("func min: argument slice length must not be zero")
	}
	val = a[0]
	for i, aa := range a {
		if aa < val {
			idx, val = i, aa
		}
	}
	return
}
func sum(a []int) int {
	res := 0
	for _, v := range a {
		res += v
	}
	return res
}
func isEven(n int) bool            { return n&1 == 0 }
func isOdd(n int) bool             { return n&1 == 1 }
func swap(a int, b int) (int, int) { return b, a }
func calcMod(n int) int            { return n % mod }
func sigma(x int) int              { return x * (x + 1) / 2 }
func powInt(a, b int) int          { return int(math.Pow(float64(a), float64(b))) }
func ceil(x float64) int           { return int(math.Ceil(x)) }
func intsCopy(a []int) []int       { return append([]int(nil), a...) }
func intsClear(a []int) []int      { return a[:0] }
func intsReverse(a []int) {
	for i, j := 0, len(a)-1; i < j; i, j = i+1, j-1 {
		a[i], a[j] = a[j], a[i]
	}
	return
}
func fill(a []int, val int) {
	for i := 0; i < len(a); i++ {
		a[i] = val
	}
	return
}
func intsPeekBack(a []int) int {
	if len(a) == 0 {
		panic("func peekBack: zero length slice")
	}
	return a[len(a)-1]
}
func intsPeekFront(a []int) int {
	if len(a) == 0 {
		panic("func peekFront: zero length slice")
	}
	return a[0]
}
func intsPopBack(a []int) (int, []int) {
	if len(a) == 0 {
		panic("func popBack: zero length slice")
	}
	return a[len(a)-1], a[:len(a)-1]
}
func intsPopFront(a []int) (int, []int) {
	if len(a) == 0 {
		panic("func popFront: zero length slice")
	}
	return a[0], a[1:]
}
func intsPushBack(a []int, x int) []int  { return append(a, x) }
func intsPushFront(a []int, x int) []int { return append([]int{x}, a...) }
func gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic("the args of gcd() must be positive number")
	}
	for b != 0 {
		a, b = b, a%b
	}
	return a
}
func lcm(a, b int) int { return a / gcd(a, b) * b }
func lcmOfSlice(a []int) int {
	l := a[0]
	for i := 1; i < len(a); i++ {
		l = lcm(l, a[i])
	}
	return l
}

var (
	sc = bufio.NewScanner(os.Stdin)
	bw = bufio.NewWriter(os.Stdout)
)

func init() {}
func ru() (n int) {
	sc.Scan()
	if err := sc.Err(); err != nil {
		panic(err)
	}
	for _, v := range sc.Bytes() {
		n = n*10 + int(v-48)
	}
	return
}
func ri() (n int) {
	sc.Scan()
	if err := sc.Err(); err != nil {
		panic(err)
	}
	b := sc.Bytes()
	neg := false
	if b[0] == 45 {
		neg = true
	}
	for _, v := range b {
		n = n*10 + int(v-48)
	}
	if neg {
		n = -n
	}
	return
}
func ri64() (n int64) {
	sc.Scan()
	if err := sc.Err(); err != nil {
		panic(err)
	}
	b := sc.Bytes()
	neg := false
	if b[0] == 45 {
		neg = true
	}
	for _, v := range b {
		n = n*10 + int64(v-48)
	}
	if neg {
		n = -n
	}
	return
}
func rf() float64 {
	sc.Scan()
	if err := sc.Err(); err != nil {
		panic(err)
	}
	f, err := strconv.ParseFloat(sc.Text(), 64)
	if err != nil {
		panic(err)
	}
	return f
}
func rs() string {
	sc.Scan()
	if err := sc.Err(); err != nil {
		panic(err)
	}
	return sc.Text()
}
func rb() []byte {
	sc.Scan()
	if err := sc.Err(); err != nil {
		panic(err)
	}
	return sc.Bytes()
}
func rr() []rune {
	sc.Scan()
	if err := sc.Err(); err != nil {
		panic(err)
	}
	return []rune(sc.Text())
}
func ris(n int) []int {
	s := make([]int, n)
	for i := range s {
		s[i] = ri()
	}
	return s
}
func ri64s(n int) []int64 {
	s := make([]int64, n)
	for i := range s {
		s[i] = ri64()
	}
	return s
}
func pf(format string, a ...interface{}) {
	if _, err := fmt.Fprintf(bw, format, a...); err != nil {
		panic(err)
	}
}
func pln(a ...interface{}) {
	if _, err := fmt.Fprintln(bw, a...); err != nil {
		panic(err)
	}
}
func pall(a []int) {
	for _, v := range a {
		fmt.Fprintln(bw, v)
	}
}
func pallol(a []int) {
	s := fmt.Sprint(a)
	if _, err := fmt.Fprintln(bw, s[1:len(s)-1]); err != nil {
		panic(err)
	}
}
func dbg(a ...interface{}) {
	if _, err := fmt.Fprintln(os.Stderr, a...); err != nil {
		panic(err)
	}
}
func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1e7), 1e7)
	solve()
	bw.Flush()
}

const (
	// maxInt64  = 9223372036854775807  // 9e18
	// maxInt32  = 2147483647           // 2e9
	// maxUint64 = 18446744073709551615 // 1e19
	inf = 1 << 60
	mod = 1e9 + 7
)

type pair struct{ a, b int }
type point struct{ x, y int }

func solve() {
	pln(lcmOfSlice(ris(ri())))
}


Compiler output:
a.cc:3:1: error: 'package' does not name a type
    3 | package main
      | ^~~~~~~
a.cc:19:1: error: 'func' does not name a type
   19 | func larger(a, b int) int {
      | ^~~~
a.cc:25:1: error: 'func' does not name a type
   25 | func smaller(a, b int) int {
      | ^~~~
a.cc:31:1: error: 'func' does not name a type
   31 | func largest(a, b, c int) (lgst int) {
      | ^~~~
a.cc:42:1: error: 'func' does not name a type
   42 | func smallerst(a, b, c int) (slst int) {
      | ^~~~
a.cc:53:1: error: 'func' does not name a type
   53 | func max(a []int) (idx, val int) {
      | ^~~~
a.cc:65:1: error: 'func' does not name a type
   65 | func min(a []int) (idx, val int) {
      | ^~~~
a.cc:77:1: error: 'func' does not name a type
   77 | func sum(a []int) int {
      | ^~~~
a.cc:84:1: error: 'func' does not name a type
   84 | func isEven(n int) bool            { return n&1 == 0 }
      | ^~~~
a.cc:85:1: error: 'func' does not name a type
   85 | func isOdd(n int) bool             { return n&1 == 1 }
      | ^~~~
a.cc:86:1: error: 'func' does not name a type
   86 | func swap(a int, b int) (int, int) { return b, a }
      | ^~~~
a.cc:87:1: error: 'func' does not name a type
   87 | func calcMod(n int) int            { return n % mod }
      | ^~~~
a.cc:88:1: error: 'func' does not name a type
   88 | func sigma(x int) int              { return x * (x + 1) / 2 }
      | ^~~~
a.cc:89:1: error: 'func' does not name a type
   89 | func powInt(a, b int) int          { return int(math.Pow(float64(a), float64(b))) }
      | ^~~~
a.cc:90:1: error: 'func' does not name a type
   90 | func ceil(x float64) int           { return int(math.Ceil(x)) }
      | ^~~~
a.cc:91:1: error: 'func' does not name a type
   91 | func intsCopy(a []int) []int       { return append([]int(nil), a...) }
      | ^~~~
a.cc:92:1: error: 'func' does not name a type
   92 | func intsClear(a []int) []int      { return a[:0] }
      | ^~~~
a.cc:93:1: error: 'func' does not name a type
   93 | func intsReverse(a []int) {
      | ^~~~
a.cc:99:1: error: 'func' does not name a type
   99 | func fill(a []int, val int) {
      | ^~~~
a.cc:105:1: error: 'func' does not name a type
  105 | func intsPeekBack(a []int) int {
      | ^~~~
a.cc:111:1: error: 'func' does not name a type
  111 | func intsPeekFront(a []int) int {
      | ^~~~
a.cc:117:1: error: 'func' does not name a type
  117 | func intsPopBack(a []int) (int, []int) {
      | ^~~~
a.cc:123:1: error: 'func' does not name a type
  123 | func intsPopFront(a []int) (int, []int) {
      | ^~~~
a.cc:129:1: error: 'func' does not name a type
  129 | func intsPushBack(a []int, x int) []int  { return append(a, x) }
      | ^~~~
a.cc:130:1: error: 'func' does not name a type
  130 | func intsPushFront(a []int, x int) []int { return append([]int{x}, a...) }
      | ^~~~
a.cc:131:1: error: 'func' does not name a type
  131 | func gcd(a, b int) int {
      | ^~~~
a.cc:140:1: error: 'func' does not name a type
  140 | func lcm(a, b int) int { return a / gcd(a, b) * b }
      | ^~~~
a.cc:141:1: error: 'func' does not name a type
  141 | func lcmOfSlice(a []int) int {
      | ^~~~
a.cc:149:5: error: expected constructor, destructor, or type conversion before '(' token
  149 | var (
      |     ^
a.cc:155:1: error: 'func' does not name a type
  155 | func ru() (n int) {
      | ^~~~
a.cc:165:1: error: 'func' does not name a type
  165 | func ri() (n int) {
      | ^~~~
a.cc:183:1: error: 'func' does not name a type
  183 | func ri64() (n int64) {
      | ^~~~
a.cc:201:1: error: 'func' does not name a type
  201 | func rf() float64 {
      | ^~~~
a.cc:212:1: error: 'func' does not name a type
  212 | func rs() string {
      | ^~~~
a.cc:219:1: error: 'func' does not name a type
  219 | func rb() []byte {
      | ^~~~
a.cc:226:1: error: 'func' does not name a type
  226 | func rr() []rune {
      | ^~~~
a.cc:233:1: error: 'func' does not name a type
  233 | func ris(n int) []int {
      | ^~~~
a.cc:240:1: error: 'func' does not name a type
  240 | func ri64s(n int) []int64 {
      | ^~~~
a.cc:247:1: error: 'func' does not name a type
  247 | func pf(format string, a ...interface{}) {
      | ^~~~
a.cc:247:40: error: expected unqualified-id before ')' token
  247 | func pf(format string, a ...interface{}) {
      |                                        ^
a.cc:252:1: error: 'func' does not name a type
  252 | func pln(a ...interface{}) {
      | ^~~~
a.cc:252:26: error: expected unqualified-id before ')' token
  252 | func pln(a ...interface{}) {
      |                          ^
a.cc:257:1: error: 'func' does not name a type
  257 | func pall(a []int) {
      | ^~~~
a.cc:262:1: error: 'func' does not name a type
  262 | func pallol(a []int) {
      | ^~~~
a.cc:268:1: error: 'func' does not name a type
  268 | func dbg(a ...interface{}) {
      | ^~~~
a.cc:268:26: error: expected unqualified-id before ')' token
  268 | func dbg(a ...interface{}) {
      |                          ^
a.cc:273:1: error: 'func' does not name a type
  273 | func main() {
      | ^~~~
a.cc:284:12: error: expected ')' before '=' token
  284 |         inf = 1 << 60
      |            ^~
      |            )
a.cc:280:7: note: to match this '('
  280 | const (
      |       ^
a.cc:289:1: error: 'type' does not name a type; did you mean 'typeof'?
  289 | type point struct{ x, y int }
      | ^~~~
      | typeof
a.cc:291:1: error: 'func' does not name a type
  291 | func solve() {
      | ^~~~