1. 

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #10220 I love Big Numbers !
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=14&page=show_problem&problem=1161
*
* @author Julius Tschannerl
* @author David Leib
* @version 1.0, 25/05/2009
*
* Status : Accepted
* Runtime: 0.440
*/


import java.util.*;
import java.math.*;


public class ilove {


public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
BigInteger[] factors = new BigInteger[1001];
factors[0] = new BigInteger("1");
for(int i = 1; i<=1000; i++){
factors[i] = factors[i-1].multiply(new BigInteger(Integer.toString(i)));
}


while(sc.hasNext()){
BigInteger i = factors[sc.nextInt()];
Integer checksum = 0;
while(i.compareTo(new BigInteger("0"))>0){
checksum += i.mod(new BigInteger("10")).intValue();
i = i.divide(new BigInteger("10"));
}
System.out.println(checksum);

}


}

}

2.

/**
* Angewandte Mathematik SS09
* ACM Problem 10220 - I love big numbers!
*
* @author M. Stadler
* @author J. M�ller
* @version 1.0
*
* Status : Accepted
* Runtime: 0.884
*/

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
BigInteger big = new BigInteger("1");
int[] data = new int[1001];
for (int i = 1; i < 1001; i++) {
big = big.multiply(new BigInteger("" + i));
char[] tmp = big.toString().toCharArray();
int num = 0;
for(char j: tmp) {
num += ((int)j) - 48;
}
data[i] = num;
}

BufferedReader foo = new BufferedReader(new InputStreamReader(System.in));
String input;

try {
while ((input = foo.readLine()) != null) {
System.out.println(data[Integer.parseInt(input)]);
}
} catch (IOException e) {

}
}

}

3.

/* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #10220 (I Love Big Numbers !)
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=14&page=show_problem&problem=1161
*
* @author Dennis Wilfert
* @author Johann Studt
* @version 1.0, 05/26/2009
*
* Status : Accepted
* Runtime: 0.236
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

public static void main(String... args)
{
Scanner scanner = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
// StringBuilder für die Ausgabe
StringBuilder output = new StringBuilder();
// Eingelesener Wert
int count;
// Eingelesener Wert als BigInteger
BigInteger number;
// Ergebnis der Multiplikation
BigInteger result;
// Ergebnis als String
String resultstring;
// Summe aus den einzelnen Ziffern des Ergebnis
int sum;
// Länge des Strings
int length;
while (scanner.hasNext())
{
sum = 0;
count = scanner.nextInt();
number = BigInteger.valueOf(count);
result = BigInteger.ONE;

// Von der Zahl immer eins abziehen und zu result multiplizieren
for(int i = count; i>1; i--){
result = result.multiply(number);
number = number.subtract(BigInteger.ONE);
}
// Ergebnis als String
resultstring = result.toString();
length = resultstring.length();

// Einzelne Ziffern auslesen und zu sum addieren
for(int i = 0; i < length; i++)
sum += Long.parseLong(resultstring.substring(i, i+1));

// An Ausgabe anhängen
output.append(sum + "\n");
}
System.out.print(output);
}
}