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

Fixed submission:
input_list = list(map(int,input().split()))
for i in range(61):
    if (input_list[0]*(2**i )<=input_list[1])&(input_list[0]*(2**(i +1))>input_list[1]):
        print(i+1)

Buggy submission (verdict: Runtime Error):
imput_list = list(map(int,input().split()))
a = imput_list[1]/imput_list[0]
print(math.floor(math.log2(a)) + 1)

Buggy submission (verdict: Runtime Error):
imput_list = list(map(int,input().split()))
print(math.floor(math.log(imput_list[1]/imput_list[0], 2)) + 1)
Problem p03486 (python)

Fixed submission:
s_input_sort = sorted(list(str(input())))
t_input_sort = sorted(list(str(input())), reverse=True)

s_str = "".join(s_input_sort)
t_str = "".join(t_input_sort)

if s_str == t_str:
    print("No")
else:    
    if t_str < s_str:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
s_input_sort = sorted(list(str(input())))
t_input_sort = sorted(list(str(input())), reverse=True)

s_str = "".join(s_input_sort)
t_str = "".join(t_input_sort)

if t_str >= s_str:
        print("Yes")
    else:
        print("No")
Problem p03487 (python)

Fixed submission:
N = int(input())
sort_a_list = sorted(list(map(int, input().split())))

sort_dict = {}
for i in sort_a_list:
    if i not in sort_dict.keys():
        sort_dict[i] = [i]
    else:
        sort_dict[i].append(i)
        
remove_counter = 0
for key, value in sort_dict.items():
    if len(value) < key:
        remove_counter += len(value)
    elif len(value) == key:
        pass
    else:
        remove_counter +=(len(value) - key)
        
print(remove_counter)

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

sort_dict = collections.Counter(a_list)

remove_counter = 0

for key, value in sort_dict.items():
    if value < key:
        remove_counter += value
    elif value == key:
        pass
    else:
        remove_counter += (value - key)
        
print(remove_counter)
Problem p03547 (python)

Fixed submission:
a, b =  list(input().split())

alphabet_list = sorted([a, b])
if alphabet_list[0] == alphabet_list[1]:
    print("=")
    #pass
elif a == alphabet_list[0]:
    print("<")
else:
    print(">")

Buggy submission (verdict: Runtime Error):
X = input()
Y = input()

alphabet_list = sorted([X, Y])
if alphabet_list[0] == alphabet_list[1]:
    print("=")
    #pass
elif X == alphabet_list[0]:
    print("<")
else:
    print(">")
Problem p03548 (python)

