Question
Find the unit digit of the expression: 1! + 2! + 3! +
4! + 5! + ........ + 999!.Solution
1! = 1 2! = 1 X 2 = 2 3! = 1 X 2 X 3 = 6 4! = 1 X 2 X 3 X 4 = 24 5! = 1 X 2 X 3 X 4 X 5 = 120 6! = 1 X 2 X 3 X 4 X 5 X 6 = 720 Here, we can observe that the unit-digit of numbers larger than 4! Is 0. So, unit digit of the given expression, 1! + 2! + 3! + 4! + 5! + ........ + 999! = unit digit of (1 + 2 + 6 + 4 + 0) = unit digit of 13 Required unit digit = 3
Which tree traversal is most suitable for finding the shortest path in an unweighted graph represented as a tree?
Which software development methodology emphasizes iterative development and customer feedback? Â Â Â Â Â Â Â
...Which of the following is correct for a single-line comment in C++?
In Python, which method is used to convert a string to lowercase?
In C, what is the output of printf("%d", 5/2);?
In Python, what does len() function do?
Which Python keyword is used to handle exceptions?
Which of the following algorithms is used for finding Minimum Spanning Tree?
Which of the following is true about C++ destructors?
 What is the output of the following code: x = 5; y = 2; print(x ** y)?