PAT (Basic Level) Practice Python解法 1006 换个格式输出整数
hys= int(input())
bw, gw, sw = hys//100, hys%100//10, hys%10 #hys先取余100后余下十位,之后再整除取商
b = "B"*bw
s = "S"*gw
g = ''.join(map(str,range(1,sw+1))) #不用map把int转换成str的话,join会报错
print(b,s,g,sep='',end='')
PAT (Basic Level) Practice Python解法 1006 换个格式输出整数
hys= int(input())
bw, gw, sw = hys//100, hys%100//10, hys%10 #hys先取余100后余下十位,之后再整除取商
b = "B"*bw
s = "S"*gw
g = ''.join(map(str,range(1,sw+1))) #不用map把int转换成str的话,join会报错
print(b,s,g,sep='',end='')