标签:设计 put otto end tar nbsp href str comm
字串数
http://acm.hdu.edu.cn/showproblem.php?pid=1261
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 5281 Accepted Submission(s): 1398
Problem Description
一个A和两个B一共可以组成三种字符串:"ABB","BAB","BBA".
给定若干字母和它们相应的个数,计算一共可以组成多少个不同的字符串.
Input
每组测试数据分两行,第一行为n(1<=n<=26),表示不同字母的个数,第二行为n个数A1,A2,...,An(1<=Ai<=12),表示每种字母的个数.测试数据以n=0为结束.
Output
对于每一组测试数据,输出一个m,表示一共有多少种字符串.
Sample Input
Sample Output
Source
Recommend
JGShining | We have carefully selected several similar problems for you:
1263 1265 1264 1262 1260 Problem1261 字串数
标签:设计 put otto end tar nbsp href str comm
原文地址:https://www.cnblogs.com/parzulpan/p/9984418.html