結果
| 問題 |
No.509 塗りつぶしツール
|
| コンテスト | |
| ユーザー |
makonagix
|
| 提出日時 | 2017-04-28 22:37:44 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 344 bytes |
| コンパイル時間 | 479 ms |
| コンパイル使用メモリ | 54,672 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 18:09:31 |
| 合計ジャッジ時間 | 1,387 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 2 WA * 25 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
string s;
int main()
{
cin >> s;
long ans = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == '1' || '2' || '3' || '5' || '7') ans += 2;
else if (s[i] == '0' || '4' || '6' || '9')ans += 3;
else if (s[i] == '8')ans += 4;
}
ans++;
cout << ans << endl;
return 0;
}
makonagix