Merge pull request #115 from RollandMichael7/patch-2
Update LowestBasePalindrome.java
This commit is contained in:
commit
8b29c6ca1d
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user