We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Python:
just figure out // is floor division and / is float division.
When n are very large, / will round your result and // will result in integer.
Try the following code to see the difference
print(10 ** 25 / 2, 10 ** 25 // 2)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #169: Exploring the number of different ways a number can be expressed as a sum of powers of 2.
You are viewing a single comment's thread. Return to all comments →
Python: just figure out // is floor division and / is float division. When n are very large, / will round your result and // will result in integer. Try the following code to see the difference print(10 ** 25 / 2, 10 ** 25 // 2)