Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.math.BigInteger;
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = scanner.nextInt();
- BigInteger f = new BigInteger(String.valueOf(1));
- for (int i = 1; i <= n; i++) {
- f = f.multiply(BigInteger.valueOf(i));
- }
- System.out.println(f);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement