accepted Problem7