結果
| 問題 | No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用) |
| ユーザー |
|
| 提出日時 | 2018-10-24 07:41:12 |
| 言語 | Go (1.27.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 12 ms / 2,000 ms |
| + 534µs | |
| コード長 | 667 bytes |
| 記録 | |
| コンパイル時間 | 9,889 ms |
| コンパイル使用メモリ | 264,516 KB |
| 実行使用メモリ | 9,872 KB |
| 最終ジャッジ日時 | 2026-09-26 12:41:13 |
| 合計ジャッジ時間 | 11,921 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 15 |
ソースコード
package main
import (
"fmt"
"os"
"bufio"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
func main() {
sc.Split(bufio.ScanWords)
// code goes here
n := nextInt()
total := int64(0)
for i := int64(0); i < n; i += 1 {
total += nextInt()
}
fmt.Println(total)
}
func nextInt() int64 {
sc.Scan()
v, e := strconv.ParseInt(sc.Text(), 10, 64)
if e != nil {
panic(e)
}
return v
}
func nextString() string {
sc.Scan()
return sc.Text()
}
func nextFloat() float64 {
sc.Scan()
v, e := strconv.ParseFloat(sc.Text(), 64)
if e != nil {
panic(e)
}
return v
}