Project Euler 1 by C++

I can't solve it faster than this.