結果

問題 No.656 ゴルフ
ユーザー cowgirl
提出日時 2018-09-15 16:37:45
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 1,383 ms
コンパイル使用メモリ 166,464 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 07:05:23
合計ジャッジ時間 1,839 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 3 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
    int s;
    cin >> s;
    int sum=0;
    while(s > 0){
        if(s % 10 == 0) sum += 10;
        else sum += s % 10;
        s = s / 10;
    }
    cout << sum << endl;
}
0