Problem
Read two numbers. Print the factorial of the first, then the digit sum of the second.
Both must be written recursively — each method calls itself, with a base case that stops it.
For the input 5 1234:
5 1234
120 10
Note factorial(0) is 1.
factorial(0)
1
Press «Submit» to run your code against the task's test cases — that is what sets your score. «AI review» is an optional second opinion: it reads your code — logic and style, not just the output — and suggests the next step without handing over the answer. It never changes your score.