1412091645-hd-ZOJ

Source: Internet
Author: User

1412091645-hd-ZOJ
ZOJTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission (s): 1899 Accepted Submission (s): 1344

Problem Description reads a string containing three ZOJ characters. The numbers are not necessarily equal and are output in the order of ZOJ. When a character is used up, the rest are output in the order of ZOJ.
The Input question contains multiple sets of use cases. Each set of Use Cases occupies one row and contains three ZOJ characters. When "E" is entered, the Input is complete.
1 <= length <= 100.

Output: For each input group, Output a line indicating the strings processed as required.
See the following example.
Sample Input

ZZOOOJJJZZZZOOOOOJJJZOOOJJE

Sample Output
ZOJZOJOJZOJZOJZOJZOOZOJOJO
Determine the number of Z, O, and J. Then judge cyclically. If the number is not 0, the output will be made and the len will be cyclically executed. Code
# Include
 
  
# Include
  
   
Char zoj [110]; int main () {int len; int I, j, k; int numz, numo, numj; while (scanf ("% s", zoj) & strcmp ("E", zoj )! = 0) {len = strlen (zoj); numz = numo = numj = 0; for (I = 0; I
   
    

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.