結果

問題 No.656 ゴルフ
コンテスト
ユーザー tsuchinaga
提出日時 2019-02-19 17:47:06
言語 Go
(1.26.1)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 236 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 20,187 ms
コンパイル使用メモリ 283,712 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-29 11:04:29
合計ジャッジ時間 13,330 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

import (
	"fmt"
	"strconv"
)

func main() {
	var s string
	_, _ = fmt.Scan(&s)

	total := 0
	for _, c := range s {
		n, _ := strconv.Atoi(string(c))

		total += n
		if n == 0 {
			total += 10
		}
	}

	fmt.Println(total)
}
0