結果

問題 No.289 数字を全て足そう
ユーザー Pachicobue
提出日時 2017-08-27 23:10:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 498 ms
コンパイル使用メモリ 63,376 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-06 07:03:39
合計ジャッジ時間 1,393 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 2 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;
inline int decode(char c)
{
if(c >= '0' and c <= '9'){
return c-'0';
} else {
return 0;
}
}

int main()
{
string s;
int num = 0;
for(int i = 0; i < s.size(); i++){
num += decode(s[i]);
}
cout << num << endl;
return 0;
}
0