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

New Thread

User 顯示WA,可以幫幫我嗎?

thuo8819 SendIMessage
Henry

a039. 公平的戰役(EOF版) | From: 114.42.188.32 | Post Date:2021-02-04 14:43:19.0

#include<iostream>
using namespace std;

int main() {
while(1){
int a,b;
cin>>a>>b;
if(cin.fail()) return 0;
if(a>b){
cout<<"A "<<a-b<<endl;
}
else if(b-a){
cout<<"B "<<b-a<<endl;
}
else if(a==b){
cout<<"0"<<endl;
}
}
}
 


文章類型: 一般 | Reply | Back
User Re:顯示WA,可以幫幫我嗎?

sagit SendIMessage
sagit

a039. 公平的戰役(EOF版) | From: 112.104.147.164 | Post Date:2021-02-19 22:50:58.0

你最後一次上傳的程式跟這邊貼的不一樣 


文章類型: 一般 | Reply | Back

New Thread

ZeroJudge Forum