#include <bits/stdc++.h> #include<math.h> using namespace std; const int MAX_LEN = 100005; //const int MAX_D = 31; int main(){ int n; cin>>n; int Bdigit = n / 100; int Sdigit = (n / 10)%10; int Ddigit = n % 10; if(Bdigit != 0){ for(int i=0;i<Bdigit;++i){ cout<<‘B‘; } } if(Sdigit != 0){ for(int i = 0;i<Sdigit;++i){ cout<<‘S‘; } } if(Ddigit != 0){ for(int i=1;i<=Ddigit;++i){ if(i<=Ddigit){ cout<<i; } } } system("pause"); return 0; }
原文地址:https://www.cnblogs.com/JasonPeng1/p/12129568.html
时间: 2024-11-07 03:52:44