#2447: 一直跑出RE


ashspark (AshSparK)

學校 : 國立臺灣大學
編號 : 8168
來源 : [210.59.162.125]
最後登入時間 :
2015-03-06 14:39:18
d134. 00369 - Combinations -- UVa369 | From: [140.112.240.134] | 發表日期 : 2009-10-08 21:00

我使用的編譯器是DEV C++ 4.9.9.2

 在電腦上面測會跑出正確的值來,但是我上傳之後就出現RE了!拜託高手幫幫忙

#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");
                            }
              }

 
ZeroJudge Forum