結果
| 問題 |
No.509 塗りつぶしツール
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-28 22:26:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 236 bytes |
| コンパイル時間 | 485 ms |
| コンパイル使用メモリ | 66,416 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 18:01:00 |
| 合計ジャッジ時間 | 1,393 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 16 |
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
main()
{
string s;cin>>s;
int cnt=0;
cnt=s.size()*2+1;
for(int i=0;i<s.size();i++)
{
if(s[i]=='0'||s[i]=='4'||s[i]=='6'||s[i]=='9')cnt++;
else if(s[i]=='8')cnt+=2;
}
cout<<cnt<<endl;
}