static int count = 0; class sum { public: sum() { _count += _i; ++_i; } static int Getcount() { return _count; } private: static int _i; static int _count; }; int sum::_i = 1; int sum::_count = 0; class Solution { public: int Sum_Solution(int n) { sum arr[n]; return sum::Getcount(); } };