Formula is N=t^2-t/2

Problem...if a leage has 45 games scheduled, how many teams belong to the league, assumeing that each team plays every team once?

How do you set this problem up??? if "t" is the teams then it seems that we donr have enough info...

The answer for a similar problem but with 36 games is "9 teams".

I just need to see how its done.Can anyone understand this problem?