Problem: The door of Snuke's laboratory is locked with a security code.  The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same.  You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`.

Submission attempts (in order):
a = input().split()
n = a[0]
l = a[1]

sum_ = 0
for i in range(n-1):
    sum_ = sum_ + (l + i - 1)

taste = [] 

for i in range(n):
    taste = sum_ - (l + i - 1)

min_sa = 0
sa = 0

for i in range(n):
    sa = sum_ - teste[i]
    if sa < min_sa:
        min_sa = sa

for i in range(n):
    if (sum_ - taste[i]) == min_sa:
        print(taste[i])
        return

n,l=map(int,input().split())

taste = []
teste_zettaichi = []

for i in range(n):
    taste.append(l+i-1)
    teste_zettaichi = abs[taste[i]]

print(sum(taste) - min(teste_zettaichi))

n,l=map(int,input().split())

sum_ = 0
for i in range(n-1):
    sum_ = sum_ + (l + i - 1)

taste = [] 

for i in range(n):
    taste.append(sum_ - (l + i - 1))

min_sa = 0
sa = 0

for i in range(n):
    sa = sum_ - taste[i]
    if sa < min_sa:
        min_sa = sa

for i in range(n):
    if (sum_ - taste[i]) == min_sa:
        print(taste[i])
        break

a = [int(i) for i in input().split()]
n = a[0]
l = a[1]

sum_ = 0
for i in range(n-1):
    sum_ = sum_ + (l + i - 1)

taste = [] 

for i in range(n):
    taste = sum_ - (l + i - 1)

min_sa = 0
sa = 0

for i in range(n):
    sa = sum_ - teste[i]
    if sa < min_sa:
        min_sa = sa

for i in range(n):
    if (sum_ - taste[i]) == min_sa:
        print(taste[i])
        break

n,l=map(int,input().split())

taste = []
teste_zettaichi = []

for i in range(n):
    taste.append(l+i-1)
    teste_zettaichi = abs(taste[i])

print(sum(taste) - min(teste_zettaichi))

n,l=map(int,input().split())

sum_ = 0
for i in range(n-1):
    sum_ = sum_ + (l + i - 1)

taste = [] 

for i in range(n):
    taste = sum_ - (l + i - 1)

min_sa = 0
sa = 0

for i in range(n):
    sa = sum_ - teste[i]
    if sa < min_sa:
        min_sa = sa

for i in range(n):
    if (sum_ - taste[i]) == min_sa:
        print(taste[i])
        break

n,l=map(int,input().split())

taste = []

for i in range(n):
    taste.append(l+i-1)

sum_taste = sum(taste)

taste_pie = []

for i in range(n):
    taste_pie.append(sum_taste - taste[i])

sub_min = 0
sub = []

for i in range(n):
    sub.append(sum_taste - taste_pie[i])
    
sub_min = min(sub)

for i in range(n):
    if sub_min == (sum_taste - taste_pie[i]):
        print(taste_pie[i])
        break

a = input().split()
n = a[0]
l = a[1]

sum_ = 0
for i in range(n-1):
    sum_ = sum_ + (l + i - 1)

taste = [] 

for i in range(n):
    taste = sum_ - (l + i - 1)

min_sa = 0
sa = 0

for i in range(n):
    sa = sum_ - teste[i]
    if sa < min_sa:
        min_sa = sa

for i in range(n):
    if (sum_ - taste[i]) == min_sa:
        print(taste[i])
        return

n,l=map(int,input().split())

taste = []
taste_abs = []

for i in range(n):
    taste.append(l+i)
    taste_abs.append(abs(taste[i]))

sum_taste = sum(taste)
min_abs = min(taste_abs)
print(sum_taste - min_abs)

n,l=map(int,input().split())

taste = []
teste_zettaichi = []

for i in range(n):
    taste.append(l+i-1)
    teste_zettaichi.append(abs(taste[i]))

sum_taste = sum(taste)
min_zettaichi = min(teste_zettaichi)
print(sum_taste - min_zettaichi)

num = input()


if num[0] == num[1] or num[1] == num[2] or num[2] == num[3]:
    print('Bad')
else:
    print('Good')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted