結果

問題 No.509 塗りつぶしツール
ユーザー ykprogramykprogram
提出日時 2018-08-16 17:54:50
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 54,800 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-03 03:14:00
合計ジャッジ時間 1,485 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main(void){
	int num[10] = {
		1, 0, 0, 0, 1, 0, 1, 0, 2, 1	
	};
	int n, count=1, digit=0;
	std::cin >> n;
	while (n!=0)
	{
		count += num[n % 10];
		n = n / 10;
		digit++;
	}
	std::cout << count + digit * 2 << std::endl;
	return 0;
}
0