AtCoder Beginner Contest 112 - Programming Education

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

-----Sample Output-----
Hello World

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

Source: atcoder | Difficulty: EASY


Solutions:
N = int(input())
if N == 1:
	print('Hello World')
else:
	A = int(input())
	B = int(input())
	print(A + B)


n = int(input())
if n == 1:
	print('Hello World')
else:
	print(int(input()) + int(input()))


i = input
print(eval(i() + '+' + i()) if '1' < i() else 'Hello World')


print('Hello World' if input() == '1' else sum([int(input()) for _ in range(2)]))


b = int(input()) == 1
if b:
	print('Hello World')
else:
	print(int(input()) + int(input()))


(n, *d) = map(int, open(0).read().split())
print((sum(d), 'Hello World')[n == 1])


N = int(input())
print('Hello World' if N == 1 else int(input()) + int(input()))


n = int(input())
if n == 1:
	print('Hello World')
elif n == 2:
	a = int(input())
	b = int(input())
	print(a + b)


a = int(input())
if a == 1:
	print('Hello World')
else:
	b = int(input())
	c = int(input())
	print(b + c)


n = int(input())
if n == 1:
	print('Hello World')
else:
	a = int(input())
	b = int(input())
	print(a + b)


n = int(input())
if n == 1:
	print('Hello World')
else:
	A = int(input())
	B = int(input())
	print(A + B)


import sys
if input() == '1':
	print('Hello World')
else:
	A = int(input())
	B = int(input())
	print(A + B)


N = int(input())
if N == 1:
	print('Hello World')
else:
	print(sum((int(input()) for T in range(0, 2))))


a = int(input())
if a == 1:
	print('Hello World')
else:
	print(int(input()) + int(input()))


n = int(input())
if n == 2:
	a = int(input())
	b = int(input())
	print(a + b)
else:
	print('Hello World')


(n, *l) = map(int, open(0))
print('Hello World' if n == 1 else sum(l))


i = lambda : int(input())
print(i() + i() if i() - 1 else 'Hello World')


N = int(input())
if N == 1:
	print('Hello World')
	exit()
print(int(input()) + int(input()))


x = int(input())
if x == 1:
	print('Hello World')
else:
	x = int(input())
	y = int(input())
	print(x + y)


a = input()
if a == '1':
	print('Hello World')
elif a == '2':
	b = int(input())
	c = int(input())
	print(b + c)


N = int(input())
print('Hello World' if N % 2 != 0 else int(input()) + int(input()))


n = int(input())
if n == 1:
	print('Hello World')
else:
	(a, s) = (int(input()), int(input()))
	print(a + s)


x = int(input())
if x == 1:
	print('Hello World')
else:
	A = int(input())
	B = int(input())
	print(A + B)


if input()[0] == '1':
	print('Hello World')
else:
	a = int(input())
	b = int(input())
	print(a + b)


n = int(input())
if n == 1:
	print('Hello World')
if n == 2:
	print(int(input()) + int(input()))


N = int(input())
if N == 1:
	print('Hello World')
elif N == 2:
	print(int(input()) + int(input()))


def main():
	n = int(input())
	(a, b) = ('Hello ', 'World')
	if n == 2:
		(a, b) = [int(input()) for _ in range(n)]
	print(a + b)
main()


n = int(input())
print('Hello World' if n != 2 else int(input()) + int(input()))


import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007

def main():
	N = int(readline())
	if N == 1:
		print('Hello World')
	else:
		(A, B) = list(map(int, read().split()))
		print(A + B)
	return

def __starting_point():
	main()
__starting_point()


import sys
if input() == '1':
	(print('Hello World'), sys.exit())
print(int(input()) + int(input()))


a = int(input())
if a == 1:
	print('Hello World')
else:
	g = int(input())
	h = int(input())
	print(g + h)


(*a,) = map(int, open(0).read().split())
print(a[1] + a[2] if a[0] > 1 else 'Hello World')


f = lambda : int(input())
n = f()
if n == 1:
	print('Hello World')
else:
	print(f() + f())


j = input
print('Hello World' if '1' == j() else int(j()) + int(j()))


if 1 == int(input()):
	print('Hello World')
else:
	(x, y) = [int(input()) for i in range(2)]
	print(x + y)


n1 = int(input())
if n1 == 1:
	print('Hello World')
else:
	n2 = int(input())
	n3 = int(input())
	print(n2 + n3)


a = int(input())
if a == 1:
	print('Hello World')
else:
	a = [int(input()) for i in range(2)]
	print(a[0] + a[1])


Nennrei = int(input())
if Nennrei == 2:
	print(int(input()) + int(input()))
else:
	print('Hello World')


print('Hello World' if input() == '1' else eval('+int(input())' * 2))


com = int(input())
if com == 1:
	print('Hello World')
else:
	a = int(input())
	b = int(input())
	print(a + b)


age = int(input())
if age == 1:
	print('Hello World')
else:
	print(int(input()) + int(input()))


n = input()
if n == '1':
	print('Hello World')
else:
	print(sum((int(input()) for _ in [0] * 2)))


A = int(input())
if A == 1:
	print('Hello World')
else:
	print(int(input()) + int(input()))


I = lambda : int(input())
print('Hello World' if I() % 2 else I() + I())


N = input()
if N == '1':
	print('Hello World')
else:
	(a, b) = (int(input()), int(input()))
	print(a + b)


a = int(input())
if a == 1:
	print('Hello World')
else:
	A = int(input())
	B = int(input())
	print(A + B)


i = input
i()
p = print
try:
	p(int(i()) + int(i()))
