結果

問題 No.509 塗りつぶしツール
ユーザー Naoyk1212
提出日時 2017-05-01 17:40:15
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 1,317 ms
コンパイル使用メモリ 158,420 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 01:57:02
合計ジャッジ時間 2,324 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

signed main(){
	string n;
	cin >> n;
	int v[10] = {4, 3, 3, 3, 4, 3, 4, 3, 5, 4};
	
	long long count = 0;
	for(int i = 0; i < n.length(); i++){
		int a = n[i] - '0';
		if(i == 0)count += v[a];
		else count += v[a] - 1;
	}
	cout << count << endl;
}
0