Created
June 20, 2023 04:39
-
-
Save fahnub/90042b22777413108aad30996a0bde8f to your computer and use it in GitHub Desktop.
Foobar Level 2 Problem 1 (bunny worker locations)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(x, y): | |
worker_id = (((x + y - 2) * (x + y - 1)) / 2) + x | |
return str(worker_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment