結果

問題 No.9011 数字を全て足そう(数字だけ)
ユーザー ashipan
提出日時 2020-05-02 14:28:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 858 ms
コンパイル使用メモリ 74,680 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-29 23:26:24
合計ジャッジ時間 1,938 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <queue>
#include <vector>
#define rep(i, a, n) for(int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main()
{
    int n;
    cin >> n;
    int sum = 0;
    rep(i, 0, 100){
        int m;
        m = n%10;
        n /= 10;
        sum += m;
    }
    cout << sum << endl;
    return 0;
}
0