except:
	p('Hello World')


i = int(input())
if i == 1:
	print('Hello World')
	exit()
print(int(input()) + int(input()))


i = lambda : int(input())
print('Hello World' * (1 & i()) or i() + i())


i = lambda : int(input())
print('Hello World' if i() - 2 else i() + i())


(N, *C) = map(int, open(0).read().split())
if N == 2:
	print(sum(C))
else:
	print('Hello World')


a = list(map(int, open(0).read().split()))
print(sum(a) - 2 if a[0] == 2 else 'Hello World')


N = int(input())
if N == 2:
	A = int(input())
	B = int(input())
	print(A + B)
else:
	print('Hello World')


IN = open(0).read().split()
if len(IN) == 1:
	print('Hello World')
else:
	print(int(IN[1]) + int(IN[2]))


N = int(input())
if N == 1:
	print('Hello World')
	exit()
A = int(input())
B = int(input())
print(A + B)


age = int(input())
if age == 1:
	print('Hello World')
elif age == 2:
	a = int(input())
	b = int(input())
	print(a + b)


a = int(input())
if a == 2:
	b = int(input())
	c = int(input())
	print(b + c)
else:
	print('Hello World')


n = int(input())
if n == 1:
	print('Hello World')
	exit()
print(int(input()) + int(input()))


print('Hello World' if int(input()) == 1 else sum(map(lambda n: int(n), [input(), input()])))


k = int(input())
if k == 1:
	print('Hello World')
else:
	a = int(input())
	b = int(input())
	print(a + b)


n = int(input())
print('Hello World' if n == 1 else sum([int(input()) for i in range(0, 2)]))


a = int(input())
if a == 2:
	print(int(input()) + int(input()))
else:
	print('Hello World')


i = input
print('2' > i() and 'Hello World' or int(i()) + int(i()))


(n, *a) = map(int, open(0).read().split())
print('Hello World' if n == 1 else sum(a))


I = input()
if I == '1':
	print('Hello World')
else:
	A = input()
	B = input()
	print(int(A) + int(B))


(n, *t) = map(int, open(0))
print(n % 2 * 'Hello World' or sum(t))


input()
try:
	print(int(input()) + int(input()))
except:
	print('Hello World')


a = input()
if a == '1':
	print('Hello World')
else:
	p = input()
	q = input()
	print(int(p) + int(q))


X = int(input())
if X == 1:
	print('Hello World')
else:
	a = int(input())
	b = int(input())
	print(a + b)


N = int(input())
if N == 1:
	print('Hello World')
elif N == 2:
	A = int(input())
	B = int(input())
	print(A + B)


if input() == '1':
	print('Hello World')
else:
	[a, b] = [int(input()) for _ in range(2)]
	print(a + b)


L = lambda : int(input())
n = L()
if n == 1:
	print('Hello World')
else:
	print(L() + L())


x = int(input())
if x == 1:
	print('Hello World')
else:
	a = int(input())
	b = int(input())
	print(a + b)


s = input()
if s == '1':
	print('Hello World')
else:
	print(int(input()) + int(input()))


i = input
i()
try:
	a = int(i()) + int(i())
except:
	a = 'Hello World'
print(a)


a = int(input())
print(eval("A'+Hienltl(oi nWpourtl(d)')"[a::2] * a))


a = int(input())
if a == 1:
	print('Hello World')
	exit()
b = int(input())
c = int(input())
print(b + c)


N = int(input())
if N == 1:
	print('Hello World')
	exit()
a = int(input())
b = int(input())
print(a + b)


def main():
	n = int(input())
	if n == 1:
		print('Hello World')
	else:
		a = int(input())
		b = int(input())
		print(a + b)

def __starting_point():
	main()
__starting_point()


N = int(input())
if N == 1:
	print('Hello World')
else:
	A = int(input())
	b = int(input())
	print(A + b)


import sys
stdin = sys.stdin

def ns():
	return stdin.readline().rstrip()

def ni():
	return int(stdin.readline().rstrip())

def nm():
	return list(map(int, stdin.readline().split()))

def nl():
	return list(map(int, stdin.readline().split()))

def main():
	print('Hello World' if ni() == 1 else ni() + ni())

def __starting_point():
	main()
__starting_point()


X = int(input())
if X == 1:
	print('Hello World')
else:
	print(int(input()) + int(input()))


l = int(input())
if l == 1:
	print('Hello World')
else:
	a = int(input())
	b = int(input())
	print(a + b)


n = int(input())
if n == 2:
	b = int(input())
	c = int(input())
	print(b + c)
else:
	print('Hello World')


N = int(input())
if N == 1:
	print('Hello World')
else:
	b = int(input())
	c = int(input())
	print(b + c)


def __starting_point():
	n = int(input())
	if n == 1:
		print('Hello World')
	else:
		ans = 0
		for i in range(2):
			ans += int(input())
		print(ans)
__starting_point()


i = input()
if i == '2':
	n = int(input())
	m = int(input())
	print(n + m)
else:
	print('Hello World')


print('Hello World' if input() == '1' else sum(map(int, [input(), input()])))


num = int(input())
if num == 1:
	print('Hello World')
else:
	print(int(input()) + int(input()))


I = lambda : int(input())
print('Hello World' if I() == 1 else I() + I())


try:
	(n, a, b) = [int(input()) for _ in range(3)]
	print(a + b)
except:
	print('Hello World')


import sys
l = []
for i in sys.stdin:
	l.append(int(i))
print('Hello World' if l[0] == 1 else l[1] + l[2])