1006. Output in another format INTEGER (15) Time Limit 400 MS
The memory limit is 32000 kb.
Code length limit: 8000 B
Criterion author Chen, Yue
Let's use the letter B to represent "Hundred", the letter S to represent "Ten", and "12... N (<10) is a single digit. In another format, a positive integer of no more than three digits is output. For example, 234 should be output as bbsss1234 because it has two "hundreds", three "Ten", and four digits.
Input Format:Each test input contains one test case and a positive integer N (<1000 ).
Output Format:The output of each test case occupies one line and outputs N in the specified format.
Input Example 1:
234
Output Example 1:
Bbsss1234
Input Example 2:
23
Output Example 2:
Ss123
# Include <iostream> using namespace STD; int main () {int N, I; int B = 0; int S = 0; int G = 0; CIN> N; G = n % 10; N/= 10; S = n % 10; N/= 10; B = n % 10; for (I = 0; I <B; I ++) cout <"B"; for (I = 0; I <s; I ++) cout <"S"; for (I = 1; I <= g; I ++) cout <I; cout <Endl; return 0 ;}