結果

問題 No.509 塗りつぶしツール
ユーザー gotutiyan
提出日時 2018-01-18 11:42:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 810 bytes
コンパイル時間 756 ms
コンパイル使用メモリ 82,888 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 11:03:22
合計ジャッジ時間 1,983 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <tuple>
#include <set>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define all(v) (v).begin(),(v).end()
#define Sort(x) sort((x).begin(),(x).end())
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000007
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef std::pair<int,int> pii;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

int main(){
    int v[10]={1,0,0,0,1,0,1,0,2,1};
    string s; cin>>s;
    int ans=0;
    ans+=(int)s.length()*2;
    rep(i,0,s.length()){
        ans+=v[s[i]-'0'];
    }
    cout<<ans+1<<endl;
    
    
    
    return 0;
}
0