제출 #1266423

#제출 시각아이디문제언어결과실행 시간메모리
1266423canhnam357Sifra (COCI21_sifra)C++20
50 / 50
0 ms328 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 timeMemoryGrader output
Fetching results...