We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

# Project Euler #217: Balanced Numbers

# Project Euler #217: Balanced Numbers

#### Sort by

recency

#### |

#### 11 Discussions

#### |

Please Login in order to post a comment

Something is wrong with the server.

Can someone just tell me why am I getting timeout error in some problems, wrong in some and right in some

long int num[1000],ans[2]; long int Base,num_dig,totalsum=0;

int summation(int a) {int sum=0; for(int i=0;i<=a;i++) sum+=num[i]; return sum;}

void convert (int i) {int a=-1; ans[1]=i; double sum1=0,sum2=0,num1=i; while(i>0) {a++; num[a]=i%Base; i/=Base; } sum1=summation(a); sum2=summation(a/2);

}

int main() { long int count=0; cin>>Base; cin>>num_dig;

}

@khalid_t would you consider disclosing base and number of digits of test cases 3 until 6 ? I see a lot of people stuck at scores 0.1 (only first 3 test cases) and 0.29 (only first 4). Also I suspect that timeouts in test cases above 7 are somehow associated with failing the first ones...

and how we are getting the sequence

1,2,3,4,5,6,7,8,9,10,12,24,36............

how ? please explain

can you please explain me how that would be 240 for second case.

i did nt understand what exactly balanced means. please any one explain me ?