Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
sao
i use array to storage the nums, and i successed in my chorme,but can't in here; lose heart!!!,this my code ,who can help me?
var ll=[];
function intCubeSumDiv(n) {
// your code
if(ll.length!=0){
if(ll.length>=n){
return ll[n];
}else{
return test(ll[ll.length-1],n);
}
}else{
return test(2,n);
}
}
function test(w,n){
var sum=0;
for(var j=1;j<=Math.sqrt(w);j++){
if(w%j==0){
if(j==Math.sqrt(w)){
sum+=j;
}else{
sum+=j+w/j;
}
}
}
if(Math.pow(w,3)%sum==0){
ll.push(w);
if(ll.length==n){
return w;
}else{
w++;
return test(w,n);
}
}else{
w++;
return test(w,n);
}
}
cool solution