Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import jdk.nashorn.internal.scripts.JO;
- import javax.print.attribute.standard.JobPriority;
- import javax.swing.*;
- import java.math.BigDecimal;
- import java.math.BigInteger;
- import java.util.Scanner;
- import java.util.stream.IntStream;
- public class A {
- public static void main(String[] args) {
- BigInteger sum = new BigInteger("0");
- BigInteger multiple = new BigInteger("1");
- for (int i = 1; i < 1001; i++) {
- multiple = Math.pow(i, i);
- sum += multiple;
- System.out.println(multiple);
- }
- System.out.println(sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement