标签:ros span bsp div cout ios 乙级 c++ std
1 #include <iostream>
2 using namespace std;
3
4 int main() {
5 int n = 0;
6 cin >> n;
7 int chu = n, yu = 0;
8 int num[3], loc = 0;
9 while (chu >= 10) {
10 yu = chu % 10;
11 chu /= 10;
12 num[loc] = yu;
13 loc++;
14 }
15 num[loc] = chu;
16 for (int i = loc; i >= 0; i--) {
17 if (i == 2)
18 for (int j = 0; j < num[i]; j++)
19 cout << ‘B‘;
20 else if (i == 1)
21 for (int j = 0; j < num[i]; j++)
22 cout << ‘S‘;
23 else
24 for (int j = 0; j < num[i]; j++)
25 cout << j + 1;
26 }
27 cout << endl;
28
29 return 0;
30 }
标签:ros span bsp div cout ios 乙级 c++ std
原文地址:https://www.cnblogs.com/moujun1001/p/9300776.html