Skip to main content
4 of 5
edited body
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27

Recursiva, 20 bytes

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

Try it online!

Explanation:

smBa++'=0%'Va'a:a!0' - 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]
    ++'=0%'Va'a:a!0' - function, evaluates to 0 if param cannot divide a i.e. 20
0xffcourse
  • 2.8k
  • 3
  • 14
  • 27