Fixed submission:
X, Y, Z =  list(map(int, input().split()))
print((X-Z)//(Y+Z))

Buggy submission (verdict: Runtime Error):
X, Y, Z =  list(map(int, input().split()))
pritn((X-Z)//(Y+Z))
Problem p03624 (python)

Fixed submission:
str_list = list(input())
import string
if set(str_list) == set(string.ascii_lowercase):
    print("None")
else:
    dif_list = sorted(list(set(string.ascii_lowercase) - set(str_list)))
    print(dif_list[0])

Buggy submission (verdict: Runtime Error):
str_list = list(input())
import string
dif_list = sorted(list(set(string.ascii_lowercase) - set(sorted(str_list))))
print(dif_list[0])
Problem p03633 (python)

Fixed submission:
N = int(input())
input_list = [int(input())for _ in range(N)]

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)
  
def lcm(x, y):
    return (x * y) // gcd(x, y)
  
initial_num = 1
for i in input_list:
    t = lcm(initial_num, i)
    if  t > initial_num:
        initial_num = t
        
print(initial_num)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
input_list = [int(input())for _ in range(N)]

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
  
initial_num = 1
for i in input_list:
    t = lcm(initial_num, i)
    if  t > initial_num:
        initial_num = t
        
print(initial_num)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
input_list = [int(input())for _ in range(N)]

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
  
initial_num = 1
for i in input_list:
    if lcm(initial_num, i) > initial_num:
        initial_num = lcm(initial_num, i)
        
print(initial_num)
Problem p03658 (python)

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

print(sum(int_list[-K:]))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
int_list = sorted(list(map(int, input().split())), reverse=True)

print(sum(int_list[:K])
Problem p03853 (python)

Fixed submission:
H, W = map(int, input().split())
c=[input() for _ in range(H)]
for _ in c:
    print(_ + "\n" + _)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
C_list = []
for _ in range(W):
    i = input()
    print(i + "\n" + i)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
C_list = []
for _ in range(W):
    C_list.append(input())
    
for i in C_list:
    print(i + "\n" + i)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
C_list = []
for _ in range(W):
    C_list.append(input())
    
for i in C_list:
    print(i)
    print(i)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
C_list = []
for _ in range(W):
    temp_list = input()
    print(temp_list)
    print(temp_list)
Problem p03239 (python)

Fixed submission:
N, T = map(int, input().split())
c = []
t = []

for i in range(N):
    box = [0,0]
    box[0], box[1] = map(int, input().split())
    c.append(box[0])
    t.append(box[1])

cost = 1000
check = -1
for i in range(N):
    if t[i] <=T and c[i] <= cost:
        check = i
        cost = c[i]
        #print(i)
        #print(cost)

if check == -1:
    print('TLE')
else:
    print(cost)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
c = []
t = []

for i in range(N):
    box = [0,0]
    box[0], box[1] = map(int, input().split())
    c.append(box[0])
    t.append(box[1])

cost = 1000
check = -1

for i in range(N):
    if t[i] <=T and c[i] <= cost:
        check = i
        cost = c[i]
        #print(i)
        #print(cost)

if index == -1:
    print('TLE')
else:
    print(cost)
Problem p03241 (python)

Fixed submission:
def solve():
    n,m = map(int,input().split())
    for i in range(m//n,0,-1):
        if m%i==0: break
    print(i)
solve()

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
for i in range(M//N,0,-1):
    if m%i==0:
        print(i)
        break
    else: break

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

for i in range(M//N,0,-1):
    if m%i!=0: break
    else (M-N*i)%i==0:
        ret = i
        print(ret)
        break
Problem p03262 (python)

Fixed submission:
# abc109c

def gcd(a, b):
    if a < b:
        a, b = b, a
    r = a % b
    if r == 0:
        return b
    return gcd(r, b)

N,X = map(int,input().split())
x = list(map(int,input().split()))

x.append(X)
x.sort()
diff = [x[1]-x[0]]
for i in range(N):
    diff.append(x[i+1]-x[i])

D = gcd(diff[0],diff[1])
for i in range(2,N+1):
    D = gcd(D,diff[i])
print(D)

Buggy submission (verdict: Runtime Error):
# abc109c

import math

N,X = map(int,input().split())
x = list(map(int,input().split()))

x.append(X)
x.sort()
diff = [x[1]-x[0]]
for i in range(N):
    diff.append(x[i+1]-x[i])
#print(x)
#print(diff)
D = math.gcd(diff[0],diff[1])
for i in range(2,N+1):
    D = math.gcd(D,diff[i])
    #print(diff[i],D)
print(D)
Problem p03309 (python)

Fixed submission:
#c

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

for i in range(1,n+1):
    a[i-1] -= i
a.sort()
num0 = 0
num1 = a[int(n/2)-1]
num2 = a[int(n/2)]
num3 = int((num1 + num2)/2)
num4 = num3 - 1
num5 = num3 + 1
num6 = num1 + 1
num7 = num1 - 1
num8 = num2 + 1
num9 = num2 - 1

ans0 = 0
for i in range(n):
    ans0 += abs(a[i]-num0)
ans1 = 0
for i in range(n):
    ans1 += abs(a[i]-num1)
ans2 = 0
for i in range(n):
    ans2 += abs(a[i]-num2)
ans3 = 0
for i in range(n):
    ans3 += abs(a[i]-num3)
ans4 = 0
for i in range(n):
    ans4 += abs(a[i]-num4)
ans5 = 0
for i in range(n):
    ans5 += abs(a[i]-num5)
ans6 = 0
for i in range(n):
    ans6 += abs(a[i]-num6)
ans7 = 0
for i in range(n):
    ans7 += abs(a[i]-num7)
ans8 = 0
for i in range(n):
    ans8 += abs(a[i]-num8)
ans9 = 0
for i in range(n):
    ans9 += abs(a[i]-num9)

ans = min(ans0,ans1)
ans = min(ans,ans2)
ans = min(ans,ans3)
ans = min(ans,ans4)
ans = min(ans,ans5)
ans = min(ans,ans6)
ans = min(ans,ans7)
ans = min(ans,ans8)
ans = min(ans,ans9)
print(ans)

Buggy submission (verdict: Runtime Error):
#c

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

for i in range(1,n+1):
    a[i-1] -= i
num1 = a[int(n/2)]
num2 = a[int(n/2)+1]

ans1 = 0
for i in range(n):
    ans1 += abs(a[i]-num1)
ans2 = 0
for i in range(n):
    ans2 += abs(a[i]-num2)

ans = min(ans1,ans2)
print(ans)
Problem p03353 (python)

Fixed submission:
s = input()
K = int(input())
arr = set()
for i in range(len(s)):
    for j in range(i+1,min(i+1+K,len(s)+1)):
        arr.add(s[i:j])
print(sorted(arr)[K-1])

Buggy submission (verdict: Runtime Error):
s = input()
K = int(input())
arr = set()
for i in range(len(s)):
    for j in range(i+1,min(i+1+K,len(s))):
        arr.add(s[i:j])
print(list(sorted(arr))[K-1])
Problem p03361 (python)

Fixed submission:
import sys
sys.setrecursionlimit(100000)

H,W=list(map(int,input().split())) # R行 C列 の迷路を受け取る

canv=[]
for i in range(H):
    canv.append([])
    line_input=input() # 迷路を1行取得
    for j in range(W):
        canv[i].append(line_input[j:j+1]) # slice による部分文字列取得

dx=[1,0,-1,0]
dy=[0,1,0,-1]

def dfs(x,y):
    for i in range(4):
        canv[x][y]="."
        nx = x + dx[i]
        ny = y + dy[i]
        if 0<=nx and nx<H and 0<=ny and ny<W:
            if canv[nx][ny]=="#":
                dfs(nx,ny)

for i in range(H):
    for j in range(W):
        for k in range(4):
            nx1 = i + dx[k]
            ny1 = j + dy[k]
            if 0<=nx1 and nx1<H and 0<=ny1 and ny1<W:
                if canv[i][j]=="#" and canv[nx1][ny1]=="#":
                    dfs(i,j)
flg = True
for i in range(H):
    for j in range(W):
        if canv[i][j]=="#":
            flg = False
if flg: print("Yes")
else: print("No")

Buggy submission (verdict: Runtime Error):
H,W=list(map(int,input().split())) # R行 C列 の迷路を受け取る

canv=[]
for i in range(H):
    canv.append([])
    line_input=input() # 迷路を1行取得
    for j in range(W):
        canv[i].append(line_input[j:j+1]) # slice による部分文字列取得

dx=[1,0,-1,0]
dy=[0,1,0,-1]

def dfs(x,y):
    for i in range(4):
        canv[x][y]="."
        nx = x + dx[i]
        ny = y + dy[i]
        if 0<=nx and nx<H and 0<=ny and ny<W:
            if canv[nx][ny]=="#":
                dfs(nx,ny)

for i in range(H):
    for j in range(W):
        for k in range(4):
            nx1 = i + dx[k]
            ny1 = j + dy[k]
            if 0<=nx1 and nx1<H and 0<=ny1 and ny1<W:
                if canv[i][j]=="#" and canv[nx1][ny1]=="#":
                    dfs(i,j)
flg = True
for i in range(H):
    for j in range(W):
        if canv[i][j]=="#":
            flg = False
if flg: print("Yes")
else: print("No")
Problem p03363 (python)

Fixed submission:
#import numpy as np
import copy as cp

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

def nck(n,k):
    if 0 <= k <= n:
        ret = 1
        for i in range(k):
            ret = ret*(n-i)/(i+1)
        return ret
    return 0

def numzero(a):
    if a <= 1:
        return 0
    elif a == 2:
        return 1
    else: return nck(a,2)

cumsum = [0]
s = 0
for i in range(len(a)):
    s += a[i]
    cumsum.append(s)
#print(cumsum)

v = cp.deepcopy(cumsum)
v.sort()
#print(v)

cnt = [1]
c = 0
for i in range(1,len(v)):
    if v[i] == v[i-1]:
        cnt[c] += 1
    else:
        cnt.append(1)
        c += 1
#print(cnt)    

ans = 0
for i in range(len(cnt)):
    ans += numzero(cnt[i])
print(int(ans))

Buggy submission (verdict: Runtime Error):
import numpy as np
import copy as cp

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

def nck(n,k):
    if 0 <= k <= n:
        ret = 1
        for i in range(k):
            ret = ret*(n-i)/(i+1)
        return ret
    return 0

def numzero(a):
    if a <= 1:
        return 0
    elif a == 2:
        return 1
    else: return nck(a,2)

cumsum = [0]
s = 0
for i in range(len(a)):
    s += a[i]
    cumsum.append(s)
#print(cumsum)

v = cp.deepcopy(cumsum)
v.sort()
cnt = np.zeros(v[-1]-v[0]+1)

for i in range(len(cumsum)):
    #print(i,cumsum[i])
    cnt[cumsum[i]-v[0]] += 1
    #print(cnt)
#print(cnt)

ans = 0
for i in range(len(cnt)):
    ans += numzero(cnt[i])
print(int(ans))
Problem p03598 (python)

Fixed submission:
N = int(input())
K = int(input())

x = input().split()

ans = 0
for i in range(N):
    ans += 2*min(int(x[i]), K-int(x[i]))
    
print(ans)

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

x = map(int, input().split())

ans = 0
for i in range(N):
    ans += 2*min(x, K-x)
    
print(ans)

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

x = map(int, input().split())

ans = 0
for i in range(N);
    ans += 2*min(x, K-x)
    
print(ans)

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

ans = 0
for i in range(N):
    x = int(input())
    ans += 2*min(x,K-x)
print(ans)

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

ans = 0
for i in range(N):
    x = int(input)
    ans += 2*min(x,K-x)
print(ans)

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

ans = 0
for i in range(N):
    x = int(input)
    ans += 2*min(x,K-x)
print(ans)
Problem p03607 (python)

Fixed submission:
N = int(input())

a = []
for i in range(N):
    a.append(int(input()))

a.sort() 

cnt2 = 0
cnt = 1
ans = 0
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
        flg = False

ans += cnt%2
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())

a = np.zeros([100000])
for i in range(N):
    idx = int(input())
    a[idx] += 1
    a[idx] = a[idx]%2
ans = int(np.sum(a))
print(ans)
Problem p03721 (python)

Fixed submission:
n,k = map(int,input().split())
d = []
for _ in range(n):
    d.append(list(map(int,input().split())))
d.sort(key=lambda x: x[0])
count = 0
for x,y in d:
    count += y
    if count >= k:
        break
print(x)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input()split())
d = []
for _ in range(n):
    d.append(list(map(int,input().split())))
d.sort(key=lambda x: x[0])
count = 0
for x,y in d:
    count += y
    if count >= k:
        break
print(x)
Problem p03828 (python)

Fixed submission:
N=int(input())
q=1
t=[0]*N
for i in range(2,N+1):
    s=1
    while i>1:
        s+=1
        while i%s==0:
            i=i//s
            t[s-2]+=1
for j in range(N):
    q=q*(t[j]+1)%(10**9+7)
print(q)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
d = []
for _ in range(n):
    d.append(list(map(int,input().split())))
d.sort(key=lambda x: x[0])
count = 0
for x,y in d:
    count += y
    if count >= k:
        break
print(x)

Buggy submission (verdict: Runtime Error):
N=int(input())
t=[0]*N
for i in range(2,N+1):
    s=1
    while i>1:
        s+=1
        while i%s==0:
            i=i//s
            t[s-2]+=1
for j in range(N):
    q=q*(t[j]+1)%(10**9+7)
print(q)

Buggy submission (verdict: Runtime Error):
N=int(input());t=[0]*N
for i in range(2,N+1):
    s=1
    while i>1:
        s+=1
        while i%s==0:
            i=i//s
            t[s-2]+=1
for j in range(N):
    q=q*(t[j]+1)%(10**9+7)
print(q)
Problem p03243 (python)

Fixed submission:
n = int(input())
i = int(n / 111)
if n % 111 != 0:
    i += 1
print(i * 111)

Buggy submission (verdict: Runtime Error):
number = int(input())
i = int(number / 111)
if number % 111 != 0:
  i += 1
 print(i * 111)
Problem p03243 (python)

Fixed submission:
n=input()
if int(n[0])>int(n[1]):
  out=int(n[0])
elif int(n[0])==int(n[1]):
  if int(n[1])>=int(n[2]):
    out=int(n[0])
  else:
    out=int(n[0])+1
else:
    out=int(n[0])+1
print(str(out)*3)

Buggy submission (verdict: Runtime Error):
n=input()
if int(n[0])>int(n[1]):
  out=int(n[0])
elif int(n[0])==int(n[1]):
  if int(n[1])==int(n[2]):
    out=int(n[0])
  else:
    out=int(n[0]+1)
else:
    out=int(n[0]+1)

print(str(out)*3)
Problem p03852 (python)

Fixed submission:
import sys

vowel="aeiou"
if sys.stdin.readline()[0] in vowel:
    print "vowel"
else:
    print "consonant"

Buggy submission (verdict: Runtime Error):
import sys
H,_=map(int,raw_input().split())
for _ in range(0,H):
    line=sys.stdin.readline()
    print line
    print line
Problem p03853 (python)

Fixed submission:
import sys
H,_=map(int,raw_input().split())
for _ in range(0,H):
    line=sys.stdin.readline()
    print line
    print line

Buggy submission (verdict: Runtime Error):
import sys
H,_=map(int,raw_input().spilt())
for _ in range(0,H):
    line=sys.stdin.readline()
    print line
    print line
Problem p03244 (python)

Fixed submission:
n = int(input())

c = [int(x) for x in input().split()]

even = [[int(x),0] for x in range(10**5+1)]

odd = [[int(x),0] for x in range(10**5+1)]

for i in range(len(c)):
    if i % 2 == 0:
        even[c[i]][1] += 1
    else:
        odd[c[i]][1] += 1

even = sorted(even,key = lambda x:-x[1])
odd = sorted(odd,key = lambda x:-x[1])

if even[0][0] == odd[0][0]:
    print(min(n-even[0][1]-odd[1][1],n-even[1][1]-odd[0][1]))
else:
    print(n-even[0][1]-odd[0][1])

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

c = [int(x) for x in input().split()]

even = [[int(x),0] for x in range(1,10**5+1)]

odd = [[int(x),0] for x in range(1,10**5+1)]

for i in range(len(c)):
    if i % 2 == 0:
        even[c[i]][1] += 1
    else:
        odd[c[i]][1] += 1

even = sorted(even,key = lambda x:-x[1])
odd = sorted(odd,key = lambda x:-x[1])

if even[0][0] == odd[0][0]:
    print(min(n-even[0][1]-odd[1][1],n-even[1][1]-odd[0][1]))
else:
    print(n-even[0][1]-odd[0][1])

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

c = [int(x) for x in input().split()]

even = [[int(x),0] for x in range(1,10**5+1)]

odd = [[int(x),0] for x in range(1,10**5/2+1)]

for i in range(len(c)):
    if i % 2 == 0:
        even[c[i]][1] += 1
    else:
        odd[c[i]][1] += 1

even = sorted(even,key = lambda x:-x[1])
odd = sorted(odd,key = lambda x:-x[1])

if even[0][0] == odd[0][0]:
    print(min(n-even[0][1]-odd[1][1],n-even[1][1]-odd[0][1]))
else:
    print(n-even[0][1]-odd[0][1])

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

c = [int(x) for x in input().split()]

even = [[int(x),0] for x in range(1,10**5/2+1)]

odd = [[int(x),0] for x in range(1,10**5+1/2+1)]

for i in range(len(c)):
    if i % 2 == 0:
        even[c[i]][1] += 1
    else:
        odd[c[i]][1] += 1

even = sorted(even,key = lambda x:-x[1])
odd = sorted(odd,key = lambda x:-x[1])

if even[0][0] == odd[0][0]:
    print(min(n-even[0][1]-odd[1][1],n-even[1][1]-odd[0][1]))
else:
    print(n-even[0][1]-odd[0][1])

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

c = [int(x) for x in input().split()]

even = [[int(x),0] for x in range(1,10**5+1)]

odd = [[int(x),0] for x in range(1,10**5+1)]

for i in range(len(c)):
    if i % 2 == 0:
        even[c[i]][1] += 1
    else:
        odd[c[i]][1] += 1

even = sorted(even,key = lambda x:-x[1])
odd = sorted(odd,key = lambda x:-x[1])

if even[0][0] == odd[0][0]:
    print(min(n-even[0][1]-odd[1][1],n-even[1][1]-odd[0][1]))
else:
    print(n-even[0][1]-odd[0][1])
Problem p03260 (python)

Fixed submission:
A, B=map(int, input(). split())
if A%2==1 and B%2==1:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
A, B=map(int, input(). split())
if A%2==1 and B%2==1:
	print(“Yes”)
else:
	print(“No”)

Buggy submission (verdict: Runtime Error):
A, B=map(int, input(). split())
if A%2==1 and B%2==1:
	print(‘Yes’)
else:
	print(‘No’)

Buggy submission (verdict: Runtime Error):
A, B=map(int, input(). split())
if (A*B)%2==1:
	print(“Yes”)
else:
	print(“No”)

Buggy submission (verdict: Runtime Error):
A, B=map(int, input(). split())
if (A*B)%2==1:
	print(‘Yes’)
else:
	print(‘No’)

Buggy submission (verdict: Runtime Error):
A, B=map(int, input(). split())
if(A*B%==1):
	print(‘Yes’)
else:
	print(‘No’)
Problem p03284 (python)

Fixed submission:
N, K=map(int, input(). split())
if N%K==0:
	print(0)
else:
	print(1)

Buggy submission (verdict: Runtime Error):
N,  K=map(int, input(), split())
if N%K==0:
	print(0)
else:
	print(1)

Buggy submission (verdict: Runtime Error):
N, K=map(int, input(), split())
if N%K==0:
	print(0)
else:
	print(1)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input(),split())
if N%K==0:
	print(0)
else:
	print(1)

Buggy submission (verdict: Runtime Error):
N=int(input()) K=int(input())
if N%K==0:
	print(0)
else:
	print(1)

Buggy submission (verdict: Runtime Error):
N=int(input()) K=int(input))
if N%K==0:
	print(0)
else:
	print(1)
Problem p03251 (python)

Fixed submission:
s=list(map(int,input().split()))
x=list(map(int,input().split()))
y=list(map(int,input().split()))
ma, mi = -10000, 10000
for i in x:
    ma = max(ma, i)
for j in y:
    mi = min(mi, j)
ma = max(ma, s[2])
mi = min(mi, s[3])
if (ma < mi):
    print("No War")
else:
    print("War")

Buggy submission (verdict: Runtime Error):
s=list(map(int,input().split()))
x=list(map(int,input().split()))
y=list(map(int,input().split()))
ma, mi = -100, 100
for i in range(s[0]-1):
    ma = max(ma, x[i])
for j in range(s[1]-1):
    mi = min(mi, y[j])
if (ma < mi and ma < s[3] and ((s[2] < mi <= s[3]) or (mi > s[3] and ma < s[3])):
    print("No War")
else:
    print("War")
Problem p03369 (python)

Fixed submission:
N = list(input().strip(","))

NC = int(N.count("o"))

print(700+NC*100)

Buggy submission (verdict: Runtime Error):


N = map(str,input().split())

NC = int(N.count("o"))

print(700+NC*100)
Problem p03469 (python)

Fixed submission:
# coding: utf-8
import numpy

N = input()
N_list = list(N)
map(str,N_list)
N_list[3] = "8"

ans = ''.join(N_list)
print(ans)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
import numpy

N = input()
N_list = list(N)
map(str,N_list)
aaa = []

aaa = set(N_list)

ans = len(ans) - 1


print(ans)
Problem p03493 (python)

Fixed submission:
# coding: utf-8

N = input()
N_list = list(N)
N_count = N_list.count("1")

if N_count == 0:
	print("0")
elif N_count == 1:
	print("1")
elif N_count == 2:
	print("2")
elif N_count == 3:
	print("3")

Buggy submission (verdict: Runtime Error):
# coding: utf-8

N = input()
array1 = input().split()
array = list(array1)
chk = 0

if (int(array[0])%2) != 0:
	print("0")
else:
	flg = 0
	mini1 = min(array)
	mini = int(mini1)
	while 1:
		if mini%2 != 0:
			break
		mini = mini/2
		flg +=1
		
		if mini == 0:
			break

	print(flg)

Buggy submission (verdict: Runtime Error):
# coding: utf-8

N = input()
array1 = input().split()
#array2 = int(array1)
array = list(array1)
chk = 0

if (int(array[0])%2) != 0:
	print("0")
else:
	flg = 0
	mini1 = min(array)
	mini = int(mini1)
	while 1:
		mini = mini/2
		flg +=1
		if mini%2 !== 0:
			break

	print(flg)

Buggy submission (verdict: Runtime Error):
# coding: utf-8

N = input()
N_list = list(N)
N_len = len(N_list)
N_count = N_list("1")

if N_count ==0:
	print("0")
elif N_count == 1:
	print("1")
elif N_count == 2:
	print("2")
elif N_count == 3:
	print("3")