Happy New Year 2025

ABC 387

Problem 29 of 50

Easy

What to do

Given two positive integers a and b, calculate (a + b)². Return the result. For example, square_of_sum(20, 25) = (20+25)² = 45² = 2025.

Key Concepts

basic math input/output variables addition squaring a number

Examples

Input: a = 20, b = 25

Output: 2025

Input: a = 30, b = 25

Output: 3025

Tips for Beginners

  • Focus on understanding the logic, not memorizing syntax
  • Use print statements to debug your code
  • Don't worry about input parsing - the function handles that for you
  • If stuck, try writing out your solution on paper first

Python Editor

Loading Python...