Skip to content

Instantly share code, notes, and snippets.

@modos
Created July 16, 2022 22:49
Show Gist options
  • Save modos/5957c8ec2751c80942ca100908c01837 to your computer and use it in GitHub Desktop.
Save modos/5957c8ec2751c80942ca100908c01837 to your computer and use it in GitHub Desktop.
بازی تفاضل
def get_digit(number, n):
return number // 10**n % 10
def game(number):
x = get_digit(number, 0)
y = get_digit(number, 1)
return abs(x - y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment