백준

백준 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

'백준' 카테고리의 다른 글

백준 1037 - Java  (0) 2024.09.11
백준 11050 - Java  (0) 2024.09.09
백준 24723 - Java  (0) 2024.09.09
백준 15439 - Java  (0) 2024.09.09
백준 2346 - Java  (1) 2024.09.08