7 kyu

Simple beads count

5,024 of 20,008Joz

Description:

Two red beads are placed between every two blue beads. There are N blue beads. After looking at the arrangement below work out the number of red beads.

@ @@ @ @@ @ @@ @ @@ @ @@ @

Implement a function returning the number of red beads.
If there are less than 2 blue beads return 0.

Fundamentals

Stats:

CreatedJan 7, 2017
PublishedJan 7, 2017
Warriors Trained27095
Total Skips2054
Total Code Submissions39831
Total Times Completed20008
Python Completions5024
JavaScript Completions5379
C Completions1168
Haskell Completions248
PHP Completions850
Java Completions2438
Ruby Completions415
Kotlin Completions940
C# Completions883
NASM Completions73
C++ Completions1498
Rust Completions897
TypeScript Completions497
Go Completions700
COBOL Completions17
Crystal Completions19
Shell Completions112
CoffeeScript Completions15
Scala Completions37
BF Completions34
Lua Completions10
Total Stars103
% of votes with a positive feedback rating88% of 2174
Total "Very Satisfied" Votes1711
Total "Somewhat Satisfied" Votes392
Total "Not Satisfied" Votes71
Total Rank Assessments14
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Joz Avatar
  • suic Avatar
  • donaldsebleung Avatar
  • St3f4n Avatar
  • Jay-9 Avatar
  • Blind4Basics Avatar
  • a.merezhanyi Avatar
  • M-a-c Avatar
  • Voile Avatar
  • Madjosz Avatar
  • Souzooka Avatar
  • KenKamau Avatar
  • uglywarthog Avatar
  • trashy_incel Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • uebernihilist Avatar
  • nathomp3 Avatar
  • XoRMiAS Avatar
  • KayleighWasTaken Avatar
  • saudiGuy Avatar
  • PetitLu117 Avatar
  • HeartCat22 Avatar
Ad