結果

問題 No.9011 数字を全て足そう(数字だけ)
ユーザー focus
提出日時 2019-02-07 23:35:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 72,880 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-13 20:11:23
合計ジャッジ時間 1,386 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<cstdio>
#include<string>

using namespace std;
using ll = long long;

int main(){ 
        string str;
        int sum = 0;
        cin >> str;
        for(int i=0;i<str.size();i++){
                sum+=(str[i]-'0');
        }
        cout << sum;
        return 0;
}
0