結果

問題 No.289 数字を全て足そう
ユーザー kachipan
提出日時 2023-06-22 16:44:09
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 28,416 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-29 23:44:09
合計ジャッジ時間 1,093 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 3 WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>

int main()
{
	char str[10000] = "";
	int ans = 0;
	scanf("%s", str, sizeof(str));

	for (int i = 0;str[i] != '\0';i++)
	{
		char* end;
		int num = strtol(&str[i], &end, 10);
		
		ans += num;
	}

	printf("%d", ans);

	return 0;
}
0