Skip to main content
Commonmark migration
Source Link

#Java 8, 12 bytes

Java 8, 12 bytes

y->~-y/100+1

Try it online.

Explanation:

y->     // Method with integer as both parameter and return-type
  ~-y   //  Decrease the input by 1
  /100  //  Then integer-divide it by 100
  +1    //  And then add 1

#Java 8, 12 bytes

y->~-y/100+1

Try it online.

Explanation:

y->     // Method with integer as both parameter and return-type
  ~-y   //  Decrease the input by 1
  /100  //  Then integer-divide it by 100
  +1    //  And then add 1

Java 8, 12 bytes

y->~-y/100+1

Try it online.

Explanation:

y->     // Method with integer as both parameter and return-type
  ~-y   //  Decrease the input by 1
  /100  //  Then integer-divide it by 100
  +1    //  And then add 1
Source Link
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384

#Java 8, 12 bytes

y->~-y/100+1

Try it online.

Explanation:

y->     // Method with integer as both parameter and return-type
  ~-y   //  Decrease the input by 1
  /100  //  Then integer-divide it by 100
  +1    //  And then add 1