結果

問題 No.289 数字を全て足そう
ユーザー asdfghjkl;
提出日時 2019-10-08 20:54:23
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 205 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 28,800 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 16:47:02
合計ジャッジ時間 1,255 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main(void){
char s[11000];
int count;
int sum=0;
scanf("%s",s);
for(count=0;s[count]!='\0';count++){
if(s[count]>='0'&&s[count]<='9'){sum=sum+(s[count]-'0');}
}
printf("%d\n",sum);
}
0