fork download
  1. import java.util.*;
  2.  
  3. public class Main
  4. {
  5. public static void main(String []args)
  6. {
  7. Scanner scanner = new Scanner(System.in);
  8. long a = scanner.nextLong();
  9. long b = scanner.nextLong();
  10. System.out.println(a * a + b * b);
  11. }
  12. }
Success #stdin #stdout 0.07s 2184192KB
stdin
1 2
stdout
5