This commit is contained in:
smayzy committed 2026-10-04 11:11:18 +02:00
1 parent 6361168409
commit bfac007c85
9 files changed
+118

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
def from_base(digits, base):
power = 1
number = 0
for digit in reversed(digits):
number += power * digit
power *= base
return number
digits = [int(input("digit_a : ")), int(input("digit_b : ")), int(input("digit_c : ")), int(input("digit_c : "))]
base = int(input("base : "))
print(from_base(digits, base))