結果
問題 | No.289 数字を全て足そう |
ユーザー |
![]() |
提出日時 | 2019-12-06 17:15:10 |
言語 | C (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 246 bytes |
コンパイル時間 | 1,873 ms |
コンパイル使用メモリ | 27,648 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-23 11:33:49 |
合計ジャッジ時間 | 4,579 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 3 RE * 18 |
ソースコード
#include <stdio.h>#include <string.h>int main(void){char str[100];int i;int count = 0;scanf("%s", str);for (i = 0; str[i] != '\0'; i++) {if (str[i] <= '9')count += (str[i] - 48);}printf("%d", count);return 0;}