Problem (문제) The factorial of the integer n, written n!, is defined as: 정수 n의 팩토리얼, n!은 다음과 같다. n!=n*(n-1)*(n-2)*···*3*2*1 Calculate and print the factorial of a given integer. 주어진 정수의 팩토리얼을 계산하고 출력하세요. For example, if n=30, we calculate 30*29*28*···*2*1 and get 265252859812191058636308480000000. 예를 들어, n=30일 때, 30*29*28*···*2*1을 계산하면 265252859812191058636308480000000입니다. Function Description (함..
Problem (문제) Sam's house has an apple tree and an orange tree that yield an abundance of fruit. In the diagram below, the red region denotes his house, where s is the start point, and t is the endpoint. The apple tree is to the left of his house, and the orange tree is to its right. You can assume the trees are located on a single point, where the apple tree is at point a, and the orange tree is..
Difficulty Easy Language Javascript Problem (문제) You are in charge of the cake for your niece's birthday and have decided the cake will have one candle for each year of her total age. When she blows out the candles, she’ll only be able to blow out the tallest ones. Your task is to find out how many candles she can successfully blow out. 당신은 당신의 조카 생일을 위해 케이크를 담당하고 있으며 케이크는 그녀의 연령만큼 양초를 가질 것이라고 결..
Difficulty Easy Language Javascript Problem (문제) Consider a staircase of size n=4: n=4인 계단이라면: # ## ### #### Observe that its base and height are both equal to n, and the image is drawn using # symbols and spaces. The last line is not preceded by any spaces. 밑변과 높이가 n과 같고 # 기호와 공백을 사용하여 이미지가 그려지는 것을 확인할 수 있다. 마지막 줄에는 공백이 없다. Write a program that prints a staircase of size n. 크기가 n인 계단을 출력하는 프로그램..
Difficulty Easy Language Javascript Problem (문제) Given a square matrix, calculate the absolute difference between the sums of its diagonals. 정사각형 행렬이 주어지면, 대각선의 합 사이의 절대 차이를 계산하세요. For example, the square matrix arr is shown below: 예를 들어, 정사각형 행렬 arr이 다음과 같다면: 1 2 3 4 5 6 7 8 9 The left-to-right diagonal = 1 + 5+ 9 = 15. The right-to-left diagonal = 3 + 5+ 9 = 17. Their absolute difference is |1..