I just want to know,
Why int(a/b) or math.floor(a/b) is not working instead of a//b in this question or in general? What are the cases where using first 2 methods will give different results than a//b?
My solutions links where i have used following methods to code :
- int(a/b) : https://www.codechef.com/viewsolution/24866057
- math.floor(a/b) : https://www.codechef.com/viewsolution/24866078
- a//b : https://www.codechef.com/viewsolution/24866054
Only 3rd one is AC.
I have read this stackoverflow post but it doesn’t explain case of both positive numers : https://stackoverflow.com/questions/12843750/integer-division-is-a-b-inta-b-true-for-all-integers-a-b