Update Problem7.cs

Removed unnecessary memory consumption