8 kyu

String repeat

3,501 of 324,216wichu

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 Trained395051
Total Skips18583
Total Code Submissions617802
Total Times Completed324216
Haskell Completions1894
Python Completions102607
F# Completions420
JavaScript Completions129037
C# Completions15109
PHP Completions7433
Clojure Completions754
C Completions3131
Ruby Completions6370
TypeScript Completions4124
Crystal Completions90
Swift Completions4562
Java Completions27967
CoffeeScript Completions79
Rust Completions3501
Go Completions6525
Shell Completions1756
Lua Completions899
Elixir Completions688
Solidity Completions413
Scala Completions1016
NASM Completions33
Nim Completions119
Julia Completions134
Kotlin Completions2905
Dart Completions2025
Racket Completions99
Reason Completions26
Factor Completions26
C++ Completions12504
Perl Completions153
BF Completions107
COBOL Completions31
R Completions241
D Completions16
SQL Completions2833
OCaml Completions92
Total Stars1741
% of votes with a positive feedback rating89% of 19574
Total "Very Satisfied" Votes15822
Total "Somewhat Satisfied" Votes3135
Total "Not Satisfied" Votes617
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