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

jq _

RankUserSizeTimeDateStatistics
1pooq430.02122018/01/23 11:59:220B / ?B / ?B

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

gs2 _

RankUserSizeTimeDateStatistics
1tails (whio)200.15862017/05/18 09:36:318B / 7B / 4B
2whio210.16692017/05/18 02:22:199B / 7B / 4B

Vim _

RankUserSizeTimeDateStatistics
1udioica330.02312017/05/12 08:27:463B / 25B / 1B

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
1gs2tails (whio)2010000
2dctails (embed)296896
3Vimudioica336060
4Kteebee365555
5Perltails375405
6Rubyleonid (embed)385263
7Logopooq414878
8jqpooq434651
9Jpooq464347
10Rpooq484166
11Asymptoteteebee484166
12BASICpooq494081
13Pythonhallvabo (embed)504000
14Xtalpooq513921
15Cteebee(embed)553636
16Maximapooq573508
17Luapooq583448
18Scalapooq593389
19OCamlm.ukai682941
20Iconpooq782564
21Iopooq812469
22Javateebee(embed)832409

return to the top page