The Gateway to Computer Science Excellence
+1 vote
119 views
How many positive integers less than 1,000,000 have the sum of their digits equal to 19?
in Combinatory by Boss (29.1k points)
closed by | 119 views
+1

I am little doubtful with regard to below points.

The equation I understood is

d1 +d2 + d3+ d4+d5+d6=19

where each  0$\leq$di$\leq$9 (Actually answer comes when  I take each di in this range)

my query was why not each di will be in range 1$\leq$di$\leq$9

because question mentions for positive integers so each digit must be from 1 to 9.

0
yes,that will be equation

ans 42504?
0
@Ayush it's because 1 digit number can be written as 00000 or 000001 or 0000002 or so on..

I mean, 000 289 = 19 is also a possibility.
0
@Srestha-No it's 30492.

I think Why di ranges from 0 to 9 because

Firstly the question says

"the sum of digits must be 19"

so with all zeroes, I cannot have sum as 19 (so obviously there would be a positive integer whose sum of digit would be 19)

and since with up to 6 digits, each digit can range from 0 to 9 only that's why each di is from 0 to 9.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,302 answers
198,306 comments
105,007 users