package test; import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); //要取余就要在每一次可能溢出的运算处取余 long sum=0; for(long i=1;i<=100;i++) { long ans=1; for(long j=2;j<=i;j++) { ans*=j; ans%=1000000000; } sum+=ans; sum%=1000000000; } long a=sum%1000000000; System.out.print(a); } }