結果

問題 No.509 塗りつぶしツール
ユーザー makonagix
提出日時 2017-04-28 22:32:37
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
MLE  
実行時間 -
コード長 352 bytes
コンパイル時間 481 ms
コンパイル使用メモリ 54,528 KB
実行使用メモリ 814,464 KB
最終ジャッジ日時 2024-09-13 18:05:38
合計ジャッジ時間 6,245 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample MLE * 1 -- * 2
other -- * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
	long ans = 0;
	char a[1000000000];
	for (int i = 0; i < 1000000000; i++) {
		cin >> a[i];
		if (a[i] == '1' || '2' || '3' || '5' || '7') ans += 2;
		else if (a[i] == '0' || '4' || '6' || '9')ans += 3;
		else if (a[i] == '8')ans += 4;
		else break;
	}
	ans++;
	cout << ans << endl;
    return 0;
}
0