# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
484280 | 2021-11-02T19:59:18 Z | rainboy | Sifra (COCI21_sifra) | C | 1 ms | 276 KB |
#include <ctype.h> #include <stdio.h> #include <string.h> #define N 100 #define A 1000 int main() { static char cc[N + 1], used[A]; int n, i, j, k; scanf("%s", cc), n = strlen(cc); k = 0; for (i = 0; i < n; i++) if (isdigit(cc[i])) { int a; j = i, a = 0; while (j < n && isdigit(cc[j])) { a = a * 10 + (cc[j] - '0'); j++; } if (!used[a]) used[a] = 1, k++; i = j - 1; } printf("%d\n", k); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Correct | 0 ms | 204 KB | Output is correct |
8 | Correct | 0 ms | 276 KB | Output is correct |
9 | Correct | 0 ms | 204 KB | Output is correct |
10 | Correct | 0 ms | 276 KB | Output is correct |