結果
問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
|
提出日時 | 2018-05-03 10:19:17 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 375 bytes |
コンパイル時間 | 15,206 ms |
コンパイル使用メモリ | 238,312 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 00:41:31 |
合計ジャッジ時間 | 13,213 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 4 WA * 11 |
ソースコード
package main import ( "bufio" "fmt" "math/big" "os" "strings" ) func main() { var n int64 sum := new(big.Int) fmt.Scan(&n) r := bufio.NewReader(os.Stdin) b, _, _ := r.ReadLine() ss := strings.Split(string(b), " ") for _, v := range ss { if len(v) < 1 { continue } x, _ := new(big.Int).SetString(v, 10) sum = sum.Add(sum, x) } fmt.Println(sum) }