Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x = int(input())

dp = [0 for _ in range(x + 1)] #0:"No", 1:"Yes"
dp[0] = 1
if x < 100:
    print(dp[x])
    exit()
for i in range(100, 106):
    dp[i] = 1
for i in range(106, x + 1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[x])


Fixed submission:
# -*- coding: utf-8 -*-
x = int(input())

tmp1 = (x % 100) // 5
tmp2 = ((x % 100) - tmp1 * 5) // 4
tmp3 = ((x % 100) - tmp1 * 5 - tmp2 * 4) // 3
tmp4 = ((x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3) // 2
tmp5 = (x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3 - tmp4 * 2
if x // 100 >= tmp1 + tmp2 + tmp3 + tmp4 + tmp5:
    print(1)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
x = int(input())

dp = [0 for _ in range(x + 1)] #0:"No", 1:"Yes"
dp[0] = 1
for i in range(100, 106):
    dp[i] = 1
for i in range(106, x + 1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[x])


Fixed submission:
# -*- coding: utf-8 -*-
x = int(input())

tmp1 = (x % 100) // 5
tmp2 = ((x % 100) - tmp1 * 5) // 4
tmp3 = ((x % 100) - tmp1 * 5 - tmp2 * 4) // 3
tmp4 = ((x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3) // 2
tmp5 = (x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3 - tmp4 * 2
if x // 100 >= tmp1 + tmp2 + tmp3 + tmp4 + tmp5:
    print(1)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
x = int(input())

dp = [0 for _ in range(x + 1)] #0:"No", 1:"Yes"
dp[0] = 1
for i in range(100, 106):
    dp[i] = 1
for i in range(106, x + 1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[x])


Fixed submission:
# -*- coding: utf-8 -*-
x = int(input())

tmp1 = (x % 100) // 5
tmp2 = ((x % 100) - tmp1 * 5) // 4
tmp3 = ((x % 100) - tmp1 * 5 - tmp2 * 4) // 3
tmp4 = ((x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3) // 2
tmp5 = (x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3 - tmp4 * 2
if x // 100 >= tmp1 + tmp2 + tmp3 + tmp4 + tmp5:
    print(1)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
a = [int(i) for i in input().split()]

ans = []
x = 0

for h in range(N):
    B = [0]
    for i in range(1,N+1):
        B.append(a[i-1] + B[i-1])

    for i in range(N):
        if B[N] - B[i] == B[i]:
            ans.append(x)
        else:
            a[h] += 1
            x += 1


for h in range(N):
    B = [0]
    for i in range(1,N+1):
        B.append(a[i-1] + B[i-1])

    for i in range(N):
        if B[N] - B[i] == B[i]:
            ans.append(x)
        else:
            a[h] -= 1
            x += 1

#print(ans)
print(min(ans))


Fixed submission:
# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()] 

su = [0 for _ in range(n)] #鉄の棒の切れ目の座標
for i in range(n):
    su[i] = su[i-1] + a[i]
#print(su)

tmp = 2 * pow(10, 10) + 1
for i in su:
    if abs(i - su[-1]/2) < tmp:
        tmp = abs(i - su[-1]/2)
#print(su[-1]/2, tmp)

"""
#中心に一番近い鉄の棒の切れ目と中心との距離の差
l = 0
r = n-1
while (l - r) >= 1:
    c = (l + r) // 2
    #print(l, r, c)
    if su[c] < su[-1] / 2:
        l = c
    elif su[c] > su[-1] / 2:
        r = c
#print(su[l], su[r])
tmp = min(abs(su[l] - su[-1]/2), abs(su[r] - su[-1]/2))
print(tmp)
"""

ans = 2 * tmp
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())

A = []
for h in range(1, int(N/2)+1):
    if N % h == 0:
        A.append(h + int(N/h))

C = min(A)
print(C - 2)


Fixed submission:
# -*- coding: utf-8 -*-
n = int(input())

tmp = 10 ** 24
tmp2 = 1
tmp3 = 1
for i in range(1, 10 ** 6 + 1):
    if n % i == 0 and i + (n / i) < tmp:
        tmp = i + (n // i)
        tmp2 = i
        tmp3 = n // i
print(tmp2 + tmp3 - 2)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())

A = []
for h in range(1, N+1):
    if N % h == 0:
        A.append(h + int(N/h))

C = min(A)
print(C - 2)


Fixed submission:
# -*- coding: utf-8 -*-
n = int(input())

tmp = 10 ** 24
tmp2 = 1
tmp3 = 1
for i in range(1, 10 ** 6 + 1):
    if n % i == 0 and i + (n / i) < tmp:
        tmp = i + (n // i)
        tmp2 = i
        tmp3 = n // i
print(tmp2 + tmp3 - 2)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())

A = []
for h in range(1, N+1):
    if N % h == 0:
        A.append([h , int(N/h)])

B = []
for k in range(len(A)):
    B.append(A[k][0] + A[k][1])
C = min(B)
print(C - 2)


Fixed submission:
# -*- coding: utf-8 -*-
n = int(input())

tmp = 10 ** 24
tmp2 = 1
tmp3 = 1
for i in range(1, 10 ** 6 + 1):
    if n % i == 0 and i + (n / i) < tmp:
        tmp = i + (n // i)
        tmp2 = i
        tmp3 = n // i
print(tmp2 + tmp3 - 2)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int, input().split()))

for h in range(1,N+1):
    for i in range(N):
        if A[i] == h:
            print(i + 1)


Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int, input().split()))

"""
for h in range(1,N+1):
    for i in range(N):
        if A[i] == h:
            print(i + 1)
#このやり方でもOKだけど、nが馬鹿でかくなった時にTLEしちゃうよ
"""

S = []
for i in range (N):
    S.append([A[i] , i + 1])
S.sort()

for i in range(N):
    print(S[i][1])
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n = int(input())

tmp = [i for i in range(1, n + 1)]
print(sum(tmp) - n)


Fixed submission:
# -*- coding: utf-8 -*-
n = int(input())

sum_n = n * (1 + n) // 2
print(sum_n - n)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N, L = map(int,input().split())

taste = []
for i in range(1,N + 1):
    taste.append(L + i - 1)

SUM = sum(taste)

DIF = abs(SUM - (SUM - taste[0]))
ans = SUM - taste[0]
for i in range(1,N + 1):
    x = SUM - taste[i]
    if abs(SUM - x) < DIF:
        DIF = abs(SUM - x)
        ans = x
print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
N, L = map(int,input().split())

taste = []
for i in range(1,N + 1):
    taste.append(L + i - 1)

SUM = sum(taste)

DIF = abs(SUM - (SUM - taste[0]))
ans = SUM - taste[0]
for i in range(1,N):
    x = SUM - taste[i]
    if abs(SUM - x) < DIF:
        DIF = abs(SUM - x)
        ans = x
print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
S = list(str(input()))
K = int(input())

for i in range(N):
    if S[i] != S[K]:
        S[i] = "*"
"".join(S)
print(S)


Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
S = list(str(input()))
K = int(input())

for i in range(N):
    if S[i] != S[K - 1]:
        S[i] = "*"

Z = ''.join(S)
print(Z)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

ans = 0
tmp = [A, B, C, D, E]
Y = []
Z = []
for i in range(5):
    Y.append([tmp[i] % 10, tmp[i]])
Y.sort()
#print(Y)
for i in range(5):
    if Y[i][0] != 0:
        Z.append(i)
for i in range(5):
    X = Y[i][1]
    #print(i)
    while X % 10 != 0:
        X += 1
    ans += X
    #print(X)
    #print(ans)
G = Y[Z[0]][1]
while G % 10 != 0:
    G += 1
ans -= G
ans += Y[Z[0]][1]
#print(tmp[0])
print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

ans = 0
tmp = [A, B, C, D, E]
Y = []
Z = []
for i in range(5):
    Y.append([tmp[i] % 10, tmp[i]])
Y.sort()
#print(Y)
for i in range(5):
    if Y[i][0] != 0:
        Z.append(i)
if len(Z) != 0:
    for i in range(5):
        X = Y[i][1]
        #print(i)
        while X % 10 != 0:
            X += 1
        ans += X
        #print(X)
        #print(ans)
    G = Y[Z[0]][1]
    while G % 10 != 0:
        G += 1
    ans -= G
    ans += Y[Z[0]][1]
    #print(tmp[0])
else:
    ans = sum(tmp)
print(ans)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

ans = 0
tmp = [A, B, C, D, E]
Y = []
Z = []
L = []
for i in range(5):
    Y.append([tmp[i] % 10, tmp[i]])
Y.sort()
#print(Y)
for i in range(5):
    if Y[i][0] != 0:
        Z.append(i)
    else:
        L.append(i)
for i in range(5):
    X = Y[i][1]
    #print(i)
    while X % 10 != 0:
        X += 1
    ans += X
    #print(X)
    #print(ans)
G = Y[Z[0]][1]
while G % 10 != 0:
    G += 1
ans -= G
ans += Y[Z[0]][1]
#print(tmp[0])
print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

ans = 0
tmp = [A, B, C, D, E]
Y = []
Z = []
for i in range(5):
    Y.append([tmp[i] % 10, tmp[i]])
Y.sort()
#print(Y)
for i in range(5):
    if Y[i][0] != 0:
        Z.append(i)
if len(Z) != 0:
    for i in range(5):
        X = Y[i][1]
        #print(i)
        while X % 10 != 0:
            X += 1
        ans += X
        #print(X)
        #print(ans)
    G = Y[Z[0]][1]
    while G % 10 != 0:
        G += 1
    ans -= G
    ans += Y[Z[0]][1]
    #print(tmp[0])
else:
    ans = sum(tmp)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n, q = map(int,input().split())
s = input()

tmp = [0 for _ in range(n)]
for i in range(n - 1):
    if s[i] == 'A' and s[i + 1] == 'C':
        tmp[i] = 1
        tmp[i + 1] = 3
#print(tmp)

for i in range(q):
    l, r = map(int,input().split())
    ans = sum(tmp[l-1:r])
    if tmp[l-1] == 3:
        ans -= 3
    if tmp[r-1] == 1:
        ans -= 1
    print(ans // 4)


Fixed submission:
# -*- coding: utf-8 -*-
n, q = map(int,input().split())
s = input()

tmp = [0 for _ in range(n)]
for i in range(1, n):
    if s[i-1] == 'A' and s[i] == 'C':
        tmp[i] = 1 + tmp[i-1]
    else:
        tmp[i] = tmp[i-1]
#print(tmp)

for i in range(q):
    l, r = map(int,input().split())
    print(tmp[r-1] - tmp[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n, q = map(int,input().split())
s = input()

tmp = [0 for _ in range(n)]
for i in range(n - 1):
    if s[i] == 'A' and s[i + 1] == 'C':
        tmp[i] = 1
        tmp[i + 1] = 3
#print(tmp)

for i in range(q):
    l, r = map(int,input().split())
    ans = sum(tmp[l-1:r])
    if tmp[l-1] == 3:
        ans -= 3
    if tmp[r-1] == 1:
        ans -= 1
    print(ans // 4)


Fixed submission:
# -*- coding: utf-8 -*-
n, q = map(int,input().split())
s = input()

tmp = [0 for _ in range(n)]
for i in range(1, n):
    if s[i-1] == 'A' and s[i] == 'C':
        tmp[i] = 1 + tmp[i-1]
    else:
        tmp[i] = tmp[i-1]
#print(tmp)

for i in range(q):
    l, r = map(int,input().split())
    print(tmp[r-1] - tmp[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n, q = map(int,input().split())
s = list(str(input()))
lr = []
for i in range(q):
    lr.append([int(i) for i in input().split()])

for i in range(q):
    ans = 0
    for j in range(lr[i][0], lr[i][1]):
        #print(lr[i][0], lr[i][1])
        #print(j)
        #print(s[j - 1], s[j])
        if s[j - 1] == 'A' and s[j] == 'C':
            ans += 1
    print(ans)
    ans = 0


Fixed submission:
# -*- coding: utf-8 -*-
n, q = map(int,input().split())
s = input()

tmp = [0 for _ in range(n)]
for i in range(1, n):
    if s[i-1] == 'A' and s[i] == 'C':
        tmp[i] = 1 + tmp[i-1]
    else:
        tmp[i] = tmp[i-1]
#print(tmp)

for i in range(q):
    l, r = map(int,input().split())
    print(tmp[r-1] - tmp[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n, q = map(int,input().split())
s = list(str(input()))
lr = []
for i in range(q):
    lr.append([int(i) for i in input().split()])

for i in range(q):
    ans = 0
    for j in range(lr[i][0], lr[i][1]):
        #print(lr[i][0], lr[i][1])
        #print(j)
        #print(s[j - 1], s[j])
        if s[j - 1] == 'A' and s[j] == 'C':
            ans += 1
    print(ans)
    ans = 0


Fixed submission:
# -*- coding: utf-8 -*-
n, q = map(int,input().split())
s = input()

tmp = [0 for _ in range(n)]
for i in range(1, n):
    if s[i-1] == 'A' and s[i] == 'C':
        tmp[i] = 1 + tmp[i-1]
    else:
        tmp[i] = tmp[i-1]
#print(tmp)

for i in range(q):
    l, r = map(int,input().split())
    print(tmp[r-1] - tmp[l-1])
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = int(input())

a = [s]
for i in range(10):
    #print(i)
    if a[i] % 2 == 0:
        a.append(a[i] // 2)
    else:
        a.append(3 * a[i] + 1)
#print(a)
i = 0
flag = True
while flag:
    for j in range(i):
        if a[i] == a[j]:
            ans = i + 1
            flag = False
            break
    i += 1
print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
s = int(input())

a = [s]
for i in range(1000001):
    #print(i)
    if a[i] % 2 == 0:
        a.append(a[i] // 2)
    else:
        a.append(3 * a[i] + 1)
#print(a)
i = 0
flag = True
while flag:
    for j in range(i):
        if a[i] == a[j]:
            ans = i + 1
            flag = False
            break
    i += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import sys
inf = sys.maxsize

n, k = map(int,input().split())
h = [int(i) for i in input().split()]

dp = [0] * n
dp[0] = 0
for i in range(1,n):
    if i < k:
        dp[i] = inf
        for j in range(1, i + 1):
            if dp[i - j] + abs(h[i] - h[i - j]) < dp[i]:
                dp[i] = dp[i - j] + abs(h[i] - h[i - j])
    elif i >= k:
        dp[i] = inf
        for j in range(1, k + 1):
            if dp[i - j] + abs(h[i] - h[i - j]) < dp[i]:
                dp[i] = dp[i - j] + abs(h[i] - h[i - j])
print(dp[n - 1])


Fixed submission:
# -*- coding: utf-8 -*-
import sys
inf = sys.maxsize

n, k = map(int,input().split())
h = [int(i) for i in input().split()]

dp = [0] * n
dp[0] = 0
for i in range(1,n):
    if i < k:
        dp[i] = inf
        for j in range(1, i + 1):
            if dp[i - j] + abs(h[i] - h[i - j]) < dp[i]:
                dp[i] = dp[i - j] + abs(h[i] - h[i - j])
    elif i >= k:
        dp[i] = inf
        for j in range(1, k + 1):
            if dp[i - j] + abs(h[i] - h[i - j]) < dp[i]:
                dp[i] = dp[i - j] + abs(h[i] - h[i - j])
print(dp[n - 1])
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n, x = map(int,input().split())

def solv(n):
    if n == 0:
        return 'P'
    else:
        tmp = solv(n - 1)
        return 'B' + tmp + 'P' + tmp + 'B'

ans = solv(n)
print(list(ans[:x]).count('P'))


Fixed submission:
# -*- coding: utf-8 -*-
n, x = map(int,input().split())

l = [0 for _ in range(n+1)] #バーガーの長さ
p = [0 for _ in range(n+1)] #パティの枚数
l[0] = 1
p[0] = 1
for i in range(1,n+1):
    l[i] = 3 + 2 * l[i-1]
    p[i] = 1 + 2 * p[i-1]
#print(l)
#print(p)

def solv(n, x): #答えを返します
    #print(n, x)
    if n == 0:
        if x == 1:
            return 1
        if x == 0:
            return 0
    else:
        if x <= 1:
            return 0
        elif 1 < x <= l[n-1] + 1:
            return solv(n-1, x - 1)
        elif x == l[n-1] + 2:
            return solv(n-1, x - 2) + 1
        elif l[n-1] + 3 <= x:
            if x == l[n]:
                return p[n-1] + 1 + solv(n - 1, x - 3 - l[n - 1])
            else:
                return  p[n-1] + 1 + solv(n - 1, x - 2 - l[n - 1])

print(solv(n,x))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
h, w = map(int,input().split())
s = []
for i in range(w):
    s.append(list(input()))

ans = "Yes"
for i in range(h):
    for j in range(w):
        if s[i][j] == '#' and s[max(0,i - 1)][j] == '.' and s[min(h - 1, i + 1)][j] == '.' and s[i][min(w - 1, j + 1)] == '.' and s[i][max(0, j - 1)] == '.':
            ans = "No"
print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
h, w = map(int,input().split())
s = []
for i in range(h):
    s.append(list(input()))

ans = "Yes"
for i in range(h):
    for j in range(w):
        if s[i][j] == '#' and s[max(0,i - 1)][j] == '.' and s[min(h - 1, i + 1)][j] == '.' and s[i][min(w - 1, j + 1)] == '.' and s[i][max(0, j - 1)] == '.':
            ans = "No"
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import collections
n = int(input())
a = [int(i) for i in input().split()]

#累積和を求める
sum_a = [0 for _ in range(n+1)]
for i in range(1, n+1):
    sum_a[i] = sum_a[i-1] + a[i-1]
#print(sum_a)

ans = 0
c = collections.Counter(sum_a)
for i in range(min(sum_a), max(sum_a)+1):
    tmp = c[i]
    if tmp >= 2:
        ans += (tmp * (tmp - 1)) // 2
print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
import collections
n = int(input())
a = [int(i) for i in input().split()]

#累積和を求める
sum_a = [0 for _ in range(n+1)]
for i in range(1, n+1):
    sum_a[i] = sum_a[i-1] + a[i-1]
#print(sum_a)

ans = 0
c = collections.Counter(sum_a)
for i in set(sum_a):
    tmp = c[i]
    if tmp >= 2:
        ans += (tmp * (tmp - 1)) // 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import collections
n = int(input())
a = [int(i) for i in input().split()]

#累積和を求める
sum_a = [0 for _ in range(n+1)]
for i in range(1, n+1):
    sum_a[i] = sum_a[i-1] + a[i-1]
#print(sum_a)

ans = 0
c = collections.Counter(sum_a)
for i in range(min(sum_a), max(sum_a)+1):
    tmp = c[i]
    if tmp >= 2:
        ans += (tmp * (tmp - 1)) // 2
print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
import collections
n = int(input())
a = [int(i) for i in input().split()]

#累積和を求める
sum_a = [0 for _ in range(n+1)]
for i in range(1, n+1):
    sum_a[i] = sum_a[i-1] + a[i-1]
#print(sum_a)

ans = 0
c = collections.Counter(sum_a)
for i in set(sum_a):
    tmp = c[i]
    if tmp >= 2:
        ans += (tmp * (tmp - 1)) // 2
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a,b,k = map(int,input().split())

for i in range(a, b + 1):
    if a + k - 1 >= i or b - k + 1 <= i:
        print(i)


Fixed submission:
# -*- coding: utf-8 -*-
a,b,k = map(int,input().split())

"""
for i in range(a, b + 1):
    if a + k - 1 >= i or b - k + 1 <= i:
        print(i)
"""
tmp = []
for i in range(k):
    if a + i <= b:
        print(a + i)
        tmp.append(a + i)
for i in range(k):
    i = k - i - 1
    if (b - i >= a) and (not((b - i) in tmp)):
        print(b - i)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a,b,k = map(int,input().split())

for i in range(a, b + 1):
    if a + k - 1 >= i or b - k + 1 <= i:
        print(i)


Fixed submission:
# -*- coding: utf-8 -*-
a,b,k = map(int,input().split())

"""
for i in range(a, b + 1):
    if a + k - 1 >= i or b - k + 1 <= i:
        print(i)
"""
tmp = []
for i in range(k):
    if a + i <= b:
        print(a + i)
        tmp.append(a + i)
for i in range(k):
    i = k - i - 1
    if (b - i >= a) and (not((b - i) in tmp)):
        print(b - i)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(int,input().split())

"""
if b < 10:
    number = 10 * a + b
if 10 <= b < 100:
    number = 100 * a + b
if b == 100:
    number = 1000 * a + b
"""

number = 10 ** len(b) * a + b

ans = "No"
for i in range(101):
    if i * i == number:
        ans = "Yes"

print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(int,input().split())

"""
if b < 10:
    number = 10 * a + b
if 10 <= b < 100:
    number = 100 * a + b
if b == 100:
    number = 1000 * a + b
"""

number = 10 ** len(str(b)) * a + b

ans = "No"
"""
for i in range(4, 101):
    if i ** 2 == number:
        ans = "Yes"
"""

if number ** 0.5 == int(number ** 0.5):
    ans = "Yes"

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import sys
n, y = map(int,input().split())

for i in range(y // 10000 + 1): #10000円札の枚数
    for j in range(y // 5000 + 1):
        for k in range(y // 1000 + 1):
            if 10000 * i + 5000 * j + 1000 * k == y and i + j + k == n:
                print(i, j, k)
                sys.exit()
print(-1, -1, -1)


Fixed submission:
# -*- coding: utf-8 -*-
import sys
n, y = map(int,input().split())

for i in range(y // 10000 + 1): #10000円札の枚数
    for j in range(y // 5000 + 1):
        if n - i - j >= 0 and n - i - j == (y - 10000 * i - 5000 * j) / 1000:
            print(i, j, n - i - j)
            sys.exit()
print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
x,y = [int(i) for i in input().split()]
if x == 2 or y == 2:
    print("No")
elif (x == 4 or x == 6 or x == 9) and (y == 6 or y == 9 or y == 11):
    print("Yes")
elif (x == 1 or x == 3 or x == 5 or x == 7 or x == 8 or x == 10)　and (y == 3 or y == 5 or y == 7 or y == 8 or y == 10 or y == 12):
    print("Yes")
else:
    print("No")

Fixed submission:
# -*- coding: utf-8 -*-S
x,y = [int(i) for i in input().split()]

"""
if x == 2 or y == 2:
    print("No")
elif x == 4 or x == 6 or x == 9 and y == 6 or y == 9 or y == 11:
    print("Yes")
elif x == 1 or x == 3 or x == 5 or x == 7 or x == 8 or x == 10　and y == 3 or y == 5 or y == 7 or y == 8 or y == 10 or y == 12:
    print("Yes")
else:
    print("No")
"""

A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
tmp = False

for i in range(7):
    if A[i] == x:
        for j in range(i,7):
            if A[j] == y:
                tmp = True
for i in range(4):
    if B[i] == x:
        for j in range(i,4):
            if B[j] == y:
                tmp = True
if tmp:
    print("Yes")
if not tmp:
    print("No")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
o = list(input())
e = list(input())

len_o = len(o)
len_e = len(e)

if len_o == len_e:
    for i in range(len_o - 1):
        print(o[i], end = '')
        print(e[i], end = '')
    print(o[len_o - 1], end = '')
    print(e[len_e - 1])

else:
    for i in range(min(len_o, len_e):
        print(o[i], end = '')
        print(e[i], end = '')
    if len_e > len_o:
        print(e[len(e) - 1])
    if len_o > len_e:
        print(o[len(o) - 1])


Fixed submission:
# -*- coding: utf-8 -*-
o = list(input())
e = list(input())

len_o = len(o)
len_e = len(e)

if len_o == len_e:
    for i in range(len_o - 1):
        print(o[i], end = '')
        print(e[i], end = '')
    print(o[len_o - 1], end = '')
    print(e[len_e - 1])

else:
    for i in range(min(len_o, len_e)):
        print(o[i], end = '')
        print(e[i], end = '')
    if len_e > len_o:
        print(e[len(e) - 1])
    if len_o > len_e:
        print(o[len(o) - 1])
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>
#include <math.h>
int main(void){
    long int n;
    scanf("%ld", &n);

    long int ans = 1;
    long int tmp = pow(10, 9);
    for (long int i = 1; i <= n; i++){
        ans = ans * i;
    }
    printf("%ld\n", ans % (tmp + 7));

    return 0;
}


Fixed submission:
n = int(input())

ans = 1
#34ms
for i in range(1, n + 1):
    ans = (ans * i) % (10 ** 9 + 7)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()]

ans = 0
for i in range(n):
    for j in range(i + 1, n):
        if a[i] == j + 1 and a[j] == i + 1:
            ans += 1
print(ans)


Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]

ans = 0
for i in range(n):
    if a[a[i] - 1] == i + 1:
        ans += 1
print(ans // 2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
c = list(input())
cFixed = [x for x in c]
cFixed.sort()
lastR = -1
for i in range(n):
	if cFixed[i] == "R":
		lastR = i
ans = 0
for i in range(lastR+1):
	if c[i] == "W":
		ans += 1

print(ans)


Fixed submission:
n = int(input())

if n >= 30:
	print("Yes")
else:
	print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
c = list(input())
cFixed = [x for x in c]
cFixed.sort()
for i in range(n):
	if cFixed[i] == "R":
		lastR = i
ans = 0
for i in range(lastR+1):
	if c[i] == "W":
		ans += 1

print(ans)


Fixed submission:
n = int(input())

if n >= 30:
	print("Yes")
else:
	print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
c = list(input())
cFixed = [x for x in c]
cFixed.sort()
for i in range(n):
	if cFixed[i] == "R":
		lastR = i
ans = 0
for i in range(lastR+1):
	if c[i] == "W":
		ans += 1

print(ans)


Fixed submission:
n = int(input())

if n >= 30:
	print("Yes")
else:
	print("No")