結果

問題 No.289 数字を全て足そう
ユーザー ryogom
提出日時 2019-04-12 13:20:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 55,248 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-14 00:36:13
合計ジャッジ時間 1,357 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 1 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main(){
    char S[10000];
    cin>>S;
    int i;
    int n;
    int ans=0;
    for(i=0;i<10000;i++){
    if(S[i]>=48&&S[i]<=57){
        n=S[i]-48;
        ans+=n;
    }
    if(S[i]==0){
        break;
    }
        
    }
    cout<<S;
}
0