| about | help | code help+videos | done | prefs |
Find all elements in the array such that a mod b = 0, where a appears earlier in the array than b. Return the count of such pairs. Pairs do not need to be consecutive. countModPairs([6, 3]) → 1 countModPairs([6, 7, 3]) → 1 countModPairs([2, 10, 8, 5, 4]) → 2 ...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: 300
Copyright Nick Parlante 2017 - privacy