eolymp
bolt
Try our new interface for solving problems
Problems

Rooks on a chessboard

published at 4/3/24, 10:56:09 pm

import java.util.Scanner; import java.math.BigInteger; public class Main { public static void main(String[] args) { Scanner sc = new Scanner (System.in); int n = sc.nextInt(); sc.close(); BigInteger f = BigInteger.ONE; for (int i=1; i<=n; i++) { f=f.multiply(BigInteger.valueOf(i)); } System.out.println(f); } }