NPS-INR-Cyber-Programming-2021

The 2021 edition of the NPS Indiranagar interhouse Cyber Programming contest.

View on GitHub

Tesla Pyramid

Problem Statement:

Elon Musk wants to build a pyramid of Teslas to appease the Martian Gods. If a pyramid has a height of K units, then there are i Teslas on the ith level (1 ≤ iK). To avoid being killed by the Martians when the SpaceX astronauts land on Mars, Elon Musk has hired you to find the maximum height pyramid that can be formed using N Teslas.

Constraints:

Subtask 1: 20 points

Subtask 2: 60 points

Input format:

Output format:

Sample input:

7 

Sample output:

3