結果

問題 No.671 1000000007
ユーザー Coffee_drunkCoffee_drunk
提出日時 2018-06-10 22:26:01
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 248 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 55,656 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 13:23:20
合計ジャッジ時間 1,026 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>

int main(){
	int num,cnt=0;
	std::string S;
	std::cin >> S;
	for(int i=0;i<(int)S.size();++i){
		if(S[i]=='0')
			cnt++;
	}
	if(cnt>8)
		num=cnt-8;
	else
		num=8-cnt;
	std::cout << num << std::endl;
	return 0;
}
0