https://github.com/yankouskia/additional_6
Zeros
https://github.com/yankouskia/additional_6
Last synced: 20 days ago
JSON representation
Zeros
- Host: GitHub
- URL: https://github.com/yankouskia/additional_6
- Owner: yankouskia
- License: mit
- Created: 2017-02-17T20:03:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-28T13:49:20.000Z (over 7 years ago)
- Last Synced: 2025-03-29T11:06:31.291Z (27 days ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 0
- Forks: 770
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zeros
## Task
Implement function `zeros(str)`, that for given expression will return the number of zeros in the end of number.
Expression contains only factorials of numbers and multiplying signs, like: `zeros('5!*7!*6!!*7!!')`
`5! === 1 * 2 * 3 * 4 * 5`
`10!! === 2 * 4 * 6 * 8 * 10`
`7!! === 1 * 3 * 5 * 7````js
zeros('5!') // -> 1 because 5! === 120
zeros('10!') // -> 2 because 10! === 3628800
zeros('9!!*10!!') // 2 -> because 9!!*10!! === 3628800
```Write your code in `src/index.js`