simple classes, add codewars - last digit of huge number

This commit is contained in:
schaermicha1 committed 2026-02-27 15:49:12 +01:00
1 parent d73e6cb2ec
commit 41c0c31f97
4 files changed
+61

No files matched your search

@@ -0,0 +1,20 @@
from codewars.lastDigitOfHugeNumber import last_digit
def test_last_digit():
test_data = [
([], 1),
([0, 0], 1),
([0, 0, 0], 0),
([1, 2], 1),
([3, 4, 5], 1),
([4, 3, 6], 4),
([7, 6, 21], 1),
([12, 30, 21], 6),
([2, 2, 2, 0], 4),
([937640, 767456, 981242], 0),
([123232, 694022, 140249], 6),
([499942, 898102, 846073], 6),
]
for test_input, test_output in test_data:
assert last_digit(test_input) == test_output