結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー tookunn_1213
提出日時 2017-06-10 22:41:05
言語 Go
(1.26.1)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 1,288 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 12,903 ms
コンパイル使用メモリ 273,904 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2026-04-11 19:06:16
合計ジャッジ時間 13,525 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

import "fmt"
import "os"
import "bufio"
import "bytes"
import "strconv"

const NEW_LINE byte = 10
const SPACE string = " "

type long int64
type float float32
type double float64

var reader *bufio.Reader
var buffer[][]byte
var pointer int

func InitReader() {
    reader = bufio.NewReaderSize(os.Stdin,4096)
}

func ReadLine() []byte {
    retBytes,_ := reader.ReadBytes(NEW_LINE)
    return retBytes
}

func Next() string {
    if pointer < len(buffer) {
        ret := buffer[pointer]
        pointer++
        return string(ret)
    }

    bs := ReadLine()
    bs = bs[0:len(bs)-1]
    buffer = bytes.Split(bs,[]byte(SPACE))
    pointer = 0
    return Next()
}

func NextLine() string {
    b := ReadLine()
    return string(bytes.TrimSpace(b))
}

func NextInt() int {
    s := Next()
    i,_ := strconv.ParseInt(s,10,32)
    return int(i)
}

func NextLong() long {
    s := Next()
    l,_ := strconv.ParseInt(s,10,64)
    return long(l)
}

func NextFloat() float {
    s := Next()
    f,_ := strconv.ParseFloat(s,32)
    return float(f)
}

func NextDouble() double {
    s := Next()
    d,_ := strconv.ParseFloat(s,64)
    return double(d)
}

func main() {
    InitReader()

    A := NextInt()
    B := NextInt()
    S := Next()

    N := A + B


    fmt.Println(N,S)
}
0