Merge pull request #115 from RollandMichael7/patch-2

Update LowestBasePalindrome.java
This commit is contained in:
Anup Kumar Panwar 2017-10-01 14:09:28 +05:30 committed by GitHub
commit 8b29c6ca1d

View File

@ -46,7 +46,7 @@ public class LowestBasePalindrome {
String digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; String digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
while (!foundBase) { while (!foundBase) {
// Try from bases 2 to num (any number n in base n is 1) // Try from bases 2 to num-1
for (base=2; base<num2; base++) { for (base=2; base<num2; base++) {
newNum=""; newNum="";
while(num>0) { while(num>0) {