結果

問題 No.509 塗りつぶしツール
ユーザー agis
提出日時 2017-04-28 23:51:12
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 381 bytes
コンパイル時間 1,925 ms
コンパイル使用メモリ 194,096 KB
最終ジャッジ日時 2025-01-03 22:21:11
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
	string n;
	cin >> n;
	int count=0;
	for (int i = 0;i < n.size();i++) {
		if (n[i] == '0' || n[i] == '4' || n[i] == '6' || n[i] == '9') {
			count += 3;
		}
		else if (n[i] == '8') {
			count += 4;
		}
		else {
			count += 2;
		}
		cout << count<<" ";
	}
	count++;
	cout << count << endl;
	return 0;
}
0