Whatā€™s the best way to address this problem? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Whatā€™s the best way to address this problem?

you are one the NBAā€™s top executives and with the playoffs starting, you want to make sure that the league has prepared enough basketballs to go around. Youā€™ve received word from your assistant that the league will need to prepare X amount of basketballs, each with a unique radius R for the playoffs. You immediately rush to your warehouse and measure it to be L by W by H. Write a program that determines whether or not the basketballs will fit inside the warehouse. Assume that the balls can be deformed.

4th May 2018, 2:29 PM
Lyka Abregana
Lyka Abregana - avatar
1 Resposta
+ 3
that the balls can be deformed means that you can squeeze them so that no empty space is left between them. the volume of your warhouse is w=L*W*H volume of one basketball b=(4Ć·3)*pi*r*r*r number of basketballs that can fit n=wĆ·b write the code in your preferred language.
4th May 2018, 2:37 PM
storm
storm - avatar