結果

問題 No.509 塗りつぶしツール
ユーザー pengin_2000pengin_2000
提出日時 2021-11-09 22:18:38
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 277 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 28,544 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-19 04:28:08
合計ジャッジ時間 1,530 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
int main()
{
	int n;
	scanf("%d", &n);
	int ans = 1;
	while (n > 0)
	{
		ans += 2;
		if (n % 10 == 0)ans++;
		if (n % 10 == 4)ans++;
		if (n % 10 == 6)ans++;
		if (n % 10 == 8)ans += 2;
		if (n % 10 == 9)ans++;
		n /= 10;
	}
	printf("%d\n", ans);
	return 0;
}
0