結果
問題 |
No.289 数字を全て足そう
|
ユーザー |
![]() |
提出日時 | 2019-12-06 17:21:04 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 230 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 28,288 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-23 11:44:48 |
合計ジャッジ時間 | 1,085 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <stdio.h> int main(void) { char str[100000]; 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\n", count); return 0; }