ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1402. Cocktails

Java language the best in the world
Posted by TUITUF_Bahrom 5 Apr 2013 14:01
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
Posted by Khujamurod Murtozakulov (Tashkent U of IT) 11 Dec 2018 11:43
I don't think so !!

Edited by author 11.12.2018 11:44