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

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

Buggy submission (verdict: Runtime Error):
import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

N,M = map(int, input().split())

print(combinations_count(N, 2)+combinations_count(M, 2))
Problem p02819 (python)

Fixed submission:
import math
def is_prime(n):
    if n == 1:
        return False
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
    
x=int(input())
for i in range(x, 2*x):
    if is_prime(i):
        print(i)
        break

Buggy submission (verdict: Runtime Error):
import math
def is_prime(n):
    if n == 1:
        return False
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
    
x = int(input())
for i in range(x, 2*x:
    if is_prime(i):
        print(i)
        break
Problem p02729 (python)

Fixed submission:
a,b=map(int,input().split())
print (a*(a-1)//2+b*(b-1)//2)

Buggy submission (verdict: Runtime Error):
a,=b=map(int,input().split())
print(a*(a-1)/2+b*(b-1)/2)

Buggy submission (verdict: Runtime Error):
a,b=map(input().split())
ans=a*(a-1)/2+b*(b-1)/2
print (ans)
Problem p02753 (python)

Fixed submission:
if __name__ == '__main__':
    s = input()
    print("No" if s == "AAA" or s == "BBB" else "Yes")

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    s = input()
    n = int(input())
    for _ in range(n):
        q = input().split()
        if q[0] == '1':
            s = s[::-1]
        else:
            if q[1] == '1':
                s = q[2]+s
            else:
                s = s+q[2]
    print(s)

Buggy submission (verdict: Runtime Error):
    s = input()
    print("no" if s == "AAA" or s == "BBB" else "yes")
Problem p02754 (python)

Fixed submission:
if __name__ == '__main__':
    (n, a, b) = map(int, input().split())
    ans = (n//(a+b)) * a
    m = min(n%(a+b), a)
    print(ans+m)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    (n, a, b) = map(int, input().split())
    if a == 0: print(0)
    elif n <= a+b:
        print(a)
    else:
    set_count = int(n/(a+b))*a+1
    print(set_count)
Problem p02831 (python)

Fixed submission:
import fractions
a, b = map(int, input().split())
def lcm(x, y):
    return (x*y) // fractions.gcd(x, y)
print(lcm(a,b))

Buggy submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
def lcm(x, y):
    return (x*y) // math.gcd(x, y)
print(lcm(a,b))
Problem p02832 (python)

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

num =  1
ans = 0
if 1 not in a:
    print(-1)
    sys.exit()
for i in a:
    if i == num:
        num += 1
    else:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
n = int(input())
a = list(input())
b =list(map(int,a))
aa = list(set(b))
x = []
y = []
c = 1
for i in range(1,n+1):
    x.append(i)
for j in aa:
    if j in x and 1 in aa:
        pass
    else:
        print("-1")
        sys.exit()
for k in a:
    if int(k) == c:
        y.append(k)
        c = c + 1
print(len(a)-len(y))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(input())
b =list(map(int,a))
aa = list(set(b))
x = []
y = []
z = []
c = 1
for i in range(1,n+1):
    x.append(i)
for j in aa:
    if j in x and 1 in aa:
        z.append(j)
    else:
        print("-1")
        exit()
for k in a:
    if int(k) == c:
        y.append(k)
        c = c + 1
print(len(a)-len(y))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(input())
b =list(map(int,a))
aa = list(set(b))
x = []
y = []
c = 1
for i in range(1,n+1):
    x.append(i)
for j in aa:
    if j in x and 1 in aa:
        c = 1
        
    else:
        print("-1")
        exit()
for k in a:
    if int(k) == c:
        y.append(k)
        c = c + 1
print(len(a)-len(y))
Problem p02836 (python)

Fixed submission:
a = list(input())
b = len(a)
c = int(b/2)
x = []
result = []
if b%2 == 0:
    A = a[:c]
    B = a[c:]
    BB = B[::-1]
    for v in range(c):
        if A[v] != BB[v]:
            result.append(v)
        else:
            x.append(v)
        
else:
    C = a[:c]
    D = a[c+1:]
    DD = D[::-1]
    for v in range(c):
        if C[v] != DD[v]:
            result.append(v)
        else:
            x.append(v)
print(len(result))

Buggy submission (verdict: Runtime Error):

a = list(input())
b = len(a)
c = int(b/2)
result = []
if b%2 == 0:
    A = a[:c]
    B = a[c:]
    BB = B[::-1]
    for v in range(c):
        if A[v] != BB[v]:
            result.append(v)
        else:
            x.append(v)
        
else:
    C = a[:c]
    D = a[c+1:]
    DD = D[::-1]
    for v in range(c):
        if C[v] != DD[v]:
            result.append(v)
        else:
            x.append(v)
print(len(result))
Problem p02935 (python)

Fixed submission:
n = int(input())
v = sorted(list(map(int,input().split())))
ans = (v[0] + v[1])/2

for i in range(2,n):
    ans = (ans + v[i])/2
print(ans)

Buggy submission (verdict: Runtime Error):
ans = (ans + v[i])/2
Problem p02970 (python)

Fixed submission:
n,d = map(int,input().split())
x = d*2 + 1
print((n+d*2)//x)

Buggy submission (verdict: Runtime Error):
n,d = map(int,input().split())
x = d*2 + 1
print((n+d*2)//(x)
Problem p02897 (python)

Fixed submission:
n = int(input())
if n % 2 == 0:
  print(0.5)
else:
  a = n // 2
  print((n-a)/n)

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

for i in range(n):
  if h[i] >= k:
    a += 1
print(a)
Problem p02729 (python)

Fixed submission:
import math
n,m=map(int,input().split())
def cc(n,r):
    return int(math.factorial(n)/(math.factorial(n-r)*math.factorial(r)))
if n>=2:
    if m>=2:
        print(cc(n,2)+cc(m,2))
    else:
        print(cc(n,2))
else:
    if m>=2:
        print(cc(m,2))
    else:
        print(0)

Buggy submission (verdict: Runtime Error):
    main()
import math
n,m=map(int,input().split())
def cc(n,r):
    return int(math.factorial(n)/(math.factorial(n-r)*math.factorial(r)))
if n>=2:
    if m>=2:
        print(cc(n,2)+cc(m,2))
    else:
        print(cc(n,2))
else:
    if m>=2:
        print(cc(m,2))
    else:
        print(0)
Problem p03250 (python)

Fixed submission:
a,b,c=map(int,input().split())
N=[a,b,c]
N.sort (reverse=True)
print(10*N[0]+N[1]+N[-1])

Buggy submission (verdict: Runtime Error):
N=[int(input()) for i in range(3)]
N.sort (reverse=True)
ans1=10*N[0]+N[1]
ans2=N[-1]
print(ans1+ans2)
Problem p02729 (python)

Fixed submission:
import math

a = [int(x) for x in input().split(" ")]
n = a[0]
m = a[1]
ans = 0
if n >= 2 :
    ans += math.factorial(n) // (2 * math.factorial(n - 2))
if m >= 2 :
    ans += math.factorial(m) // (2 * math.factorial(m - 2))
print(ans)

Buggy submission (verdict: Runtime Error):
import math
 
def resolve():
    n = int(input())
    a = [int(x) for x in input().split()]
 
    for k in range(n):
        # 初期化
        ak = [x for x in a] # deep copy
        del ak[k]
        kumi = 0
        ended = []
 
        # loop
        for i in range(n - 1):
            a0 = ak[i] # i番目の要素を検査
            if a0 in ended:
                continue
            cnt = ak.count(a0)
            if cnt >= 2:
                kumi += kumiawase(cnt ,2)
            ended.append(a0)
        print(kumi)
 
def kumiawase(n, r):
    return math.factorial(n) // (r * math.factorial(n - r))
 
resolve()
Problem p02771 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
import collections
mylist = []
for i in range(N):
  val = input("")
  if val:
    mylist.append(val)
if len(mylist) != len(set(mylist)):
    c = collections.Counter(mylist)
    A = [i for i in range(len(set(mylist))) if c.most_common()[0][1] == c.most_common()[i][1]]
    B = [c.most_common()[i][0] for i in range(len(A))]
    C = sorted(B)
    for item in C:
        print(item)
else:
    D = sorted(mylist)
    for item in D:
            print(item)
Problem p02729 (python)

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

result = (nm[0] * (nm[0] - 1)) // 2
result += (nm[1] * (nm[1] - 1)) // 2

print(result)

Buggy submission (verdict: Runtime Error):
 nm = [int(i) for i in input().split()]
  2
  3 result = (nm[0] * (nm[0] - 1)) // 2
  4 result += (nm[1] * (nm[1] - 1)) // 2
  5
  6 print(result)
Problem p02729 (python)

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

Buggy submission (verdict: Runtime Error):
L = input()
ans = (L//3)**3
print(ans)
Problem p02753 (python)

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

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

Buggy submission (verdict: Runtime Error):
s = imput ()
if s [0] == s[1] or s[1] == s[2]:print('No')
else: print('Yes')
Problem p02771 (python)

Fixed submission:
def is_kawaisou(a, b, c):
    if a == b and a == c:
        return 'No'
    if a == b or b == c or a == c:
        return 'Yes'
    else:
        return 'No'


if __name__ == '__main__':
    a, b, c = map(int, input().split())
    print(is_kawaisou(a, b, c))

Buggy submission (verdict: Runtime Error):
from collections import Counter


def words_sort_ordered(words_list):
    word_cnt = Counter()
    for word in words_list:
        word_cnt[word] += 1

    word_written_max_time = 0
    for each_word_ct in word_cnt.values():
        if each_word_ct > word_written_max_time:
            word_written_max_time = each_word_ct

    answer_words_list = []
    for word, number in dict(word_cnt).items():
        if number == word_written_max_time:
            answer_words_list.append(word)

    return sorted(answer_words_list)


if __name__ == '__main__':
    words_num = int(input())
    words_list = [input() for i in range(words_num)]
    for w in words_sort_ordered(words_list):
        print(w)
Problem p02860 (python)

Fixed submission:
n = int(input())

fin = n//2
s = input()

debut = s[0:fin]

if s == debut + debut:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys
import math
import itertools

n = int(sys.stdin.readline())
total = math.factorial(n)
res = 0
acc = 0
lines = []

for i in range(n):
    lines.append(sys.stdin.readline().rstrip('\n'))
for y in itertools.combinations(lines, 2):
    acc += ((int(y[0][0]) - int(y[1][0]))**2) + ((int(y[0][1]) - int(y[1][1]))**2)
    acc += math.sqrt(acc)

res = acc/total
print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()

if s.endswith(s[:n/2]):
  print("Yes")
else:
  print("No")
Problem p02779 (python)

Fixed submission:
def has_no_duplicates(seq):
  return len(seq) == len(set(seq))

N = int(input())
A = list(map(int, input().split()))

if has_no_duplicates(A):
  print('YES')
else:
  print('NO')

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

if has_duplicates(A):
  print('NO')
else:
  print('YES')
Problem p02835 (python)

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

if (a+b+c<=21):
  print('win')
else:
  print('bust')

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

if x + y + z <= 21:
	print('win')
else:
	print('bust')
Problem p02753 (python)

Fixed submission:
s = input()
if 'A' in s and 'B' in s:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
l = list(map(int, input().split()))
n,a,b=l[0],l[1],l[2]
count=0
while True:
  for i in range(a):
    if n == 0:
      break
    count += 1
    n -= 1	
  for i in range(b):
    if n == 0:
      break
    n -= 1
  if n == 0:
    break
print(count)
Problem p02790 (python)

Fixed submission:
r = input()
k=r.split()



t1=t2=''

t1=k[0]*int(k[1])
t2=k[1]*int(k[0])



rr = [t1,t2]

rr.sort()

print(rr[0])

Buggy submission (verdict: Runtime Error):
r=input()
k=r.split()

t1=t2=0
for i in range(k[2]):
    t1 += k[0]
for i in range(k[0]):
    t2 += k[2]
    
jj=[t1,t2]
jj.sort(reverse=True)
print(jj[0])
Problem p02989 (python)

Fixed submission:

N=int(input())
x=list(map(int,input().split()))
n=N//2

X=sorted(x)
#print(X)

#print(X[n-1])
#print(X[n])

print(X[n]-X[n-1])

Buggy submission (verdict: Runtime Error):

N=int(input())
x=list(map(int,input().split()))
n=N//2

X=sorted(x)
#print(X)

#print(X[n-1])
#print(X[n])

print(X[n]-X[n-1]
Problem p03038 (python)

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

a=list(map(int,input().split()))
a=sorted(a)
a.append(0)
D=[]
for i in range(M):

    d=list(map(int,input().split()))

    D.append(d)

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


k=0

for j in range(M):
    l=k
    for i in range(D[M-j-1][0]):
        q=max(M-j-1,0)
        if D[q][1] > a[k] and k!=N:
            a[k]=D[q][1]
            k=k+1
        else:
            k=k

        if l==k:
            break

    if l==k:
        break



print(sum(a)-a[N])

Buggy submission (verdict: Runtime Error):

N,M=map(int,input().split())

a=list(map(int,input().split()))
a=sorted(a)
a.append(0)
D=[]
for i in range(M):

    d=list(map(int,input().split()))

    D.append(d)

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


k=0

for j in range(M):
    l=k
    for i in range(D[M-j-1][0]):

        if D[M-j-1][1] > a[k]:
            a[k]=D[M-j-1][1]
            k=k+1
        if l==k:
            break

    if l==k:
        break

print(sum(a)-a[N])

Buggy submission (verdict: Runtime Error):

N,M=map(int,input().split())

a=list(map(int,input().split()))
a=sorted(a)
a.append(0)
D=[]
for i in range(M):

    d=list(map(int,input().split()))

    D.append(d)

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


k=0

for j in range(M):
    l=k
    for i in range(D[M-j-1][0]):

        if D[M-j-1][1] > a[k]:
            a[k]=D[M-j-1][1]
            k=k+1

    if l==k:
        break

print(sum(a)-a[N])

Buggy submission (verdict: Runtime Error):

N,M=map(int,input().split())

a=list(map(int,input().split()))
a=sorted(a)

D=[]
for i in range(M):

    d=list(map(int,input().split()))

    D.append(d)

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


k=0

for j in range(M):
    l=k
    for i in range(D[M-j-1][0]):

        if D[M-j-1][1] > a[k]:
            a[k]=D[M-j-1][1]
            k=k+1

    if l==k:
        break
print(sum(a))
Problem p02773 (python)

Fixed submission:
from sys import stdin, stdout
from collections import defaultdict
n = int(stdin.readline().strip())
word_map = defaultdict(lambda: 0)
maxi = 0
for i in range(n):
  word = stdin.readline().strip()
  x = word_map[word]
  word_map[word] = x + 1
  maxi = max(maxi, x+1)
  
word_list = []
for key, value in word_map.items():
  if value == maxi:
    word_list.append(key)
word_list.sort()
for word in word_list:
  stdout.write(word+'\n')

Buggy submission (verdict: Runtime Error):
from sys import stdin, stdout
from collections import defaultdict
n = int(stdin.readline().strip())
word_map = defaultdict(lambda: 0)
maxi = 0
for i in range(n):
  word = stding.readline().strip()
  x = word_map[word]
  word_map[word] = x + 1
  maxi = max(maxi, x+1)
  
word_list = []
for key, value in word_map.items():
  if value == maxi:
    word_list.append(key)
word_list.sort()
for word in word_list:
  stdout.write(word+'\n')
Problem p03077 (python)

Fixed submission:
from math import ceil

N = int(input())
a = [int(input()) for _ in range(5)]

print(ceil(N / min(a)) + (5-1))

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [int(input) for _ in range(5)]

print(N // min(a) + 5)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [int(input) for _ in range(5)]

print(n // min(a) + 5)
Problem p02759 (python)

Fixed submission:
import bisect, collections

def solution():
    n = input().strip()
    print((int(n)+1)//2)
    

    

def main():    
    # T = int(input().strip())
    for _ in range(1):
        solution()
    

main()

Buggy submission (verdict: Runtime Error):
import bisect, collections

def solution():
    n = input().strip()
    print(n//2)
    

    

def main():    
    # T = int(input().strip())
    for _ in range(1):
        solution()
    

main()
Problem p02754 (python)

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

sum_num = a + b
times = n // sum_num
amari = n % sum_num

ans = times * a
if amari <= a:
    ans += amari
else :
    ans += a

print(ans)

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

sum_num = a + b
times = n // sum_num
amari = n % sum_num
if amari >= a:
    print(times * a + amari)
elif:
    print(times * a + a)
Problem p02951 (python)

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

    ans = C-(A-B)
    if ans <= 0:
        ans = 0

    print(ans)


if __name__ == '__main__' :
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    H = list(map(int, input().split()))

    judge = 'Yes'

    H[0] = H[0] - 1

    for i in range(1,N):
        if H[i-1] > H[i] :
            H[i-1] = H[i-1] - 1

    for i in range(1,N):
        if H[i-1] > H[i]:
            judge = 'No'
            
    print(judge)

if __name__ == '__main__' :
    main()
Problem p03011 (python)

Fixed submission:
def main():
    p = list(map(int,input().split()))
    ans = []

    p.sort()

    ans = p[0] + p[1]
    print(ans)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    L = list(map(int, input().split()))

    s1, s2 = 0,sum(L)
    ans = sum(L)

    for i in range(N):
        s1 += L[i]
        s2 -= L[i]
        ans = min(ans, abs(s1-s2))

    print(ans)

if __name__ == "__main__":
    main()
Problem p03012 (python)

Fixed submission:
def main():
    N = int(input())
    L = list(map(int, input().split()))

    s1, s2 = 0,sum(L)
    ans = sum(L)

    for i in range(N):
        s1 += L[i]
        s2 -= L[i]
        ans = min(ans, abs(s1-s2))

    print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    L = list(map(int, input().split()))

    s1, s2 = 0,sum(W)
    ans = sum(W)

    for i in range(N):
        s1 += L[i]
        s2 -= L[i]
        ans = min(ans, abs(s1-s2))

    print(ans)

if __name__ == "__main__":
    main()
Problem p03013 (python)

Fixed submission:
import sys
input = sys.stdin.readline
n,m = map(int, input().split())
a = set(map(int, [input() for _ in range(m)]))
dp = [0] * (n+1)

#`dp[i] = i段目にいる通り数`
if not 0 in a:
    dp[0] = 1
if not 1 in a:
    dp[1] = 1
    
for i in range(2,n+1):
    if i in a:
        dp[i] = 0
    else: 
        dp[i] += (dp[i-1] + dp[i-2]) % (10 ** 9 + 7)

print(dp[-1])

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
n,m = map(int, input().split())

print(a)
dp = [0] * (n+1)

#`dp[i] = i段目にいる通り数`
dp[0] = 1
dp[1] = 1
for i in range(2,n+1):
    if i in a:
        dp[i] = 0
    else: 
        dp[i] += (dp[i-1] + dp[i-2]) % (10 ** 9 + 7)

print(dp[-1])
Problem p03041 (python)

Fixed submission:
N , K = map(int,input().split())
S = list(input())

for i in range(1,N+1):
    if i == K :
        S[i-1] = S[i-1].swapcase()
print(''.join(S))

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

for i in range(1,N+1):
    if i == K :
        S[i] = S[i].lower()
print(S)

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

for i in range(1,N+1):
    if i == K :
        S[i] == S[i].lower()
print(S)

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

for i in range(1:N+1):
    if i == K :
        S[i] == S[i].lower()
print(S)

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

for i in N:
    if i == K :
        S[i] == S[i].lower()
print(S)
Problem p03075 (python)

Fixed submission:
def main():
    input_data = [int(input()) for i in range(5)]
    k = int(input())

    input_data.sort()
    input_data.reverse()

    temp = input_data[0] - input_data[4]
    if temp > k :
        print(":(")
    else:
        print('Yay!')

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    input_data = [int(input()) for i in range(5)]
    k = int(input())

    input_data.sort()
    input_data..reverse()

    temp = input_data[0] - input_data[4]
    if temp > k :
        print(":(")
    else:
        print('Yay!')

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    input_data = [int(input()) for i in range(5)]
    k = int(input())
    count = 0

    input_data = input_data.sort()

    temp = input_data[0] - input_data[4]
    if temp > k :
        print(":(")
    else:
        print('Yay!')

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    input_data = [input() for i in range(5)]
    k = int(input())

    input_data.sort()

    for i in input_data:
        temp = i - input_data[4]
        if temp > k :
            print(":(")
            break
        print('Yay!')

if __name__ == '__main__':
    main()
Problem p03250 (python)

Fixed submission:
def main():
    l = list(map(int,input().split()))
    l = sorted(l,reverse=True)
    ans = ''

    for i in range(0,len(l)-1):
        ans = ans + str(l[i])
    ans_int = int(ans) + int(l[-1])

    print(ans_int)




if __name__ == '__main__' :
    main()

Buggy submission (verdict: Runtime Error):
import sys

def odd_def(num):
    if num % 2 == 0:
        return False
    else:
        return True

def main():
    a,b = map(int, input().split())
    for i in range(1,4):
        mal = a*b*c
        if odd_def(mal):
            print('Yes')
            sys.exit()
    print('No')


if __name__ == '__main__' :
    main()
Problem p03307 (python)

Fixed submission:
# coding:utf-8
from fractions import gcd
def main():
    n = int(input())
    ans = 2*n / gcd(2,n)
    print(int(ans))

if __name__ == '__main__' :
    main()

Buggy submission (verdict: Runtime Error):
# coding:utf-8
import fractions
def main():
    n = int(input())
    ans = 2*n / fractions.gcd(2,n)
    print(int(ans))

    if __name__ == '__main__' :
    main()

Buggy submission (verdict: Runtime Error):
# coding:utf-8
import math
def main():
    n = int(input())
    ans = 2*n / math.gcd(2,n)
    print(int(ans))



if __name__ == '__main__' :
    main()

Buggy submission (verdict: Runtime Error):
# coding:utf-8
#ab=gl
import math
def main():
    n = int(input())
    ans = 2*n / math.gcd(2,n)
    print(int(ans))



if __name__ == '__main__' :
    main()
Problem p02729 (python)

Fixed submission:
a = input().split()
N = int(a[0])
M = int(a[1])

answer = (N*(N-1) / 2) + (M*(M-1) / 2)

print(int(answer))

Buggy submission (verdict: Runtime Error):
N = int(input())
M = int(input())
answer = (N*(N-1) / 2) + (M*(M-1) / 2)

print(int(answer))
Problem p02777 (python)

Fixed submission:
S,T=map(str,input().split())
s,t=map(int,input().split())
U=input()

if S==U:
    print(s-1,t)
elif T==U:
    print(s,t-1)

Buggy submission (verdict: Runtime Error):
S,T=map(str,input.split())
s,t=map(int,input.split())
U=input()

if S==U:
    print(s-1,t)
elif T==U:
    print(s,t-1)
Problem p02790 (python)

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

a="";b=""
a=str(A)*B;b=str(B)*A
if A<=B:
    print(a)
elif A>B:
    print(b)

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

a="";b=""
a=str(A)*B;b=str(B)*A
if A=<B:
    print(a)
elif A>B:
    print(b)
Problem p02779 (python)

Fixed submission:
N=(int)(input())
A=(input()).split()
A.sort()
 
for i in range(N-1):
    if A[i]==A[i+1]:
        print('NO')
        break
    elif i==N-2:
        print('YES')

Buggy submission (verdict: Runtime Error):
N=input()
A=(input()).split()
A.sort()

for i in range(N-1):
  if A[i]==A[i+1]:
    print('NO')
  if i==N-2:
    print('YES')