Problem:
﻿Score: 100 points

Problem Statement

In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education.

One day, there was an exam where a one-year-old child must write a program that prints Hello World, and a two-year-old child must write a program that receives integers A, B and prints A+B.

Takahashi, who is taking this exam, suddenly forgets his age.

He decides to write a program that first receives his age N (1 or 2) as input, then prints Hello World if N=1, and additionally receives integers A, B and prints A+B if N=2.

Write this program for him.

Constraints

N is 1 or 2.

A is an integer between 1 and 9 (inclusive).

B is an integer between 1 and 9 (inclusive).

Input

Input is given from Standard Input in one of the following formats:

1

2
A
B

Output

If N=1, print Hello World; if N=2, print A+B.

Sample Input 1

1

Sample Output 1

Hello World

As N=1, Takahashi is one year old. Thus, we should print Hello World.

Sample Input 2

2
3
5

Sample Output 2

8

As N=2, Takahashi is two years old. Thus, we should print A+B, which is 8 since A=3 and B=5.

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Runtime Error)

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	private static Scanner scan;

	public static void main(String[] args) {
		scan = new Scanner(System.in);
		int cx,cy,h=0;
		int inputCount = Integer.parseInt(scan.nextLine());

		List<int[]> inputList = new ArrayList<int[]>();
		for(int i=0; i<inputCount; i++) {
			String r = scan.nextLine();
			int xi = Integer.parseInt(r.substring(0, r.indexOf(" ")));
			int yi = Integer.parseInt(r.substring(r.indexOf(" ")+1, r.lastIndexOf(" ")));
			int hi = Integer.parseInt(r.substring(r.lastIndexOf(" ") + 1));
			inputList.add(new int[]{xi, yi, hi});
		}


		for(cx=0; cx<=100; cx++) {
			for(cy=0; cy<=100; cy++) {
				h = (inputList.get(0)[2] + Math.abs(cx-inputList.get(0)[0]) + Math.abs(cy-inputList.get(0)[1]));
				if(h==0) continue;
				for(int i=1; i<inputList.size(); i++) {
					if(inputList.get(i)[2] != (h - Math.abs(inputList.get(i)[0]-cx) - Math.abs(inputList.get(i)[1]-cy))) {
						h = 0;
						break;
					}				}
				if(h>0) {
					System.out.println(cx + " " + cy + " " + h);
					return;
				}

			}
		}
	}
}