// yukicoder: No.785 色食い虫 // 2019.5.6 bal4u #include #include #if 1 #define gc() getchar_unlocked() #else #define gc() getchar() #endif int ins(char *s) // 文字列の入力 スペース以下の文字で入力終了 { char *p = s; do *s = gc(); while (*s++ > ' '); *--s = 0; return s - p; } char s[100]; int main() { int i, w, ans; ans = 1; for (i = 0; i < 3; i++) { w = ins(s); if (*s == 'N') ans *= 256; else ans *= (15-(w>>1)) * (15-(w>>1)); } printf("%d\n", ans); return 0; }