Problems
10034 - Multi Power Number
SUBMIT PROBLEM

Multi Power Number

Time Limit: 3 sec

 

The Problem

A positive number is said to be multi power number when it is the power of two or more different positive integers.

For example 16 is a multi power number as 4^2 = 16 and 2^4 = 16.

[Here ^ sign denoted power]

 

First 10 multi power numbers are

1, 16, 64, 81, 256, 512, 625, 729, 1024, 1296.

 

Write a simple program that reads one variable named n. Calculate and print the nth multi power number.

 

The Input

Input file contain a series of line, each line contain one integer number n(0<n<=30000).  Input is terminated by EOF.

 

The Output

For each line of input, output will show one integer number which is the nth multi power number in a separate line.

 

Sample Input

2

10

99

 

Sample Output

16

1296

28398241

 

 

 

[School & College Level]

1st Online Programming Contest 2016 by Outsbook

Problem Setter: Shahin ShamS