# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1266423 | canhnam357 | Sifra (COCI21_sifra) | C++20 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
set<int> st;
int k = -1;
for (char c : s) {
if (isdigit(c)) {
if (k < 0) k = 0;
k = k * 10 + c - '0';
}
else {
if (k >= 0) {
st.insert(k);
}
k = -1;
}
}
if (k >= 0) {
st.insert(k);
}
cout << st.size();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |