Skip to content

Instantly share code, notes, and snippets.

@mojaie
Created December 4, 2011 16:09
Show Gist options
  • Save mojaie/1430554 to your computer and use it in GitHub Desktop.
Save mojaie/1430554 to your computer and use it in GitHub Desktop.
AOJ:0014
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
while (scn.hasNext()) {
int d = scn.nextInt();
int n = 600 / d;
int area = 0;
for (int i = 1; i < n; i++) {
area = area + (d * d * d * i * i);
}
System.out.println(area);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment