#include <stdio.h>
#include <string.h>
int main() {
char s[100];
int i;
int count = 0;
scanf("%s", s);
count = strlen(s);
for (i = 0; i < strlen(s); i++) {
if (s[i] == 'c' || s[i] == 's' || s[i] == 'z') {
if (s[i + 1] == '=') {
count--;
}
}
if (s[i] == 'n' || s[i] == 'l') {
if (s[i + 1] == 'j') {
count--;
}
}
if (s[i] == 'c' || s[i] == 'd') {
if (s[i + 1] == '-') {
count--;
}
}
if (s[i] == 'd'){
if (s[i + 1] == 'z') {
if(s[i+2]=='=')
count--;
}
}
}
printf("%d\n", count);
}
크로아티아 알파펫이 나오면 count를 줄여나갔다.
'Programming > Algorithm (C++)' 카테고리의 다른 글
[백준 11650] Python :: 좌표 정렬하기 (0) | 2021.01.14 |
---|---|
[백준 10250번] C언어 :: ACM호텔 (0) | 2021.01.13 |
[백준 5622번] C언어 :: 다이얼 (0) | 2021.01.12 |
[백준 1453번] C언어 :: 피시방 알바 (0) | 2021.01.12 |
[백준 2743번] C언어 :: 단어 길이 재기 (0) | 2021.01.11 |