Problem 3486 --ones

3486: ones

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $1$ 正确数量 $1$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 动态规划
Given a positive integer N (0<=N<=10000), you are to find an expression equals to N using only 1,+,*,(,). 1 should not appear continuously, i.e. 11+1 is not allowed.
There are multiple test cases. Each case contains only one line containing a integer N
For each case, output the minimal number of 1s you need to get N.
2
10
2
7

推荐代码 查看3486 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$97 $ms] aoj_judger 615416 2020-10-08 17:16:36
内存最少[$0 $KB] aoj_judger 615416 2020-10-08 17:16:36
第一AC aoj_judger 615416 2020-10-08 17:16:36
第一挑战 aoj_judger 615416 2020-10-08 17:16:36

赛题来源/所属竞赛 N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