結果

問題 No.289 数字を全て足そう
ユーザー projectappbird
提出日時 2020-01-24 23:02:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 293 bytes
コンパイル時間 609 ms
コンパイル使用メモリ 66,428 KB
最終ジャッジ日時 2025-01-08 20:34:37
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdlib>

int main()
{
    using namespace std;
    char input[10000];
    int result = 0;
    cin >> input;
    for (char& element:input){
        if (element == 0) break;
        if (isdigit(element)) result += element - 48;
    }
    cout << result << endl;
}
0