Skip to content

Instantly share code, notes, and snippets.

View KatUser's full-sized avatar
🌊
Dreams of sea that will never see

Qatya KatUser

🌊
Dreams of sea that will never see
  • CFT
  • Novosibirsk, Russia
  • 17:55 (UTC +07:00)
View GitHub Profile
@KatUser
KatUser / Sys исчисления
Created July 23, 2020 08:01
88 = 32 +22 +17 +16 in 9 sys
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)