about | help | code help+videos | done | prefs |
Input parameters: ding = the number of times a bell will ding. ring = the number of rings in a cycle. ringCyclesPerDing = the number of complete ring cycles that will happen for each ding. The new school bell system is very strange. A bell will "ding" followed by a cycle of "rings" that will repeat, with a short pause between each cycle, for ringCyclesPerDing number of times for each time the other bell dings. For example, ding=2, ring=4, ringCyclesPerDing=3 would cause the bells to ring like this: ding, ring, ring, ring, ring, (pause), ring, ring, ring, ring, {pause}, ring, ring, ring, ring, {pause}, ding, ring, ring, ring, ring, (pause), ring, ring, ring, ring, {pause}, ring, ring, ring, ring. Return an array that contains the total number of times the bell will "ding" followed by the total number of times the bell will "ring". Note that all of the input parameters will be reasonably small non-negative integers. countDingRing2(12, 4, 15) → [12, 720] countDingRing2(4, 5, 2) → [4, 40] countDingRing2(17, 2, 1) → [17, 34] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 245
Copyright Nick Parlante 2017 - privacy