Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02622 (python)

Fixed submission:
S = input().strip()
T = input().strip()
count = 0
for i in range(len(S)):
  if S[i] != T[i]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
S = input().strip()
T = input().strip()
count = 0
for i in len(S):
  if S[i] == T[i]:
    count += 1
print(count)
Problem p02880 (python)

Fixed submission:
import math 
 
n = int(input())
if n <= 81:
  m = int(round(math.sqrt(n)))
  while True:
    if n % m == 0:
      print("Yes")
      break
    else:
      m += 1
      if m >= 10:
        print("No")
        break
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math 
 
n = input()
if n <= 81:
  m = int(math.sqrt(n))
  while True:
    if n % m == 0:
      print("Yes")
      break
    else:
      m += 1
      if m >= 10:
        print("No")
        break
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math 

n = input()
if n <= 81:
  m = int(math.sqrt(n))
  while True:
    if n % m == 0:
      print("Yes")
      break
    else:
      m += 1
      if m >= 10:
        print("No")
        break
else:
  print("No")
Problem p02689 (python)

Fixed submission:
N,M = map(int,input().split())
H = list(map(int,input().split()))
AB = [set() for i in range(N)]
for i in range(M):
    A,B = map(int,input().split())
    AB[A-1].add(B-1)
    AB[B-1].add(A-1)
ans = 0
for i in range(N):
    res = True
    for x in AB[i]:
        if H[i]<=H[x]:
            res = False
            break
    if res:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
XX = [set() for i in range(N)]
ans = 0
for i in range(M):
  A,B = map(int,input().split())
  XX[A-1].add(B)
  XX[B-1].add(A)
  
for i in range(N):
  for y in XX[i]:
    r = True
    if H[i]<=H[y]:
      r = False
      break
    if r:
      ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
XX = [set() for i in range(N)]
ans = 0
for i in range(M):
  A,B = map(int,input().split())
  XX[A-1].add(B)
  XX[B-1].add(A)
  
for i in range(N):
  for y in XX[i]:
    if H[i]<=H[y]:
	    break
    else:
    	ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
XX = [set() for i in range(N)]
ans = 0
for i in range(M):
  A,B = map(int,input().split())
  XX[A-1].add(B)
  XX[B-1].add(A)
  
for i in range(N):
  for y in XX[1]
  	if H[i]<=H[y]:
      break
    else:
      ans += 1
      
print(ans)
Problem p02771 (python)

Fixed submission:
A, B, C = map(int, input().split())
if (A ==B and A !=C) or (B == C and A != B) or (A == C and A!=B):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = {}
for i in range(N):
    a = input()
    ans[a] = ans.get(a,0) + 1

ans2 = [k for k, v in ans.items() if v == max(ans.values())]
ans2.sort()
[print(i) for i in ans2]

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = {}
for i in range(len(L)):
    a = input()
    ans[a] = ans.get(a,0) + 1

ans2 = [k for k, v in ans.items() if v == max(ans.values())]
ans2.sort()
[print(i) for i in ans2]
Problem p02622 (python)

Fixed submission:
s=input()
t=input()
ans=0
for i in range(len(s)):
  if s[i]!=t[i]:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
 
for i in range(s.size()):
  if s[i]!=t[i]:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()

for i in s.size():
  if s[i]!==t[i]:
    ans += 1
print(ans)
Problem p02759 (python)

Fixed submission:
import math
n = int(input())
print(math.ceil(n/2))

Buggy submission (verdict: Runtime Error):
n = int(input())
print n//2
Problem p02771 (python)

Fixed submission:
n,m,l = map(int,input().split())
if (n != m) and (n != l ) and (m != l):
  print('No')
elif n == m:
  if n == l:
    print('No')
  else:
    print('Yes')
elif n == l:
  print('Yes')
elif m == l:
  print('Yes')

Buggy submission (verdict: Runtime Error):
n = int(input())
m = list(map(int,input().split()))
f = True
for i in m:
  if i % 2 == 0:
    if (i % 3 == 0 ) or (i % 5 == 0 ):
      f = True
    else:
      print('DENIED')
      exit()

print('APPROVED')
Problem p02777 (python)

Fixed submission:
n,m = input().split()
r,b = map(int,input().split())
t = input()
if n == t:
  print(str(r-1) + ' ' + str(b))
