結果

問題 No.289 数字を全て足そう
ユーザー koba-e964
提出日時 2015-10-19 12:35:20
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 182 bytes
コンパイル時間 553 ms
コンパイル使用メモリ 56,728 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-07 20:26:27
合計ジャッジ時間 1,201 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(void) {
string s;cin>>s;
int t=0;
for(int i=0;i<s.length();i++){
if('1' <= s[i] && s[i] <= '9') t += s[i] - '0';
}
cout<<t<<endl;
}
0