結果

問題 No.289 数字を全て足そう
ユーザー maine_honzuki
提出日時 2021-05-13 11:22:54
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 262 bytes
コンパイル時間 2,158 ms
コンパイル使用メモリ 193,244 KB
最終ジャッジ日時 2025-01-21 10:32:49
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

//https://ncode.syosetu.com/n4830bu/289/
#include <bits/stdc++.h>
using namespace std;

int main() {
    string S;
    cin >> S;
    int maine = 0;
    for (auto&& c : S) {
        if (isdigit(c))
            maine += c - '0';
    }
    cout << maine << endl;
}
0