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 = input()
for i in range(len(s))[1:]:
  if s[i] == s[i-1]:
    print(Bad)
    break:
print(Good)

Submission status: Runtime Error

Solution code:
import fractions

A, B, C, D = tuple([int(a) for a in input().split(' ')])


def func1(n):
    return n - n//C - n//D + n//(C*D//fractions.gcd(C, D))


print(func1(B) - func1(A-1))

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:
n, l = input().split()

def apple_aji(i):
  return int(l) + int(i) - 1

def apple_pie(n):
  ajis = [apple_aji(x) for x in n]
  mini = min(list(map(abs, ajis)))
  mini = mini * -1
  if mini in ajis:
    pass
  else:
    mini = mini * -1
  print(ajis)
  ajis.remove(mini)
  print(ajis)
  return sum(ajis)

print(apple_pie(range(1, int(n))))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from fractions import gcd

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


def cnt_div(a, b, x):
    q, r = divmod(a, x)

    if r == 0:
        m = q - 1
    else:
        m = q

    n = b // x

    return n - m


num_c = cnt_div(a, b, c)
num_d = cnt_div(a, b, d)
lcm = int((c * d) / gcd(c, d))
num_c_d_gcd = cnt_div(a, b, lcm)

print((b - a + 1) - (num_c + num_d - num_c_d_gcd))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = 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()
 
result = 0
for i in range(len(S) - 1):
    if S[i] == S[i+1]:
        print("Bad")
    	break
else:
    print("Good")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = int(input())

result = 0
for i in range(len(S) - 1):
    if S[i] == S[i+1]:
        result += 1

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

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 = 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 numpy as np

n = int(input())
jobs = [list(map(int, input().split())) for i in range(n)]

jobs.sort(key=lambda x:x[1])

flg = True

a = np.array(jobs)[:,0]
b = np.array(jobs)[:,1]

sum = np.add.accumulate(a)
if sum(sum > b):
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
i = a[0]

lst = []
while i > 0:
    lst.append(i%10)
    i //= 10 # 必須
lst.reverse()

flag = 0;
for k in range(3):
  if lst[k] == lst[k+1]:
    flag = 1
    
if flag == 1:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
n = int(input())
flag = 0
for i in range(len(n)-1):
    if n[i] == n[i+1]:
        flag = 1

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

Submission status: Runtime Error

Solution code:
n = int(input())
flag = 0
for i in range(len(n)-1):
  if n[i] == n[i+1]:
    flag = 1

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

Submission status: Runtime Error

Solution code:
import sys
st = input()
for i in range(len(st)):
  if st[i] == st[i+1]:
    print("Bad")
    sys.exit(0)
print("Good")

Submission status: Runtime Error

Solution code:
data = input().split()
N = int(data[0])
L = int(data[1])
taste = []
for i in range(N):
    taste.append(L + (i+1) - 1)
absTaste = []
for i in range(N):
    absTaste.append(abs(taste[i]))
index = 0
minimum = 0
for i in range(1,N):
    if absTaste[i-1] > absTaste[i]:
        index = i
        minimum = taste[i]
ans = sum(taste) - taste[index]#sumはリスト内の数値の合計を計算する関数
print(ans)

Submission status: Runtime Error

Solution code:
import sys
i = int(input())
i = list(i)
for k in range(3):
  if i[k] == i[k+1]:
    print("Bad")
    sys.exit()
print("Good")

Submission status: Runtime Error

Solution code:
s = int(input())
checker = True
for i in range(3):
    if s[i] == s[i+1]:
        checker=False

if checker:
    print("Good")
else:
    print("bad")

Submission status: Runtime Error

Solution code:
print("bad" if [ str(x)[0]==str(x)[1] or str(x)[1]==str(x)[2] or str(x)[2]==str(x)[3] for x in [int(input())] ] == [1] else "good")

Submission status: Runtime Error

Solution code:
import re
s = input()
pattern = r"\d{2}"
if(!re.match(pattern, s)):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import re
s = input()
if(s.match(r"\d{2}")):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
s = input()
if(s.match(r"\d{2}")):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

for i in range(a, b):
    if i%c != 0:
        if i%d !=0:
            print(i)

Submission status: Runtime Error

Solution code:
a=int(input())

if a in '11' or '22' or '33' or '44' or '55' or '66' or '77' or '88' or '99' or '00':
  print('Bad')
  
else:
  print('Good')

Submission status: Runtime Error

