title: How to write python program that computes the value of n+nn+nnn+nnnn+... nn...n ntimes with a given number as the value of n
body: <p>Write a program that computes the value of n+nn+nnn+nnnn+... nn...n ntimes with a given number as the value of n.
  Ex :if n=3 , output = 3+33+333=369 and if n=1 output =1</p>
  
  <p>My code is not working for input n=1
  Can you please help</p>
  
  <pre><code>a = int(input("Input an integer : "))
  n1 = int( "%s" % a )
  n2 = int( "%s%s" % (a,a) )
  n3 = int( "%s%s%s" % (a,a,a) )
  print (n1+n2+n3)
  </code></pre>