def weight_hashtags(text, hashtags, ntimes):
    """gives ntimes weight to the hashtags identified in the given text"""
    weighted_hashtags = hashtags * (ntimes - 1)
    text = ' '.join(weighted_hashtags) + ' ' + text
    return text
