Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
T = [0] * N
A = [0] * N
for i in range(N):
    T[i], A[i] = map(int, input().split())

x = 1
y = 1
for i in range(N):
    n = 1
    while not (x <= n * T[i] and y <= n * A[i]):
        n += 1
    else:
        x = n * T[i]
        y = n * A[i]
else:
    print(x + y)

Fixed submission:
N = int(input())
T = [0] * N
A = [0] * N
for i in range(N):
    T[i], A[i] = map(int, input().split())

x = 1
y = 1
for i in range(N):
    k = max(-(-x // T[i]), -(-y // A[i]))
    x = k * T[i]
    y = k * A[i]
else:
    print(x + y)
Buggy python submission (verdict: Runtime Error):
sen=[A,B,C]
x=max(sen)
y=min(sen)
if x==7 and y==5 and sum(sen)-x-y==5:
    print("YES")
else:
    print("NO")


Fixed submission:
# -*- coding: utf-8 -*-

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

sen = [A, B, C]
x = max(sen)
y = min(sen)
if x == 7 and y == 5 and sum(sen) - x - y == 5:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
sen = [A,B,C]
sen.sort()
if sen == [5,5,7]:
	print("YES")
else:
	print("NO")

Fixed submission:
# -*- coding: utf-8 -*-

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

sen = [A, B, C]
x = max(sen)
y = min(sen)
if x == 7 and y == 5 and sum(sen) - x - y == 5:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
sen = [A,B,C]
print(sen)
sen.sort()
print(sen)
if sen == [5,5,7]:
	print("YES")
else:
	print("NO")

Fixed submission:
# -*- coding: utf-8 -*-

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

sen = [A, B, C]
x = max(sen)
y = min(sen)
if x == 7 and y == 5 and sum(sen) - x - y == 5:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
sen = [A,B,C]
sen = sen.sort()
if sen == [5,5,7]:
	print("YES")
else:
	print("NO")


Fixed submission:
# -*- coding: utf-8 -*-

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

sen = [A, B, C]
x = max(sen)
y = min(sen)
if x == 7 and y == 5 and sum(sen) - x - y == 5:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
sen = [A,B,C]
sen = sen.sort()
if sen = [5,5,7]:
	print("YES")
else:
	print("NO")

Fixed submission:
# -*- coding: utf-8 -*-

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

sen = [A, B, C]
x = max(sen)
y = min(sen)
if x == 7 and y == 5 and sum(sen) - x - y == 5:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
n = int(input())
xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]


for i in range(n - 1):
    if x[i] == y[i]:
        ans += 1
        if ans == 3:
            print("Yes")
            break
    
    else:
        ans = 0
        

if ans == 0 or ans == 1 or ans == 2:
    print("No")




Fixed submission:
n = int(input())
xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]

ans = 0
for i in range(n):
    if x[i] == y[i]:
        ans += 1
        if ans == 3:
            print("Yes")
            break
    
    else:
        ans = 0
        

if ans == 0 or ans == 1 or ans == 2:
    print("No")
