# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1246542 | spiritt | Sifra (COCI21_sifra) | C++20 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
string secret;
int ans = 0;
cin >> secret;
bool inNumber = false;
for (int i = 0; i < secret.length(); i++) {
if (isdigit(secret[i])) {
if (!inNumber) {
ans++;
inNumber = true;
}
} else {
inNumber = false;
}
}
cout << ans << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |