結果

問題 No.509 塗りつぶしツール
コンテスト
ユーザー Yut176
提出日時 2017-06-10 16:47:24
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 462 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 413 ms
コンパイル使用メモリ 101,120 KB
実行使用メモリ 9,808 KB
最終ジャッジ日時 2026-09-03 07:40:34
合計ジャッジ時間 2,277 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
using namespace std;


int main(void) {

  string s;
  cin >> s;

  int n[10] = {1,0,0,0,1,0,1,0,2,1};

  int ans = s.size() * 2;
  for(int i=0; i<s.size(); i++){
    ans += n[ s[i]-'0' ];
  }
  ans += 1;
  cout << ans << endl;

  return 0;
}






// EOF
0