Results for “floor division”

4 results

  1. Challenge

    Packing crates

    …9 Tubes in the last crate: 4 Empty slots: 8 Rounding a division up is a classic trick: (tubes + slots_per_crate - 1) // slots_per_crate . Adding one tube less than a full crate pushes any leftover…

    Write the code Medium 2 stages floor division modulo rounding up //
  2. Challenge

    Duration formatter

    Split 100,000 seconds of mission time into hours, minutes and seconds with // and %, pad it to a 27:46:40 clock, then add days in the DDD/HH:MM:SS format.

    Write the code Easy 3 stages floor division modulo // %