8 kyu

String repeat

1,888 of 321,599wichu

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 Trained391915
Total Skips18426
Total Code Submissions613193
Total Times Completed321599
Haskell Completions1888
Python Completions101540
F# Completions419
JavaScript Completions128260
C# Completions14990
PHP Completions7400
Clojure Completions753
C Completions3093
Ruby Completions6349
TypeScript Completions4070
Crystal Completions90
Swift Completions4547
Java Completions27800
CoffeeScript Completions79
Rust Completions3469
Go Completions6459
Shell Completions1738
Lua Completions888
Elixir Completions687
Solidity Completions406
Scala Completions1015
NASM Completions33
Nim Completions118
Julia Completions133
Kotlin Completions2884
Dart Completions1999
Racket Completions99
Reason Completions26
Factor Completions24
C++ Completions12288
Perl Completions150
BF Completions104
COBOL Completions30
R Completions240
D Completions16
SQL Completions2763
OCaml Completions89
Total Stars1730
% of votes with a positive feedback rating89% of 19511
Total "Very Satisfied" Votes15767
Total "Somewhat Satisfied" Votes3128
Total "Not Satisfied" Votes616
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