Integers Come In All Sizes

Sort by

recency

|

406 Discussions

|

  • + 0 comments
    a,b,c,d = [int(input()) for _ in range(4)]
    print(pow(a,b) + pow(c,d))
    
  • + 0 comments

    Trying to do it with the least amount of code…

    a, b, c, d = map(int, [input() for _ in range(4)])
    print(a**b + c**d)
    

    I don't really like using input(), so at first I had the slightly longer…

    import sys
    
    a, b, c, d = map(int, sys.stdin.read().split())
    print(a**b + c**d)
    
  • + 0 comments

    Here is HackerRank Integer Come in all sizes in python solution - https://programmingoneonone.com/hackerrank-integers-come-in-all-sizes-solution-in-python.html

  • + 0 comments
    a,b,c,d=int(input()),int(input()),int(input()),int(input())
    print(a**b+c**d)
    
  • + 0 comments

    Hackerrank is a great place to sharpen those skills and learn more languages while you're at it! Tigerexch 247