Balanced Number [ZOJ 3416]

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3416

注意当0也是满足条件的情况下, 假设数字分解有cnt位,则结果将会多出cnt-1个0,即ans-cnt+1为最后结果。

View Code
posted @ 2013-05-03 11:13  zhang1107  阅读(133)  评论(0编辑  收藏  举报