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