笨笨的我又來發問囉!這次又碰到很奇怪的問題了啊~
系統上面寫
與正確輸出不相符(line:1)
您的答案為: 12 things taken ...略
正確答案為: 12 things taken 5 at a time is 792 exactly.
一開始以為是換行 但是明明就會換啊?怎麼會這樣咧= =
拜託各位高手救救我><
#include<stdio.h>
int main(void){
long long int N,M,C;
while(scanf("%I64d%I64d",&N,&M)!=EOF){
if(N==0&&M==0)
break;
long long int iN,iM,NF=1,MF=1;
if(N>M){
for(iN=1;iN<=M;iN++) {
NF=NF*(N+1-iN); }
for(iM=2;iM<=M;iM++) {
MF=MF*iM; }
}
C=NF/MF;
printf("%I64d things taken %I64d at a time is %I64d exactly.",N,M,C);
printf("\n");
}
}