結果

問題 No.1070 Missing a space
ユーザー ke-mi
提出日時 2020-07-28 09:55:27
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 310 bytes
コンパイル時間 1,426 ms
コンパイル使用メモリ 166,112 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 20:33:22
合計ジャッジ時間 2,023 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

// yukicoder No.1070
#include <bits/stdc++.h>
using namespace std;

int main()
{
  string s; cin >> s;

  int lim = s.size();
  int z_counter = 0;
  for(int i = 0; i < lim; ++i) {
    if(s[i] == '0') ++z_counter;
    else continue;
  }

  int ans = (lim - 1) - z_counter;
  cout << ans << "\n";

  return 0;
}
0