Skip to main content
5 of 5
added 1 character in body
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27

Recursiva, 20 18 bytes

smBa++'%'Va'a:0!a'

Try it online!

Explanation:

smBa++'%'Va'a:0!a' - Input to a; 20
s                    - sum up; 42
 m                   - map with; [1, 0, 3, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15]
  Ba                 - Range; [1,2..20]
    ++'%'Va'a:0!a'   - function, evaluates to 0 if param cannot divide a i.e. 20
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27