結果

問題 No.509 塗りつぶしツール
ユーザー legosuke
提出日時 2017-12-03 19:28:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 1,440 ms
コンパイル使用メモリ 158,152 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-28 14:36:19
合計ジャッジ時間 2,484 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(void) {
  int n;
  cin >> n;

  int ans = 1;
  int a[] = {1, 0, 0, 0, 1, 0, 1, 0, 2, 1};
  while (n) {
    ans += a[n % 10];
    ans += 2;
    n /= 10;
  }
  cout << ans << endl;

  return 0;
}
0