about | help | code help+videos | done | prefs |
Preconditions: 'smaller' and 'larger' are both greater than one. 'smaller'<'larger'. 'max' is greater than one. Create an array of positive integers such that each integer in the array has both 'smaller' and 'larger' as factors and the integers in the array are in increasing order. All the integers in the array will be less than or equal to 'max'. For example, if 'smaller'=3, 'larger'=5, and 'max'=33 you would return {15,30} because those are the only two positive integers less than or equal to 33 that have both 3 and 5 as factors. Look at the test data for additional examples. test2022_12_08_APP1SLHL_factorOfBoth(17, 23, 10) → [] test2022_12_08_APP1SLHL_factorOfBoth(7, 11, 444) → [77, 154, 231, 308, 385] test2022_12_08_APP1SLHL_factorOfBoth(2, 3, 11) → [6] ...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: 250
Copyright Nick Parlante 2017 - privacy