Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

2 of 5
added 178 characters in body
fəˈnɛtɪk
  • 4.2k
  • 2
  • 15
  • 40

JavaScript, 18 bytes

x=>y=>[x/y>>0,x%y]

Receives input in format (x)(y)

Gets floor of x/y by bitshifting answer by 0
Gets remainder by x%y
Puts both values in an array so that they can both be returned

Try it online!

fəˈnɛtɪk
  • 4.2k
  • 2
  • 15
  • 40

AltStyle によって変換されたページ (->オリジナル) /