| about | help | code help+videos | done | prefs |
Return an int[] of length n where n / m elements are set to their index when m divides the index with no remainder and the remaining elements are set to zero. skipN(10, 4) → [0, 0, 0, 0, 4, 0, 0, 0, 8, 0] skipN(20, 4) → [0, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0] skipN(30, 4) → [0, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 16, 0, 0, 0, 20, 0, 0, 0, 24, 0, 0, 0, 28, 0] ...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: 20
Copyright Nick Parlante 2017 - privacy