結果
| 問題 | No.289 数字を全て足そう | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-02-05 13:58:31 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 422 bytes | 
| コンパイル時間 | 741 ms | 
| コンパイル使用メモリ | 79,500 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-02 04:54:15 | 
| 合計ジャッジ時間 | 1,551 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <vector>
#include <map>
#include <utility>
#include <list>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
    string s;
    cin>>s;
    int count=0;
    for(int i=0;i<s.size();i++)
    {
        if('0'<=s.at(i)&&s.at(i)<='9')
        {
            count+=(int)(s.at(i))-48;
        }
    }
    cout<<count<<endl;
    return 0;
}
            
            
            
        