Header Ad

HackerRank Integers come in all sizes solution in python

In this Integers come in all sizes problem we need to develop a python program that can read four integers separated with lines. and then we need to print the value of the expression on the output screen.

HackerRank Integers come in all sizes solution in python


Problem solution in Python 2 programming.

a=int(input())
b=int(input())
c=int(input())
d=int(input())
print a**b+c**d


Problem solution in Python 3 programming.

# Enter your code here. Read input from STDIN. Print output to STDOUT
a,b,c,d = (int(input()) for _ in range(4))
print (pow(a,b)+pow(c,d))


Problem solution in pypy programming.

a = int(raw_input())
b = int(raw_input())
c = int(raw_input())
d = int(raw_input())
print a**b + c**d


Problem solution in pypy3 programming.

# Enter your code here. Read input from STDIN. Print output to STDOUT
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(pow(a,b)+pow(c,d))


Post a Comment

0 Comments