結果
問題 |
No.289 数字を全て足そう
|
ユーザー |
|
提出日時 | 2019-02-18 14:29:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 247 bytes |
コンパイル時間 | 483 ms |
コンパイル使用メモリ | 54,364 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 04:05:02 |
合計ジャッジ時間 | 1,055 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 21 |
ソースコード
#include <iostream> #include <string> using namespace std; int main() { string str; cin >> str; int a = 0; for (unsigned int i = 0; i < str.length(); i++) { if (str[i] >= '0' && str[i] <= '9') { a += str[i] - '0'; } } return 0; }