You are viewing a single comment's thread. Return to all comments →
I only checked your numbers up to 18).
Yours results for 15, 27, 32, 35, 36, 51, 55, 60, 63 are not unique.
5^2 - 3^2 - 1^2 = 15 7^2 - 5^2 - 3^2 = 15 19^2 - 15^2 - 11^2 = 15
12^2 - 9^2 - 6^2 = 27 34^2 - 27^2 - 20^2 = 27
7^2 - 4^2 - 1^2 = 32 11^2 - 8^2 - 5^2 = 32
8^2 - 5^2 - 2^2 = 35 10^2 - 7^2 - 4^2 = 35 44^2 - 35^2 - 26^2 = 35
9^2 - 6^2 - 3^2 = 36 23^2 - 18^2 - 13^2 = 36
22^2 - 17^2 - 12^2 = 51 64^2 - 51^2 - 38^2 = 51
9^2 - 5^2 - 1^2 = 55 15^2 - 11^2 - 7^2 = 55 69^2 - 55^2 - 41^2 = 55
10^2 - 6^2 - 2^2 = 60 14^2 - 10^2 - 6^2 = 60 38^2 - 30^2 - 22^2 = 60
11^2 - 7^2 - 3^2 = 63 13^2 - 9^2 - 5^2 = 63 27^2 - 21^2 - 15^2 = 63 79^2 - 63^2 - 47^2 = 63
My solution for the sample test is:
1 4^2 - 3^2 - 2^2 = 3 2 3^2 - 2^2 - 1^2 = 4 3 9^2 - 7^2 - 5^2 = 7 4 14^2 - 11^2 - 8^2 = 11 5 8^2 - 6^2 - 4^2 = 12 6 6^2 - 4^2 - 2^2 = 16 7 24^2 - 19^2 - 14^2 = 19 8 13^2 - 10^2 - 7^2 = 20 9 29^2 - 23^2 - 17^2 = 23 10 18^2 - 14^2 - 10^2 = 28 11 39^2 - 31^2 - 23^2 = 31 12 54^2 - 43^2 - 32^2 = 43 13 28^2 - 22^2 - 16^2 = 44 14 59^2 - 47^2 - 35^2 = 47 15 16^2 - 12^2 - 8^2 = 48 16 33^2 - 26^2 - 19^2 = 52 17 74^2 - 59^2 - 44^2 = 59 18 84^2 - 67^2 - 50^2 = 67 19 43^2 - 34^2 - 25^2 = 68 20 89^2 - 71^2 - 53^2 = 71 21 48^2 - 38^2 - 28^2 = 76 22 99^2 - 79^2 - 59^2 = 79 23 26^2 - 20^2 - 14^2 = 80 24 104^2 - 83^2 - 62^2 = 83 25 58^2 - 46^2 - 34^2 = 92
Can anybody confirm that? Thanks!
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Project Euler #136: Singleton difference
You are viewing a single comment's thread. Return to all comments →
I only checked your numbers up to 18).
Yours results for 15, 27, 32, 35, 36, 51, 55, 60, 63 are not unique.
5^2 - 3^2 - 1^2 = 15 7^2 - 5^2 - 3^2 = 15 19^2 - 15^2 - 11^2 = 15
12^2 - 9^2 - 6^2 = 27 34^2 - 27^2 - 20^2 = 27
7^2 - 4^2 - 1^2 = 32 11^2 - 8^2 - 5^2 = 32
8^2 - 5^2 - 2^2 = 35 10^2 - 7^2 - 4^2 = 35 44^2 - 35^2 - 26^2 = 35
9^2 - 6^2 - 3^2 = 36 23^2 - 18^2 - 13^2 = 36
22^2 - 17^2 - 12^2 = 51 64^2 - 51^2 - 38^2 = 51
9^2 - 5^2 - 1^2 = 55 15^2 - 11^2 - 7^2 = 55 69^2 - 55^2 - 41^2 = 55
10^2 - 6^2 - 2^2 = 60 14^2 - 10^2 - 6^2 = 60 38^2 - 30^2 - 22^2 = 60
11^2 - 7^2 - 3^2 = 63 13^2 - 9^2 - 5^2 = 63 27^2 - 21^2 - 15^2 = 63 79^2 - 63^2 - 47^2 = 63
My solution for the sample test is:
Can anybody confirm that? Thanks!