Atlassian 2023-January| Hard CP | Digit DP (Dynamic Programming)

Atlassian · Question · Posted Jun 2026

Question 1: Prime Sum Numbers Problem Statement You are given two large numbers L and R represented as strings. Find the total count of numbers in the inclusive range [L, R] whose sum of digits evaluates to a prime number. Since the answer can be large, print it modulo 10^9 + 7. Input Format The first line contains T - the number of test cases. Each testcase contains two space-separated string integers L and R. Output Format For each test ...

The full answer & interview discussion are available to premium members.

Log in Create a free account