# stringreps1.py
# Written by Todd Wareham for CS 2500
"""
Given an integer n and a string s as command-line arguments, computes and
 prints the string consisting of n copies of s concatenated together.

This version is implemented using a for-loop and the string concatenation (+) 
 operator.
"""

import sys

if len(sys.argv) != 3:
    print "usage: ", sys.argv[0], " str num"
    sys.exit(1)

result = ""
for i in range(1, int(sys.argv[2]) + 1):
    result = result + sys.argv[1]

print result

