Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
smenergy@inbox.ru
A,C,B are angles triangle. a,b,c are sides triangle (a,b,c Integer numbers). For C=2A -> c2=a2+ab. Solving system inequalities of triangle: a+b>c, b+c>a, a+c>b -> a<c<2a. for twice iteration 1th-a,2th-c (a<c<2a) and calculate b=(c2-a2)/a if b is Integer number and gcd(a,b,c)=1. My result for p=2470 is pos=219 (count(p)=1 for all p if pos < 219). This elementary geometry,but result incorrect.You can send a table of your results for 1<pos<215. Thank.
For n=215 result p=2470 and side=715,729,1026 is correct?
Ok.
You helped me.
Thank you!
1.Python
Results (see below).
Time: 648ms Passed: 116 Failed: 1 Exit Code: 1
Test Results:
Sample tests (green indicator)
Give way (green indicator)
No side streets (3 of 3 Assertions)
example
More tests
Side streets having no effect (3 of 3 Assertions)
Many side streets (4 of 4 Assertions)
Character test
Test Passed
Test Passed
Test Passed
Test Passed
'abcdaeafagahaiaajakalamaX' should equal 'abcdfeefdgchbiaejdkclbmaX' ????????
Random tests (100 of 100 Assertions)
I can't debug my code for unsuccessful test becouse I haven't input date (kata return only result witout input date) for the test.
I ask autor give me input date "Character test" number 5 for debug my code.
110 test is successful.
1 test is unsuccessful
All tests are ok (include Random 100 of 100 is ok). Only one test "Character test" number 5 is unsuccessful.
Hello!
I have solved all test but one.
I can't sove test "Character test" number 5.
Can you give me initial condition this test?
Thank you!
@raulbc777
In addition:
My result Python == my result Excel (calculation in Excel on basis of https://www.maa.org/sites/default/files/0746834215798.di020710.02p0187t.pdf for gcd==1)
I can my results send to you by e-mail(for p=2470 pos=219)
Hi!
I can't solve the task.
For this task (where Triangle has integtal side and one angle twice another):
gcd(a,b,c)=1
a=i2
b=j*i
c=j2-i2
where
i<j<i*20.5. The inequality for Python -> i<j<2i+1 or i<j<2i
Me code for p=2470 and side (715,729,1026) return order num = 219 (autor order number = 215). I think that my code return excess triangle, but I verified results for criterion of Heronian triangles.
I can send my code or You will send to me (smenergy@inbox.ru) list your results for order number 1...219
This comment is hidden because it contains spoiler information about the solution
Me code is located in "View solution" in previous my post.
Some comments:
Function f(k,m)
k-slope,
m[...]-parameters of point reflection:
m[0] - coordinate 'X' of point reflection,
m[1] - coordinate 'Y' of point reflection,
m[2] - edge of of point reflection (1-Top,2-Right,3-Bottom,4-Left,0-corner),
abs(a) - number of edge, sign(a) - sign slop.'''
P.S. I don't know download file-code in the chat.Sorry.
Hello!
I can't solve Reflecting Light V2.
Tests - successfully
Random tests - some successfully, some falied.
Can I send my code by e-mail?
Sorry.I'm not careful . Thank
Test code ERROR
Test.assert_equals(split_and_add([1,2,3,4,5], 2), [5,10])
NameError: name 'split_and_add' is not defined