http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0014&lang=jp
#include <iostream> using namespace std; int main (int argc, const char * argv[]) { int read = 0; while (cin >> read) { int num = read; long long int sum = 0; for (int i = 1;(i * num) <= (600 - read) ; i++) { sum += ((i * num) * (i * num) * read); } cout << sum << "\n"; } return 0; }