当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1570:A C

题目描述
Are you excited when you see the title "AC" ? If the answer is YES , AC it ;

You must learn these two combination formulas in the school . If you have forgotten it , see the picture.




Now I will give you n and m , and your task is to calculate the answer .
输入解释
In the first line , there is a integer T indicates the number of test cases.
Then T cases follows in the T lines.
Each case contains a character 'A' or 'C', two integers represent n and m. (1<=n,m<=10)
输出解释
For each case , if the character is 'A' , calculate A(m,n),and if the character is 'C' , calculate C(m,n).
And print the answer in a single line.
输入样例
2
A 10 10
C 4 2
输出样例
3628800
6
来自杭电HDUOJ的附加信息
Author linle
Recommend linle

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1570

最后修改于 2020-10-25T22:46:06+00:00 由爬虫自动更新

共提交 363

通过率 72.45%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)