//入门经典P47 水题 #include <cstdio> int main() { int c, q = 1; while ((c = getchar()) != EOF) { if (c == '"') { printf("%s", q?"``":"''"); q = 1 - q; } else printf("%c", c); } return 0; } /* #include <iostream> #include <cstdio> using namespace std; int main() { int c, j = 1; while ((c = getchar()) != EOF) { if (c == '"') { cout << (j?"``":"''"); j = !j; } else cout << (char)c; } return 0; } */