This problem I use the method is very troublesome, use string to get the input number, and then get every character in string, stored in the array, in order to output to know the length of the array, so that the length of the array will be written in three cases.
It is better to get an integer directly, with/and% to take each bit of value, so if only two bits bai= n/100; 0, direct while (bai>0) {system;bai--}; simpler.
No code, too much trouble.
Topic:
Let us use the letter B to denote "hundred", the letter S for "Ten", "12...N" to represent the single digit n (<10), in a different format to output any of the 3-bit positive integer. For example, 234 should be output as BBSSS1234, because it has 2 "hundred", 3 "ten", and a single digit of 4.
input Format: each test input contains 1 test cases, giving a positive integer n (<1000).
Output format: one row for each test case output n in the specified format.
Input Sample 1:
234
Output Example 1:
BBSSS1234
Input Sample 2:
23
Output Example 2:
SS123
Java 1006. Output integers in a different format (15)