Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const getGets = (arr) => {
- let index = 0;
- return () => {
- const toReturn = arr[index];
- index += 1;
- return toReturn;
- };
- };
- // this is the test
- const test = [
- '13',
- ];
- const gets = this.gets || getGets(test);
- const print = this.print || console.log;
- let input = gets()
- let number =0
- for (let i = 0 ; i < input ; i++) {
- if (input%i === 0 || input%(i+2) === 0) {
- number += i
- print(number)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement