結果

問題 No.581 XOR
ユーザー tookunn_1213tookunn_1213
提出日時 2017-10-27 22:30:22
言語 Go
(1.22.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,293 bytes
コンパイル時間 11,379 ms
コンパイル使用メモリ 213,568 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-14 03:37:55
合計ジャッジ時間 12,101 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 2 ms
4,384 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
    "fmt"
    "os"
    "bufio"
    "bytes"
    "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()

	var A long = NextLong();
	var C long = NextLong();
	var B long = A^C;

	fmt.Println(B);
}
0