Go: package main

import "fmt"

func main() {
	var d int
	for {
		fmt.Scan(&d)
		sum := 0
		for i := 0; i < 600/d; i++ {
			sum += d*d*i*d*i
		}
		fmt.Println(sum)
	}
}

C++: #include<iostream>
#include<cstdio>
using namespace std;


int f(int x)
{
  return x * x;
}

int main(void)
{
  int a=0, i, d;

  scanf("%d", &d);

  for(i=1; i < 600/d; i++)
  {
    a = d * f(d*i) + a;
  }

  printf("%d", a);

  return 0;
}

C++: #include<iostream>
using namespace std;

double func(double d,double x){
	return d*x*x;
}

int main()
{
	while(1){
		double s=0,d;
		cin>>d;
		for(double i=d;i<600;i+=d){
			s+=func(d,i);
		}
		cout<<s;
	}
}

C++: #include<iostream>
#include<vector>

using namespace std;

double rect_area(double a,double b){
  return a*b*b;
}


int main(){
  int d;vector<int> ans;
  while(cin >> d){
    int l=int(600/d);
    double c=0;
    for(int i=0;i<l;i++){
      c+=rect_area(d,i*d);
    }
    ans.push_back(int(c));
  }
  for(auto& e: ans){
    cout << e << endl;
  }

}

C++: #include <bits/stdc++.h>
#include <chrono>
using namespace std;

using _i64 = int64_t;
using _u64 = uint64_t;
using _f64 = double;

#define endl "\n"

#define _for(i, start, end) for(_i64 i = (_i64)start; i < (_i64)end; ++i)
#define _rep(i, number) _for(i, 0, number)
#define _foreach(e, data) for(auto& e : data)
#define _all(data) data.begin(), data.end()

template<typename type>
_i64 _size(const type& data) { return static_cast<_i64>(data.size()); }
template<typename type, size_t size>
_i64 _size(const type (&)[size]) { return static_cast<_i64>(size); }

enum _flag : bool { able = true, disable = false };

struct _time {
    _time(_flag flag) { check = flag; if(!check) { return; } gettime(start); }
    ~_time() {
        if(!check) { return; }; gettime(end);
        _i64 elapse = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cout << endl << "Time: " << elapse << " ms" << endl;
    }
    private:
    using _timer = chrono::time_point<chrono::system_clock>;
    _timer start, end; bool check;
    void gettime(_timer& time) { time = chrono::system_clock::now(); }
};

struct _ini { _ini() { ios::sync_with_stdio(false); cin.tie(nullptr); } } _ini;

int main() {
    {
        _time time(disable);
        _i64 d, ans;
        while(cin >> d) {
            ans = 0;
            _for(i, 1, 600 / d) { ans += pow(d * i, 2) * d; }
            cout << ans << endl;
        }
    }
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;

int yf(int x)
{
  return x*x;
}


int main()
{
  int d;
  int ans;
  while( scanf("%d",&d) != EOF ){
    for(int i=0; i<(600/d); i++){
      ans = ans + d * yf((600 - (i+1)*d));
      //printf("%d\n",ans);
    }
    printf("%d\n",ans);
    ans = 0;
  }
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int main(int argc, char const* argv[])
{
	int sum[5000];
	int n;

	while( cin >> n && n != 0 ){
		int input;
		for( int i = 0;i < 5000;i++ ) sum[i] = 0;
		cin >> input;
		sum[1] = input;
		for( int i = 2;i <= n;i++ ){
			cin >> input;
			sum[i] = input + sum[i - 1];
		}

		int answer = -10000000;

		for( int i = 0;i <= n;i++ ){
			for( int j = 0;j < i;j++ ){
				answer = max( answer, sum[i] - sum[j] );
			}
		}

		cout << answer << endl;
	}

			

	return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
#define NUM 600

int main(){
	long n;
	while(cin >> n){
		long a = NUM/n;
		long b = 0;
		for(long i=1;i<a;i++) b += n*n*n*i*i;
		cout << b << endl;
	}
}

C++: using namespace std;int main(){int a=0,d,i=0;while(cin>>d){for(;i<600;i+=d){a+=i*i*d;}cout<<a<<endl;}}

C++: #include <iostream>
using namespace std;int main(){int a=0,d,i=0;while(cin>>d){for(;i<600;i+=d){a+=i*i*d;}cout<<a<<endl;}}

C++: #include <iostream>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    long long d;
    while (cin >> d) {
        long long sum = 0;
        for (int i=d; i<=600-d; i+=d) {
            sum += i * i * d;
        }
        cout << sum << "\n";
    }
    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;

int main()
{
    int d , s;
    while(cin >> d){
        s=0;
        for(int i=0 ; i<600 ; i+=d){
            s+=i*i*d;
        }
    　　cout << s << endl;
    }
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#define fi first
#define se second
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=10000009;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };
int main() {
	int d;
	while(true){
		cin>>d;
		int S=0;
		for(int i=1;i*d<=600-d;i++){
			int x=i*d;
			x=x*x;
			x*=d;
			S+=x;
		}
		cout<<S<<endl;
		S=0;
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int d;

    while (cin >> d) {
        int ans = 0;
        for (int a = d; a <= 600 - d; a += d) ans += a * a * d;
        cout << ans << endl;
    }
}

C++: #include <iostream>

using namespace std;

//height
int f(int x)
{
    return x * x;
}

int main()
{
    int d;
    
    while (cin>>n)
    {
        int ans = 0;
        
        for (int i = 1; d * i < 600; i++)
        {
            ans += f(d * i) * d; // equation is informed from question
        }
        
        cout<<ans<<endl;
    }
    
    return 0;
}

C++: #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;

int main(){
    int d;
    while(cin){
        cin >> d;
        if(!cin) break;
        int itg=0;
        for(int i=1;i*d<600;i++) itg+=pow(i*d,2)*d;
        cout << itg << endl;
    }
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}

ll f(ll x) {
	return x * x;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	int d;
	while (cin >> d) {
		ll n = 600/d;
		ll ans = 0;
		REP(i, n) {
			ll x1 = i * d, x2 = (i+1) * d;
			ans += d * f(x1);
		}
		cout << ans << endl;
	}
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

int main() {
	int d;
	int seki;
	int yaku;
	int sum = 0;

	while (cin >> d) {
		yaku = 600 / d - 1;

		for (int i = 0; i < yaku; i++) {
			seki = d * d * d * (i + 1) * (i + 1);
			sum += seki;
		}

		cout << sum << endl;
		sum = 0;
	}

	return 0;
}

C++: #include <iostream>
#include <cmath>

using namespace std;

int main(void){
	int s = 0, d;
	cin >> d;
	
	for(int i = d; i < 600; i += d) s += pow(i, 2);

	cout << s;

	return 0;
}

C++: // Integral

#include <iostream>
using namespace std;

int main() {
    int d; // 幅

    while (cin >> d) {
        int area = 0; // 累積の面積
        for (int x = d; x < 600; x += d) {
            area += x * x * d;
        }
        cout << area << "\n";
    }
    return 0;
}