Problem:


Score : 100 points

Problem Statement

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.

Constraints

S is a 4-character string consisting of digits.

Input

Input is given from Standard Input in the following format:

S

Output

If S is hard to enter, print Bad; otherwise, print Good.

Sample Input 1

3776

Sample Output 1

Bad

The second and third digits are the same, so 3776 is hard to enter.

Sample Input 2

8080

Sample Output 2

Good

There are no two consecutive digits that are the same, so 8080 is not hard to enter.

Sample Input 3

1333

Sample Output 3

Bad

Sample Input 4

0024

Sample Output 4

Bad



Sample input:
3776


Sample output:
Bad

Submission status: Runtime Error

Solution code:
S = int(input())

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

Submission status: Runtime Error

Solution code:
S = int(input())

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

Submission status: Runtime Error

Solution code:
s=input()
for i in range(1,4):
  if s[i]==s[i-1]:
    print("Bad")
    return
print("Good")

Submission status: Runtime Error

Solution code:
import math
def solve():
  a, b, c, d = map(int, input().split())
  a -= 1
  lc = (c*d)//math.gcd(c,d)
  ans = (b-a)-(b//c-a//c)-(b//d-a//d)+(b//lc-a//lc)
  print(ans)
  return 0
 
if __name__ == "__main__":
  solve()

Submission status: Runtime Error

Solution code:
s=int(input())
if s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[3]:
  print('Good')
  
else:
  print('Bad')

Submission status: Runtime Error

Solution code:
s = input()
if len(set(s.sort())) == 4:
    print("Good")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = input()
if len(set(sort(s))) == 4:
    print("Good")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = input()
if(s[0]==s[1]):
    print("Bad")
elif(s[1]==s[2]):
    print("Bad")
elif(s[2]==s[3]):
    print("Bad")
elif(s[3]==s[4]):
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
n=input()
for i in range(len(n)):
  if n[i]==n[i+1]:
    print('Bad')
    exit()
  else:
    print('Good')

Submission status: Runtime Error

Solution code:
s=input()
for i in range(len(s)):
    if s[i]==s[i+1]:
        result='Bud'
        break
    else:
        result='Good'
print(result)

Submission status: Runtime Error

Solution code:
# input
S = input()

fl = True
for i in range(0, 4):
    if S[i] == S[i + 1]:
        print("Bad")
        fl = False
        break

if fl is True:
    print("Good")

Submission status: Runtime Error

Solution code:
# input
S = input()

fl = True
for i, s in range(0, 4):
    if S[i] == S[i + 1]:
        print("Bad")
        fl = False
        break

if fl is True:
    print("Good")

Submission status: Runtime Error

Solution code:
a,b,c,d = input()
print('Bad'

Submission status: Runtime Error

Solution code:
def security(s):

    return "Good" if s[0] != s[1] and s[1] != s[2] and s[2] != s[3] else "Bad"
def main():
    s = list(int(input()))
    print(security(s))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
s = str(int(input()))
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')

Submission status: Runtime Error

Solution code:
s = int(input())
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')

Submission status: Runtime Error

Solution code:
n=str(input())
print("Good" if all([n[j]!=n[j+1] for i in range(3)]) else "Bad")

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())
print("Bad" if a==b or b==c or c==d else "Good")

Submission status: Runtime Error

Solution code:
n=int(input())
n=list(str(n))
if n[0]==n[1] or n[1]==n[2] or n[2]==n[3]:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
n=int(input())
n=list(str(n))
if n[0]==n[1] or n[0]==n[2] or n[0]==n[3] or n[1]==n[2] or n[1]==n[3] or n[2]==n[3]:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

Solution code:
def main():
    S = sorted(int(input()))
    if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
        print("Bad")
    else:
        print("Good")


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import math
A,B,C,D = map(int, input().split())
d = math.gcd(C, D)
t = C * D / d

m = math.floor(B / C) + math.floor(B / D) - math.floor(B / t)
 
n = math.floor((A-1) / C) + math.floor((A-1) / D ) - math.floor((A-1) / t)

print(B-A+1-m+n)

Submission status: Runtime Error

Solution code:
S = input()
for i in range(1,5):
  if S[i] == S[i-1]:
    print('Bad')
    break
else:
  print('Good')

Submission status: Runtime Error

Solution code:
S = input()
for i in range(1,5):
  if S[i] == S[i-1]:
    print('Bad')
    break

Submission status: Runtime Error

Solution code:
S = input()
for i in range(len(S)):
    if S[i] == S[i+1]:
        print("Bad")
        exit()
print("Good")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# N = int(input())
S = input()
# N, A, B = map(int, input().split())
# A = list(map(int, input().split()))

for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        print("Bad")
        break
else:
    pirnt("Good")

Submission status: Runtime Error

Solution code:
S = list(input())
if S[0]==s[1] or S[1]==S[2] or S[2]==S[3]:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
import fractions

a, b, c, d = map(int, input().split())

b_c = b//c - (a-1)//c
d_c = b//d - (a-1)//d
cd = (c * d) // fractions.gcd(c, d)
cd_c = b//cd - (a-1)//cd

print((b - a + 1) - (b_c + d_c - cd_c))

Submission status: Runtime Error

Solution code:
import fractions

a, b, c, d = map(int, input().split())

b_c = b//c - (a-1)//c
d_c = b//d - (a-1)//d
cd = (c * d) // math.gcd(c, d)
cd_c = b//cd - (a-1)//cd

print((b - a + 1) - (b_c + d_c - cd_c))

Submission status: Runtime Error

Solution code:
s = input()
for i in range(4):
  if s[i] != s[i+1]:
    print("Bad")
    exit()
print("Good")

Submission status: Runtime Error

Solution code:
N = int(input())
data = [list(map(int,input().split())) for i in range(N)]

A = []

for i in range(N):
    A.append((data[i][1],data[i][0]))

A = sorted(A)

a = 0  #i番目にやった仕事の終了時間
for i in range(N):
    a += A[i][1]
    if a > A[i][0]:
        print('No')
        break
    else:
        continue
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
S=input()
s=S[0]
for i in range(len(S)-1):
    if S[i+1]==s:
        print('Bad')
        sys.exit()
    s=S[i+1]
print('Good')

Submission status: Runtime Error

Solution code:
a=list(input())
b=[]
for i in range(3):
  if a[i]==a[i+1]:
      b.append(0)
  else:
      b.append(1)
if b in 0:
    print('Bad')
else:
    print('Good')

Submission status: Runtime Error

Solution code:
import math
from functools import reduce
from fractions import gcd
#import math
#import itertools
#import statistics
#import numpy as np
#import collections
#n = int(input())
a, b, c, d = list(map(int, input().split()))
#b = list(map(int, input().split()))

#10 11  13 14 15  17  19 20 21 22 23  25 26 27 28 29 
# 31  33 34 35  37 38 39  
lcm = a*b/gcd(a, b)
diff = b-a+1
d1 = (b//c - a//c)
d2 = (b//d - a//d)
a1 =  int((b//lcm-a//lcm))

print(diff-d1-d2+a1)

Submission status: Runtime Error

Solution code:
s = input()

i = -1

a = 'Good'

while i <= 2:
	i += 1
	if s[i] == s[i+1]:
		a = 'Bad'
        break
        
print(a)

Submission status: Runtime Error

Solution code:
s = input()

i = 0

a = 'Good'

while i <= 2:
	if s[i] == s[i+1]:
		a = 'Bad'
        i += 1
        
print(a)

Submission status: Runtime Error

Solution code:
S = int(input())
ls = list(str(S))
if ls[0] == ls[1] or ls[1] == ls[2] or ls[2] == ls[3]:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
S = int(input())
ls = list(S)
if ls[0] == ls[1] or ls[1] == ls[2] or ls[2] == ls[3]:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
S = int(input())
ls = list(S)
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
S = int(input())

Sstr = str(S)

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

Submission status: Runtime Error

Solution code:
s=input()

cnt=0

for i in range(1,len(s):
    if s[i]==s[i-1]:
        cnt += 1

if cnt > 1:
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
S = input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
  print("Bad")
  else:
    print("Good")

Submission status: Runtime Error

Solution code:
S=input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
  print("Bad")
  else: print("Good")

Submission status: Runtime Error

Solution code:
S=input()
if S[3]=S[4] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
  else: print("Good")

Submission status: Runtime Error

Solution code:
S=input()
if S[3]=S[4] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
  else print("Good")

Submission status: Runtime Error

Solution code:
S=input()
if S[0]=S[1] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
  else print("Good")

Submission status: Runtime Error

Solution code:
S=[str(x) for x in input()]
ans=0
for i in range(4):
  if S[i]==S[i+1]:
  	ans+=1
    
    if ans >= 1 :
      print('Bad')
      else print('Good')

Submission status: Runtime Error

Solution code:
S=[str(x) for in input()]
ans=0
for i in range(4):
  if S[i]==S[i+1]:
  	ans+=1
    
    if ans>=1:
      print('Bad')
      else print('Good')

Submission status: Runtime Error

Solution code:
S = sorted(str,input())
Scnt = len(S)
Sset = set(S)

if Scnt == Sset:
    print("Good")
else:
    print("Bad")

Submission status: Runtime Error

Solution code:
def gcd(c,d):
    if(d>c):
        c,d = d,c
    a,b=c,d
    r=a%b
    while (r>0):      
        a = b
        b = r 
        r = a%b
    return b

def countDivBy(d,a,b):
    resB=int(b/d)
    resA=int(a/d)
    res = resB-resA
    if(a%d==0):
        res+=1
    return res


A = list(map(int, input().split()))
a, b, c, d = A
g = gcd(c,d)
lcm = int(c*d/g)
ansC = countDivBy(c,a,b)
ansD = countDivBy(d,a,b)
ansCD = countDivBy(lcm,a,b)
ans = b - a + 1 - ansC - ansD + ansCD
print(ans)

Submission status: Runtime Error

Solution code:
S = input()
for i in range(len(S)):
  if S[i] == S[i+1]:
    print("Bad")
    exit()
  else:
    print("Good")

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())
total_num = b-a+1
# # of x%c==0
c_num = b//c - (a-1)//c
d_num = b//d - (a-1)//d
from fractions import gcd
lcm = c*d/gcd(c,d)
cd_num = b//lcm - (a-1)//lcm
print(total_num-c_num-d_num+cd_num)

Submission status: Runtime Error

Solution code:
a = input()

for i in range(0,3):
  if a[i] == a[i+1]:
    print("Bad")
	return

print("Good")

Submission status: Runtime Error

Solution code:
s=int(input())

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

Submission status: Runtime Error

Solution code:
import io
import math
# libraries

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

if m<=0<=m+n-1:
  print(sum(range(m,m+n)))

  elif m<0:
  print(sum(range(m,m+n-1)))

  else:
  print(sum(range(m+1,m+n)))

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())

n = b-a-1
n_c = n//c
n_d = n//d
n_gap = n//(c*d)

print(n-n_c-n_d+n_gap+1)

Submission status: Runtime Error

Solution code:
s = list(map(int, input().split()))
for i in range(1,4):
  if s[i]==s[i-1]:
    print('Bad')
    exit()
print('Yes')

Submission status: Runtime Error

Solution code:
s=int(input())
if s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[3]:
    print('Good')
else:
    print('Bad')

Submission status: Runtime Error

Solution code:
s=input()
n=0
while s[n]!=s[n+1]:
    n+=1
    print('Good')
else:
    print('Bad')

Submission status: Runtime Error

Solution code:
s=int(input())
n=0
while s[n]!=s[n+1]:
    n+=1
    n=5:
        print('Good') 
else:
    print('Bad')

Submission status: Runtime Error

Solution code:
s = list(int(input()))
if s[0] != s[1] and s[1] != s[2] and s[2] != s[3]:
     print('Good')
else:
     print('Bad')

Submission status: Runtime Error

Solution code:
A, B, C, D = map(int, input().split())

def abc131_c_v3(A,B,C,D):
    def gcd(a, b):
        while b:
            a, b = b, a % b
        return a
 
    def lcm(a, b):
        return a // gcd(a, b) * b
 
    a = (A-1) - ((A-1) // C + (A-1) // D - (A-1) // lcm(C, D))
    b = B - (B // C + B // D - B // lcm(C, D))
    print(b-a)
    
abc131_c_v3(A,B,C,D)

Submission status: Runtime Error

Solution code:
S=input()
for i in range(3):
  if s[i]==s[i+1]:
    print('Bad')
    exit(0)
print('Good')

Submission status: Runtime Error

Solution code:
s = input()
flg = 0
for i in range(4):
    if s[i] == s[i+1]:
        flg = 1

if flg == 0:
    print("Good")
else:
    print("Bad")

Submission status: Runtime Error

Solution code:
s = input()

ans = 'Good'

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans='Bad'

print(ans

Submission status: Runtime Error

Solution code:
S = input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3] or S[3]==S[4]:
    print('Bad')
else:
    print('Good')

Submission status: Runtime Error

Solution code:
import fractions
a, b, c, d = map(int, input().split())
ans = 0
nc = 1
nc2 = 0
nd = 1
nd2 = 0 
ndc = 1
ndc2 = 0
while b >= c*nc:
  nc2 += 1
  nc += 1
while b >= d*nd:
  nd += 1
  nd2 += 1
cd = c*d//fractions.gcd(c,d)
while b >= cd*ndc:
  ndc += 1
  ndc2 += 1
nc2 -= a//c
nd2 -= a//d
ndc2 -= a//(cd)
ans = b-a+1-nc2-nd2+ndc2
print(ans)

Submission status: Runtime Error

Solution code:
A,B,C,D=map(int,input().split())
ans=0
m=A
while  m<=B:
  if m%C!=0 and m%D!=0:
    ans=ans+1
  m=m+1
print(ans)

Submission status: Runtime Error

Solution code:
S = [int(e) for e in input().split()]

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

Submission status: Runtime Error

Solution code:
S=input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3] or S[3]==S[4]:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
S = int(input())
for i in range(1, 4):
  if A[i] == A[i-1]:
    print("Bad")
    exit()
print("Good")

Submission status: Runtime Error

Solution code:
s =input()
print("Bad" if any(S[i]==S[i+1] for i in range(3)) else "Good")

Submission status: Runtime Error

Solution code:
s = input()

s[0]s = input()

flg = 0

for i in range(3):
    if s[i] == s[i + 1]:
        flg = 1

if flg == 1:
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
s = list(input())

for i in range(4):
    if s[i] == s[i+1]:
        print("Bad")
        exit()

print("Good")

Submission status: Runtime Error

Solution code:
s = int(input())

for i in range(4):
    if s[i] == s[i+1]:
        print("Bad")
    else:
        print("Good")

Submission status: Runtime Error

Solution code:
from fractions import gcd

A, B, C, D = map(int, input().split())

cnt = B//C -(A - 1)//C + B//D - (A - 1)//D - ((B//((C * D) // gcd(C, D))) - (A - 1)//((C * D) // gcd(C, D)))
cnt1 = B - (A - 1) -cnt

print(cnt1)

Submission status: Runtime Error

Solution code:
s = int(input())
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
a=list(input())
for i in range(len(a)-1):
	if a[i]==a[i+1]:
		print("Good")
        break
else:print("Bad")

Submission status: Runtime Error

Solution code:
S = int(input())
flag = True
for i in range(3):
  if S[i] == S[i+1]:
    flag = False
if flag == True:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

Solution code:
S=input()
for i in range(3):
  if S[i]=S[i+1]:
    print("Bad")
    break
else:
  print("Good")

Submission status: Runtime Error

Solution code:
S=input()
if S[0]=S[1] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
S=int(input())
if S[0]=S[1] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
import math
a,b,c,d=map(int,input().split())
def k(n):
    aa=n//c
    bb=n//d
    f=n//((c*d)//math.gcd(c,d))
    return n-aa-bb+f
print(k(b)-k(a-1))

Submission status: Runtime Error

Solution code:
S = list(input())

out = "Good"

for i in range(0,4):
  if S[i] == S[i+1]:
    out = "Bad"
    
print(out)

Submission status: Runtime Error

Solution code:
S = list(input())

out = Good

for i in range(0,4):
  if S[i] == S[i+1]:
    out = "Bad"
    
print(out)

Submission status: Runtime Error

Solution code:
S=int(input())
count=1
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')

Submission status: Runtime Error

Solution code:
S = int(input())
flag = 0

for i in range(3):
  if S[i] == S[i+1]:
    flag = 1
    
if flag:
  print("Bad")
  
else:
  print("Good")

Submission status: Runtime Error

Solution code:
s=input()

for i in range(3):
        if s[i] == s[j+1]:
                print("Bad")
                exit()
print("Good")

Submission status: Runtime Error

Solution code:
s = list(str(input()))

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

Submission status: Runtime Error

Solution code:
s = list(str(input()))

if s[0] == s[1] and a[1] == s[2] and s[2] == s[3]:
    print('Bad')
else:
    print('Good')

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())
from fractions import gcd

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count_b = b - b//c - b//d + b//lcm(c,d)
count_a = a-1 - (a-1)//c - (a-1)//d + (a-1)//lcm(c,d)
print(count_b-count_a)

Submission status: Runtime Error

Solution code:
S = input()
judge = 0

for i in range(4):
  if S[i] == S[i+1]:
    judge += 1
    
if judge == 0:
  print('Good')
else:
  print('Bad')

Submission status: Runtime Error

Solution code:
a=input()
ca=a[0]
for c in a[1:]:
  if ca == c:
    print('Bad')
    return
  ca = c
print('Good')

Submission status: Runtime Error

Solution code:
S = int(input())

s = list(S)

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

Submission status: Runtime Error

Solution code:
s = int(input())

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

Submission status: Runtime Error

Solution code:
#ls = list(input())
ls = [*input()]
flg = False
for i in range(len(ls)-1):
    if ls[i] == ls[i+1]:
        flg=True

if (flg): 
    print('Bad') 
else: 
    print('Good')

Submission status: Runtime Error

Solution code:
def z_algorithm(s):
  n = len(s)
  z = [None] * n
  z[0] = n
  
  i = 1
  j = 0
  while i < n:
    while i + j < n and s[j] == s[i + j]:
      j += 1
    z[i] = j
    if j == 0:
      i += 1
      continue
    k = 1
    while i + k < n and z[k] + k < j:
      z[i + k] = z[k]
      k += 1
    i += k
    j -= k
  return z

S = input()
T = input()
z = z_algorithm(T + "$" + S)

length = len(T)
for i in range(len(z)):
  if z[i] == length:
    index = i - length - 1
    print(index)

Submission status: Runtime Error

Solution code:
S = raw_input()
print "Bad" if A[0]==A[1] or A[1]==A[2] or A[2]==A[3] else "Good"

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
if k>((n-2)*(n-1))//2:
  print(-1)
else:
  ans=[]
  for a in range(1):
    for b in range(a+1,n):
        ans.append([a+1,b+1])
  i,j,cnt=2,3,0
  while cnt<((n-2)*(n-1))//2-k:
    while j<=n:
      ans.append([i,j])
      j+=1
      cnt+=1
      if cnt==((n-2)*(n-1))//2-k:
        break
    i+=1
  print(len(ans))
  for i in range(len(ans)):
    print(*ans[i])

Submission status: Runtime Error

Solution code:
s = input()
flag = 1
for i in range(1, n):
    if s[i - 1] == s[i]:
        flag = 0
if flag:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
import sys
a=list(input())
b=''
c=0
for i in range(4):
  if b=a[i]:
    c+=1
    if c>=2:
      print('Bad')
    else:
      print('Good')
    
  else:
    pass
  c=0
print('Bad')

Submission status: Runtime Error

Solution code:
a=list(int(input()))
if a[0]==a[1] or a[0]==a[2] or a[0]==a[3] or a[1]==a[2] or a[1]==a[3] or a[2]==a[3]:
  print('Good')
else:
  print('Bad')

Submission status: Runtime Error

Solution code:
S = input()
if S[0]==S[1]||S[1]==S[2]||S[2]==S[3]||S[3]==S[4]:
  print("bad")
else:
  print("good")

Submission status: Runtime Error

Solution code:
s=input()
if s[0]==s[1] or s[1]==s[2] or s[2]=-s[3]:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
import sys
row = sys.stdin.readline
 
ls = list(row())
s = sum([1 for i in range(1, len(ls) + 1) if ls[i-1] == ls[i]])
print("Good" if s+1 == len(ls) else "Bad")

Submission status: Runtime Error

Solution code:
import sys
row = sys.stdin.readline
 
ls = list(row())
s = sum([1 for i in range(1, len(ls) + 1) if ls[i-1] == ls[i]])
print("Good" if s == len(ls) else "Bad")

Submission status: Runtime Error

Solution code:
S = map(int, input().split())

flag = 0;

for i in range(1, 3):
    if S[i-1] = S[i] :
        flag = 1

res = "Good" if flag==0 else "Bad"

print(res)

Submission status: Runtime Error

Solution code:
s=input()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print(Bad)
else:
  print(Good)

Submission status: Runtime Error

Solution code:
from fractions import gcd
from math import ceil

def lcm(a, b):
    return a*b//gcd(a, b)

def num(l, r, n):
    return r//n-(l-1)//n

a, b, c, d = map(int, input().split(' '))

l = lcm(c, d)
print((b-a+1)-num(a, b, c)-num(a, b, d)+num(a, b, l))

Submission status: Runtime Error

Solution code:
S = input()

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
  r = 'Bad'
else:
  r - 'Good'

print(r)

Submission status: Runtime Error

Solution code:
S=input()
a=(str(S)[0])
b=(str(S)[1])
c=(str(S)[2])
d=(str(S)[3])
if(int(a)==int(b)):
  print("Bad")
else:
    print("Good")
    if(int(b)==int(c)):
  print("Bad")
else:
    print("Good")
if(int(c)==int(d)):
  print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
s = input()

ans = 0

for i in [0, 1, 2]:
  if s[i] == s[i + 1]:
    ans += 1
  else:
  
if ans >= 1:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
S = input()
if S[1] == S[2] or S[2] == S[3] or S[3] == S[4]:
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
S = input()
if S[1] == S[2]or S[2] == S[3]or S[3] == S[4]:
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
s = input()
ans="Good"
for i in range(4):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
ans="Good"
for i in range(len(s)):
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
ans="Good"
for i in range(len(s))
	if s[i]==s[i+1]:
		ans="Bad"
print(ans)

Submission status: Runtime Error

Solution code:
s = int(input())
s_list = list(s)
ans="Good"
for i in range(len(s))
	if s_list[i]==s_list[i+1]:
		ans="Bad"
print(ans)

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())

total = b - a + 1

c_1 = b//c - a//c if a%c!=0 else b//c - a//c + 1
d_1 = b//d - a//d if a%d!=0 else b//d - a//d + 1

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x%y == 0:
        return y
    else:
        while x%y != 0:
            z = x%y
            x = y
            y = z
        else:
            return z

div = int(c * d / gcd(c, d))

cd = b//div - a//div if a%div!=0 else b//div - a//div + 1

print(total - c_1 - d_1 + cd)

Submission status: Runtime Error

Solution code:
S=input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3}:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
S=int(input())
if S[0]==S[1] or S[1]==S[2} or S[2]==S[3]:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
s = list(input())
if s[0] == s[1] or s[1] == s[2] or s[2] = s[3]:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

Solution code:
def gcd(x, y): 
	while(y): 
   		x, y = y, x % y 
	return x 
a,b,c,d=map(int,input().split())
m=((c*d)//(gcd(c,d)))
di=b-a
if a%c==0:
  c1=(b//c-a//c)+1
else:
  c1=(b//c-a//c)
if a%d==0:
  c2=(b//d-a//d)+1
else:
  c2=(b//d-a//d)
if a%m==0:
  c3=(b//m-a//m)+1
else:
  c3=(b//m-a//m)
print(di-(c1+c2-c3-c3))

Submission status: Runtime Error

Solution code:
n = input()
l = input()
apples = [(i + int(l)) for i in range(int(n))]
eaten = min(apples)
print(sum(apples) - eaten)

Submission status: Runtime Error

Solution code:

    n = int(input())
    l = int(input())
    if 2 <= n and n <= 200 and -100 <= l and l <= 100:
        apples = [(i + l) for i in range(n)]
        eaten = min(apples)
        print(sum(apples) - eaten)

Submission status: Runtime Error

Solution code:
S = list( input() )
dif = [ int( S[1]-S[0] ), int( S[2]-S[1] ), int( S[3]-S[2] ) ]
if 0 in dif: 
   print( "Good" )
else : 
   print( "Bad" )

Submission status: Runtime Error

Solution code:
S = list( input() )
new = [ S[1]-S[0], S[2]-S[1], S[3]-S[2] ]
if 0 in new : 
   print( "Good" )
else : 
   print( "Bad" )

Submission status: Runtime Error

Solution code:
n = int(input())
ab = [list(map(int,input().split())) for i in range(n)]

ab.sort(key= lambda x:x[1])
time = 0

for i in range(n):
    time += ab[i][0]
    if time > ab[i][1]:
        ans = "No"
        break
else:
    ans = "Yes"

print(ans)

Submission status: Runtime Error

Solution code:
import fractions
a,b,c,d = map(int,input().split())
def ans():
    return((b-a+1) - ((b//c + b//d - b//(fractions.gcd(c,d))) - ((a-1)//c + (a-1)//d - (a-1)//(fractions.gcd(c,d)))))
ans = ans()
print(ans)

Submission status: Runtime Error

Solution code:
s = list((input())
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
s = list(int(input()))
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
N,L = list(map(int,input().split()))


i = 1
taste = []

while i <= N:
        taste.append(L + i - 1)
        i += 1


if L > 0 :
        print(sum(taste[1:N]))
elif L <= 0 and N + L < 0:
        print(sum(taste[0:N-1]))
elif L <= 0 and N + L >= 0:
        print(sum(taste[0:N-1]))

Submission status: Runtime Error

Solution code:
N,L = list(map(int,input().split()))


i = 1
taste = []

while i == N:
        taste.append(L + i - 1)
        i += 1

if L > 0 :
        print(sum(taste[1:N]))
elif L < N and N + L < 0:
        print(sum(taste[0:N-1]))
elif L <= 0 and N - L >= 0:
        print(sum(taste))

Submission status: Runtime Error

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


s = list(input())

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

Submission status: Runtime Error

Solution code:
a=input()
for i in range(len(a)-1):
  if a[i]==a[i+1]:
    flag=True
    break
if flag:
  print('Bad')
else:
  print('Good')

Submission status: Runtime Error

Solution code:
import sys
readline=sys.stdin.buffer.readline
n=int(input())
a=[list(map(int, readline().split())) for _ in range(n)]
a.sort(key=lambda x: x[1])
t=0
for i in range(n):
  t+=a[i][0]
  if t>a[i][1]:
    print("No")
    break
  elif i==n-1:
    print("Yes")

Submission status: Runtime Error

Solution code:
s = input()
for w in s:
    a = s.index(w)
    if w == s[a+1]:
        print("Bad")
        break
    else:
        continue
else:
    print("Good")

Submission status: Runtime Error

Solution code:
S = list(map(str, input()))

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

Submission status: Runtime Error

Solution code:
n=list(map(int,input()))
for i in (range(3)):
    if n[i]==n[i+1]:
        count+=1
if count>=1:
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
n = input()
s = set()
for c in n:
  s.add(c)
if s.len() == 4:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

Solution code:
n = input()
s = set()
for c in n:
  s.push(c)
if s.len() == 4:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

Solution code:
import fractions
a,b,c,d=map(int,input().split())
print(b-a+1-(b//c-(a-1)//c+b//d-(a-1)//d-b//(c*d/fractions.gcd(c,d))+(a-1)//(c*d/fractions.gcd(c,d))))

Submission status: Runtime Error

Solution code:
s=input()
for i in range(3):
  if s[i]=s[i+1]:
    print('Bad')
    exit()
print('Good')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

S = input()

for i in range(len(S)):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')

Submission status: Runtime Error

Solution code:
S = list(int(input()))

c = 0
for i in range(3):
  if S[i] != S[i+1]:
    c += 1
if c == 3:
  print('Good')
else:
  print('Bad')

Submission status: Runtime Error

Solution code:
S = list(int(input()))

c = 0
for i in range(3):
  if S[i] != S[i+1]:
    c += 1
if c == 3:
  print('GOOD')
else:
  print('BAD')

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
if (n-2)*(n-1)//2<k:
    print(-1)
else:
    print(n-1+(n-2)*(n-1)//2-k)
    for i in range(2,n+1):
        print(1,i)
    c=0
    for i in range(2,n+1):
        for j in range(2,n+1):
            if i<j:
                print(i,j)
                c+=1
                if c==(n-2)*(n-1)//2-k:
                    exit()

Submission status: Runtime Error

Solution code:
a=input()
b=False
for i in range(3):
 if a[i+1]==a[i]:
  b=True

if b:
 print(“Bad”)
else:
 print(“Good”)

Submission status: Runtime Error

Solution code:
a=input()
b=False
for i in range(3):
 if a[i+1]==a[i]:
  b=True

if b:
print(“Bad”)
else:
print(“Good”)

Submission status: Runtime Error

Solution code:
S=list(input())
N=len(S)
flg=0
for i in range(S-1):
  if S[i]==S[i+1]:
    print("Bad")
    break
if flg:
  print("Good")

Submission status: Runtime Error

Solution code:
s=list(str(input()))
count=0
for i in range(3):
  if s[i]==s[i+1]:
    count+=1

if count==0:
  print('Good')
  else:
    print('Bad')

Submission status: Runtime Error

Solution code:
s=input()   
if s[0]==s[1]:
	print("Bad")
elif s[1]==s[2]:
	print("Bad")
elif s[2]==s[3]:
	print("Bad")
else:
	print(good)

Submission status: Runtime Error

Solution code:
s=input()
if s[1:]==s[1:2]:
    print("Bad")
elif s[1:2]==s[2:3]:
    print("Bad")
elif s[2:3]==s[3:4]:
    print("Bad")
else:
    print(good)

Submission status: Runtime Error

Solution code:
s = input()

for i in range(1,len(s)):
  if s[i] == s[i-1]:
    print('Bad')
    sys.exit()

print('Good')

Submission status: Runtime Error

Solution code:
s=input()
ans=0
for i in range(0,3):
  if s[i]=s[i+1]:
    ans+=1
  else:
    ans+=0

if ans==0:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

Solution code:
s=input()
ans=0
for i in range(0,len(s)-1):
  if s[i]=s[i+1]:
    ans+=1
  else:
    ans+=0

if ans==0:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

Solution code:
a,b,c,d=int(input())

ans=0
if a==b or b==c or c==d:
  ans=1
  
if ans=1:
  print("Bad")
else:
  print('Good')