Sunday, October 1, 2017

623 - 500!

/***

            Bismillahir Rahmanir Rahim
            Read the name of Allah, who created you!!!
            Author : Shah Newaj Rabbi Shishir
            Department of CSE, City University, Bangladesh.

***/

import java.util.Scanner;
import java.math.BigInteger;

public class Main
{
public static void main (String args[])
{
Scanner in = new Scanner (System.in);

int n,i;

while (in.hasNext())
{
n = in.nextInt ();

BigInteger fact = BigInteger.valueOf(1);

for (i=1; i<=n; i++)
fact = fact.multiply(BigInteger.valueOf(i));

System.out.println (n+"!\n"+fact);
}
}
}

No comments: