虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

您现在的位置是:虫虫下载站 > 资源下载 > 其他 > Input The input contains blocks of 2 lines. The first line contains the number of sticks parts afte

Input The input contains blocks of 2 lines. The first line contains the number of sticks parts afte

  • 资源大小:2 K
  • 上传时间: 2015-10-27
  • 上传用户:pore
  • 资源积分:2 下载积分
  • 标      签: contains The blocks number

资 源 简 介

Input The input contains blocks of 2 lines. The first line contains the number of sticks parts after cutting, there are at most 64 sticks. The second line contains the lengths of those parts separated by the space. The last line of the file contains zero. Output The output should contains the smallest possible length of original sticks, one per line. Sample Input 9 5 2 1 5 2 1 5 2 1 4 1 2 3 4 0 Sample Output 6 5

相 关 资 源