結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
|
提出日時 | 2018-01-04 20:50:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 1,098 ms |
コンパイル使用メモリ | 66,432 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 03:46:50 |
合計ジャッジ時間 | 1,600 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int main(){ string n; cin >> n; int hole[10] = {1, 0, 0, 0, 1, 0, 1, 0, 2, 1}; int hole_all = 1; for(int i = 0; i < n.size(); i++){ hole_all += hole[n[i] - '0']; } cout << min(hole_all, int(n.size())) + hole_all + n.size() << endl; }