結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー tookunn_1213tookunn_1213
提出日時 2017-06-10 22:41:05
言語 Go
(1.22.1)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 1,288 bytes
コンパイル時間 16,540 ms
コンパイル使用メモリ 224,060 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-24 20:36:21
合計ジャッジ時間 15,231 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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