UVA 10055 - Hashmat the Brave Warrior

UVA Aug 31, 2020

Problem PDF

Solution:

package mypkg;
import java.util.Scanner;
 class Main {

    public static void main(String[] args) {
      Scanner in=new Scanner (System.in);
      while(in.hasNext())
      {
          long a=in.nextLong();
          long b=in.nextLong();
          if(a>b)
              System.out.println(a-b);
          else
              System.out.println(b-a);

      }
    }

}
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10055/Main.java

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.