Compare commits

..

No commits in common. "9dea34d7ac17ca6276406682cb9c1b0aaee4de79" and "60c75969d9d5ce08e71fd21c8acbea0ea43ffd79" have entirely different histories.

2 changed files with 2 additions and 15 deletions

View File

@ -1,14 +1,3 @@
def is_armstrong(n:int) -> bool: def is_armstrong(n:int) -> bool:
digits_str = str(n) pass
digits_len = len(digits_str)
total = 0
for digit in digits_str:
number = int(digit)
result = number ** digits_len
total = total + result
return total == n
if __name__ == "__main__":
print(f"is_armstrong(153) = {is_armstrong(153)}")
print(f"is_armstrong(10) = {is_armstrong(10)}")
print(f"is_armstrong(9474) = {is_armstrong(9474)}")
print(f"is_armstrong(123) = {is_armstrong(123)}")

View File

@ -1,2 +0,0 @@
def intersection_of_sorted(a: list, b: list) -> list:
pass