結果
問題 | No.509 塗りつぶしツール |
ユーザー |
|
提出日時 | 2019-01-17 00:19:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 374 bytes |
コンパイル時間 | 1,534 ms |
コンパイル使用メモリ | 167,160 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 06:35:16 |
合計ジャッジ時間 | 2,485 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 16 |
ソースコード
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; int len = (int)s.length(); long long ans = 2 * len; for(int i = 0; i < len; i++) { int a = s[i] - '0'; if(a == 0 || a == 6 || a == 9 || a == 4) ans++; if(a == 8) ans += 2; } cout << ans + 1 << endl; return 0; }