Integers in Python can be as big as the bytes in your machine's memory. There is no limit in size as there is: (c++ int) or (C++ long long int).
As we know, the result of grows really fast with increasing .
Let's do some calculations on very large integers.
Read four numbers, a, b, c, and d, and print the result of ab + cd.
Integers a, b, c, and d are given on four separate lines, respectively.
Print the result of on one line.
9 29 7 27
Note: This result is bigger than . Hence, it won't fit in the long long int of C++ or a 64-bit integer.
Solution in Python
a,b,c,d = [int(input()) for i in range(4)] print(a**b+c**d)