백준
백준 10872 - Java
으엉어엉
2024. 9. 9. 11:25
728x90
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Factorial {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
int fact = 1;
for (int i = 1; i <= N; i++) {
fact *= i;
}
System.out.println(fact);
}
}
728x90