結果
| 問題 | No.509 塗りつぶしツール |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-22 09:59:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 312 bytes |
| コンパイル時間 | 1,689 ms |
| コンパイル使用メモリ | 172,116 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-22 05:02:02 |
| 合計ジャッジ時間 | 2,679 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const set<int> ST = {0, 4, 6, 9};
int main() {
string n;
cin >> n;
int sz = n.size();
int ans = 2 * sz + 1;
for (int i = 0; i < sz; i++) {
int cd = n[i] - '0';
if (ST.count(cd)) ans++;
else if (cd == 8) ans += 2;
}
cout << ans << endl;
return (0);
}