結果

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

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,ans=0;
    cin >> n;
    while(n!=0){
        ans+=2;
        int tmp=n%10;
        if(tmp==0||tmp==4||tmp==6||tmp==9) ans++;
        if(tmp==8) ans+=2;
        n/=10;
    }
    cout << ans+1 << endl;

    return 0;
}
0