結果
問題 |
No.289 数字を全て足そう
|
ユーザー |
![]() |
提出日時 | 2025-03-03 14:34:52 |
言語 | C (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 257 bytes |
コンパイル時間 | 413 ms |
コンパイル使用メモリ | 23,424 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-03-03 14:34:54 |
合計ジャッジ時間 | 1,510 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 21 |
ソースコード
#include <stdio.h> #include <ctype.h> #include <stdlib.h> void main(void){ char str[100000]; int sum = 0 , i = 0 ; while(str[i] != '\0'){ int charNum = str[i] - '0'; if(charNum >= 0 && charNum <= 9){ sum += charNum; } } printf("%d\n",sum); }