結果

問題 No.656 ゴルフ
ユーザー tsuchinaga
提出日時 2019-02-19 17:47:06
言語 Go
(1.23.4)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 15,466 ms
コンパイル使用メモリ 222,256 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 12:16:11
合計ジャッジ時間 16,057 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

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