Tap here to switch tabs
Problem
Submissions

Problem: Armstrong Number

med
30 min
Try to solve the Armstrong Number problem.

Statement

Given an integer n, return true if it is an Armstrong number, or false otherwise.

An integer n is an Armstrong number if the sum of each of its digits raised to the power of kk is equal to n, where kk is the total number of digits in n.

Constraints:

  • 1≤1 \leq n ≤108\leq 10^8

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Armstrong Number

med
30 min
Try to solve the Armstrong Number problem.

Statement

Given an integer n, return true if it is an Armstrong number, or false otherwise.

An integer n is an Armstrong number if the sum of each of its digits raised to the power of kk is equal to n, where kk is the total number of digits in n.

Constraints:

  • 1≤1 \leq n ≤108\leq 10^8