Problem p02860 (python)

Fixed submission:
def judge(N,str):
    a = list(str)
    b = []
    c = []
    if N%2 == 0:
        for k in range(int(N/2)):
            b.append(a[k])
            c.append(a[k+int(N/2)])
        if b == c:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
N = int(input())
S = input()
judge(N,S)

Buggy submission (verdict: Runtime Error):

N = int(input())
S = input()
a = list(str)
b = []
c = []
if N%2 == 0:
  for k in range(int(N/2)
        b.append(a[k])
        c.append(a[k+int(N/2)])
        if b == c:
            print("yes")
        else:
            print("No")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
def judge1(Num,a):
    s = list(range(Num+1))
    for l in range(2,Num+1):
        if Num%l == 0:
            alpha = list(a)
            j = int(Num/l - 1)
            b = []
            c = []
            for i in range(j+1):
                b.append(alpha[i])
            for k in range(l):
                c = c + b
            if alpha == c:
                s[l] = 1
            else:
                s[l] = 0
        else:
            s[l] = 0
    return s


N = int(input())
S = input()
a = judge1(N,S)
if 1 == a[2]:
    print("yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
def judge1(Num,a):
    s = list(range(Num))
    for l in range(2,Num):
        if Num%l == 0:
            alpha = list(a)
            j = int(Num/l - 1)
            b = []
            c = []
            for i in range(j+1):
                b.append(alpha[i])
            for k in range(l):
                c = c + b
            if alpha == c:
                s[l] = 1
            else:
                s[l] = 0
        else:
            s[l] = 0
    return s

N = int(input())
S = input()
a = judge1(N,S)
if 1 == a[2]:
    print("yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
def judge1(Num,a):
    s = []
    for l in range(2,Num):
        if Num%l == 0:
            alpha = list(a)
            j = int(Num/l - 1)
            b = []
            c = []
            for i in range(j+1):
                b.append(alpha[i])
            for k in range(l):
                c = c + b
            if alpha == c:
                s.append(1)
            else:
                s.append(0)
        else:
            s.append(0)
    return s

N = int(input())
S = input()
a = judge1(N,S)
if 1 == a[0]:
    print("yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
def judge1(Num,a):
    s = []
    for l in range(2,Num):
        if Num%l == 0:
            alpha = list(a)
            j = int(Num/l - 1)
            b = []
            c = []
            for i in range(j+1):
                b.append(alpha[i])
            for k in range(l):
                c = c + b
            if alpha == c:
                s.append(1)
            else:
                s.append(0)
        else:
            s.append(0)
    return s

N = int(input())
S = input()
a = judge1(N,S)
if 1 == a[0]:
    print("yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
def judge1(Num,a):
    s = []
    for l in range(2,Num):
        if Num%l == 0:
            alpha = list(a)
            j = int(Num/l - 1)
            b = []
            c = []
            for i in range(j+1):
                b.append(alpha[i])
            for k in range(l):
                c = c + b
            if alpha == c:
                s.append(1)
            else:
                s.append(0)
        else:
            s.append(0)
    return s

N = int(input())
S = input()
a = judge1(N,A)
if 1 in a:
    print("yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
def judge1(Num,a):
    if Num%2 == 0:
        j = int(Num/2 - 1)
        b = []
        for i in range(j+1):
            b.append(a[i])
        c = b + b
        alpha = "".join(c)
        if alpha == a:
            print("yes")
        else:
            print("No")
    else:
        print("No")

N = int(input())
S = input()

judge1(N,"S")