結果

問題 No.509 塗りつぶしツール
ユーザー furafura
提出日時 2020-05-04 20:47:32
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 2,082 ms
コンパイル使用メモリ 191,328 KB
最終ジャッジ日時 2025-01-10 06:31:22
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	int f[128];
	f['0']=1;
	f['1']=0;
	f['2']=0;
	f['3']=0;
	f['4']=1;
	f['5']=0;
	f['6']=1;
	f['7']=0;
	f['8']=2;
	f['9']=1;

	string s; cin>>s;
	int hole=0;
	rep(i,s.length()) hole+=f[s[i]];
	printf("%lu\n",1+2*s.length()+hole);

	return 0;
}
0