19 lines
580 B
C++
19 lines
580 B
C++
|
|
#include <bits/stdc++.h>
|
|||
|
|
|
|||
|
|
using namespace std;
|
|||
|
|
|
|||
|
|
int main() {
|
|||
|
|
ios::sync_with_stdio(false); //读入输出优化的强迫症
|
|||
|
|
int c, q = 1;
|
|||
|
|
//在windows平台,stdin输入流的EOF标志是 ctrl + z,然后回车就结束了!在黑窗口下试试,
|
|||
|
|
// Clion中需要进入调试模式,然后ctrl+d 即可退出
|
|||
|
|
//参考:https://www.zhihu.com/question/41952758
|
|||
|
|
while ((c = getchar()) != EOF) {
|
|||
|
|
if (c == '"') {
|
|||
|
|
printf("%s", q ? "``" : "''");
|
|||
|
|
q = !q;
|
|||
|
|
} else printf("%c", c);
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
}
|