Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let print = this.print || console.log;
- let output = 0
- for(i = 1 ; i <= 1000 ; i++){
- let number = +gets()
- let m = number.toString()
- let n = m.split("").map(Number)
- if(n[0] + n[2] === n[1]){
- output += number
- }
- else {break;}
- }
- print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement