# 1134. Armstrong Number ###### tags: `Leetcode` `Easy` ## Code ```java= class Solution { public boolean isArmstrong(int n) { String tmp = String.valueOf(n); int k = tmp.length(); int sum = 0, x = n; while(x>0){ sum += (int)Math.pow(x%10, k); x/=10; if(sum>n) return false; } return sum==n; } } ```