Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tc(s){
- var t = [3,6,9];
- while (s > 9){s = s.toString().split("").map(function(e){return parseInt(e,10)}).reduce(function(p,c){return p+c})};
- s = parseInt(s,10);
- return t.indexOf(s)!=-1;
- }
- function zu(i){
- var t = i.toString();
- var result = tc(t)?"ZAL":"";
- result += ((t.charAt(t.length-1) == "5")||(t.charAt(t.length-1) == "0"))?"UPA":"";
- return (result == "")?i:result;
- }
- var s = ""
- for(var i = 1; i<=100 ; i++ ) s += zu(i)
- console.log(s)
Advertisement
Add Comment
Please, Sign In to add comment