結果
| 問題 | No.1168 Digit Sum Sequence |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-22 18:31:46 |
| 言語 | Go (1.26.1) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 406 bytes |
| 記録 | |
| コンパイル時間 | 13,953 ms |
| コンパイル使用メモリ | 280,928 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-04 07:14:46 |
| 合計ジャッジ時間 | 12,209 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 29 |
ソースコード
package main
import (
"strings"
"fmt"
"strconv"
)
func main() {
var input string
result := []int{}
fmt.Scan(&input)
n, _ := strconv.Atoi(input)
result = append(result, n)
for i := 0; i < 100; i++ {
x := strconv.Itoa(result[i])
y := strings.Split(x, "")
var z int
for _, a := range y {
m, _ := strconv.Atoi(a)
z += m
}
result = append(result, z)
}
fmt.Println(result[99])
}