結果
問題 |
No.289 数字を全て足そう
|
ユーザー |
|
提出日時 | 2016-03-13 11:48:42 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 217 bytes |
コンパイル時間 | 1,006 ms |
コンパイル使用メモリ | 56,592 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 00:48:18 |
合計ジャッジ時間 | 1,439 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <iostream> #include <string> int main() { std::string str; std::cin >> str; int sum = 0; for (const auto &c : str) { if (c < 58) { sum += c - '0'; } } std::cout << sum << std::endl; return 0; }