結果
問題 |
No.289 数字を全て足そう
|
ユーザー |
|
提出日時 | 2019-02-18 14:28:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 247 bytes |
コンパイル時間 | 419 ms |
コンパイル使用メモリ | 56,096 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-06 04:04:55 |
合計ジャッジ時間 | 1,190 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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] >= '1' && str[i] <= '9') { a += str[i] - '0'; } } return 0; }