ABC400 Party
ABC 400Problem 16 of 50
EasyWhat to do
You need to arrange 400 people in a rectangle with a given number of rows (A). Your task is to find out how many columns (B) you can have if each row must be full. If it's not possible to arrange them this way, you should return -1.
Key Concepts
basic math
if-statements
input/output
division
Examples
Input:
10
Output:
40
Input:
11
Output:
-1
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...