UJ spoj Solution - Correct, Optimal and Working

while 1:
	n,s,d=raw_input().partition(' ')
	if n=="0" and d=="0":
		break
	else:
		print (int(n)**(int(d)))

470+ Solutions to various Programming Questions

Subscribe to my weekley newsletter