ZZULIOJ-1005, integral powers (Python)

Subject description:

3 integer input, the output power thereof 1, 2 and 3 power power. 

Input: 

3 input integer, separated by spaces.  

Output: 

3 the output lines of three integers, they are a power and second power and the third power, each representing an integer of 9, 9 insufficient left-aligned.  

Sample input: 

1 5 100 

Sample output: 

1 1 1

5 25 125

100 10000 1000000  

code: 

a,b,c=map(int,input().split())
print("%-9d%-9d%-9d" %(a,a*a,a*a*a))
print("%-9d%-9d%-9d" %(b,b*b,b*b*b))
print("%-9d%-9d%-9d" %(c,c*c,c*c*c))

 

Published 331 original articles · won praise 343 · views 40000 +

Guess you like

Origin blog.csdn.net/weixin_43823808/article/details/104701985