結果

問題 No.289 数字を全て足そう
ユーザー cureskol
提出日時 2020-04-01 11:31:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 175 bytes
コンパイル時間 1,694 ms
コンパイル使用メモリ 167,088 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 07:35:11
合計ジャッジ時間 2,430 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

signed main(){
    string s;cin>>s;
    int ans=0;
    for(auto p:s)if(p>='0'&&p<='9')ans+=(char)(p-'0');
    cout<<ans<<endl;
}
0