Problem: 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.

Submission attempts (in order):
#encoding utf-8

n = int(input())
data = []
for i in range(n):
    x,y,h=map(int,input().split())
    data.append([x,y,h])

def calH(cx,cy,data):
    return data[2]+abs(data[0]-cx)+abs(data[1]-cy)

def conh(temH,cx,cy,data):
    return temH-abs(data[0]-cx)-abs(data[1]-cy)


for i in range(101):
    for j in range(101):
        clear = 0
        count = 0
        for k in range(n):
            if clear == 0:
                temH = calH(i,j,data[k])
                if data[k][2] != 0:
                    clear = 1
                else:
                    if conh(temH,i,j,data[k]) < 0:
                        count += 1
                    else:
                        count += 1
                        clear = 1

        for k in range(count,n):
            print(k)
            ignore_flag = 0
            if data[k][2] == 0:
                if conh(temH,i,j,data[k]) < 0:
                    ignore_flag = 1
                    count += 1

            if ignore_flag == 0:
                if calH(i,j,data[k]) != temH:
                    break
                else:
                    count += 1
            if count == n:
                answer=[i,j,calH(i,j,data[0])]

print(answer[0],answer[1],answer[2])


#encoding utf-8

n = int(input())
data = []
for i in range(n):
    x,y,h=map(int,input().split())
    data.append([x,y,h])

def calH(cx,cy,data):
    return data[2]+abs(data[0]-cx)+abs(data[1]-cy)

def conh(temH,cx,cy,data):
    return temH-abs(data[0]-cx)-abs(data[1]-cy)


for i in range(101):
    for j in range(101):
        clear = 0
        count = 0
        for k in range(n):
            if clear == 0:
                temH = calH(i,j,data[k])
                if data[k][2] != 0:
                    clear = 1
                else:
                    if conh(temH,i,j,data[k]) < 0:
                        count += 1
                    else:
                        count += 1
                        clear = 1

        for k in range(count,n):
            print(k)
            ignore_flag = 0
            if data[k][2] == 0:
                if conh(temH,i,j,data[k]) < 0:
                    ignore_flag = 1
                    count += 1

            if ignore_flag == 0:
                if calH(i,j,data[k]) != temH:
                    break
                else:
                    count += 1
            if count == n:
                answer=[i,j,calH(i,j,data[0])]

print(answer[0],answer[1],answer[2])


#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

mod = 10**9+7
sys.setrecursionlimit(mod) 

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

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

Verdicts: Runtime Error

Runtime Error

Accepted