We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Python
  3. Math
  4. Integers Come In All Sizes

Integers Come In All Sizes

Problem
Submissions
Leaderboard
Discussions
Editorial

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.

Task
Read four numbers, , , , and , and print the result of .

Input Format
Integers , , , and are given on four separate lines, respectively.

Constraints



Output Format
Print the result of on one line.

Sample Input

9
29
7
27

Sample Output

4710194409608608369201743232  

Note: This result is bigger than . Hence, it won't fit in the long long int of C++ or a 64-bit integer.

Author

shashank21j

Difficulty

Easy

Max Score

10

Submitted By

176496

Need Help?


View discussions
View editorial
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy