結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
|
提出日時 | 2023-05-22 09:50:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 1,789 ms |
コンパイル使用メモリ | 170,740 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-22 04:52:43 |
合計ジャッジ時間 | 2,818 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 17 |
ソースコード
#include <bits/stdc++.h> using namespace std; const set<int> st = {0, 4, 6, 9}; int main() { int n; cin >> n; int ans = 1; while (n) { ans += 2; int cd = n % 10; if (st.count(cd)) ans++; else if (cd == 8) ans += 2; n /= 10; } cout << ans << endl; return (0); }