結果
問題 | No.289 数字を全て足そう |
ユーザー |
![]() |
提出日時 | 2023-06-23 09:06:46 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 232 bytes |
コンパイル時間 | 1,256 ms |
コンパイル使用メモリ | 29,056 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 14:22:53 |
合計ジャッジ時間 | 2,098 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 2 WA * 19 |
ソースコード
#include <stdio.h> #include <malloc.h> #include <ctype.h> #include <string.h> int main() { char s[10001]; int sum = 0; for (int i = 0;i < strlen(s);i++) { if (isdigit(s[i])) { sum += s[i] - '0'; } } printf("%d\n",sum); }