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

Fixed submission:
H,W,M=map(int, input().split())
sumh=[0]*H
sumw=[0]*W
bomb=[]
for i in range(M):
  h,w=map(int, input().split())
  sumh[h-1]+=1
  sumw[w-1]+=1
  bomb.append((h,w))

maxh=max(sumh)
maxw=max(sumw)
ch=sumh.count(maxh)
cw=sumw.count(maxw)

cnt=0
for h,w in bomb:
  if sumh[h-1]==maxh and sumw[w-1]==maxw:
    cnt+=1

if cnt==ch*cw:
  print(maxh+maxw-1)
else:
  print(maxh+maxw)

Buggy submission (verdict: Runtime Error):
H,W,M=map(int, input().split())
sumh=[0]*H
sumw=[0]*W
bomb=[]
for i in range(M):
  h,w=map(int, input().split())
  sumh[h-1]+=1
  sumw[w-1]+=1
  bomb.append((h,w))
 
maxh=max(sumh)
maxw=max(sumw)

cnt=0
for h,w in bomb:
  if sumh[h-1]==maxh and sumw[w-1]==maxw:
    cnt+=1

if cnt==len(qh)*len(qw):
  print(maxh+maxw-1)
else:
  print(maxh+maxw)

Buggy submission (verdict: Runtime Error):
H,W,M=map(int, input().split())
sumh=[0]*H
sumw=[0]*W
s=[[0]*W for _ in range(H)]
for i in range(M):
  h,w=map(int, input().split())
  sumh[h-1]+=1
  sumw[w-1]+=1
  s[h-1][w-1]=1

maxh=maxw=0
qh=[]
qw=[]
for i in range(H):
  maxh=max(maxh, sumh[i])
for i in range(H):
  if maxh==sumh[i]:
    qh.append(i)

for i in range(W):
  maxw=max(maxw, sumw[i])
for i in range(W):
  if maxw==sumw[i]:
    qw.append(i)

for i in qh:
  for j in qw:
    if s[i][j]==0:
      print(maxh+maxw)
      exit()

print(maxh+maxw-1)

Buggy submission (verdict: Runtime Error):
H,W,M=map(int, input().split())
sumh=[[_,0] for _ in range(H)]
sumw=[[_,0] for _ in range(W)]
s=[[0]*W for _ in range(H)]
for i in range(M):
  h,w=map(int, input().split())
  sumh[h-1][1]+=1
  sumw[w-1][1]+=1
  s[h-1][w-1]=1

maxh=maxw=0
qh=[]
qw=[]
for i in range(H):
  maxh=max(maxh, sumh[i][1])
for i in range(H):
  if maxh==sumh[i][1]:
    qh.append(i)

for i in range(W):
  maxw=max(maxw, sumw[i][1])
for i in range(W):
  if maxw==sumw[i][1]:
    qw.append(i)

for i in qh:
  for j in qw:
    if s[i][j]==0:
      print(maxh+maxw)
      exit()

print(maxh+maxw-1)

Buggy submission (verdict: Runtime Error):
H,W,M=map(int, input().split())
sumh=[[_,0] for _ in range(H)]
sumw=[[_,0] for _ in range(W)]
s=[[0]*W for _ in range(H)]
for i in range(M):
  h,w=map(int, input().split())
  sumh[h-1][1]+=1
  sumw[w-1][1]+=1
  s[h-1][w-1]=1

sumh.sort(reverse=True, key=lambda x:x[1])
sumw.sort(reverse=True, key=lambda x:x[1])

maxh=sumh[0][1]
maxw=sumw[0][1]

flg=s[sumh[0][0]][sumw[0][0]]
for i in range(H):
  if sumh[i][1]<maxh:
    print(maxh+maxw-flg)
    exit()
  for j in range(W):
    if sumw[j][1]<maxw:
      j=W-1
    else:
      flg=min(flg,s[sumh[i][0]][sumw[j][0]])
#      print("###",i,j,sumh[i],sumw[j])


print(maxh+maxw-flg)
Problem p02623 (python)

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

