結果

問題 No.656 ゴルフ
ユーザー bluemeganebluemegane
提出日時 2018-09-07 21:12:28
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 1,705 ms
コンパイル使用メモリ 65,164 KB
実行使用メモリ 22,772 KB
最終ジャッジ日時 2023-08-19 11:53:47
合計ジャッジ時間 2,322 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
22,740 KB
testcase_01 AC 55 ms
20,872 KB
testcase_02 AC 55 ms
20,680 KB
testcase_03 AC 56 ms
20,740 KB
testcase_04 AC 55 ms
20,700 KB
testcase_05 AC 55 ms
20,832 KB
testcase_06 AC 55 ms
22,772 KB
testcase_07 AC 55 ms
20,600 KB
testcase_08 AC 54 ms
20,752 KB
testcase_09 AC 55 ms
20,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var s = Console.ReadLine().Trim();
        var ans = 0;
        for (int i = 0; i < 9; i++)
        {
            var w = int.Parse(s[i].ToString());
            ans += w == 0 ? 10 : w;
        }
        Console.WriteLine(ans);
    }
}
0