結果
問題 |
No.289 数字を全て足そう
|
ユーザー |
|
提出日時 | 2016-02-09 09:21:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 288 bytes |
コンパイル時間 | 670 ms |
コンパイル使用メモリ | 55,856 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 00:44:31 |
合計ジャッジ時間 | 1,394 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <cstdlib> #include <iostream> #include <string> #include <typeinfo> using namespace std; int main(int argc, char**argv) { string s; cin >> s; int total = 0; for (int ii=0; ii<s.size(); ++ii) { total += atoi(s.substr(ii, 1).c_str()); } cout << total << endl; return 0; }