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 Rust (1.15.1) (judge verdict: Runtime Error)

fn manhattan(p: (i32, i32), q: (i32, i32)) -> i32 {
    (p.0 - q.0).abs() + (p.1 - q.1).abs()
}

fn main() {
    let inputs = {
        use std::str::FromStr;
        let mut buf = String::new();
        std::io::stdin().read_line(&mut buf).unwrap();
        let n = buf.trim().parse().unwrap();
        (0..n)
            .map(|_| {
                buf.clear();
                std::io::stdin().read_line(&mut buf).unwrap();
                let row = buf
                    .trim()
                    .split(' ')
                    .map(i32::from_str)
                    .collect::<Result<Vec<_>, _>>()
                    .unwrap();
                ((row[0], row[1]), row[2])
            })
            .collect::<Vec<_>>()
    };
    let &(xy0, h0) = inputs.iter().find(|&&(_, h)| h != 0).unwrap();
    for cx in 0..101 {
        for cy in 0..101 {
            let center = (cx, cy);
            let height = manhattan(center, xy0) + h0;
            let height_at = |xy| std::cmp::max(height - manhattan(center, xy), 0);
            if inputs.iter().all(|&(xy, h)| height_at(xy) == h) {
                println!("{} {} {}", cx, cy, height);
                return;
            }
        }
    }
}