#include #include #include int main() { int x = 0, y = 0; std::string c; std::cin >> c; for (int i = 0;; i++) { if (c[i] == '^'&&c[i+1]=='*') { x++; }else if (c[i] == '*'&&c[i + 1] == '^') { y++; } if (c[i] == '#')break; } printf("(^^*)は%d個\n(*^^)は%d個", x, y); getchar(); getchar(); return 0; }