A=B
Prime factorization
Broken test cases
11001=25=5*5=101,101
but the expected output is 11001.

I will post more broken test cases if I find any.
< >
Показване на 1-5 от 5 коментара
I have created a spreadsheet of the numbers from 2-100 and their prime factorization, in both decimal and binary.

Please forgive the poor formatting.


Input (decimal) Output (decimal) Input (binary) Output (binary)
2 2 10 10
3 3 11 11
4 2,2 100 10,10
5 5 101 101
6 2,3 110 10,11
7 7 111 111
8 2,2,2 1000 10,10,10
9 3,3 1001 11,11
10 2,5 1010 10,101
11 11 1011 1011
12 2,2,3 1100 10,10,11
13 13 1101 1101
14 2,7 1110 10,111
15 3,5 1111 11,101
16 2,2,2,2 10000 10,10,10,10
17 17 10001 10001
18 2,3,3 10010 10,11,11
19 19 10011 10011
20 2,2,5 10100 10,10,101
21 3,7 10101 11,111
22 2,11 10110 10,1011
23 23 10111 10111
24 2,2,2,3 11000 10,10,10,11
25 5,5 11001 101,101
26 2,13 11010 10,1101
27 3,3,3 11011 11,11,11
28 2,2,7 11100 10,10,111
29 29 11101 11101
30 2,3,5 11110 10,11,101
31 31 11111 11111
32 2,2,2,2,2 100000 10,10,10,10,10
33 3,11 100001 11,1011
34 2,17 100010 10,10001
35 5,7 100011 101,111
36 2,2,3,3 100100 10,10,11,11
37 37 100101 100101
38 2,19 100110 10,10011
39 3,13 100111 11,1101
40 2,2,2,5 101000 10,10,10,101
41 41 101001 101001
42 2,3,7 101010 10,11,111
43 43 101011 101011
44 2,2,11 101100 10,10,1011
45 3,3,5 101101 11,11,101
46 2,23 101110 10,10111
47 47 101111 101111
48 2,2,2,2,3 110000 10,10,10,10,11
49 7,7 110001 111,111
50 2,5,5 110010 10,101,101
51 3,17 110011 11,10001
52 2,2,13 110100 10,10,1101
53 53 110101 110101
54 2,3,3,3 110110 10,11,11,11
55 5,11 110111 101,1011
56 2,2,2,7 111000 10,10,10,111
57 3,19 111001 11,10011
58 2,29 111010 10,11101
59 59 111011 111011
60 2,2,3,5 111100 10,10,11,101
61 61 111101 111101
62 2,31 111110 10,11111
63 3,3,7 111111 11,11,111
64 2,2,2,2,2,2 1000000 10,10,10,10,10,10
65 5,13 1000001 101,1101
66 2,3,11 1000010 10,11,1011
67 67 1000011 1000011
68 2,2,17 1000100 10,10,10001
69 3,23 1000101 11,10111
70 2,5,7 1000110 10,101,111
71 71 1000111 1000111
72 2,2,2,3,3 1001000 10,10,10,11,11
73 73 1001001 1001001
74 2,37 1001010 10,100101
75 3,5,5 1001011 11,101,101
76 2,2,19 1001100 10,10,10011
77 7,11 1001101 111,1011
78 2,3,13 1001110 10,11,1101
79 79 1001111 1001111
80 2,2,2,2,5 1010000 10,10,10,10,101
81 3,3,3,3 1010001 11,11,11,11
82 2,41 1010010 10,101001
83 83 1010011 1010011
84 2,2,3,7 1010100 10,10,11,111
85 5,17 1010101 101,10001
86 2,43 1010110 10,101011
87 3,29 1010111 11,11101
88 2,2,2,11 1011000 10,10,10,1011
89 89 1011001 1011001
90 2,3,3,5 1011010 10,11,11,101
91 7,13 1011011 111,1101
92 2,2,23 1011100 10,10,10111
93 3,31 1011101 11,11111
94 2,47 1011110 10,101111
95 5,19 1011111 101,10011
96 2,2,2,2,2,3 1100000 10,10,10,10,10,11
97 97 1100001 1100001
98 2,7,7 1100010 10,111,111
99 3,3,11 1100011 11,11,1011
100 2,2,5,5 1100100 10,10,101,101
[\spoiler]

Последно редактиран от David; 8 май 2022 в 20:31
If you like, I can put (in spoiler text) my horribly inefficient function that generates those cases in sandbox mode.
Alternatively, you can ask me to delete this thread, and I will stop bothering you.
Let me see what's wrong with my code.
I have to add another line to make it correct. Now the goal is 39 lines.
Terribly sorry for my carelessness, and thank you for your time.
This update may fix all the cases.
Thank you.
Unless we are both wrong, this version seems to work.
< >
Показване на 1-5 от 5 коментара
На страница: 1530 50