結果

問題 No.369 足し間違い
ユーザー fmhrfmhr
提出日時 2016-06-24 02:32:13
言語 Go
(1.22.1)
結果
RE  
実行時間 -
コード長 397 bytes
コンパイル時間 11,279 ms
コンパイル使用メモリ 231,684 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-20 01:18:07
合計ジャッジ時間 12,045 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

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

func main() {
	var N, a, A, v int
	N = nextInt()
	for i:=0; i<N; i++{
		a = nextInt()
		A += a
	}
	v = nextInt()
	fmt.Println(A-v)
}

var s = bufio.NewScanner(os.Stdin)

func next() string {
	s.Split(bufio.ScanWords)
	s.Scan()
	return s.Text()
}

func nextInt() int {
	i, e := strconv.Atoi(next())
	if e != nil {
		panic(e)
	}
	return i
}
0