結果

問題 No.289 数字を全て足そう
ユーザー meimaruEngineermeimaruEngineer
提出日時 2019-05-15 00:36:18
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 53 ms / 1,000 ms
コード長 447 bytes
コンパイル時間 2,151 ms
コンパイル使用メモリ 102,076 KB
実行使用メモリ 22,808 KB
最終ジャッジ日時 2023-09-27 11:21:39
合計ジャッジ時間 4,479 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
20,588 KB
testcase_01 AC 48 ms
22,724 KB
testcase_02 AC 47 ms
20,680 KB
testcase_03 AC 48 ms
22,724 KB
testcase_04 AC 48 ms
20,632 KB
testcase_05 AC 50 ms
20,684 KB
testcase_06 AC 52 ms
20,600 KB
testcase_07 AC 52 ms
22,672 KB
testcase_08 AC 49 ms
18,752 KB
testcase_09 AC 50 ms
20,676 KB
testcase_10 AC 49 ms
22,724 KB
testcase_11 AC 50 ms
22,736 KB
testcase_12 AC 51 ms
20,612 KB
testcase_13 AC 52 ms
20,600 KB
testcase_14 AC 50 ms
20,624 KB
testcase_15 AC 51 ms
22,584 KB
testcase_16 AC 50 ms
20,652 KB
testcase_17 AC 52 ms
20,764 KB
testcase_18 AC 52 ms
20,684 KB
testcase_19 AC 51 ms
20,644 KB
testcase_20 AC 50 ms
20,676 KB
testcase_21 AC 50 ms
20,576 KB
testcase_22 AC 51 ms
20,692 KB
testcase_23 AC 53 ms
22,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Text;

class No289
{
    static void Main(string[] args)
    {
        string input = Console.ReadLine();
        
        int total = 0;
        int temp = 0;
        for (int i = 0; i<input.Length; i++)
        {
            if (int.TryParse(input[i].ToString(),out temp))
            {
                total += temp;
            }
        }
        Console.WriteLine(total);
    }
}
0