|
| 1 | +{ |
| 2 | + "for": { |
| 3 | + "description": "returns prime factors for the given input number", |
| 4 | + "cases": [ |
| 5 | + { |
| 6 | + "description" : "returns no prime factors for 1", |
| 7 | + "input" : 1, |
| 8 | + "expected" : [] |
| 9 | + }, |
| 10 | + { |
| 11 | + "description" : "returns [2] as the prime factors for 2", |
| 12 | + "input" : 2, |
| 13 | + "expected" : [2] |
| 14 | + }, |
| 15 | + { |
| 16 | + "description" : "returns [3] as the prime factors for 3", |
| 17 | + "input" : 3, |
| 18 | + "expected" : [3] |
| 19 | + }, |
| 20 | + { |
| 21 | + "description" : "returns [2,2] as the prime factors for 4", |
| 22 | + "input" : 4, |
| 23 | + "expected" : [2, 2] |
| 24 | + }, |
| 25 | + { |
| 26 | + "description" : "returns [2,3] as the prime factors for 6", |
| 27 | + "input" : 6, |
| 28 | + "expected" : [2, 3] |
| 29 | + }, |
| 30 | + { |
| 31 | + "description" : "returns [2,2,2] as the prime factors for 8", |
| 32 | + "input" : 8, |
| 33 | + "expected" : [2, 2, 2] |
| 34 | + }, |
| 35 | + { |
| 36 | + "description" : "returns [3,3] as the prime factors for 9", |
| 37 | + "input" : 9, |
| 38 | + "expected" : [3, 3] |
| 39 | + }, |
| 40 | + { |
| 41 | + "description" : "returns [3,3,3] as the prime factors for 27", |
| 42 | + "input" : 27, |
| 43 | + "expected" : [3, 3, 3] |
| 44 | + }, |
| 45 | + { |
| 46 | + "description" : "returns [5,5,5,5] as the prime factors for 625", |
| 47 | + "input" : 625, |
| 48 | + "expected" : [5, 5, 5, 5] |
| 49 | + }, |
| 50 | + { |
| 51 | + "description" : "returns [5, 17, 23, 461] as the prime factors for 901255", |
| 52 | + "input" : 901255, |
| 53 | + "expected" : [5, 17, 23, 461] |
| 54 | + }, |
| 55 | + { |
| 56 | + "description" : "returns [11, 9539, 894119] as the prime factors for 93819012551", |
| 57 | + "input" : 93819012551, |
| 58 | + "expected" : [11, 9539, 894119] |
| 59 | + } |
| 60 | + ] |
| 61 | + } |
| 62 | +} |
0 commit comments