Product

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Given two numbers x and N, find the number of x-digit numbers whose product of digits is N.

Input format:

Each lines contain two numbers Nand x.

Output Format:

For each input case, output the result on a new line.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

204120 10
210 4
3780 4
35 7
22680 7

Sample output:

3432240
48
0
42
22470

Sample input:_

5 2
8 3

Sample output:

2
10

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid (embed)410.00962011/01/23 22:34:080B / 22B / 18B
2leonid (embed)380.00882011/01/24 07:11:120B / 19B / 18B
3teebee(embed)400.02002011/01/24 01:04:480B / 18B / 21B

Perl _

RankUserSizeTimeDateStatistics
1tails370.00242011/01/23 02:12:580B / 21B / 11B
2teebee(embed)370.00052011/01/23 23:40:040B / 21B / 11B

Python _

RankUserSizeTimeDateStatistics
1hallvabo (embed)500.04982011/01/21 02:10:220B / 32B / 13B
2leonid (embed)500.05572011/01/23 22:31:280B / 36B / 13B

Io _

RankUserSizeTimeDateStatistics
1pooq810.17762012/11/04 20:53:030B / 62B / 16B

Lua _

RankUserSizeTimeDateStatistics
1pooq580.03272012/04/03 07:01:550B / 34B / 20B

Xtal _

RankUserSizeTimeDateStatistics
1pooq510.04532011/01/13 21:14:100B / 33B / 13B

Icon _

RankUserSizeTimeDateStatistics
1pooq780.03282012/04/03 06:58:240B / 52B / 22B

BASIC _

RankUserSizeTimeDateStatistics
1pooq490.00152011/01/12 20:14:570B / 32B / 10B

J _

RankUserSizeTimeDateStatistics
1I., S.(I like this and, not to be discouraged, wish input samples were longer and consistent i.e. either with or without the last LF.)5540.14352011/01/23 15:14:130B / 198B / 275B
2pooq460.06202011/03/09 00:46:300B / 26B / 15B

K _

RankUserSizeTimeDateStatistics
1teebee360.02992012/03/21 01:39:490B / 22B / 9B
2pooq380.06542012/03/20 22:50:420B / 22B / 11B

C _

RankUserSizeTimeDateStatistics
1teebee(embed)550.00042011/01/24 00:23:561B / 36B / 18B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai680.20462011/01/21 17:04:500B / 47B / 15B

Java _

RankUserSizeTimeDateStatistics
1teebee(embed)830.25672011/01/23 23:22:240B / 56B / 26B
2hallvabo (embed)830.25662011/01/24 00:05:120B / 56B / 26B

Maxima _

RankUserSizeTimeDateStatistics
1pooq570.26832011/05/08 01:27:020B / 40B / 11B

Asymptote _

RankUserSizeTimeDateStatistics
1teebee480.20512011/12/20 03:14:290B / 27B / 16B
2pooq520.91332011/12/20 01:15:080B / 33B / 14B

dc _

RankUserSizeTimeDateStatistics
1tails (embed)290.00362011/05/08 03:05:530B / 19B / 9B
2tails290.00602011/05/08 03:33:350B / 20B / 8B

R _

RankUserSizeTimeDateStatistics
1pooq480.58862011/08/21 15:14:060B / 31B / 12B

Scala _

RankUserSizeTimeDateStatistics
1pooq596.66642011/02/26 01:08:150B / 42B / 17B

Logo _

RankUserSizeTimeDateStatistics
1pooq410.00572011/04/11 11:53:370B / 29B / 5B
2teebee480.32322011/04/04 11:04:460B / 34B / 5B

Language Ranking_

RankLangUserSizeScore
1dctails (embed)2910000
2Kteebee368055
3Perltails377837
4Rubyleonid (embed)387631
5Logopooq417073
6Jpooq466304
7Rpooq486041
8Asymptoteteebee486041
9BASICpooq495918
10Pythonhallvabo (embed)505800
11Xtalpooq515686
12Cteebee(embed)555272
13Maximapooq575087
14Luapooq585000
15Scalapooq594915
16OCamlm.ukai684264
17Iconpooq783717
18Iopooq813580
19Javateebee(embed)833493

return top