#939: 求救


famous727 (famous727)

學校 : 國立臺灣大學
編號 : 4132
來源 : [140.112.4.202]
最後登入時間 :
2012-11-21 20:09:21
a012. 10055 - Hashmat the Brave Warrior -- UVa10055 | From: [118.167.198.159] | 發表日期 : 2008-11-15 22:27

# include <iostream>
using namespace std;
int main (  )
{

int a,b,c;
while(cin>>a>>b)
{
 c=a-b;
 if (c<0)
 cout<<c*-1<<endl;
 else
 cout<<c<<endl;             
               
               
               
               
               
}               


 return 0;
  }

 
#5194: Re:求救


pigismy0 (小野貓)

學校 : 新北市立板橋高級中學
編號 : 13292
來源 : [111.240.55.134]
最後登入時間 :
2014-04-23 15:18:22
a012. 10055 - Hashmat the Brave Warrior -- UVa10055 | From: [219.86.130.131] | 發表日期 : 2011-06-14 20:26

請把: int a,b,c;

改成:long long a,b,c;

這樣應該就可以過了

 
ZeroJudge Forum