本文共 351 字,大约阅读时间需要 1 分钟。
AC代码:
#includeusing 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; }}
转载地址:http://rbykz.baihongyu.com/