Determine the number
Practice
2.8 (39 votes)
Dynamic programming
Digitdp
Math basic
Algorithms
Binary search
Counting and arrangements
Easy.
Math
Problem
23% Success 2878 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
You are given \(T\) test cases. Your task is to determine the \(n^{th}\) '100 sum' number corresponding to each test case.
Note: A '100 sum' number is defined as a number whose sum of all digit is equal to 100.
Input format
- First line: Single integer \(T\) denoting the number of test cases
- Next \(T\) lines: Single integer \(N\) representing the \(n^{th}\) 100 sum number
Output format
For each test case, print a single integer in a new line that contains the correct answer.
Constraints
\(1\le T\le 100\)
\(1\le N\le 1e^{10}\)
Sample Input
1 1
Sample Output
199999999999
Explanation
First 100sum number is "199999999999" . You can check by taking the sum.
Code Editor
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
Submissions
Please login to view your submissions
Similar Problems
Points:20
Tags:
Easy
2.Game
Points:20
11 votes
Tags:
Dynamic ProgrammingAlgorithmsApprovedEasy
Points:20
8 votes
Tags:
Counting and ArrangementsDynamic ProgrammingAlgorithms
Editorial
Login to unlock the editorial
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