Solution of 12895 - Armstrong Number

Problem description 
source: https://uva.onlinejudge.org/external/128/12895.html




Input 

The first line of input is an integer, T that determines the number of test cases. Each of the next T lines contain a positive integer N, where N ≤ 1000000000.