sa=[0]*(n+1)
sb=[0]*(m+1)
s=0
for i in range(n):
  s+=a[i]
  sa[i+1]=s
s=0
for i in range(m):
  s+=b[i]
  sb[i+1]=s

if sa[n]+sb[m]<=k:
  print(n+m)
  exit()

ans=0
j=0
for i in reversed(range(n+1)):
  if sa[i]+sb[j]>k:
    continue
  while j<m and sa[i]+sb[j+1] <= k:
    j+=1
  if sa[i]+sb[j] <= k and ans<i+j:
    ans=i+j

print(ans)

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

sa=[0]*n
sb=[0]*m
s=0
for i in range(n):
  s+=a[i]
  sa[i]=s
s=0
for i in range(m):
  s+=b[i]
  sb[i]=s

if sa[n-1]+sb[m-1]<=k:
  print(n+m)
  exit()
  
if m<n:
  ans=n if sa[n-1]<=k else 0
else:
  ans=m if sb[m-1]<=k else 0

j=0
for i in reversed(range(n)):
  if sa[i]+sb[j]>k:
    continue
  while j<m and sa[i]+sb[j+1] <= k:
    j+=1
  if sa[i]+sb[j] <= k and ans<i+j+2:
    ans=i+j+2

print(ans)

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

sa=[0]*n
sb=[0]*m
s=0
for i in range(n):
  s+=a[i]
  sa[i]=s
s=0
for i in range(m):
  s+=b[i]
  sb[i]=s

if sa[n-1]+sb[m-1]<=k:
  print(n+m)
  exit
  
if m<n:
  ans=n if sa[n-1]<=k else 0
else:
  ans=m if sb[m-1]<=k else 0

j=0
for i in reversed(range(n)):
  if sa[i]+sb[j]>k:
    continue
  while j<m and sa[i]+sb[j+1] <= k:
    j+=1
  if sa[i]+sb[j] <= k and ans<i+j+2:
    ans=i+j+2

print(ans)
Problem p02712 (python)

Fixed submission:
#!/usr/bin/env python3
import sys

def solve(N: int):
    ans=0
    for i in range(1,N+1):
        ans+=i if i%3!=0 and i%5!=0 else 0
    print(ans)
    return

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
                                                                                                                                                                                                                                                                      def solve(N: int):                                                                                                                     ans=0
    for i in range(N):
        ans+=i if i%3!=0 and i%5!=0 else 0
    print(ans)                                                                                                                         return                                                                                                                                                                                                                                                                                                                                                                                               # Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():                                                                                                                  for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

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

Fixed submission:
#!/usr/bin/env python3
import sys
import fractions as f

MOD = 1000000007  # type: int


def solve(N: int, A: "List[int]"):
    #lcm=np.lcm.reduce(A)
    lcm=A[0]
    for i in range(1,N):
        lcm=lcm*A[i]//f.gcd(lcm,A[i])

    ans=0
    for i in range(N):
        ans+=lcm//A[i]
    print(ans%MOD)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
import numpy as np

MOD = 1000000007  # type: int


def solve(N: int, A: "List[int]"):
    lcm=np.lcm.reduce(A)
    ans=0
    for i in range(N):
        ans+=lcm//A[i]
    print(ans%MOD)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

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

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

acum1=[0]
for i in range(n):
	acum1.append(acum1[-1]+a[i])
acum2=[0]
for i in range(m):
	acum2.append(acum2[-1]+b[i])
ans = 0
j = m
for i in range(n + 1):
	if acum1[i] > k:
		break
	while (j > 0) and (acum1[i] + acum2[j] > k):
		j -= 1
	ans = max(ans, i + j)
print(ans)

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

max_count = 0
for i in range(n):
	a_sum = sum(a[:i + 1])
	for j in range(m):
		b_sum = sum(b[:j + 1])
		if (a_sum + b_sum <= k) && (a_sum + b_sum > max_count):
			max_count = i + j + 2
print(max_count)
Problem p02659 (python)

Fixed submission:
inputs = input().split()
a = int(inputs[0])
b = inputs[1]
b = 100 * int(b[0]) + 10 * int(b[2]) + int(b[3])

