結果

問題 No.509 塗りつぶしツール
ユーザー h8d51nh8d51n
提出日時 2017-04-28 23:19:12
言語 C++11
(gcc 11.4.0)
結果
OLE  
実行時間 -
コード長 367 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 26,500 KB
実行使用メモリ 7,104 KB
最終ジャッジ日時 2023-10-11 19:42:33
合計ジャッジ時間 6,792 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 OLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<string.h>
int main(void){
	char s[16];
	int n;
	int len;
	int i;
	int ans;
	while(1){
		scanf("%s",s);
		len=strlen(s);
		ans=len*2;
		for(i=0;i<len;i++){
			n=(int)s[i]-(int)'0';
			if(n==1||n==2||n==3||n==5||n==7)ans+=0;
			else if(n==0||n==4||n==6||n==9)ans+=1;
			else ans+=2;
		}
		ans++;
		printf("%d\n",ans);
		ans=0;
	}
	return 0;
}
0