|
|
back to boardJava language the best in the world import java.math.BigInteger; import java.util.Scanner; public class T_1402_Cocktails { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); BigInteger a[]=new BigInteger[30]; BigInteger p=BigInteger.ONE; a[0]=BigInteger.ONE; for (int i = 1; i <=21; i++) { p=p.multiply(new BigInteger(i+"")); a[i]=new BigInteger(p+""); } BigInteger sum=BigInteger.ZERO; for (int i = 0; i <=n-2; i++) sum=sum.add(a[n].divide(a[i])); System.out.println(sum); } } Re: Java language the best in the world I don't think so !! Edited by author 11.12.2018 11:44 |
|
|