Skip to content

csj1328059093/juejin-count

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

juejin-count

NPM Version NPM Downloads Install Size

使用

image

// count.js
// 因为引入node-fetch,包只能以esm形式导出
import {count} from 'juejin-count'

count([1, 1, 1, 2, 2, 3], ['+', '+', '*', '*', '/'], 11)
$ node count.js
最终表达式:
[
  1,   '+', 1,   '/', 1,
  '*', 2,   '*', 2,   '+',
  3
]
最终表达式从左至右计算即可得到结果

检验:((((1+1)/1)*2)*2)+3=11

About

Calculate the number puzzle of "juejin"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published