#27193: Java答案


zoo9008213635@gmail.com (張珈薰)

學校 : 不指定學校
編號 : 167129
來源 : [120.119.140.232]
最後登入時間 :
2021-12-14 16:18:10
a012. 10055 - Hashmat the Brave Warrior -- UVa10055 | From: [39.13.166.45] | 發表日期 : 2021-09-17 15:46

import java.util.Scanner;

public class JAVA 

{

static Scanner keyboard=new Scanner(System.in);

public static void main(String args[]) 

{

long HashmentSoldier,opponentSoldier,d=0L;

 

while(keyboard.hasNext())

{

HashmentSoldier=keyboard.nextLong();

opponentSoldier=keyboard.nextLong();

 

d=opponentSoldier-HashmentSoldier;

 

System.out.println(Math.abs(d));

}

}

}

 
ZeroJudge Forum