Language: C

package main

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

var DEBUG = true

func main() {
	defer Flush()

	R := readf()
	println(2 * R * math.Pi)
}

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte.  Trailing '\n' will not be included.
// See also comments on readb()
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

func dbgf(f string, args ...interface{}) {
	if !DEBUG {
		return
	}
	fmt.Fprintf(os.Stderr, f, args...)
}

func dbg(args ...interface{}) {
	if !DEBUG {
		return
	}
	fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Utilities

func sumSlice(a []int) int {
	var res int
	for _, v := range a {
		res += v
	}
	return res
}

func sumSlicell(a []int64) int64 {
	var res int64
	for _, v := range a {
		res += v
	}
	return res
}

func readInts(N int) (int, []int) {
	if N == 0 {
		N = readi()
	}
	a := make([]int, N)
	for i := range a {
		a[i] = readi()
	}
	return N, a
}

func readIntsll(N int) (int, []int64) {
	if N == 0 {
		N = readi()
	}
	a := make([]int64, N)
	for i := range a {
		a[i] = readll()
	}
	return N, a
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func minll(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

func minf(a, b float64) float64 {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func maxll(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}

func maxf(a, b float64) float64 {
	if a < b {
		return b
	}
	return a
}

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

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

func absf(a float64) float64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}


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:28:1: error: unknown type name 'var'
   28 | var nextToken func() ([]byte, error)
      | ^~~
main.c:28:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'func'
   28 | var nextToken func() ([]byte, error)
      |               ^~~~
main.c:47:1: error: unknown type name 'func'
   47 | func SetOutput(w io.Writer) {
      | ^~~~
main.c:47:16: error: unknown type name 'w'
   47 | func SetOutput(w io.Writer) {
      |                ^
main.c:53:1: error: unknown type name 'func'
   53 | func Flush() {
      | ^~~~
main.c: In function 'Flush':
main.c:54:12: error: expected '(' before 'OutputBuffer'
   54 |         if OutputBuffer != nil {
      |            ^~~~~~~~~~~~
      |            (
main.c:54:12: error: 'OutputBuffer' undeclared (first use in this function)
   54 |         if OutputBuffer != nil {
      |            ^~~~~~~~~~~~
main.c:54:12: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:60:1: error: unknown type name 'func'
   60 | func IsSpace(c byte) bool {
      | ^~~~
main.c:60:14: error: unknown type name 'c'
   60 | func IsSpace(c byte) bool {
      |              ^
main.c:68:1: error: unknown type name 'func'
   68 | func IsNewLine(c byte) bool {
      | ^~~~
main.c:68:16: error: unknown type name 'c'
   68 | func IsNewLine(c byte) bool {
      |                ^
main.c:77:1: error: unknown type name 'func'
   77 | func SetInput(r io.Reader) {
      | ^~~~
main.c:77:15: error: unknown type name 'r'
   77 | func SetInput(r io.Reader) {
      |               ^
main.c:127:1: error: unknown type name 'func'
  127 | func SetUnbefferedInput(r io.Reader) {
      | ^~~~
main.c:127:25: error: unknown type name 'r'
  127 | func SetUnbefferedInput(r io.Reader) {
      |                         ^
main.c:165:1: error: unknown type name 'func'
  165 | func readb() []byte {
      | ^~~~
main.c:165:6: error: 'readb' declared as function returning an array
  165 | func readb() []byte {
      |      ^~~~~
main.c: In function 'readb':
main.c:165:16: error: expected declaration specifiers before 'byte'
  165 | func readb() []byte {
      |                ^~~~
main.c:174:1: error: unknown type name 'func'
  174 | func reads() string {
      | ^~~~
main.c:174:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'string'
  174 | func reads() string {
      |              ^~~~~~
main.c:180:1: error: unknown type name 'func'
  180 | func readbln() []byte {
      | ^~~~
main.c:180:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'byte'
  180 | func readbln() []byte {
      |                  ^~~~
main.c:189:1: error: unknown type name 'func'
  189 | func readsln() string {
      | ^~~~
main.c:189:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'string'
  189 | func readsln() string {
      |                ^~~~~~
main.c:194:1: error: unknown type name 'func'
  194 | func readll() int64 {
      | ^~~~
main.c:194:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int64'
  194 | func readll() int64 {
      |               ^~~~~
main.c:203:1: error: unknown type name 'func'
  203 | func readi() int {
      | ^~~~
main.c:203:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
  203 | func readi() int {
      |              ^~~
main.c:208:1: error: unknown type name 'func'
  208 | func readf() float64 {
      | ^~~~
main.c:208:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'float64'
  208 | func readf() float64 {
      |              ^~~~~~~
main.c:217:1: error: unknown type name 'func'
  217 | func printf(f string, args ...interface{}) (int, error) {
      | ^~~~
main.c:217:13: error: unknown type name 'f'
  217 | func printf(f string, args ...interface{}) (int, error) {
      |             ^
main.c:217:23: error: unknown type name 'args'
  217 | func printf(f string, args ...interface{}) (int, error) {
      |                       ^~~~
main.c:222:1: error: unknown type name 'func'
  222 | func println(args ...interface{}) (int, error) {
      | ^~~~
main.c:222:18: error: expected ')' before '...' token
  222 | func println(args ...interface{}) (int, error) {
      |                  ^~~~
      |                  )
main.c:227:1: error: unknown type name 'func'
  227 | func eprintf(f string, args ...interface{}) (int, error) {
      | ^~~~
main.c:227:14: error: unknown type name 'f'
  227 | func eprintf(f string, args ...interface{}) (int, error) {
      |              ^
main.c:227:24: error: unknown type name 'args'
  227 | func eprintf(f string, args ...interface{}) (int, error) {
      |                        ^~~~
main.c:232:1: error: unknown type name 'func'
  232 | func eprintln(args ...interface{}) (int, error) {
      | ^~~~
main.c:232:19: error: expected ')' before '...' token
  232 | func eprintln(args ...interface{}) (int, error) {
      |                   ^~~~
      |                   )
main.c:236:1: error: unknown type name 'func'
  236 | func dbgf(f string, args ...interface{}) {
      | ^~~~
main.c:236:11: error: unknown type name 'f'
  236 | func dbgf(f string, args ...interface{}) {
      |           ^
main.c:236:21: error: unknown type name 'args'
  236 | func dbgf(f string, args ...interface{}) {
      |                     ^~~~
main.c:243:1: error: unknown type name 'func'
  243 | func dbg(args ...interface{}) {
      | ^~~~
main.c:243:14: error: expected ')' before '...' token
  243 | func dbg(args ...interface{}) {
      |              ^~~~
      |              )
main.c:254:1: error: unknown type name 'func'
  254 | func sumSlice(a []int) int {
      | ^~~~
main.c:254:15: error: unknown type name 'a'
  254 | func sumSlice(a []int) int {
      |               ^
main.c:262:1: error: unknown type name 'func'
  262 | func sumSlicell(a []int64) int64 {
      | ^~~~
main.c:262:17: error: unknown type name 'a'
  262 | func sumSlicell(a []int64) int64 {
      |                 ^
main.c:270:1: error: unknown type name 'func'
  270 | func readInts(N int) (int, []int) {
      | ^~~~
main.c:270:15: error: unknown type name 'N'
  270 | func readInts(N int) (int, []int) {
      |               ^
main.c:281:1: error: unknown type name 'func'
  281 | func readIntsll(N int) (int, []int64) {
      | ^~~~
main.c:281:17: error: unknown type name 'N'
  281 | func readIntsll(N int) (int, []int64) {
      |                 ^
main.c:298:12: error: expected ')' before '=' token
  298 |         INF  = 1000000007
      |            ^ ~
      |            )
main.c:310:1: error: unknown type name 'func'
  310 | func minll(a, b int64) int64 {
      | ^~~~
main.c:310:16: error: expected ')' before 'int64'
  310 | func minll(a, b int64) int64 {
      |                ^~~~~~
      |                )
main.c:317:1: error: unknown type name 'func'
  317 | func minf(a, b float64) float64 {
      | ^~~~
main.c:317:15: error: expected ')' before 'float64'
  317 | func minf(a, b float64) float64 {
      |               ^~~~~~~~
      |               )
main.c:324:1: error: unknown type name 'func'
  324 | func max(a, b int) int {
      | ^~~~
main.c:324:14: error: expected ')' before 'int'
  324 | func max(a, b int) int {
      |              ^~~~
      |              )
main.c:331:1: error: unknown type name 'func'
  331 | func maxll(a, b int64) int64 {
      | ^~~~
main.c:331:16: error: expected ')' before 'int64'
  331 | func maxll(a, b int64) int64 {
      |                ^~~~~~
      |                )
main.c:338:1: error: unknown type name 'func'
  338 | func maxf(a, b float64) float64 {
      | ^~~~
main.c:338:15: error: expected ')' before 'float64'
  338 | func maxf(a, b float64) float64 {
      |               ^~~~~~~~
      |               )
main.c:345:1: error: unknown type name 'func'
  345 | func abs(a int) int {
      | ^~~~
main.c:345:10: error: unknown type name 'a'
  345 | func abs(a int) int {
      |          ^
main.c:352:1: error: unknown type name 'func'
  352 | func absll(a int64) int64 {
      | ^~~~
main.c:352:12: error: unknown type name 'a'
  352 | func absll(a int64) int64 {
      |            ^
main.c:359:1: error: unknown type name 'func'
  359 | func absf(a float64) float64 {
      | ^~~~
main.c:359:11: error: unknown type name 'a'
  359 | func absf(a float64) float64 {
      |           ^
main.c:369:1: error: unknown type name 'func'
  369 | func egcd(a, b int) (int, int, int) {
      | ^~~~
main.c:369:15: error: expected ')' before 'int'
  369 | func egcd(a, b int) (int, int, int) {
      |               ^~~~
      |               )
main.c:377:1: error: unknown type name 'func'
  377 | func egcdll(a, b int64) (int64, int64, int64) {
      | ^~~~
main.c:377:17: error: expected ')' before 'int64'
  377 | func egcdll(a, b int64) (int64, int64, int64) {
      |                 ^~~~~~
      |                 )
main.c:385:1: error: unknown type name 'func'
  385 | func gcd(a, b int) int {
      | ^~~~
main.c:385:14: error: expected ')' before 'int'
  385 | func gcd(a, b int) int {
      |              ^~~~
      |              )
main.c:390:1: error: unknown type name 'func'
  390 | func gcdll(a, b int64) int64 {
      | ^~~~
main.c:390:16: error: expected ')' before 'int64'
  390 | func gcdll(a, b int64) int64 {
      |                ^~~~~~
      |                )
main.c:396:1: error: unknown type name 'func'
  396 | func init() {
      | ^~~~
main.c:396:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
  396 | func init() {
      |             ^
main.c:404: error: expected '{' at end of input