Answer by Hot Licks for the thirteen adjacent digits in the 1000-digit number...
I suspect the problem is this: int A 32-bit int can store a number up to 2,147,483,647, but the possible product of 13 instances of the 9 digit is 2,541,865,828,329. The result and max values need to...
View ArticleAnswer by kugelblitz for the thirteen adjacent digits in the 1000-digit...
I didn't test it, but I thing this should work: int const ADJ_NUMBERS= 13; long maxVal = 0; long currentVal; for(int i = 0; i < list.size() - ADJ_NUMBERS; i++){ currentVal = list.get(i); for(int j =...
View Articlethe thirteen adjacent digits in the 1000-digit number that have the greatest...
this is my code for finding the thirteen adjacent digits in the 1000-digit number that have the greatest product. can anyone tell me where did i do wrong? for(int i = 0; i <= list.size()-13 ; i++){...
View Article
More Pages to Explore .....