else:
  print(str(r) + ' ' + str(b-1))

Buggy submission (verdict: Runtime Error):
n.m = input().split()
r,b = map(int,input().split())
t = input()
if n == t:
  print(str(r-1) + ' ' + str(b))
else:
  print(str(r) + ' ' + str(b-1))

Buggy submission (verdict: Runtime Error):
n,m = input().split()
r,b = map(int,input().split())
i = input()
if i == n:
  r = r -1
  print(r + ' ' + b)
else:
  b = b-1
  print(r + ' ' + b)
Problem p02779 (python)

Fixed submission:
n = int(input())
m = list(map(int,input().split()))
m.sort()
for i in range(n-1):
  if m[i] == m[i+1]:
    print('NO')
    exit()
    
print('YES')

Buggy submission (verdict: Runtime Error):
n = int(input())
m = list(map(int,input().split()))
m.sort()
for i in range(n):
  if m[i] == m[i+1]:
    print('NO')
    exit()
    
print('YES')
Problem p02819 (python)

Fixed submission:
m = int(input())
if m <= 2 :
  print('2')
else:
  n = 10**6
  primes = set(range(2, n+1))
  for i in range(2, int(n**0.5+1)):
      primes.difference_update(range(i*2, n+1, i))
  primes=list(primes)

  for i in range(len(primes)-1):
    if primes[i] < m and m <= primes[i+1]:
      print(primes[i+1])

Buggy submission (verdict: Runtime Error):
n = 10**5
primes = set(range(2, n+1))
for i in range(2, int(n**0.5+1)):
    primes.difference_update(range(i*2, n+1, i))
primes=list(primes)

m = int(input())
for i in range(len(primes)):
  if primes[i] < m and m < primes[i+1]:
    print(primes[i+1])
Problem p02847 (python)

Fixed submission:
n = input()
if n == 'SUN':
  print('7')
elif n == 'MON':
  print('6')
elif n == 'TUE':
  print('5')
elif n == 'WED':
  print('4')
elif n == 'THU':
  print('3')
elif n == 'FRI':
  print('2')
elif n == 'SAT':
  print('1')

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

print(S.translate(str.maketrans(alphabet, alphabet[N:] + alphabet[:N])))

Buggy submission (verdict: Runtime Error):
n = int(input())
i_s = input()
out = ''
for s in i_s:
       s = ord(s)
       s = s + n
       if s >= 91 :
            s=s%26 + 25
       s = chr(s)
       out += s

print(out)
Problem p02851 (python)

Fixed submission:
n, k = map(int, input().split())
m = list(map(int, input().split()))
T = [0] * (n + 1)

b = 0
for i, a in enumerate(m):
    b += a - 1
    b %= k
    T[i + 1] = b

tmp = {}
count = 0

for i, b in enumerate(T):
    if i >= k:
        tmp[T[i - k]] -= 1

    if b in tmp:
        count += tmp[b]
        tmp[b] += 1
    else:
        tmp[b] = 1

print(count)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().partition())
a = list(map(int,input().split()))
b = [0]*(n+1)

c=0
for i,d in enumerate(a):
    c += d-1
    c%= k
    b[i+1] = c

B = {}
count = 0
for i , d in enumerate(b):
    if i > k:
        B[b[i-k]] -= 1
        
    if d in B:
        count += B[d]
        B[d] += 1
    else:
        B[d] = 1
        
print(count)
Problem p02859 (python)

Fixed submission:
n = int(input())
print(n**2)