print(a * b // 100)

Buggy submission (verdict: Runtime Error):
inputs = input().split()
a = int(inputs[0])
b = inputs[1]
b = 100 * int(b[0]) + 10 * int(b[1]) + int(b[2])

print(int(a * b / 100))
Problem p03042 (python)

Fixed submission:
s = input()
yymm = False
mmyy = False
first = int(s[:2])
last = int(s[2:])
if first<=12 and first >0:
    mmyy = True
if last <=12 and last>0:
    yymm = True
if mmyy == True and yymm == True:
    print('AMBIGUOUS')
elif mmyy == True and yymm == False:
    print('MMYY')
elif mmyy == False and yymm == True:
    print('YYMM')
else:
    print('NA')

Buggy submission (verdict: Runtime Error):
s = input()
yymm = False
mmyy = False
first = int(s[:2])
last = int(s[2:])
if first<=12 and first >0:
  mmyy = True
if last <=12 and last>0:
  yymm = True
if mmyy == True and yymm = True:
  print('AMBIGUOUS')
elif mmyy == True and yymm = False:
  print('MMYY')
elif mmyy == False and yymm = True:
  print('YYMM')
else:
  print('NA')
Problem p02659 (python)

Fixed submission:
A ,B= map(float,input().split())
A = int(A)
C = str(B)
if B == 10.0:
  D = 1000
elif B == 0.0:
  D = 0
elif len(C) == 4:
  D = int(C[-1]) + int(C[-2])*10 + int(C[-4])*100
elif len(C) == 3:
  D = int(C[-1])*10 + int(C[-3])*100
  
ans = A*D
ans = ans//100
print(ans)

Buggy submission (verdict: Runtime Error):
A ,B= map(float,input().split())
A = int(A)
C = str(B)
if B == 10.0:
  D = 1000
elif B == 0.0:
  D = 0
else:
  D = int(C[-1]) + int(C[-2])*10 + int(C[-4])*100
ans = A*D
ans = ans//100
print(ans)
Problem p02711 (python)

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

Buggy submission (verdict: Runtime Error):
N = input()
if N[0] != '7' and  N[1] != '7'  N[2] != '7':
  print('No')
else:
  print('Yes')
Problem p02725 (python)

Fixed submission:
K,N = map(int,input().split())
A = list(map(int,input().split()))
B = [0 for i in range(N)]
C = 0
for i in range(N):
  if i == N-1:
    B[i] = A[0] + K - A[i]
  else:
    B[i] = A[i+1] - A[i]
  if B[i] > C:
    C = B[i]
print(K-C)

Buggy submission (verdict: Runtime Error):
20 3
0 5 15
Problem p02835 (python)

Fixed submission:
s = list(map(int, input().split()))
if sum(s)>=22:
  print('bust')
else:
  print('win')

Buggy submission (verdict: Runtime Error):
input_data = list(map(int,(input().split()))
if sum(input_data) > 22:
    print('win')
else:
    print('bust')
Problem p02627 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a = str(input())
 
if 'a' <= a <= 'z':
  print('a')
if 'A' <= a <= 'Z':
  print('A')

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
p = list(map(int,input().split()))
p.sort()
print(sum(p[:k]))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
p = list(int,input())
print(sum(p[:k])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())

if a.islower:
  print('a')
elif a.upper:
  print('A')
Problem p02676 (python)

Fixed submission:
k = int(input())
s = str(input())

if len(s) <= k:
  print(s)
elif len(s) > k:
  print(s[:k] + '...')

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

if len(s) <= k:
  print(s)
elif len(s) > k:
  print(s[0:k-1]
Problem p02688 (python)

Fixed submission:
n,k = map(int,input().split())
ans = [1]*n

for i in range(k):
  d = int(input())
  for j in list(map(int,input().split())):
    ans[j-1] = 0

print(ans.count(1))

Buggy submission (verdict: Runtime Error):
n,k = map(int,imput().split())
ans = [1] * n

for i in range(k):
  d = int(input())
  for j in list(map(int,input().split())):
    ans[j-1] = 0

print(ans.count(1))

Buggy submission (verdict: Runtime Error):
n,k = list(map(int,imput().split()))
ans = [1] * n

for i in range(k):
  d = int(input())
  for j in list(map(int,input().split())):
    ans[j-1] = 0

print(ans.count(1))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
output = []

for i in range(k):
  d = int(input())
  l = list(map(int,input().split()))
  output.append(l)

print(n - len(set(output)))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
output = []

for i in range(k):
  d = int(input())
  for j in range(d):
    output.append(int(input()))

print(n - len(set(output)))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
output = []

for i in range(1,k):
  d = int(input())
  for j in range(1,d):
    output.append(int(input()))

print(n - len(set(output)))
Problem p02712 (python)

Fixed submission:
n = int(input())
ans = 0

for i in range(1,n+1):
  if i % 5 != 0 and i % 3 !=0:
    ans += i

print(ans)

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

for i in range(1:n+1):
  if i % 5 != 0 and i % 3 !=0:
    ans += i

print(ans)
Problem p02623 (python)

Fixed submission:
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
c=0
b=0
for i in range(M):
    b+=B[i]
    if b<=K:
        c+=1
    else:
        break
a=0
b=sum(B)
j=M
ans=0
for i in range(N):
    a+=A[i]
    if a>K:
        break
    while a+b>K:
        b-=B[-1]
        B.pop(-1)
        j-=1
    ans=max(ans,i+j+1)
ans=max(ans,c)
print(ans)

Buggy submission (verdict: Runtime Error):
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
a=A[0]
b=sum(B)
p=0
for i in range(N):
    count=a+b
    while count>K:
        count-=B[M-1]
        M-=1
    if i!=N-1:
        a+=A[i+1]
    p=max(p,i+M+1)
    if a>K:
        break
print(p)

Buggy submission (verdict: Runtime Error):
from collections import deque
N,M,K=map(int,input().split())
A=deque(map(int,input().split()))
B=deque(map(int,input().split()))
if sum(A)+sum(B)<=K:
    print(len(A)+len(B))
else:
    ans=0
    count=0
    while count<K and len(A)!=0 and len(B)!=0:
        m=min(A[0],B[0])
        count+=m
        if m==A[0]:
            A.pop(0)
        else:
            B.pop(0)
        ans+=1
    if count<K and len(A)==0:
        while count<K:
            m=B[0]
            count+=m
            B.pop(0)
            ans+=1
    if count<K and len(B)==0:
        while count<K:
            m=A[0]
            count+=m
            A.pop(0)
            ans+=1
    if count>K:
        ans-=1
    print(ans)
Problem p02629 (python)

Fixed submission:
N=int(input())
i=0
j=1
l=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
S=""
while i<N:
    i+=26**j
    j+=1
N-=i-26**(j-1)
if N==26**(j-1):
    print("z"*(j-1))
    exit()
for i in reversed(range(j-1)):
    if i!=0:
        a=N//26**i
        S+=l[a]
        N-=a*(26**i)
    else:
        S+=l[N-1]
    if N==0:
        S=S[:len(S)-1]
        S+=l[a-1]
        S+="z"*i
        break
print(S)

Buggy submission (verdict: Runtime Error):
N=int(input())
i=0
j=1
l=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
S=""
while i<N:
    i+=26**j
    j+=1
N-=i-26**(j-1)
for i in reversed(range(j-1)):
    if i!=0:
        a=N//26**i
        S+=l[a]
        N-=a*(26**i)
    else:
        S+=l[N-1]
    if N==0:
        S=S[:len(S)-1]
        S+=l[a-1]
        S+="z"*i
        break
print(S)

Buggy submission (verdict: Runtime Error):
N=int(input())
i=0
j=1
l=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
S=""
while i<N:
    i+=26**j
    j+=1
N-=i-26**(j-1)
for i in reversed(range(j-1)):
    if i!=0:
        a=N//26**i
        S+=l[a]
        N-=a*(26**i)
    else:
        S+=l[N-1]
print(S)
Problem p02711 (python)

Fixed submission:
N=input()
M=N.replace("7","")
if len(N)!=len(M):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,X,Y=map(int,input().split())
l=[0]*N-1
for i in range(1,N+1):
    for j in range(1,N+1):
        ans=min(abs(i-j),abs(X-i)+1+abs(j-Y),abs(Y-i)+1+abs(j-X))
        l[ans]+=1
for t in l:
    print(t)
Problem p02759 (python)

Fixed submission:
N=int(input())

print(-(-N//2))

Buggy submission (verdict: Runtime Error):
A,B,C=map(int,input().split())
D,E,F=map(int,input().split())
G,H,I=map(int,input().split())
N=int(input())
b=[input() for i in range(N-1)]
if b.count(A)>0 and b.count(B)>0 and b.count(C)>0:
    print("Yes")
    exit()
if b.count(D)>0 and b.count(E)>0 and b.count(F)>0:
    print("Yes")
    exit()
if b.count(G)>0 and b.count(H)>0 and b.count(I)>0:
    print("Yes")
    exit()
if b.count(A)>0 and b.count(D)>0 and b.count(G)>0:
    print("Yes")
    exit()
if b.count(B)>0 and b.count(E)>0 and b.count(H)>0:
    print("Yes")
    exit()
if b.count(C)>0 and b.count(F)>0 and b.count(I)>0:
    print("Yes")
    exit()
if b.count(A)>0 and b.count(E)>0 and b.count(I)>0:
    print("Yes")
    exit()
if b.count(C)>0 and b.count(E)>0 and b.count(G)>0:
    print("Yes")
    exit()
else:
    print("No")
Problem p02771 (python)

Fixed submission:
l=list(input().split())
if len(set(l))==2:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [input() for _ in range(n)]
d = {}
for w in s:
    if w not in d:
        d[w] = 0
    d[w] += 1
d2 = sorted(d.items(), key=lambda x:x[1], reverse=True)
maxcnts = [w[0] for w in d2 if w[1] == d2[1]]
maxcnts.sort()
for ans in maxcnts:
    print(ans)

Buggy submission (verdict: Runtime Error):
l=list(map(int,input().split())
if len(set(l))==2:
    print("Yes")
else:
    print("No")
Problem p02773 (python)

Fixed submission:
n = int(input())
s = [input() for _ in range(n)]
d = {}
for w in s:
    if w not in d:
        d[w] = 0
    d[w] += 1
d2 = sorted(d.items(), key=lambda x:x[1], reverse=True)
maxcnts = [w[0] for w in d2 if w[1] == d2[0][1]]
maxcnts.sort()
for ans in maxcnts:
    print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
P=[input().split() for i in range(N)]
print(c.most_common(P))
Problem p02777 (python)

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

if S==U:
    print(A-1,B)
if T==U:
    print(A,B-1)

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

if S==U:
    print(A-1,B)
if T==U:
    print(A,B-1)

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

if S==U:
    print(A-1,B)
if T==U:
    print(A,B-1)

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

if S==U:
    print(A-1,B)
if S==T:
    print(A,B-1)

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

if S==U:
    print(A-1,B)
if S==T:
    print(a,B-1)
Problem p02659 (python)

Fixed submission:
import math
li = input().split()
A=int(li[0])
B=li[1].split(".") #整数部分と小数部分に分割

B_int=int(B[0])
B_point=int(B[1])

print(A*B_int+(A*B_point)//100)

Buggy submission (verdict: Runtime Error):
import math
A=int(input())
B =float(input())
print(math.floor(A*B))
Problem p02577 (python)

Fixed submission:
n = str(input())
wa = 0

for i in range(len(n)):
	wa += int(n[i])

if wa % 9 == 0:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
n = str(input())
wa = 0

for i in range(len(n)):
	n[i] = int(n[i])
	wa += n[i]

if wa % 9 == 0:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
n = str(input())
wa = 0

for i in n:
	n[i] = int(n[i])
	wa += n[i]

if wa % 9 == 0:
	print('Yes')
else:
	print('No')
Problem p02622 (python)

Fixed submission:
s = str(input())
t = str(input())
count = 0

for i in range(len(s)):
	if s[i] != t[i]:
		count += 1

print(count)

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

for i in len(s):
	if s[i] != t[i]:
		count += 1

print(count)
Problem p02627 (python)

Fixed submission:
al = str(input())
if al.isupper():
	print('A')
else:
	print('a')

Buggy submission (verdict: Runtime Error):
al = str(input())
if al.isupper() = true:
	print('A')
else:
	print('a')
Problem p02897 (python)

Fixed submission:
N = int(input())

if N % 2 == 0:	
    print((N/2)/N)
else:
    print(((N+1)/2)/N)

Buggy submission (verdict: Runtime Error):
N = input()
if N % 2 == 0:
    A = (N/2)/N
    print(float(A))
else:
    B = ((N+1)/2)/N
    print(float(B))

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

if N % 2 == 0:
    print((N/2)/N)
else:
    print(((N+1)/2)/N)

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

if N % 2 == 0:
    print((N/2)/N)
else:
    print(((N//2+1)/N))

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

if N % 2 == 0:
    print(0.5)
else:
    print((N//2+1)/N)

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

if N % 2 == 0:
    print(0.5)
else:
    print(N//2+1/N)

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

if N % 2 == 0:
    print(0.5)
else:
    print(float((N//2+1)/N))

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

if N % 2 == 0:
    print(0.5)
else:
    a = N//2+1
    b = a/N
    print(b)

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

if N % 2 == 0:
    print(0.5)
else:
    print((N // 2 + 1)/N)
Problem p02595 (python)

Fixed submission:
param_n, param_d = map(int, input().split())

param_count = 0
for i in range(param_n):
    param_a, param_b = map(int, input().split())
    
    if (param_a)*(param_a) + (param_b)*(param_b) <= (param_d)*(param_d):
        param_count = param_count + 1
        
print(param_count)

Buggy submission (verdict: Runtime Error):


param_n, param_d = map(int, input().split())

param_count = 0
for i in param_n:
    param_a, param_b = map(int, input().split())
    
    if (param_a)*(param_a) + (param_b)*(param_b) <= (param_d)*(param_d):
        param_count = param_count + 1
        
print(param_count)

Buggy submission (verdict: Runtime Error):
import pandas
Problem p02596 (python)

Fixed submission:
# https://atcoder.jp/contests/abc174/submissions/15768313 さんの回答、参照

K = int(input())
num = 0
if K%2 == 0:
    print(-1)
else:
    for i in range(1, 1000000):
        num = num*10 + 7
        num %= K
        if num == 0:
            print(i)
            break
    else:
        print(-1)

Buggy submission (verdict: Runtime Error):
param_k = int(input())

if param_k % 2 == 0:
  print(-1)
  
elif param_k %  == 0:
  print(-1)
  
else:
  n=0
  for i in range(param_k + 10):
    n = 10n + 7
    if n % 7 == 0:
      print(i+1)
      break
    if i == param_k + 10 - 1:
      print(-1)
Problem p03803 (python)

Fixed submission:
A,B=map(int,input().split())
if A==B==1 :
    print("Draw")
elif A==1:
    print("Alice")
elif B==1 :
    print("Bob")
elif A<B:
    print("Bob")
elif A>B:
    print("Alice")
elif A==B:
    print("Draw")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
elif A==B==1 :
    print("Draw")
if A==1:
    print("Alice")
elif B==1 :
    print("Bob")
elif A<B:
    print("Bob")
elif A>B:
    print("Alice")
elif A==B:
    print("Draw")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A==1:
    print(Alice)
elif B==1 :
    print(Bob)
elif A==B==1 :
    print(Draw)
elif A<B:
    print(Bob)
elif A>B:
    print(Alice)
elif A==B:
    print(Draw)
Problem p02659 (python)

Fixed submission:
from decimal import *
a,b=map(Decimal,input().split())
kotae=Decimal(a)*Decimal(b)
print(int(kotae))

Buggy submission (verdict: Runtime Error):
from decimal import *
a,b=map(int,input().split())
kotae=Decimal(a)*Decimal(b)
kotae=kotae%1
print(kotae)