mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-24 04:54:21 +08:00
Format code with prettier (#3375)
This commit is contained in:
@ -19,7 +19,6 @@ import java.util.Collections;
|
||||
public class VampireNumber {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
test(10, 1000);
|
||||
}
|
||||
|
||||
@ -32,15 +31,30 @@ public class VampireNumber {
|
||||
// System.out.println(i+ " "+ j);
|
||||
if (isVampireNumber(i, j, true)) {
|
||||
countofRes++;
|
||||
res.append("" + countofRes + ": = ( " + i + "," + j + " = " + i * j + ")" + "\n");
|
||||
res.append(
|
||||
"" +
|
||||
countofRes +
|
||||
": = ( " +
|
||||
i +
|
||||
"," +
|
||||
j +
|
||||
" = " +
|
||||
i *
|
||||
j +
|
||||
")" +
|
||||
"\n"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println(res);
|
||||
}
|
||||
|
||||
static boolean isVampireNumber(int a, int b, boolean noPseudoVamireNumbers) {
|
||||
|
||||
static boolean isVampireNumber(
|
||||
int a,
|
||||
int b,
|
||||
boolean noPseudoVamireNumbers
|
||||
) {
|
||||
// this is for pseudoVampireNumbers pseudovampire number need not be of length n/2 digits for
|
||||
// example
|
||||
// 126 = 6 x 21
|
||||
@ -58,7 +72,6 @@ public class VampireNumber {
|
||||
|
||||
// methode to Split the numbers to Digits
|
||||
static String splitIntoDigits(int num, int num2) {
|
||||
|
||||
StringBuilder res = new StringBuilder();
|
||||
|
||||
ArrayList<Integer> digits = new ArrayList<>();
|
||||
|
Reference in New Issue
Block a user