結果
| 問題 | No.289 数字を全て足そう | 
| コンテスト | |
| ユーザー |  koyopro | 
| 提出日時 | 2015-10-17 14:04:24 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 270 bytes | 
| コンパイル時間 | 1,138 ms | 
| コンパイル使用メモリ | 159,644 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-07 20:22:10 | 
| 合計ジャッジ時間 | 1,874 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
#include "bits/stdc++.h"
using namespace std;
#define REP(i, n) for(int i=0; i<(n); i++)
int N,T;
string s;
signed main()
{
    cin >> s;
    int cnt = 0;
    REP(i,s.size()) {
        cnt += atoi(s.substr(i,1).c_str());
    }
    cout << cnt << endl;
    return 0;
}
            
            
            
        