Made an inefficient solution for https://codeforces.com/problemset/problem/2029/A
My solution worked but it was a brute force way to do it, I was just testing all of the possibilities that could have been part of my solution and counting them.
I need to start thinking like a Mathematician, I need to start looking at competitive programming problems as math problems. Similar to stuff we do in Math 135
After reading the editorial and understanding it their solution seemed so much more elegant, it just involved basic inequalities and rearranging it to find a formula that can solve the problem in O(1) complexity rather than what I was doing.
Link to code for the problem: https://github.com/LaZeAsh/competitive-programming/tree/main/Codeforces/2029A-Set