結果
| 問題 |
No.671 1000000007
|
| コンテスト | |
| ユーザー |
007p99lupin
|
| 提出日時 | 2018-04-22 01:13:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 371 bytes |
| コンパイル時間 | 1,423 ms |
| コンパイル使用メモリ | 158,300 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 05:32:14 |
| 合計ジャッジ時間 | 1,774 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const* argv[])
{
int counter=0;
int b,ans;
string N;
cin>>N;
// int l=std::strlen(N);
int l=N.length();
for (int j = 0; j < l; j++) {
if(N[j]=='0') counter+=1;
}
if(counter>7){
ans=counter-7;
}
else if(counter<7){
ans=7-counter;
}
else{
ans=0;
}
cout<<ans<<endl;
return 0;
}
007p99lupin