+ 13
Challenge ::: Circle Dot
Description :- Assume there is a circle with n(even number) of points with marking from 0 to n-1 with equal distance. So each point have a point opposite to it. Task :- To make a code which takes a input n and input pointr(a point on circle marked). You have to find the point which is opposite to pointr. Example:- Input :- 10, 7 Output :- 7 is opposite to 2;
10 odpowiedzi
+ 14
Here's mine in Python:
https://code.sololearn.com/crUgZndu2UpU/?ref=app
+ 7
https://code.sololearn.com/cddgHOa6u3Mf/?ref=app
+ 6
@BlazingMagpie Suppose if the input is 10 and 0. The answer should be 5.
But according to you it is just 9.
Think before you do something. Please make a equation that satisfy all the inputs not just one.
+ 6
my oneliner!!
//excluding the input line
https://code.sololearn.com/clKJGW10DXxN/?ref=app
+ 6
And.....Here is the Python 😀😀
https://code.sololearn.com/cHX0Cf6ras8C/?ref=app
+ 3
https://code.sololearn.com/cCq1jkXjTDpJ
+ 2
Oh, I was imagining the circle wrong.
- 5
Isn't it just n - pointr - 1?