Crafting exhibits of desired behav...
package margusmartseppcode.From_20_to_29; public class Problem_28 { public static void main(String[] args) { int sum = 1, diag = 1, size = 1001; for (int i = 2; i < size; diag += i * 4, i += 2) sum += 4 * diag + 10 * i; System.out.println(sum); } }
No comments:
Post a Comment