Solution code:
N, L = map(int, input().split())
tmp = 100000
proper_i = 0
for i in range(N):
    i = i+1
    m = abs(L + i - 1)
    if m == 0:
        proper_i = i
        break
    elif m < tmp:
        tmp = m
        proper_i = i
apple = []
for i in range(N):
    i = i + 1
    apple.append(L + i - 1)
taste = sum(apple) - apple[proper_i - 1]
print(taste)

Submission status: Runtime Error

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

apple_taste = [int(x+L) for x in range(N)]
all_applepie_taste = sum(apple_taste)
dif_taste_min = abs(all_applepie_taste)
num_min = 0

for i in range(N):
  dif_taste = abs(all_applepie_taste)
  dif_taste -= abs(all_applepie_taste - apple_taste[i])
  
  if dif_taste_min >= abs(dif_taste):
    dif_taste_min = dif_taste
    num_min = i
  
applepie_taste_min = all_applepie_taste - apple_taste[num_min]  
print(applepie_taste_min)

Submission status: Runtime Error

Solution code:


function Main(input) {
  input = input.split("\n");
  var S = input[0].split("");
  var ans = "Good"
  for(var i=1;i<4;i++){
    if(S[i]==S[i-1]){
      ans="Bad";
      break;
    }
  }

  console.log('%s', ans);
  return ans;
}

