Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
m-primes
import java.util.List; import java.util.ArrayList; public class PrimeFactorization { public PrimeFactorization(Integer n) { } public String toString() { return ""; } public static void main(String[] args) { String[][] testCases = { { "4", "2*2" }, { "9", "3*3" }, { "12", "2*2*3" }, { "20", "2*2*5" }, { "25", "5*5" }, { "29", "29" }, { "34", "2*17" }, { "52", "2*2*13" }, { "57", "3*19" }, { "60", "2*2*3*5" }, { "72", "2*2*2*3*3" }, { "90", "2*3*3*5" }, { "100", "2*2*5*5" }, }; for (String[] testCase : testCases) { Integer input = new Integer(testCase[0]); String expected = testCase[1]; String actual = new PrimeFactorization(input).toString(); assert actual.equals( expected ) : String.format("%s: [%s] != [%s]", input, actual, expected ); } } }
run
|
edit
|
history
|
help
0
jb15.0
patterns
JAVA # Klavyeden girilen cümlede kaç adet "a" harfi var
Java consecutive repeated cha
exp 1
pow x^n
classwork
Complex number multiplication (leetcode)
java
Linked List creation