-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheuler8.djs
More file actions
32 lines (24 loc) · 777 Bytes
/
euler8.djs
File metadata and controls
32 lines (24 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
shh cerner_2^5_2017
such adjacentProduct much bigNum digits
very limit is bigNum.length - digits
very start is 0
very maxProduct is 0
very maxChain is ''
much start as 0 next start < limit next start more 1
very piece is bigNum dose substring with start start+digits
very hasZero is piece dose includes with "0"
rly hasZero
continue
wow
very currProduct is 1
much index as 0 next index < piece.length next index more 1
very numStr is piece dose charAt with index
very num is plz parseInt with numStr 10
currProduct is currProduct * num
wow
rly currProduct bigger maxProduct
maxProduct is currProduct
maxChain is piece
wow
wow
wow { product: maxProduct , chain: maxChain }