간단한 조합 문제인데 조합의 개념을 까먹지 말자는 의미에서 기록한다.
ddd일 경우 10 * 9 * 9
가 되는 것 이다.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] template = sc.next().toCharArray();
int result = 1;
for(int i = 0 ; i < template.length ; ++i) {
if(i == 0) {
if(template[i] == 'c') result *= 26;
else result *= 10;
} else {
if(template[i] == 'c') {
if(template[i - 1] == 'c') {
result *= 25;
} else {
result *= 26;
}
} else {
if(template[i - 1] == 'd') {
result *= 9;
} else {
result *= 10;
}
}
}
}
System.out.println(result);
}
}