#include<bits/stdc++.h>using namespace std; int main(){int n;long long s = 0;cin >> n >> s;for(long long i = 1; i <= n; i++){s += i * i;}cout << s;return 0;}
Standard input is empty
3558294863109
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!