# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
395146 | rainboy | Marko (COCI15_marko) | C11 | 4 ms | 1612 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#include <string.h>
#define N 1000
#define L 1000
int code[] = { 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9 };
int main() {
static char ss[N][L + 1], s[L + 1];
int n, l, i, cnt;
scanf("%d", &n);
for (i = 0; i < n; i++) {
int h;
scanf("%s", ss[i]), l = strlen(ss[i]);
for (h = 0; h < l; h++)
ss[i][h] = code[ss[i][h] - 'a'] + '0';
}
scanf("%s", s), l = strlen(s);
cnt = 0;
for (i = 0; i < n; i++)
if (strcmp(ss[i], s) == 0)
cnt++;
printf("%d\n", cnt);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |