Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int SelfPowers()
- {
- __int64 currentSum = 0;
- for (int i = 1; i <= 1000; i++)
- {
- currentSum += (i * i);
- }
- std::string str = std::to_string(currentSum);
- std::string output = str.substr(str.size() - 9, str.size());
- return std::stoi(output);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement