結果
| 問題 |
No.1070 Missing a space
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-08 00:31:37 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 319 bytes |
| コンパイル時間 | 1,553 ms |
| コンパイル使用メモリ | 166,296 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-25 06:50:05 |
| 合計ジャッジ時間 | 2,066 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define P pair<int, int>
int main() {
string s;
cin >> s;
int ans = 0;
int n = s.size();
for (int i = 1; i < n; i++) {
if (s[i] == '0') continue;
ans++;
}
cout << ans << endl;
}