简单字符串模拟。
#include <bits/stdc++.h> using namespace std; int main(){ string a; getline(cin,a); for(int i=0;i<a.size();i++) cout << a[i] << " "; }