题解 | #质数因子#
句子逆序
http://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
一个字,绝,哦,打错了,栈。
int main() { string s; stack<string> temp; while(cin>>s) temp.push(s); while(!temp.empty()) { cout<<temp.top()<<" "; temp.pop(); } return 0; }
句子逆序
http://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
int main() { string s; stack<string> temp; while(cin>>s) temp.push(s); while(!temp.empty()) { cout<<temp.top()<<" "; temp.pop(); } return 0; }
相关推荐