結果
| 問題 |
No.1070 Missing a space
|
| コンテスト | |
| ユーザー |
seratna
|
| 提出日時 | 2020-06-05 21:46:18 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 495 bytes |
| コンパイル時間 | 1,005 ms |
| コンパイル使用メモリ | 97,608 KB |
| 最終ジャッジ日時 | 2025-01-10 22:25:58 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<cmath>
#include<queue>
#include<stack>
#include<list>
#define endl "\n"
using namespace std;
using ll = long long;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define REP(i, n) for(int i = 0; i < n; i++)
using Graph = vector<vector<int>>;
int main(){
string c;
cin>>c;
ll ans = c.length()-1;
for(int i=0;i<c.length();i++){
if(c[i] == '0') ans--;
}
cout<<ans<<endl;
}
seratna