BLACKBOX-2
Practice
4.3 (3 votes)
Mathematics
Medium
Problem
80% Success 2491 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Vivek was roaming around in the electronics shop, where he saw a box called as BlackBox. He was intrigued by its function, so he bought it. It's functionality states that for given integer input N \( \le 1000 \) - it outputs the sum of all the digits in factorial of N (N).

Now Vivek wants to extend its functionality for large numbers. So, he wants you to write a program that can check the correctness of the BlackBox .

INPUT :

The first line of the input contains a single integer T ( the number of test cases ). Next T lines of input contains an integer N .

OUTPUT :

For each test case, print the sum of all digits in the factorial of the corresponding input integer.

CONSTRAINTS :

\(1 \le T \le 10^3\)

\(0 \le N \le 1000\)

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
1 votes
Tags:
Medium
Points:30
Tags:
HiringOpenHiringOpenImplementationHiringMathematicsEasyBasic ProgrammingMathematicsMathematicsMathamatics
Points:30
10 votes
Tags:
MediumBasic MathMathematicsMathematics