結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
![]() |
提出日時 | 2017-06-10 16:47:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 462 bytes |
コンパイル時間 | 804 ms |
コンパイル使用メモリ | 82,936 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 15:42:58 |
合計ジャッジ時間 | 1,820 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 16 |
ソースコード
#include<iostream> #include<algorithm> #include<cstdio> #include<cstdlib> #include<vector> #include<string> #include<sstream> #include<cmath> #include<numeric> #include<map> #include<stack> #include<queue> using namespace std; int main(void) { string s; cin >> s; int n[10] = {1,0,0,0,1,0,1,0,2,1}; int ans = s.size() * 2; for(int i=0; i<s.size(); i++){ ans += n[ s[i]-'0' ]; } ans += 1; cout << ans << endl; return 0; } // EOF