結果

問題 No.509 塗りつぶしツール
ユーザー A_ru8743731
提出日時 2017-07-10 22:05:22
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 724 bytes
コンパイル時間 803 ms
コンパイル使用メモリ 81,084 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-07 07:15:16
合計ジャッジ時間 1,507 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <map>
#include <queue>
#include <utility>

using namespace std;

const int INF = 1000000007;
const double PI = acos(-1.0);
typedef long long ll;

int main()
{
	string str;
	int cnt = 0;
	cin >> str;
	for (int i = 0; i < str.length(); i++)
	{
		int tmp = str[i] - 48;

		switch (tmp)
		{
		case 1: case 2: case 3: case 5: case 7:
			cnt += 2;
			break;
		case 0:  case 4: case 6: case 9:
			cnt += 3;
			break;
		case 8:
			cnt += 4;
			break;
		}
	}
	cnt++;
	cout << cnt << endl;
}



0