Problem ID :a039. 公平的戰役(EOF版)

New Thread

User 救命!

hulan SendIMessage
hulan

a039. 公平的戰役(EOF版) | From: 36.238.14.156 | Post Date:2017-09-24 20:38:55.0

為甚麼這樣會se?

#include<stdio.h>

#include<stdlib.h>

int main()

{

long a,b;

while(1)

{

scanf("%d %d",&a,&b);

if(scanf("%d %d",&a,&b)<2)

break;

if(a>b){printf("A %d",a-b);}

if(a<b){printf("B %d",b-a);}

else{printf("0");}

   

}

system("pause");

return 0;

 


文章類型: 一般 | Reply | Back
User Re:救命!

sagit SendIMessage
sagit

a039. 公平的戰役(EOF版) | From: 192.168.2.108 | Post Date:2017-09-25 09:03:22.0

scanf("%d %d",&a,&b);    ←這行是多的

if(scanf("%d %d",&a,&b)<2)

break;

 

 


文章類型: 一般 | Reply | Back
User Re:救命!

hulan SendIMessage
hulan

a039. 公平的戰役(EOF版) | From: 36.238.14.156 | Post Date:2017-09-25 23:06:45.0

scanf("%d %d",&a,&b);    ←這行是多的

if(scanf("%d %d",&a,&b)<2)

break;

 謝謝指教!

已通過 


 


文章類型: 一般 | Reply | Back
User Re:救命!

hulan SendIMessage
hulan

a039. 公平的戰役(EOF版) | From: 36.238.14.156 | Post Date:2017-09-25 23:07:14.0

scanf("%d %d",&a,&b);    ←這行是多的

if(scanf("%d %d",&a,&b)<2)

break;

 謝謝指教

已通過 


 


文章類型: 一般 | Reply | Back

New Thread

ZeroJudge Forum