LeetCode 1134, Easy. Topics: Math. View on LeetCode.
Generate this problem as a practice environment: tested reference solution, 32 parametrized pytest cases, and a playground notebook:
Problem
Given an integer n, return true if and only if it is an Armstrong number.
The k-digit number n is an Armstrong number if and only if the k^th power of each digit sums to n.
Examples
Constraints
Solution
Reference implementation from solution.py on GitHub, full suite in test_solution.py:
Complexity
NeetCode All. Last modified on September 7, 2026