結果
問題 | No.656 ゴルフ |
ユーザー |
![]() |
提出日時 | 2019-03-30 04:29:35 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 14,818 ms |
コンパイル使用メモリ | 230,576 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-07 10:41:05 |
合計ジャッジ時間 | 12,302 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
package main import ( "fmt" "strconv" ) func main() { var score string var tmp int total := 0 fmt.Scan(&score) for i := 0; i < 9; i++ { if score[i:i+1] == "0" { total += 10 } else { tmp, _ = strconv.Atoi(score[i : i+1]) total += tmp } } fmt.Println(total) }