Buggy python submission (verdict: Runtime Error):
a, b = map(int(input().split())
print(a * b)

Fixed submission:
a, b = map(int, input().split())
print(a * b)
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if a >= k:
    print(1 * k)
else:
    if b >= (k - a):
        print(1 * a + k * 0)
    else:
        if c >= (k - a - b):
            print(1 * a + 0 * b + (-1) * k)
        else:
            print(-1)


Fixed submission:
a, b, c, k = map(int, input().split())
if a >= k:
    print(1 * k)
else:
    if b >= (k - a):
        print(1 * a + (k - a) * 0)
    else:
        if c >= (k - a - b):
            print(1 * a + 0 * b + (-1) * (k - a - b))
        else:
            print(-1)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
d = []
a = []
for i in range(k):
    d.append(int(input))
    a.append(list(map(int, input().split())))

aa = [0]*n

for j in a:
    for t in j:
        aa[t - 1] += 1

ans = 0

for z in aa:
    if z == 0:
        ans += 1
    else:
        ans += 0

print(ans)

Fixed submission:
n, k = map(int, input().split())
d = []
a = []
for i in range(k):
    d.append(int(input()))
    a.append(list(map(int, input().split())))

aa = [0]*n

for j in a:
    for t in j:
        aa[t - 1] += 1

ans = 0

for z in aa:
    if z == 0:
        ans += 1
    else:
        ans += 0

print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
d = []
a = []
for i in range(k):
    d.append(int(input))
    a.append(list(map(int, input().split())))

aa = [0]*n

for j in a:
    for t in j:
        aa[t - 1] += 1

ans = 0

for z in aa:
    if z == 0:
        ans += 0

print(ans)

Fixed submission:
n, k = map(int, input().split())
d = []
a = []
for i in range(k):
    d.append(int(input()))
    a.append(list(map(int, input().split())))

aa = [0]*n

for j in a:
    for t in j:
        aa[t - 1] += 1

ans = 0

for z in aa:
    if z == 0:
        ans += 1
    else:
        ans += 0

print(ans)
Buggy python submission (verdict: Runtime Error):
k = int(input().split())
a, b = map(int, input().split())

ans = 0
for i in range(a,b):
    if i%k == 0:
        ans += 1
    else:
        ans += 0
if ans >= 1:
    print("OK")
else:
    print("NG")

Fixed submission:
k = int(input())
a, b = map(int, input().split())

ans = 0
if a == b:
    if a%k == 0:
        ans += 1
    else:
        ans += 0
else:
    for i in range(a,b + 1):
        if i%k == 0:
            ans += 1
        else:
            ans += 0
if ans >= 1:
    print("OK")
else:
    print("NG")
Buggy python submission (verdict: Runtime Error):
S = str(input())

if S[3] == S[4] and S[5] == S[6]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = str(input())

if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S = str(input())

if S[3] == S[4] and S[5] == S[6]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = str(input())

if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = [int(e) for e in input().split()]

ans = 0
for i in range(N - 1):
    S = [A[i + 1] - A[i]]
    S.append((K - A[N - 1]) + A[0])
    m = sorted(S)
    for n in range(N - 1):
        ans += m[n]
print(ans)


Fixed submission:
K, N = map(int, input().split())
A = [int(e) for e in input().split()]

ans = 0
S = [(A[i + 1] - A[i]) for i in range(N - 1)]
S.append((K - A[N - 1]) + A[0])
S.sort
m = sorted(S)
for n in range(N - 1):
    ans += m[n]
print(ans)

Buggy python submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = [int(e) for e in input().split()]

ans = 0
for i in range(N - 2):
    S = [A[i + 1] - A[i]]
    S.append((K - A[N - 1]) + A[0])
    S.sort
    for n in range(N - 1):
        ans += S[i]
print(ans)

Fixed submission:
K, N = map(int, input().split())
A = [int(e) for e in input().split()]

ans = 0
S = [(A[i + 1] - A[i]) for i in range(N - 1)]
S.append((K - A[N - 1]) + A[0])
S.sort
m = sorted(S)
for n in range(N - 1):
    ans += m[n]
print(ans)

Buggy python submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = [int(e) for e in input().split()]

ans = 0
for i in range(N - 1):
    S = [A[i] - A[i + 1]]
    S.append((K - A[N - 1]) + A[0])
    S.sort
    for n in range(N - 1):
        ans += S[i]
print(ans)

Fixed submission:
K, N = map(int, input().split())
A = [int(e) for e in input().split()]

ans = 0
S = [(A[i + 1] - A[i]) for i in range(N - 1)]
S.append((K - A[N - 1]) + A[0])
S.sort
m = sorted(S)
for n in range(N - 1):
    ans += m[n]
print(ans)

Buggy python submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = [int(e) for e in input().split()]

ans = 0
for i in range(N - 1):
    S = [A[i] - A[i + 1]]
    S.append(A[N] - A[0])
    S.sort
    for n in range(N - 1):
        ans += S[i]
print(ans)

Fixed submission:
K, N = map(int, input().split())
A = [int(e) for e in input().split()]

ans = 0
S = [(A[i + 1] - A[i]) for i in range(N - 1)]
S.append((K - A[N - 1]) + A[0])
S.sort
m = sorted(S)
for n in range(N - 1):
    ans += m[n]
print(ans)
Buggy python submission (verdict: Runtime Error):
K = int(input())

S = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(S[K + 1])

Fixed submission:
K = int(input())

S = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(S[K - 1])

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

S = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(S[K])

Fixed submission:
K = int(input())

S = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(S[K - 1])
Buggy python submission (verdict: Runtime Error):
s = map(str, input())

if a and b in s:
  print("Yes")
else:
  print("No")

Fixed submission:
s = str(input())

if 'A' in s and 'B' in s:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
n = int(input())
print(a * (n // (a + b))+ min(n % (a + b), a))

Fixed submission:
N, A, B = map(int, input().split())

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
n = int(input())
print(n // (a + b) + min(n % (a + b), a))

Fixed submission:
N, A, B = map(int, input().split())

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)

Buggy python submission (verdict: Runtime Error):
import math

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

n = int(input())

s = math.floor(n / (a + b))
m = n % (a + b)

if a > m:
    print(a * s + m)
else:
    print(a * s + a)

Fixed submission:
N, A, B = map(int, input().split())

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)

Buggy python submission (verdict: Runtime Error):
import math

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

n = int(input())

s = math.floor(n // (a + b))
m = n % (a + b)

if a > m:
    print(a * s + m)
else:
    print(a * s + a)

Fixed submission:
N, A, B = map(int, input().split())

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

n = int(input())

s = n // (a + b)
m = n % (a + b)

if a > m:
    print(a * s + m)
else:
    print(a * s + a)

Fixed submission:
N, A, B = map(int, input().split())

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

n = int(input())

s = n // (a + b)
m = n % (a + b)

if a > m:
    print(a * s + a)
else:
    print(a * s + m)

Fixed submission:
N, A, B = map(int, input().split())

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)
Buggy python submission (verdict: Runtime Error):
H,A = map(int, input().split)
if H % A == 0:
    print(H // A)
else:
    print(H // A + 1)

Fixed submission:
H,A = map(int, input().split())
if H % A == 0:
    print(H // A)
else:
    print(H // A + 1)

Buggy python submission (verdict: Runtime Error):
H,A = map(int, input().split)
answer_1 = H // A
answer_2 = H % A
if answer_2 == 0:
    print(answer_1)
else:
    print(answer_1 + 1)

Fixed submission:
H,A = map(int, input().split())
if H % A == 0:
    print(H // A)
else:
    print(H // A + 1)

Buggy python submission (verdict: Runtime Error):
import math

H,A = map(int, input().split)
float_ver = H / A
print(math.ceil(float_ver))

Fixed submission:
H,A = map(int, input().split())
if H % A == 0:
    print(H // A)
else:
    print(H // A + 1)
Buggy python submission (verdict: Runtime Error):
H, N = map(int, input().split())
number = int(input().count(N))
S = sum(number)
if S / N >= H / N:
    print("Yes")
else:
    print("No")

Fixed submission:
H,N = map(int,input().split())
A = list(map(int,input().split()))
if sum(A) >= H:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
H, N = map(int, input().split())
number = int(input())
S = sum(number)
if S / N >= H / N:
    print("Yes")
else:
    print("No")

Fixed submission:
H,N = map(int,input().split())
A = list(map(int,input().split()))
if sum(A) >= H:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
S = input()

N = len(S) + 1
t = [0] * N
for i in range(N - 1):
    if S[i] == '<':
        t[i + 1] = t[i] + 1
for i in range(N - 1, -1, -1):
    if S[i] == '>':
        t[i + 1] = max(t[i], t[i + 1] + 1)
print(sum(t))

Fixed submission:
S = input()

N = len(S) + 1
t = [0] * N
for i in range(N - 1):
    if S[i] == '<':
        t[i + 1] = t[i] + 1
for i in range(N - 2, -1, -1):
    if S[i] == '>':
        t[i] = max(t[i], t[i + 1] + 1)
print(sum(t))

Buggy python submission (verdict: Runtime Error):
S = input()

N = len(S) + 1
t = [0] * N
for i in range(N - 1):
    if S[i] == '<':
        t[i + 1] = t[i] * 1
for i in range(N - 1, -1, -1):
    if S[i] == '>':
        t[i] = max(t[i], t[i + 1] + 1)
print(sum(t))

Fixed submission:
S = input()

N = len(S) + 1
t = [0] * N
for i in range(N - 1):
    if S[i] == '<':
        t[i + 1] = t[i] + 1
for i in range(N - 2, -1, -1):
    if S[i] == '>':
        t[i] = max(t[i], t[i + 1] + 1)
print(sum(t))

Buggy python submission (verdict: Runtime Error):
S = map(str, input().split())

N = len(S) + 1
t = [0] * N
for i in range(N - 1):
    if S[i] == '<':
        t[i + 1] = t[i] * 1
for i in range(N - 1, -1, -1):
    if S[i] == '>':
        t[i] = max(t[i], t[i + 1] + 1)
print(sum(t))

Fixed submission:
S = input()

N = len(S) + 1
t = [0] * N
for i in range(N - 1):
    if S[i] == '<':
        t[i + 1] = t[i] + 1
for i in range(N - 2, -1, -1):
    if S[i] == '>':
        t[i] = max(t[i], t[i + 1] + 1)
print(sum(t))
Buggy python submission (verdict: Runtime Error):
N = map(int, input())
if N % 2 == 0:
  print(N / 2 /N)
else:
  print((N // 2 + 1) / N)

Fixed submission:
N = int(input())
if N % 2 == 1:
    print((N // 2 + 1) / N)
else:
    print((N // 2) / N)

Buggy python submission (verdict: Runtime Error):
N = map(int, input())
if N % 2 == 0:
  print(N / 2 /N)
else:
  print((N / 2 + 1) / N)

Fixed submission:
N = int(input())
if N % 2 == 1:
    print((N // 2 + 1) / N)
else:
    print((N // 2) / N)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
h = list(map(int, input().split()))
         
         count = 0
         
         for i in h:
         if i >= k:
         count += 1
         
         print(count)

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))

count = 0

for i in h:
   if i >= k:
       count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
h = list(map(int, input().split())
         
         count = 0
         
         for i in h:
         if i >= k:
         count += 1
         
         print(count)

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))

count = 0

for i in h:
   if i >= k:
       count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = list(map(int, input(),split()))

L = [0]*n

for i, order in enumerate(l, 1):
    L[order-1] = i

print(*L)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))

L = [0]*n

for i, order in enumerate(l, 1):
    L[order-1] = i

print(*L)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(e) for e in range(N)]
V = 0
for i in range(N):
    V += 1/A[i]
print(1/V)

Fixed submission:
N = int(input())
A = [int(e) for e in input().split()]
V = 0
for i in range(N):
    V += 1/A[i]
print(1/V)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int, input().split())

sum = 0
sum += 1/A
ans = 0
ans += 1/sum
print(ans)

Fixed submission:
N = int(input())
A = [int(e) for e in input().split()]
V = 0
for i in range(N):
    V += 1/A[i]
print(1/V)
Buggy python submission (verdict: Runtime Error):
N = int(input())
v = [int(e) for e in input().split()]

a = sorted(v, reversed = True) #昇順に並べる
result = a[0]
for i in range(1, N):
    result = (result + a[i]) / 2
print(result)

Fixed submission:
N = int(input())
v = [int(e) for e in input().split()]

v.sort() #昇順に並べる
result = v[0]
for i in range(1, N):
    result = (result + v[i]) / 2
print(result)

Buggy python submission (verdict: Runtime Error):
N = int(input())
v = [int(e) for e in input().split()]

a = sorted(v, reversed = True) #昇順に並べる
result = a[0]
for i in range(1, N):
    result += (result + a[i]) / 2
print(result)

Fixed submission:
N = int(input())
v = [int(e) for e in input().split()]

v.sort() #昇順に並べる
result = v[0]
for i in range(1, N):
    result = (result + v[i]) / 2
print(result)

Buggy python submission (verdict: Runtime Error):
N = int(input())
v = [int(e) for e in input().split()]

a = sorted(v, reversed = True) #昇順に並べる
result = a[0]
for i in range(N - 1):
    result += (result + a[i]) / 2
print(result)

Fixed submission:
N = int(input())
v = [int(e) for e in input().split()]

v.sort() #昇順に並べる
result = v[0]
for i in range(1, N):
    result = (result + v[i]) / 2
print(result)
Buggy python submission (verdict: Runtime Error):
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")

Fixed submission:
S = str(input())

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print("Bad")
else:
    print("Good")
Buggy python submission (verdict: Runtime Error):
N = input()
if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)

Fixed submission:
N = int(input())
if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)

Buggy python submission (verdict: Runtime Error):
N = input()
A = input()
B = input()

if N == 1:
    print("Hello World")
elif N == 2:
    print(A + B)
else:
    print(-1)

Fixed submission:
N = int(input())
if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)

Buggy python submission (verdict: Runtime Error):
N = input()
A, B = map(int, input().split())

if N == 1:
    print("Hello World")
elif N == 2:
    print(A + B)
else:
    print(-1)

Fixed submission:
N = int(input())
if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A, B = map(int, input().split())

if N == 1:
    print("Hello World")
elif N == 2:
    print(A + B)

Fixed submission:
N = int(input())
if N == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)
Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
a_list=[]
amari=0
count=0
flag=False
if a%2==0 :
  flag=True
else :

  while(True) :
    k=(amari*10+7)%a
    if k==0 :
      count+=1
      break
    else :
      count+=1
      amari=k



if flag :
  print('-1')
else :
  print(count)


Fixed submission:
a=int(input())
a_list=[]
amari=0
count=0
flag=False
if a%2==0 or a%5==0 :
  flag=True
else :

  while(True) :
    k=(amari*10+7)%a
    if k==0 :
      count+=1
      break
    else :
      count+=1
      amari=k



if flag :
  print('-1')
else :
  print(count)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
a_list=[]
amari=0
count=0
flag=False
if a%2==0 :
  flag=True
else :

  while(True) :
    k=(amari*10+7)%a
    if k==0 :
      count+=1
      break
    else :
      count+=1
      amari=k



if flag :
  print('-1')
else :
  print(count)


Fixed submission:
a=int(input())
a_list=[]
amari=0
count=0
flag=False
if a%2==0 or a%5==0 :
  flag=True
else :

  while(True) :
    k=(amari*10+7)%a
    if k==0 :
      count+=1
      break
    else :
      count+=1
      amari=k



if flag :
  print('-1')
else :
  print(count)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
a_list=[]
amari=0
count=0
flag=False
while(True) :
  k=(amari*10+7)%a
  if k  in a_list :
    flag=True
    break
  elif k==0 :
    count+=1
    break
  else :
    count+=1
    amari=k
    a_list.append(amari)


if flag :
  print('-1')
else :
  print(count)

    

Fixed submission:
a=int(input())
a_list=[]
amari=0
count=0
flag=False
if a%2==0 or a%5==0 :
  flag=True
else :

  while(True) :
    k=(amari*10+7)%a
    if k==0 :
      count+=1
      break
    else :
      count+=1
      amari=k



if flag :
  print('-1')
else :
  print(count)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=input()
r_num=0
w_num=0
for i in b :

  if i=='W' :
    w_num+=1
  else :
    r_num+=1

count=0
if r_num<w_num
  for i in range(r_num) :
    if b[i]=='R' :
      count+=1
else :
  for i in range(w_num) :
    if b[i]=='W' :
      count+=1
print(count)


Fixed submission:
a=int(input())
b=input()
r_num=0
w_num=0
for i in b :

  if i=='W' :
    w_num+=1
  else :
    r_num+=1

count=0

for i in range(r_num) :
  if b[i]=='W' :
    count+=1


print(count)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
b=input()
r_num=0
w_num=0
for i in b :

  if i=='W' :
    w_num+=1
  else :
    r_num+=1
c=''
for i in range(r_num):
  c+='R'
for i in range(w_num) :
  c+='W'
count=0

for i in range(r_num) :
  if c[i]!=b[i] :
    count+=1
print(count)

Fixed submission:
a=int(input())
b=input()
r_num=0
w_num=0
for i in b :

  if i=='W' :
    w_num+=1
  else :
    r_num+=1

count=0

for i in range(r_num) :
  if b[i]=='W' :
    count+=1


print(count)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a_list=list(map(int,input().split()))
current=1000
kabu=0
for i in range(n-1) print(current)
  if a_list[i]<a_list[i+1] :
    kabu+=current//a_list[i]
    current=current%a_list[i]
  else :
    current+=a_list[i]*kabu
    kabu=0
current+=a_list[-1]*kabu
print(current)

Fixed submission:
n=int(input())
a_list=list(map(int,input().split()))
current=1000
kabu=0
for i in range(n-1) :
  if a_list[i]<a_list[i+1] :
    kabu+=current//a_list[i]
    current=current%a_list[i]
    current += a_list[i+1] * kabu
    kabu = 0




print(current)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a_list=list(map(int,input().split()))
current=1000
kabu=0
for i in range(n-1) print(current)
  if a_list[i]<a_list[i+1] :
    kabu+=current//a_list[i]
    current=current%a_list[i]
  else :
    current+=a_list[i]*kabu
    kabu=0
current+=a_list[-1]*kabu
print(current)

Fixed submission:
n=int(input())
a_list=list(map(int,input().split()))
current=1000
kabu=0
for i in range(n-1) :
  if a_list[i]<a_list[i+1] :
    kabu+=current//a_list[i]
    current=current%a_list[i]
    current += a_list[i+1] * kabu
    kabu = 0




print(current)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
import math
n1=int(math.sqrt(N))
for i in range(1,N+1) :
  count=0
  n1 = int(math.sqrt(i))
  for x in range(1,n1+1) :
    n2 = int(math.sqrt(i-x*x))
    for y in range(1,n2+1) :
      n3 = int(math.sqrt(i - y*y-x*x))
      for z in range(1,n3) :
        if x*x+y*y+z*z+x*y+y*z+z*x==i :
          count+=1
  print(count)


Fixed submission:
N=int(input())
import math
n1=int(math.sqrt(N))

list1=[0 for i in range(N)]

for x in range(1,n1) :
  for y in range(1,n1) :
    for z in range(1,n1) :
      k=x*x+y*y+z*z+x*y+y*z+z*x
      if k<=N :
        list1[k-1]+=1
for item in list1 :
  print(item)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
import math
n1=int(math.sqrt(N))
for i in range(1,N+1) :
  count=0
  n1 = int(math.sqrt(i))
  for x in range(1,n1+1) :
    n2 = int(math.sqrt(N-x*x))
    for y in range(1,n2+1) :
      n3 = int(math.sqrt(N - y * y))
      for z in range(1,n3) :
        if x*x+y*y+z*z+x*y+y*z+z*x==i :
          count+=1
  print(count)

Fixed submission:
N=int(input())
import math
n1=int(math.sqrt(N))

list1=[0 for i in range(N)]

for x in range(1,n1) :
  for y in range(1,n1) :
    for z in range(1,n1) :
      k=x*x+y*y+z*z+x*y+y*z+z*x
      if k<=N :
        list1[k-1]+=1
for item in list1 :
  print(item)