Problem 1342B

AC代码:

#include<bits/stdc++.h>
using namespace std;
int main() {
	//freopen("in.txt", "r", stdin);
	ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	int t; cin >> t;
	while (t--) {
		string s, a = ""; cin >> s;
		for (auto p : s)
			a += "01";
		if (s.find('0') == string::npos || s.find('1') == string::npos)
			cout << s << endl;
		else cout << a << endl;
	}
}

The desire of his soul is the prophecy of his fate
你灵魂的欲望,是你命运的先知。

原文地址:https://www.cnblogs.com/RioTian/p/13600661.html