8 kyu

String repeat

1,899 of 326,235wichu

Description:

Write a function that accepts a non-negative integer n and a string s as parameters, and returns a string of s repeated exactly n times.

Examples (input -> output)

6, "I"     -> "IIIIII"
5, "Hello" -> "HelloHelloHelloHelloHello"
Fundamentals
Strings

Stats:

CreatedAug 2, 2016
PublishedAug 2, 2016
Warriors Trained397350
Total Skips18693
Total Code Submissions621119
Total Times Completed326235
Haskell Completions1899
Python Completions103357
F# Completions421
JavaScript Completions129713
C# Completions15180
PHP Completions7460
Clojure Completions757
C Completions3159
Ruby Completions6381
TypeScript Completions4160
Crystal Completions90
Swift Completions4575
Java Completions28125
CoffeeScript Completions79
Rust Completions3526
Go Completions6572
Shell Completions1765
Lua Completions904
Elixir Completions690
Solidity Completions417
Scala Completions1020
NASM Completions33
Nim Completions119
Julia Completions135
Kotlin Completions2922
Dart Completions2040
Racket Completions101
Reason Completions26
Factor Completions26
C++ Completions12688
Perl Completions153
BF Completions107
COBOL Completions31
R Completions245
D Completions16
SQL Completions2869
OCaml Completions92
Total Stars1747
% of votes with a positive feedback rating89% of 19619
Total "Very Satisfied" Votes15855
Total "Somewhat Satisfied" Votes3144
Total "Not Satisfied" Votes620
Total Rank Assessments23
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • wichu Avatar
  • osleonard Avatar
  • dnolan Avatar
  • Javatlacati Avatar
  • Unnamed Avatar
  • GiacomoSorbi Avatar
  • kevinthomas Avatar
  • suic Avatar
  • shadowmanos Avatar
  • jetjake Avatar
  • WizzardOfOZ8 Avatar
  • Quickz Avatar
  • Chrono79 Avatar
  • kazk Avatar
  • user5036852 Avatar
  • JohanWiltink Avatar
  • leandrovianna Avatar
  • lilsweetcaligula Avatar
  • Blind4Basics Avatar
  • tebuchet Avatar
  • user6993975 Avatar
  • calebkleveter Avatar
  • Voile Avatar
  • Madjosz Avatar
  • YiFenZ Avatar
  • mitron6 Avatar
  • richkotze Avatar
  • Souzooka Avatar
  • user8654865 Avatar
  • kdmatrosov Avatar
  • metagn Avatar
  • monadius Avatar
  • hobovsky Avatar
  • user3029010 Avatar
  • stellartux Avatar
  • trashy_incel Avatar
  • user8436785 Avatar
  • SergeySinyavskiy Avatar
  • nmburaleh Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • Kacarott Avatar
  • dfhwze Avatar
  • orthoplex Avatar
  • ABS-12 Avatar
  • 4500zenja1 Avatar
  • KayleighWasTaken Avatar
Ad