結果

問題 No.289 数字を全て足そう
ユーザー hiyori
提出日時 2016-03-04 19:55:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 478 ms
コンパイル使用メモリ 55,108 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-24 14:10:22
合計ジャッジ時間 1,404 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main()
{
    string S;
    cin >> S;
    
    int ans = 0;
    
    for (int i = 0; i < S.length(); i++) {
        if (S[i] >= 'a' && S[i] <= 'z') continue;
        ans += S[i] - '0';
    }
    
    cout << ans << endl;
    
    return 0;
}
0