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.
- Prepare
- Algorithms
- Sorting
- Closest Numbers
- Discussions
Closest Numbers
Closest Numbers
Sort by
recency
|
605 Discussions
|
Please Login in order to post a comment
Java
import math
def find_closest_multiple(a, b, x): ab = pow(a, b) lower_multiple = (ab // x) * x upper_multiple = lower_multiple + x
def main(): import sys input = sys.stdin.read data = input().split()
if name == "main": main()
Here is my c++ solution, you can watch the explanation here: https://youtu.be/-sX3IgdQ6Wg
Python
Java Collections.sort(arr);