import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
BigInteger res = BigInteger.ONE;
BigInteger modu = new BigInteger("10000000000");
for (int i = 2; i <= 1000; i++)
res = res.add(new BigInteger(i+"").modPow(new BigInteger(i+""), modu));
System.out.println(res.mod(modu));
}
}
No hay comentarios:
Publicar un comentario