結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
![]() |
提出日時 | 2017-08-03 17:03:35 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 426 ms |
コンパイル使用メモリ | 54,616 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 20:25:20 |
合計ジャッジ時間 | 1,538 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 16 |
ソースコード
#include <iostream> #include <string> using namespace std; string s; int main(){ int n=0; cin >> s; for(int i=0;i<s.size();i++){ if(s[i]=='0' || s[i]=='4' || s[i]=='6' || s[i]=='9')n++; else if(s[i]=='8')n+=2; } n+=(2*s.size()); n+=1; cout << n << endl; return 0; }