結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
![]() |
提出日時 | 2017-08-18 23:06:09 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 805 bytes |
コンパイル時間 | 975 ms |
コンパイル使用メモリ | 101,380 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-14 15:01:36 |
合計ジャッジ時間 | 1,943 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 16 |
ソースコード
#include <cmath> #include <vector> #include <list> #include <map> #include <set> #include <functional> #include <queue> #include <iostream> #include <string.h> #include <iomanip> #include <algorithm> #include <functional> #include <cstdint> #include <climits> #include <unordered_set> #include <sstream> #include <stack> using namespace std; typedef long long int ll; typedef pair<int,int> pii; typedef tuple<int,int,int> t3; using namespace std; int main(){ string s; cin >> s; map<char,int> c; c['0'] = 1; c['1'] = c['2'] = c['3'] = 0; c['4'] = 1; c['5'] = 0; c['6'] = 1; c['7'] = 0; c['8'] = 2; c['9'] = 1; int count = (int)s.length() * 2; count++; for(auto e : s) { count += c[e]; } cout << count << endl; return 0; }