function debug(n){
  var input = document.getElementById("input"+n).value;
  var ans=Main(input);
  var result="WA";
  if(ans==document.getElementById("output"+n).value.split("\n")[0]){
    result="AC";
  }
  document.getElementById("result"+n).innerHTML=result;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<functional>
#include<string>
#include<iomanip>
#include<map>
#include<utility>
#include<string>

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

using namespace std;

#define min_3(a, b, c) min(a, min(b, c))
#define max_3(a, b, c) max(a, max(b, c))
typedef long long ll;

int main()
{
   string s; cin >> s;
   for(int i = 0; i < 3; i++){
       if(s[i] == s[i + 1]){
           cout << "Bad" << endl;
           return 0;
        }
   }
   cout << "Good" < endl;
}

Submission status: Runtime Error

Solution code:
n, L = map(int, input().split())
N = 0
G = 999
for i in range(1, n+1):
    N += (i + L - 1)
NN = N
for i in range(1, n+1):
    DD = NN - (L + i - 1)
    if abs(NN-DD)< G :
        G = abs(NN-DD)
        ZZ = DD
print(ZZ)

Submission status: Runtime Error

Solution code:
n,L = map(int,input().split())
N=0
G=0
for i in range(1,n):
    N +=(i+L-1)
NN = N
for i in range(1,n):
        DD = NN - (L+i-1)
        if DD>G :
            G = DD
print(G)

Submission status: Runtime Error

Solution code:
A=str(input () )
B=0
while True:
    if A[B]==A[B+1]:
        print('Bad')
        break
    else:    
        B=B+1
else:
    print('Good')

Submission status: Runtime Error

Solution code:
A=str(input () )
B=0
while B ==!2:
if A[B] == A[B+1]:
    print ('Bad')
    B += 1 
    break  
    print('Good')

Submission status: Runtime Error

Solution code:
A=str(input () )
B=0
while B =!2:
if A[B] == A[B+1]:
    print ('Bad')
    B += 1 
    break  
    print('Good')

Submission status: Runtime Error

Solution code:
A=input ()
B=0
while B =!2:
if A[B] == A[B+1]:
    print ('Bad')
    break
else:
    B +=1
else:
    print('Good')

Submission status: Runtime Error

Solution code:
S = list(input())
for i in range(0, 3):
    if S[i] == S[i + 1]:
        print("Bad")
        return
print("Good")

Submission status: Runtime Error

Solution code:
var input=GET(require("fs").readFileSync("/dev/stdin","utf8"));
var str = input();
if(str[0] == str[1] || str[1]==str[2] || str[2]==str[3])console.log("Bad");
else console.log("Good")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import fractions

A, B, C, D = [int(i) for i in input().split()]

lcm = (C*D)//fractions.gcd(C,D)
A = A-1
t1 = A - (A//C + A//D - A//lcm)
t2 = B - (B//C + B//D - B//lcm)
print(int(t2 - t1))

Submission status: Runtime Error

Solution code:
import collections


S = list(input())

c = collections.Counter(S)

if max(c.values) >= 2:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=int(input())


for i in range(len(S)):
    A=S[i:i+1]
    print(A)

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

Submission status: Runtime Error

Solution code:
for i in range(len(S)):
    A=S[i:i+1]
    print(A)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
ans=0
for a in range(b):
  if a%c!=0 or a%d!=0:
    ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())
x = b // c
y = b // d
w = b //(c　* d)
z = (a - 1) // d
v = (a - 1) // c
h = (a - 1) // (c * d)
print((b - x - y + w) - ((a-1) - z - v + h))
print(x,y,v,z)

Submission status: Runtime Error

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

def gcd(x,y):

    if(y>x):
        x,y = y,x
    if(x%y==0):
        return y
    else:return gcd(y,x%y)


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


Bika = B - B//C -B//D + B//lcm(C,D)
Aika = A-1 - (A-1)//C -(A-1)//D + (A-1)//lcm(C,D)

print(Bika-Aika)

Submission status: Runtime Error

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

pass = [int(a),int(b),int(c),int(d)]
 
if pass[0]==pass[1] or pass[1]==pass[2] or pass[2]==pass[3]:
    print("bad")
 
else:
    print("good")

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:
a,b,c,d = input()
pass = [int(a),int(b),int(c),int(d)]
 
if pass[0]==pass[1] or pass[1]==pass[2] or pass[2]==pass[3]:
    print("bad")
 
else:
    print("good")

Submission status: Runtime Error

Solution code:
S = str(int(input("４桁の数字を入力してください。＞＞＞")))
cnt = 0
for i in range(1, 4):
    cnt+=1
    if S[i] == S[i-1]:
        print('Bad')
        break
    elif cnt == 3:
        print('Good')

Submission status: Runtime Error

Solution code:
def nCr(n, r):
    import math
    return math.factorial(n) // ((math.factorial(n - r) * math.factorial(r)))
MOD = 1000000007

n, k = map(int, input().split())
b, r = k, n-k
for i in range(0, k):
    x = nCr(b - 1,  i) # 青いブロックの分け方
    y = nCr(r + 1 , r- i)

    print(x * y % MOD)

Submission status: Runtime Error

Solution code:
s = 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:
n=int(input())
a=n//1000
b=(n//100)%10
c=(n//10)%10
d=n%10
 
if a==b:
  print(Bad)
elif b==c:
  print(Bad)
elif c==d:
  print(Bad)
else:
  print(Good)

Submission status: Runtime Error

Solution code:
n=int(input())
a=n//1000
b=(n//100)%10
c=(n//10)%10
d=n%10

if a==b:
  print(Bad)
else if b==c:
  print(Bad)
else if c==d:
  print(Bad)
else:
  print(Good)

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:
a,b,c,d = sorted(input())
print (Bad)

Submission status: Runtime Error

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

if a == b:
    print("Bad")
elif b == c:
    print("Bad")
elif c == d:
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
S = str（input())

ans = 'Good'

for i in range(3):
  if S[i] == S[i+1]:
    ans = 'Bad'
    break
    
    print(ans)

Submission status: Runtime Error

Solution code:
S = input()

s = [int(S[i])-int(S[i+1]) for i in range(S)]

print("Good" if 0 in s else "Bad")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
Scode = input()
while count < 4:
  if Scode[count] ~= Scode[count + 1]:
    print("Bad")
  else:
    print("Good")

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int, input().split())
def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y % x, x)
def lcm(x,y):
    return x * y // gcd(x,y)
L = lcm(C,D)
b = B - (B // C) - (B // D) + (B // L)
a = (A-1) - ((A-1) // C) - ((A-1) // D) + ((A-1) // L)
print(b - a)

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int, input().split())
#最大公約数
def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y % x, x)
#最小公倍数
def lcm(x,y):
    return x * y // gcd(x,y)
L = lcm(C,D)
b = B - (B // C) - (B // D) + (B // L)
a = (A-1) - ((A-1) // C) - ((A-1) // D) + ((A-1) // L)
print(b - a)

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int, input().split())
cnt = 0
for i in range(A, B+1):
    if not i % C == 0:
        if not i % D == 0:
            cnt = cnt + 1
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
from collections import namedtuple
import functools

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int, t: "List[int]", x: "List[int]", y: "List[int]"):
    for i in range(N):
        min_length = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i])
        travel_time = t[i+1] - t[i]

        if min_length > travel_time:
            return NO
        elif min_length == travel_time:
            next
        elif (travel_time - min_length) % 2 == 0:
            next
        else:
            return NO

    return YES


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    t = [int()] * (N)  # type: "List[int]" 
    x = [int()] * (N)  # type: "List[int]" 
    y = [int()] * (N)  # type: "List[int]" 
    for i in range(N):
        t[i] = int(next(tokens))
        x[i] = int(next(tokens))
        y[i] = int(next(tokens))
    t.insert(0, 0)
    x.insert(0, 0)
    y.insert(0, 0)
    print(solve(N, t, x, y))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
def f(X,Y):
    return X//Y

A,B,C,D = map(int, input().split())
X = B-A+1
if (C>D):
    x = C
    y = D
else:
    y = C
    x = D

r = x % y
while(r!=0):
    x = y
    y = r
    r = x % y

print("%d" % (X - f(X, C) - f(X, D) + f(X, C*D//y)))

Submission status: Runtime Error

Solution code:
a = int(input())

for i in range(3):
    if str(a)[i] == str(a)[i+1]:
        print(i)
        print("Good")
        break
    elif i == 2:
        print("Bad")

Submission status: Runtime Error

Solution code:
x = input()
def samenum(string):
  for i in range(3):
  	if string[i] == string[i+1]:
    	return "Bad"
  		quit()
  return "Good"

print(samenum(x))

Submission status: Runtime Error

Solution code:
import math
input = list(map(int,input().split()))
A = input[0]
B = input[1]
C = input[2]
D = input[3]

betweenAandB = B-A+1

cA = math.ceil(A/C)
cB = int(B/C)
cDiv = cB - cA + 1

dA = math.ceil(A/D)
dB = int(B/D)
dDiv = dB - dA + 1

GCD = math.gcd(C,D)
LCM = C*D/GCD

lcmA = math.ceil(A/LCM)
lcmB = int(B/LCM)
lcmDiv = max(lcmA, lcmB) - min(lcmA, lcmB) + 1

ans = betweenAandB - cDiv - dDiv + lcmDiv
print(ans)

Submission status: Runtime Error

Solution code:
pass = int( input() )

for i range(3):
  if pass[i] == pass [i+1]:
  	print('Bad')
  	break
  elif i == 2:
    print('Good')

Submission status: Runtime Error

Solution code:
S = list()
if (S[0] - S[1])*(S[1] - S[2])*(S[2] - S[3]) == 0:
  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[3]==S[4]:
    print('Bad')
else:
    print('Good')

Submission status: Runtime Error

Solution code:
key_no = input()
ret = 'Good'
for i in range(len(key_no)-1):
  if key_no[i] == key_no[i+1]:
    ret = 'Bad'
  	break
print(ret)

Submission status: Runtime Error

Solution code:
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)
 
 
def lcd(a, b):
    return a*b // gcd(a, b)
  
a, b, c, d = map(int, input().split())
sum1 = (a - 1) // c + (a - 1) // d + (a - 1) // lcd(c, d)
sum2 = b // c + b // d + b // lcd(c, d)
print(b - a  + 1 - (sum2 - sum1))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
new = set(n)
if len(new) != 4:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

 #最小公倍数
def lcm(a,b):
    return a*b/gcd(a,b)
  
A,B,C,D=map(int,input().split())

if A%C == 0:
    AC = int(A/C) - 1
else:
    AC = int(A/C)
if A%D == 0:
    AD = int(A/D) - 1
else:
    AD = int(A/D)
    
lcmCD = lcm(C,D)
if A%(lcmCD) == 0:
    ACD = int(A/(lcmCD)) - 1
else:
    ACD = int(A/(lcmCD))
    
print((B - A + 1) - (int(B/C) - AC + int(B/D) - AD - int(B/(lcmCD) + ACD)))

Submission status: Runtime Error

Solution code:
S = str(input())
ans = 'Good'
for i in range(2):
  if S[i] == S[i+1]:
    ans = 'Bad'
Print(ans)

Submission status: Runtime Error

Solution code:
S = str(input()).split()
ans = 'Good'
for i in range(3):
  if S[i] == S[i+1]:
    ans = 'Bad'
Print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
password = list(input())
pw = set(password)
if len(pw) != 4:
  print("Bad")
  break
print("Good")

Submission status: Runtime Error

Solution code:
password = input().split()
pw = set(password)
if len(password) != len(pw):
  print("Bad")
  break
print("Good")

Submission status: Runtime Error

Solution code:
password = set(input().split())
if len(password) != 4:
  print("Bad")
  break
print("Good")

Submission status: Runtime Error

Solution code:
password = list(input())
for i in range(len(password)):
  for j in range(i+1, len(password)):
    if i != j and password[i] == password[j]:
      print("Bad")
      exit(1)
print("Good")

Submission status: Runtime Error

Solution code:
import math
a=b=2
print(math.gcd(a,b))

Submission status: Runtime Error

Solution code:
S=int(input())
a=S
b=[]
while a>0:
    b.append(a%10)
    a//=10
if b[0]==b[1] or b[1]==b[2] or b[2]==b[3]:
    print("Bad")
else:
    print("Good")

Submission status: Runtime Error

Solution code:
import math
def lcm(x,y):
  return x*y/math.gcd(x,y)
def numantidiv(a,b,c):
    r=a-math.floor(a/b)-math.floor(a/c)+math.floor(a/lcm(b,c))
    return r

a,b,c,d=(int(x) for x in input().split())
ans=numantidiv(b,c,d)-numantidiv(a-1,c,d)
print(ans)

Submission status: Runtime Error

Solution code:
import math
def lcm(x,y):
  return x*y/math.gcd(x,y)
def numantidiv(a,b,c):
    r=a-math.floor(a/b)-math.floor(a/c)+math.floor(a/lcm(b,c))
    return r
a,b,c,d=(int(x) for x in input().split())
ans=numantidiv(b,c,d)-numantidiv(a-1,c,d)
print(ans)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
code = input()
num = str(code)

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

Submission status: Runtime Error

Solution code:
code = input()

num = str(code)

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

Submission status: Runtime Error

Solution code:
code = input()
num = str(code)

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

Submission status: Runtime Error

Solution code:
code = input()

num = str(code)

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

Submission status: Runtime Error

Solution code:
code = input()

num = (str)code

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

Submission status: Runtime Error

Solution code:
code = input('security code: ')

num = (str)code

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

Submission status: Runtime Error

Solution code:
code = input('security code: ')

num = list((str)code)

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

Submission status: Runtime Error

Solution code:
code = input('security code: ')

num = (str)code.split('')

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

Submission status: Runtime Error

Solution code:
code = input('security code: ')

num = split('')

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

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**5)
m = 100005
visited = [False]*(m*2)
cnt = [0,0]
def dfs(i):
    visited[i] = True
    cnt[i//m] = cnt[i//m]+1
    for j in to[i]:
        if not visited[j]:
            dfs(j)
 
input = sys.stdin.readline
n = int(input())
to = [[] for _ in range(m*2)]
for _ in range(n):
    x,y = map(int,input().split())
    y = y+m
    to[x].append(y)
    to[y].append(x)
 
ans = 0
for i in range(m):
    if not visited[i]:
        cnt = [0,0]
        dfs(i)
        ans = ans + cnt[0]*cnt[1]
 
print(ans-n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
code = len(set(list(str(input()))))
if code==4:
  print("Good")
else:
  print("Bad")

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:
code = input()
previous = 'a'
for c in code:
  if perivioud == c:
    print('bad')
    break

Submission status: Runtime Error

Solution code:
N,L=map(int, input().split())
if N+L-1<=0:
  print(int(L*(N-1)+N*(N-1)/2-N+1))
elif L>=0:
  print(int(L*(N-1)+N*(N+1)/2-1-N+1))
else :
  print(int(L*N+N*(N+1)/2-N))

Submission status: Runtime Error

Solution code:
s=input()
a=s//1000
b=(s-a*1000)//100
c=(s-a*1000-b*100)//10
d=s-a*1000-b*100-c*10
if a==b :
    print"Bad"
    elif b==c:
        print"Bad"
    elif c==d:
        print"Bad"
else:
    print"Good"

Submission status: Runtime Error

Solution code:
s = input()

for i in range(3):
  if s(i) == s(i+1):
    print("bad")
    break
    
if i == 3:
  print("good")

Submission status: Runtime Error

Solution code:
s = input()

p = ""
for c in s:
  if c == p:
    print("bad")
    break
  p = c
  cnt += 1
  
if cnt == 4:
  print("good")

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int,input().split())
X = max(C,D)
Y = min(C,D)
def gcd(a,b):
  while b!= 0:
    a,b = b,a%b
  return a
l = C*D/ gcd(X,Y)
def f(x):
  return x - (x//C + x//D - x//l)
ans = f(B) - f(A-1)
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:
N,L = map(int,input().split())
S = 0
b = abs(L)
for i in range(1,N+1):
  a = L + i - 1
  S += a
  b = min(abs(a),b)
if -N < L:
  ans = S - b
else:
  ans = S + b
print(ans)

Submission status: Runtime Error

Solution code:
from collections import Counter
code = input()
cnt = 0
for i in range(len(code) - 1):
  if c[i] == c[i + 1]:
    cnt += 1
    break
if cnt:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

Solution code:
from collections import Counter
code = input()
max_c = Counter(list(code)).most_common()[0]
if max_c > 1:
  print("Bad")
else:
  print("Good")