結果

問題 No.509 塗りつぶしツール
ユーザー A_ru8743731A_ru8743731
提出日時 2017-07-10 22:05:22
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 724 bytes
コンパイル時間 749 ms
コンパイル使用メモリ 79,792 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 12:35:28
合計ジャッジ時間 1,713 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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