1 import java.util.*; 2 3 public class Demo1 { 4 public static void main(String[] args) { 5 Scanner sc=new Scanner(System.in); 6 long n; 7 n=sc.nextLong(); 8 long res=n*(n-1)/2%998244353; 9 for (int i = 3; i<=n; i++) { 10 res=(res*i)%998244353; 11 } 12 13 //res=(n*res)%998244353; 14 System.out.print(res); 15 } 16 }
标签:排列,Scanner,long,数学,sc,价值,public From: https://www.cnblogs.com/saucerdish/p/18125891