Buggy submission (verdict: Runtime Error):
print((int(input())**2)
Problem p02879 (python)

Fixed submission:
x,y = list(map(int,input().split()))
if x < 10 and y < 10:
	print(x*y)
else:
  print('-1')

Buggy submission (verdict: Runtime Error):
x,y = list(map(int,input().split()))
if x < 10 and y < 10:
	print(x*y)
    exit()
else:
  print('-1')

Buggy submission (verdict: Runtime Error):
x,y = list(map(int,input().split()))
if x < 10 abd y < 10:
	print(x*y)
    exit()
else:
  print('-1')

Buggy submission (verdict: Runtime Error):
n = int(input())
print(n**2)
Problem p02881 (python)

Fixed submission:
import sys
n=int(input())
for i in range(int(n**0.5)+1,0,-1):
  if n%i==0:
    print(i + n//i -2)
    sys.exit()
print(n-1)

Buggy submission (verdict: Runtime Error):
from math in sqrt
n = int(input())

m = int(sqrt(n))

print(m*2-1)
Problem p02785 (python)

Fixed submission:
N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort()
if K> 0:
    del H[-K:]
print(sum(H))

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort()
if K > 0:
  for i in range(K):
    H.pop(-1)
print(sum(H))
Problem p02835 (python)

Fixed submission:
a1,a2,a3=map(int, input().split()) 

if a1+a2+a3>=22:
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
f=lambda n:format(n, 'b')[::-1].find('1')
c=0
C=[0]*3
n=int(input())
L = list(map(int, input().split()))
for i in range(n):C[i]=f(L[i])
  print(min(C))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=5
c=10

if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
			
if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
			
if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())

if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a1,a2,a3=map(int, input().split()) 
if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a1,a2,a3=map(int, input().split()) 
if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if (a+b+c) >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a+b+c >= 22:
  print(bust)
else:
  print(win)
Problem p02859 (python)

Fixed submission:
r=int(input())
print(r**2)

Buggy submission (verdict: Runtime Error):
r=input()
print(r**2)
Problem p02933 (python)

Fixed submission:
a=int(input())
s=input()
t=s if a>=3200 else "red"
print(t)

Buggy submission (verdict: Runtime Error):
a=int(input())
s=input()
t=s if a>=3200 else red
print(t)

Buggy submission (verdict: Runtime Error):
a=input()
s=input()
t=s if a>=3200 else red
print(t)
Problem p02629 (python)

Fixed submission:
def base_convert(nl, ibase, obase):
    o = []
    while any(nl):
        c = 0
        for i in range(len(nl)):
            c = c * ibase + nl[i]
            nl[i],c = divmod(c,obase)
        o.append(c)
    o.reverse()
    return o

def convertList(lst):
    rev_lst = list(reversed(lst))
    for i,num in enumerate(rev_lst):
        if i < len(rev_lst)-1:
            if num <= 0:
                rev_lst[i+1] = rev_lst[i+1]-1
                rev_lst[i] = rev_lst[i] + 26
    return list(reversed(rev_lst))

dict1 = {
    0: '',
    1: 'a',
    2: 'b',
    3: 'c',
    4: 'd',
    5: 'e',
    6: 'f',
    7: 'g',
    8: 'h',
    9: 'i',
    10: 'j',
    11: 'k',
    12: 'l',
    13: 'm',
    14: 'n',
    15: 'o',
    16: 'p',
    17: 'q',
    18: 'r',
    19: 's',
    20: 't',
    21: 'u',
    22: 'v',
    23: 'w',
    24: 'x',
    25: 'y',
    26: 'z'
}

N = input()
N = list(map(int,[i for i in N]))
lst = base_convert(N,10,26)
lst_converted = convertList(lst)
ans = ''.join([dict1[i] for i in lst_converted])
print(ans)

Buggy submission (verdict: Runtime Error):
def base_convert(nl, ibase, obase):
    o = []
    while any(nl):
        c = 0
        for i in range(len(nl)):
            c = c * ibase + nl[i]
            nl[i],c = divmod(c,obase)
        o.append(c)
    o.reverse()
    return o

def convertList(lst):
    rev_lst = list(reversed(lst))
    for i,num in enumerate(rev_lst):
        if i < len(rev_lst)-1:
            if num <= 0:
                rev_lst[i+1] = rev_lst[i+1]-1
                rev_lst[i] = rev_lst[i] + 26
    return list(reversed(rev_lst))

N = input()
N = list(map(int,[i for i in N]))
lst = base_convert(N,10,26)
lst_converted = convertList(lst)
ans = ''.join([dict1[i] for i in lst_converted])
print(ans)

Buggy submission (verdict: Runtime Error):
N = input()
N = list(map(int,[i for i in N]))
lst = base_convert(N,10,26)
lst_converted = convertList(lst)
print(''.join([dict1[i] for i in lst_converted]))

Buggy submission (verdict: Runtime Error):
N = input()
N = list(map(int,[i for i in N]))
lst = base_convert(N,10,26)
lst_converted = convertList(lst)
print(''.join([dict1[i] for i in lst_converted]))

Buggy submission (verdict: Runtime Error):
N = input()
N = list(map(int,[i for i in N]))
lst = base_convert(N,10,26)
lst_converted = convertList(lst)
print(''.join([dict1[i] for i in lst]))
Problem p02881 (python)

Fixed submission:
from math import sqrt
n = int(input())
d = 1000000000000000000000
for i in range(1, int(sqrt(n))+1):
  if n % i == 0:
    d = min(d, i + n // i - 2)
print(d)

Buggy submission (verdict: Runtime Error):
from math import sqrt
n = int(input())
d = 1000000000000000000000
for i in range(1, sqrt(n)+1):
  if n % i == 0:
    d = min(d, i + n // i - 2)
print(d)

Buggy submission (verdict: Runtime Error):
n = int(input())
d = 1000000000000000000000
for i in range(1, int(sqrt(n))+1):
  if n % i == 0:
    d = min(d, i + n // i - 2)
print(d)

Buggy submission (verdict: Runtime Error):
n = int(input())
d = 1000000000000000000000
for i in range(1, sqrt(n)+1):
  if n % i == 0:
    d = min(d, i + n // i - 2)
print(d)
Problem p02987 (python)

Fixed submission:
S = set(input())
print('Yes' if len(S)==2 else 'No')

Buggy submission (verdict: Runtime Error):
S = sorted(list(map(int, input().split())))
print('Yes' if X[0]==X[1] and X[2]==X[3] else 'No')
Problem p02659 (python)

Fixed submission:
from math import floor 
from fractions import Fraction

A, B = input().split()
A = int(A)
B = Fraction(B)
print(floor(A*B))

Buggy submission (verdict: Runtime Error):
from math import floor 
from fractions inport Fraction

A, B = input().split()
A = int(A)
B = Fraction(B)
print(floor(A*B))

Buggy submission (verdict: Runtime Error):
import math
from fractions inport Fraction

A, B = input().split()
A = int(A)
B = Fraction(B)
print(math.floor(A*B))
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()
if a >= 3200:
  print(s)
else:
  print('red')

Buggy submission (verdict: Runtime Error):
N = int(input())
arr = list(map(int, input().split()))
while len(arr)>1:
    arr=sorted(arr)
    v1 = arr.pop(0)
    v2 = arr.pop(0)
    arr.append((v1+v2)/2)
print(arr[0])

Buggy submission (verdict: Runtime Error):
N = int(input())
arr = list(map(int, input().split()))
while len(arr)>1:
    arr=sorted(arr)
    v1 = arr.pop(0)
    v2 = arr.pop(0)
    arr.append((v1+v2)/2)
print(sum(arr))
Problem p03042 (python)

Fixed submission:
S = input()

#print(type(S[:2]))
#print(type(int(S[:2])))

if (1 <= int(S[:2]) <= 12) & (1 <= int(S[2:]) <= 12):
    print('AMBIGUOUS')
elif (1 <= int(S[:2]) <= 12) & ((int(S[2:]) == 0) or (13 <= int(S[2:]))):
    print('MMYY')
elif (1 <= int(S[2:]) <= 12) & ((int(S[:2]) == 0) or (13 <= int(S[:2]))):
    print('YYMM')
else:
    print('NA')

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

if (1 <= S[:2] <= 12) & (1 <= S[2:] <= 12):
    print('AMBIGUOUS')
elif (1 <= S[:2] <= 12) & ((S[2:] == 0) or (13 <= S[2:])):
    print('MMYY')
elif (1 <= S[2:] <= 12) & ((S[:2] == 0) or (13 <= S[:2])):
    print('YYMM')
else:
    print('NA')
Problem p03307 (python)

Fixed submission:
N = int(input())

if N%2 == 0:
    print(N)
else:
    print(2*N)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())

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

print(lcm(2, N))
Problem p02689 (python)

Fixed submission:
n, m = map(int, input().split())
h = list(map(int, input().split()))
l = [0]*n
 
for i in range(m):
    a, b = map(int, input().split())
    l[a-1] = max(l[a-1], h[b-1])
    l[b-1] = max(l[b-1], h[a-1])
 
count = 0
for i in range(n):
    if h[i] > l[i]:
        count += 1
 
print(count)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
h=list(map(int,input().split()))
a = [0] * m
b = [0] * m
l=[0]*n
count=0
for i in range(m):
    a[i], b[i]=map(int, input().split())
    l[a-1]=max(l[a-1],h[b-1])
    l[b-1]=max(l[b-1],h[a-1])
for i in range(n):
    if h[i]>l[i]:
        count=count+1
print(count)
Problem p02701 (python)

Fixed submission:
n = int(input())
s = [input() for i in range(n)]
print(len(set(s)))

Buggy submission (verdict: Runtime Error):
n=int(input())
 s= []
for _ in range(n):
    s.append(input())
count=0
for i in range(n):
    for j in range(i):
        if s[i]==s[j]:
            count=count
        else:
            count=count+1
print(count)
Problem p02711 (python)

Fixed submission:
n=input()
if (n[0]=='7' or n[1]=='7' or n[2]=='7'):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n=input()
if s[0]==7: 
	print("Yes")
if s[1]==7:
    print("Yes")
if s[2]==7:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n=input()
if (s[0]==7 or s[1]==7 or s[2]==7):
    print("Yes")
else:
    print("No")
Problem p02712 (python)

Fixed submission:
n=int(input())
sum1=0
for i in range(1,n+1):
    if not(i%3==0 or i%5==0):
        sum1=sum1+i
print(sum1)

Buggy submission (verdict: Runtime Error):
n=input()
sum1=0
for i in range(n):
    if not(i%3==0 or i%5==0):
        sum1=sum1+i
    else:
        sum1=sum1
print(sum1)

Buggy submission (verdict: Runtime Error):
n=input()
sum1=0
for i in range(n):
    if not(i%3==0 or i%5==0):
        sum1=sum1+i
    else:
        sum1=sum1
print(sum1)
Problem p02725 (python)

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

m=0
for i in range(n-1):
    d=a[i+1]-a[i]
    m=max(d,m)
d_last=a[0]+k-a[n-1]
m=max(d_last,m)

ans=k-m
print(ans)

Buggy submission (verdict: Runtime Error):
k,n=map(input(),int.split())
a=list(map(input(),int.split()))

m=0
for i in range(n-1):
    d=a[i+1]-a[i]
    m=max(d,m)
d_last=a[0]+k-a[n-1]
m=max(d_last,m)

ans=k-m
print(ans)

Buggy submission (verdict: Runtime Error):
k,n=map(input(),int.split())
a=map(list(input(),int.split()))

m=0
for i in range(n-1):
    d=a[i+1]-a[i]
    m=max(d,m)
d_last=a[0]+k-a[n-1]
m=max(d_last,m)

ans=k-m
print(ans)

Buggy submission (verdict: Runtime Error):
k,n=map(input(),int.split())
a=list(input(),int.split())

m=0
for i in range(n-1):
    d=a[i+1]-a[i]
    m=max(d,m)
d_last=a[0]+k-a[n-1]
m=max(d_last,m)

ans=k-m
print(ans)
Problem p02729 (python)

Fixed submission:
n,m=map(int,input().split())
ans=((n*(n-1))/2)+(m*(m-1))/2
print(int(ans))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().splt())
ans=((n*(n-1))/2)+(m*(m-1))/2
print(int(ans))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().splt())
ans=((n*(n-1))/2)+(m*(m-1))/2
print(ans)
Problem p02753 (python)

Fixed submission:
S=input()
if (S[0]==S[1]==S[2]):
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
(A,B)=map(int, input().split())
 
for x in range(10000):
    if (int(x*0.08)==A and int(x*0.1)==B):
        print(x)
        break
    else:
        print('-1')

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
i=(N//(A+B))*A
if N%(A+B)>A:
    i=i+A
else:
    i=i+(N%(A+B))
print(i)

Buggy submission (verdict: Runtime Error):
N, A, B = [int(i) for i in input().split()]
i=(N//(A+B))*A
if N%(A+B)>A:
    i=i+A
else:
    i=i+(N%(A+B))
print(i)

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
i=(N//(A+B))*A
if N%(A+B)>A:
    i=i+A
else:
    i=i+(N%(A+B))
print(i)

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
i=N//(A+B)*A
if N%(A+B)>A:
    i=i+A
else:
    i=i+(N%(A+B))
print(i)

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
i=N//((A+B)*(10**100))*A
if N%((A+B)*(10**100))>A:
    i=i+A
else:
    i=i+(N%(A+B)*(10**100))
print(i)

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
i=N//((A+B)*(10**100))*A
if N%((A+B)*(10**100))>A:
    i=i+A
else:
    i=i+(N%(A+B)*(10**100))
print(i)

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
i=(N//((A+B)*(10**100)))*A
if N%((A+B)*(10**100))>A:
    i=i+A
else:
    i=i+(N%(A+B)*(10**100))
print(i)

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
i=((A+B)*(10**100)//N)*A
if ((A+B)*(10**100))%N>A:
    i=i+A
else:
    i=i+((A+B)*(10**100)%N)
print(i)
Problem p02754 (python)

Fixed submission:
N,A,B=map(int,input().split())
i=(N//(A+B))*A
if N%(A+B)>A:
    i=i+A
else:
    i=i+(N%(A+B))
print(i)

Buggy submission (verdict: Runtime Error):
N=input()
A=input()
B=input()
i=((A+B)*(10**100)//N)*A
if ((A+B)*(10**100))%N>A:
    i=i+A
else:
    i=i+((A+B)*(10**100)%N)
print(i)
Problem p02759 (python)

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

Buggy submission (verdict: Runtime Error):
n=input()
if n%2==0:
    print(n/2)
else:
    print((n//2)+1)
Problem p02832 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
count=0
for i in range(n):
    if a[i]!=i+1-count:
        count=count+1
if count==n:
    count=-1
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
count=0
for i in range(n):
    if a[i]!=i+1-count:
        count=count+1
if count=0:
    count=-1
print(count)
Problem p03041 (python)

Fixed submission:
n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print("".join(s))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
s=input()
s[k-1] = chr(ord(s[k-1]) - ord('A') + ord('a'))
for c in s:
	print(c, end="")
Problem p02860 (python)

Fixed submission:
N = int(input())
S = input()
Flag = True
if N % 2 == 1:
  Flag = False
else:
  for i in range(0,int(N/2)):
    a = S[i]
    b = S[int(i+(N/2))]
    if a != b :
      Flag = False
if Flag == True:
  print('Yes')
elif Flag == False:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
Flag = True
if N % 2 == 1:
  Flag = False
for i in range(0,N+1):
  if Flag == True and S[i] != S[i+N/2] :
    Flag = False
if Flag == True:
  print('Yes')
else:
  print('No')
Problem p02879 (python)

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

if A > 9 or B > 9:
	print(-1)
else:
	print(A*B)

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

if A > 9 or B > 9:
	print(-1)
else:
	print(A*B)

Buggy submission (verdict: Runtime Error):
A = int(input())
B= int(input())
if A > 9 or B > 9:
	print(-1)
else
	print(A*B)
Problem p02881 (python)

Fixed submission:
N = int(input())
s =N+1
n = int(N**0.5) 
i = 1
while i<=n:
  if N % i != 0:
    i += 1
  elif N % i == 0 and N//i +i < s:
    s = N//i + i
    i += 1
  else:
    i += 1
print(s-2)

Buggy submission (verdict: Runtime Error):
N = int(input())
s =[]
n = N//2
for i in range(1,n):
  if N % i == 0:
    a = N//i + i
    s.append(a)
print(min(s)-2)
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()
if a >= 3200:
  print(s)
else:
  print('red')

Buggy submission (verdict: Runtime Error):
a = input()
s = input()
if a >= 3200:
  print(s)
else:
  print('red')
Problem p03075 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if abs(a-b) > k or abs(a-c) > k or abs(a-d) > k or abs(a-e) > k or abs(b-c) > k or abs(b-d) > k or abs(b-e) > k or abs(c-d) > k or abs(c-e) > k or abs(d-e) > k:
  print(':(')
else:
  print('Yay!')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if abs(a-b) > k or abs(a-c) > k or abs(a-d) > k or abs(a-e) > k or abs(b-c) > k or abs(b-d) > k or abs(b-e) > k or abs(c-d) > k or abs(c-e) > k orabs(d-e) > k :
  print(':(')
else:
  print('Yay!')