fork(4) download
  1. import re
  2. n=input()
  3. s=input()
  4. print re.sub('\d+',lambda x:`int(x.group())*n`,s)
Success #stdin #stdout 0.08s 8864KB
stdin
3
"This 1 is22a 3352sentence 50"
stdout
This 3 is66a 10056sentence 150