結果
問題 | No.1070 Missing a space |
ユーザー |
![]() |
提出日時 | 2020-06-05 22:05:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 503 bytes |
コンパイル時間 | 2,438 ms |
コンパイル使用メモリ | 215,760 KB |
最終ジャッジ日時 | 2025-01-10 22:35:10 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#define _GLIBCXX_DEBUG#define rep(i, n) for (int i = 0; i < (int)(n); i++)#define ALL(v) v.begin(), v.end()typedef long long ll;template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }#include <bits/stdc++.h>using namespace std;int main(){string s;cin>>s;int cnt=0;for(int i=1;i<s.size();i++){if(s[i]!='0') cnt++;}cout<<cnt<<endl;return 0;}