Created
July 23, 2020 08:01
-
-
Save KatUser/764ca933487fb671195def756fe7d422 to your computer and use it in GitHub Desktop.
88 = 32 +22 +17 +16 in 9 sys
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
trees = int(input()) | |
apples, pears, plums, cherries = int(input()), int(input()), int(input()), int(input()) | |
sys = 1 | |
def findsys(s): | |
while True: | |
if (trees//10) * (s**1) + (trees%10) * (s**0) == (apples//10) * (s**1) + (apples%10) * (s**0) + (pears // 10) * (s ** 1) + (pears % 10) * (s ** 0) + (plums//10) * (s**1) + (plums%10) * (s**0) + (cherries//10) * (s**1) + (cherries%10) * (s**0): | |
print(s) | |
break | |
else: | |
s = s + 1 | |
findsys(sys) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment