标签:bsp ios 可见 简单 nbsp 运行 logs tput 一个
2017-07-16 07:31:35
ZZOOOJJJ ZZZZOOOOOJJJ ZOOOJJ ESample Output
ZOJZOJOJ ZOJZOJZOJZOO ZOJOJO
#include <iostream> #include <string> using namespace std; int main() { string str; while(cin >> str&&str[0]!=‘E‘) { int cntz = 0; int cnto = 0; int cntj = 0; for(size_t i = 0 ; i < str.length() ;i++) { if(str[i] == ‘Z‘) { cntz++; } else if(str[i] == ‘O‘) { cnto++; } else { cntj++; } } for(size_t i = 0 ; i < str.length();i++) { if(cntz-->0) { cout <<"Z"; } if(cnto-->0) { cout <<"O"; } if(cntj-->0) { cout <<"J"; } } cout << endl; } return 0; }
标签:bsp ios 可见 简单 nbsp 运行 logs tput 一个
原文地址:http://www.cnblogs.com/ilovelianghui/p/7189520.html