結果
| 問題 |
No.289 数字を全て足そう
|
| コンテスト | |
| ユーザー |
tsuchinaga
|
| 提出日時 | 2019-02-19 08:32:45 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 1,000 ms |
| コード長 | 227 bytes |
| コンパイル時間 | 11,157 ms |
| コンパイル使用メモリ | 234,428 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-10 21:26:10 |
| 合計ジャッジ時間 | 11,947 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
package main
import (
"fmt"
"strconv"
)
func main() {
var s string
_, _ = fmt.Scan(&s)
total := 0
for _, c := range s {
n, err := strconv.Atoi(string(c))
if err == nil {
total += n
}
}
fmt.Println(total)
}
tsuchinaga