Cmnæ¯ä¸ä¸ªæ°å¦ä¸çå ¬å¼ï¼å ¶ä¸mæ¯å ¶çä¸è§æ ï¼næ¯å ¶çä¸è§æ ã计ç®æ¹æ³æ¯
mÃ(m-1)Ã(m-2)Ãâ¦â¦å ±æn项çä¹ç§¯ï¼ç¶åé¤ä»¥nçé¶ä¹ç¨Cè¯è¨åè¿ä¸ªè®¡ç®çç¼ç¨ï¼æ¥éª¤å¦ä¸ï¼
1ãé¦å éè¦è¯»åmånçå¼ï¼ç¶åå¨è¯»åçåæ¶è¿è¡å¤ææ¯å¦æ»¡è¶³m>0ãn>0ãm>=nçæ¡ä»¶ï¼å¦æä¸æ»¡è¶³è¦æ±éæ°è¾å ¥ã
2ãç¶åå¯ä»¥æ建两个å½æ°fun1åfun2ï¼å ¶ä¸fun1çåæ°æ两个månï¼å©ç¨å¾ªç¯æ§å¶æ±åºmÃ(m-1)Ã(m-2)÷·····ï¼fun2çåæ°åªæä¸ä¸ªï¼ç¨æ¥æ±nçé¶ä¹ã
3ãè¿åå¼ï¼æ两ç§æ¹æ³ï¼ï¼1ï¼fun1åfun2è¿åæ´åå¼å°ä¸»å½æ°ï¼å¼ºå¶è½¬æ¢æfloatåï¼ï¼2ï¼ç´æ¥å¨fun1åfun2å½æ°ä¸å°è¿åå¼å¼ºå¶è½¬æ¢æfloatåï¼ç¶åè¿åå°ä¸»å½æ°è¿è¡è®¡ç®ã
4ãå¨ä¸»å½æ°ä¸è®¡ç®ä¸¤ä¸ªè¿åå¼çå·®ï¼æåè¾åºã
å ·ä½ä»£ç å¦ä¸ï¼(精度ä¸å¤è¯·æ int æ¢æ long long)
#include<stdio.h>