标签:style 处理 main blog include 个数 source har bsp
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2779 Accepted Submission(s): 1840
1 #include <bits/stdc++.h> 2 using namespace std; 3 int main() 4 { 5 int len,i; 6 int a=0; 7 int b=0; 8 int c=0; 9 char s[105]; 10 while(gets(s)&&(s[0]!=‘E‘)) 11 { 12 len=strlen(s); 13 for(i=0;i<len;i++) 14 { 15 if(s[i]==‘Z‘) 16 a++; 17 else if(s[i]==‘O‘) 18 b++; 19 else if(s[i]==‘J‘) 20 c++; 21 } 22 while(a>0||b>0||c>0) 23 { 24 if(a>0) 25 { 26 cout<<‘Z‘; 27 a--; 28 } 29 if(b>0) 30 { 31 cout<<‘O‘; 32 b--; 33 } 34 if(c>0) 35 { 36 cout<<‘J‘; 37 c--; 38 } 39 } 40 cout<<endl; 41 } 42 return 0; 43 }
标签:style 处理 main blog include 个数 source har bsp
原文地址:http://www.cnblogs.com/ECJTUACM-873284962/p/6366202.html