SortTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total Submission (s): 38231 Accepted Submission (s): 10832
Problem description Enter a line of numbers, if we take this line of the number of ' 5 ' as a space, then we get a line with a space separated by a number of non-negative integers (some integers may start with ' 0 ', these headers ' 0 ' should be ignored, unless the integer is a number of ' 0 ', then this integer is 0).
Your task is to sort the output from small to large for these segmented integers.
Input inputs contain multiple sets of test cases, each set of input data with only one row of numbers (no spaces between the numbers), and the length of the line number is not greater than 1000.
Input data Assurance: The resulting non-negative integers are not greater than 100000000, and the input data cannot be composed of ' 5 '.
Output for each test case, the result of an integer ordering of the outputs is divided by a single space between the adjacent two integers, one row for each set of outputs.
Sample Input
0051231232050775
Sample Output
0 77 12312320
Sourcepoj
I heard that with SSCANF can also, unfortunately, the function is not too familiar.
Simple application of strtok function Hdu 1106