結果
問題 |
No.369 足し間違い
|
ユーザー |
![]() |
提出日時 | 2016-06-24 02:32:13 |
言語 | Go (1.23.4) |
結果 |
RE
|
実行時間 | - |
コード長 | 397 bytes |
コンパイル時間 | 11,859 ms |
コンパイル使用メモリ | 233,672 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 20:06:40 |
合計ジャッジ時間 | 12,650 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 5 |
ソースコード
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 }