提交时间:2025-04-05 13:31:26
运行 ID: 315932
#include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); for(int i=0; i<s.size(); i++){ if(s[i]==' ') cout<<' '; } for(int i=0; i<s.size(); i++){ if(s[i]!=' ') cout<<s[i]; } return 0; }