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

Fixed submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
 
point_div = abs(a-b)
speed_div = v-w
if speed_div * t >= point_div:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
D=abs(a-b)
if t>=D/(v-w):
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
AV = input().split()
A,V = int(AV[0]), int(AV[1])
BW = input().split()
B,W = int(BW[0]), int(BW[1])
T = int(input())
while True:
    if A+V*T==B+W*T:
        print("YES")
    elif A+V*T=!B+W*T:
        print("NO")
    else:
        break
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())
 
for x in range(N + 1):
    for y in range(N + 1- x):
        z=N - x - y
        if 10000 * x + 5000 * y + 1000 * z == Y:
            print(x,y,z)
            exit()
print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
 
for x in range(N + 1):
    for y in range(N + 1- x):
        if 10000 * x + 5000 * y + 1000 * (N - x - y) == Y:
            print(x,y,z)
            exit()
print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
 
for x in range (N+1):
  for y in range (N+1-x):
    z=N-x-y
    if 10000*x+5000*y+1000*z==Y:
    	print(x,y,z)
        exit()
print(-1,-1,-1)
Problem p03545 (python)

Fixed submission:
def main():
    A, B, C, D = input()
    for i in range(2**3):
        op = ['+', '+', '+']
        for j in range(len(op)):
            if (i >> j) & 1:
                op[j] = '-'
        if eval(A + op[0] + B + op[1] + C + op[2] + D) == 7:
            print(A + op[0] + B + op[1] + C + op[2] + D + '=7')
            break
if __name__  == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
N = int(input())
L0=2
L1=0
if N == 1
　　return L0
elif N == 2:
    return L1
else:
    for i in range(N-2):
            L0, L1 = L1, L0+L1
        return L1
        print()

Buggy submission (verdict: Runtime Error):
A,B,C,D=input()
for i in range(2**3):
	op = ["+","+","+"]
    for j in range(len(op)):
      if (i>>j) & 1:
        op[j]="-"
        




def main():
    A, B, C, D = input()
    for i in range(2**3):
        op = ['+', '+', '+']
        for j in range(len(op)):
            if (i >> j) & 1:
                op[j] = '-'
        if eval(A + op[0] + B + op[1] + C + op[2] + D) == 7:
            print(A + op[0] + B + op[1] + C + op[2] + D + '=7')
            break

    main()
Problem p02584 (python)

Fixed submission:
# -*- coding: utf-8 -*-
x,k,d=map(int,input().split())
m=abs(x)
n=m//d
j=k-n
if j>0:
  if x<0:
    if j%2==0:
      x+=d*n
    else:
      x+=d*(n+1)
  else:
    if j%2==0:
      x-=d*n
    else:
      x-=d*(n+1)
else:
  if x<0:
    x+=d*k
  else:
    x-=d*k
print(abs(x))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
x,k,d=map(int,input().split())
m=abs(x)
if x<0:
  for i in range(k):
    x+=d
    if abs(x)<m:
      m=abs(x)
    else:
      n=k-i
      break
  if n%2==0:
    print(m)
  else:
    print(abs(x))
else:
  for i in range(k):
    x-=d
    if abs(x)<m:
      m=abs(x)
    else:
      n=k-i
      break
  if n%2==0:
    print(m)
  else:
    print(abs(x))
Problem p02630 (python)

Fixed submission:
# -*- coding: utf-8 -*-
n=int(input())
numlista=list(map(int,input().split()))
import collections
numkosuu=collections.Counter(numlista)
suma=0
for i in numlista:
  suma+=i
q=int(input())
for i in range(q):
  b,c=map(int,input().split())
#変化したところのみ計算する
  suma+=(c-b)*numkosuu[b]
#個数を更新する
  numkosuu[c]+=numkosuu[b]
  numkosuu[b]=0
  print(suma)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n=int(input())
numlista=list(map(int,input().split()))
#aの合計を求める(suma)
suma=0
for i in range(n):
  suma+=numlista[i]
#1~10000がそれぞれいくつあるのか調べる(numkosuu)
numkosuu=[]
for i in range(100000):
  numkosuu.append(numlista.count(i+1))
q=int(input())
for i in range(q):
  b,c=map(int,input().split())
#変化量を求める
  k=c-b
  o=numkosuu[b-1]
#変化したところのみ計算する
  suma+=k*o
#個数を更新する
  numkosuu[b]+=numkosuu[b-1]
  numkosuu[b-1]=0
  print(suma)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n=int(input())
numlista=map(int,input().split())
#aの合計を求める
suma=0
for i in range(n):
  suma+=numlista[i]
#
#q=int(input())
#for i in range(q):
#  b,c=int(input().split())
#  k=c-b
print(numlista)
print(suma)
Problem p02601 (python)

Fixed submission:
a, b, c = list(map(int, input().split()))
k = int(input())
while k != 0:
    if b <= a:
        b *= 2
    elif c <= b:
        c *= 2
    else:
        break
    k -= 1
if (b > a) and (c > b):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = list(map(int, input().split))
k = int(input())
while k != 0:
    if b < a:
        b *= 2
    elif c < b:
        c *= 2
    else:
        break
    k -= 1
if (b > a) and (c > b):
    print('Yes')
else:
    print('No')
Problem p02742 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if(a=1 or b=1):
  print(1)
else:
  print(int((a*b)/2)+(a*b)%2)
Problem p02842 (python)

Fixed submission:
a=int(input())
b=1.08
d=int(a/b)
d=d-1
hoge=0
for i in range(4):
  if(int(d*b)==a and hoge==0):
    print(d)
    hoge=1
  d=d+1
if(hoge==0):
  print(":(")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=1.08
d=int(a/b)
d=d-1
hoge=0
for i in range(4):
  if(int(d*c)==a and hoge==0)
    print(a)
    hoge=1
  d=d+1
if(hoge==0):
  print(":(")
Problem p03971 (python)

Fixed submission:
n,nai,out=map(int,input().split())
b=input()
kokunai=0
kaigai=0
for i in range(n):
  if(b[i]=='c'):
    print('No')
  elif(b[i]=='a'):
    if(kokunai+kaigai>=nai+out):
      print('No')
    else:
      kokunai=kokunai+1
      print('Yes')
  else:
    if(kokunai+kaigai>=nai+out or kaigai>=out):
      print('No')
    else:
      print('Yes')
      kaigai=kaigai+1

Buggy submission (verdict: Runtime Error):
n,in,out=map(int,input().split())
b=input()
kokunai=0
kaigai=0
for i in range(n):
  if(b[i]=='c'):
    print('No')
  else if(b[i]=='a'):
    if(kokunai+kaigai>=in+out):
      print('No')
    else:
      kokunai=kokunai+1
      print('Yes')
  else:
    if(kokunai+kaigai>=in+put or kaigai>=out):
      print('No')
    else:
      print('Yes')
Problem p03160 (python)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
dp = [0 for i in range(n)]
dp[1] = abs(l[1]-l[0])
for i in range(2,n):
    dp[i] = min(dp[i-1] + abs(l[i]-l[i-1]),dp[i-2]+abs(l[i]-l[i-2]))
print(dp[-1])

Buggy submission (verdict: Runtime Error):
n,k = map(int , input().split())
l = tuple(map(int , input().split()))
if(k < n):
    dp = [0]*n
    dp[0] = 0
    dp[1] = abs(l[1]-l[0])
    if(n > 2):
        for i in range(2,n):
            min1 = 0
            #print(min1,i)
            for j in range(1,k+1):
                #print(i-j)
                if(i-j >= 0):
                    if(min1 == 0):
                        min1 = dp[i-j]+abs(l[i]-l[i-j])
                        #print(min1,dp[i-j],i-j)
                    else:
                        min1 = min(min1,dp[i-j]+abs(l[i]-l[i-j]))
                        #print(min1)
                else:
                    break
            dp[i] = min1
            #print(dp[i],i)
    
    #print(*dp)
    print(dp[-1])
else:
    print("0")
Problem p02628 (python)

Fixed submission:
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(map(int,input().split)
p.sort(reverse = True)
print(sum(p[:K]))
Problem p02658 (python)

Fixed submission:
N = int(input())
Ai = list(map(int, input().split()))
p = 1
i = 0
if 0 in Ai:
    print("0")
else:
    while i <= N - 1:
        p = p * Ai[i]
        if p > 10 ** 18:
            print("-1")
            break
        if i == N - 1:
            print(p)
            break
        i += 1

Buggy submission (verdict: Runtime Error):
N = int(input())
Ai = list(map(int, input().split()))
p = 1
for i in range(N):
    p = p * Ai[i]
    if p > 10 **18
    	break
if p <= 10 ** 18:
    print(p)
else:
    print("-1")
Problem p02639 (python)

Fixed submission:
lst = list(map(int, input().split()))
for e in range(len(lst)):
    if lst[e] == 0:
        print(e+1)

Buggy submission (verdict: Runtime Error):
lst = list(map(int,input().split()))
for e in range(len(lst)):
    if lst[e] == 0;
        print(lst[e]+1)
Problem p02640 (python)

Fixed submission:
a,b = map(int, input().split())
if a*2 == b or a*4==b:
    print("Yes")
elif b%2==0 and b -2*a >= 0 and 4*a-b>=0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
if a*2 == b or a*4==b:
    print("Yes")
elif b%2==0 and y -2*a >= 0 and 4*a-b>=0:
    print("Yes")
else:
    print("No")
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans = int(1)
for number in A:
  ans *= number
if ans <= 1000000000000000000:
  print(int(ans))  
else:
  print('-1')

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
ans = 1
for number in A:
  ans *= number
if ans <= 1000000000000000000:
  print(ans)
else:
  print('-1')
Problem p02641 (python)

Fixed submission:
X, N = map(int, input().split())
P = list(map(int, input().split()))
Q = [q for q in range(-1, 102) if q not in P]
ans = min(Q, key=lambda q: (abs(q - X), q))
print(ans)

Buggy submission (verdict: Runtime Error):
import copy
import sys
x,n = map(int, input().split())
nums = list(map(int, input().split()))
nums.sort()
if len(nums) == 0:
    print(x)
    sys.exit()
index = nums.index(x)
ind = copy.deepcopy(index)
ans = 0
while True:
    if ind < 0:
        break
    if nums[ind] != x and  nums[ind+1] - nums[ind] > 2:
        ans = nums[ind+1] - 1
        break
    ind -= 1
ind = copy.deepcopy(index)
while True:
    if ind > n-1:
        break
    if nums[ind] != x and  nums[ind] - nums[ind-1] > 2:
        if abs(ans - x) > abs(nums[ind-1] + 1 - x):
            ans = nums[ind-1] + 1
            break
    ind += 1
if index == 0:
    ans = x-1
if index == n - 1:
    if ans != x - 1:
        ans = x + 1
print(ans)

Buggy submission (verdict: Runtime Error):
import copy
import sys
x,n = map(int, input().split())
nums = list(map(int, input().split()))
nums.sort()
if len(nums) == 0:
    print(x)
    sys.exit()
index = nums.index(x)
ind = copy.deepcopy(index)
ans = 0
while True:
    if ind < 0:
        break
    if nums[ind] != x and  nums[ind+1] - nums[ind] > 2:
        ans = nums[ind+1] - 1
        break
    ind -= 1
ind = copy.deepcopy(index)
while True:
    if ind > n-1:
        break
    if nums[ind] != x and  nums[ind] - nums[ind-1] > 2:
        if abs(ans - x) > abs(nums[ind-1] + 1 - x):
            ans = nums[ind-1] + 1
            break
    ind += 1
if index == 0:
    ans = x - 1
if index == n-1:
    if ans != x - 1
    ans = x + 1
print(ans)

Buggy submission (verdict: Runtime Error):
import copy
import sys
x,n = map(int, input().split())
nums = list(map(int, input().split()))
nums.sort()
if len(nums) == 0:
    print(x)
    sys.exit()
index = nums.index(x)
ind = copy.deepcopy(index)
ans = 0
while True:
    if ind < 0:
        break
    if nums[ind] != x and  nums[ind+1] - nums[ind] > 2:
        ans = nums[ind+1] - 1
        break
    ind -= 1
ind = copy.deepcopy(index)
while True:
    if ind > n-1:
        break
    if nums[ind] != x and  nums[ind] - nums[ind-1] > 2:
        if abs(ans - x) > abs(nums[ind-1] + 1 - x):
            ans = nums[ind-1] + 1
            break
    ind += 1
print(ans)
Problem p02885 (python)

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

rest = a - b*2
if rest >-1:
    print(rest)
else:
    print(0)

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

rest = a - b*2
if rest >-1:
    print(rest)
else:
    print(0)
Problem p02888 (python)

Fixed submission:
n = int(input())
list = list(map(int, input().split()))
list.sort()
import bisect
ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        index = bisect.bisect_left(list, list[i]+list[j])
        ans += index - j -1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
list = list(map(int, input().split()))
list.sort()
ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n, reverse=True):
            if list[i] + list[j] <= list[k]:
                break
            ans += 1
print(ans)
Problem p02899 (python)

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

dict = {}
count = 1

for i in list:
    dict[i]= count
    count += 1
for i in range(1, n+1):
    print(dict[i], end = " ")

Buggy submission (verdict: Runtime Error):
dict = {}
for i in list:
    dict[i]= list.index(i)+1
for i in range(1, n+1):
    print(dict[i], end = " ")
Problem p02910 (python)

Fixed submission:
li = list(input())

for i in range(len(li)):
    if i % 2 == 1:
        if li[i] == "R":
            print("No")
            quit()
        else:
            continue
    else:
        if li[i] == "L":
            print("No")
            quit()
        else:
            continue
print("Yes")

Buggy submission (verdict: Runtime Error):
li = list(input())

for i in range(len(li)):
    if i % 2 == 0:
        if len[i] == "R":
            print("No")
            quit()
    else:
        if len[i] == "L":
            print("No")
            quit()
print("Yes")

Buggy submission (verdict: Runtime Error):
li = list(input())

for i in range(len(li)):
    if i % 2 == 0:
        if len[i] = "R":
            print("No")
            quit()
    else:
        if len[i] = "L":
            print("No")
            quit()
print("Yes")
Problem p02995 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
from fractions import gcd
lcm = c * d // gcd(c, d)
def num_of_complements(x,c,d,lcm):
    num = x + x//lcm - x//c - x//d
    return num

ans = num_of_complements(b,c,d,lcm) - num_of_complements(a-1,c,d,lcm)
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
import math

def num_of_complements(x,c,d):
    lcm = c * d // math.gcd(c, d)
    num = x + x//lcm - x//c - x//d
    return num

ans = num_of_complements(b,c,d) - num_of_complements(a-1,c,d)
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
import math
lcm = c * d // math.gcd(c, d)

def num_of_complements(x,c,d):
    num = x + x//lcm - x//c - x//d
    return num

ans = num_of_complements(b,c,d) - num_of_complements(a-1,c,d)
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
import math
lcm = c * d // math.gcd(c, d)
def num_of_complements(x,c,d):

    num = x + x//lcm - x//c - x//d
    return num

ans = num_of_complements(b,c,d) - num_of_complements(a-1,c,d)
print(int(ans))

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
import math
lcm = c * d // math.gcd(c, d)
def num_of_complements(x,c,d):

    num = x + x//lcm - x//c - x//d
    return num

ans = num_of_complements(b,c,d) - num_of_complements(a-1,c,d)
print(int(ans))

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
import math
lcm = c * d // math.gcd(c, d)
def num_of_complements(x,c,d):

    num = x + x//lcm - x//c - x//d
    return num

ans = num_of_complements(b,c,d) - num_of_complements(a-1,c,d)
print(int(ans)))

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
import math
def num_of_complements(x,c,d):
    lcm = c * d // math.gcd(c, d)
    num = x + x//lcm - x//c - x//d
    return num

ans = num_of_complements(b,c,d) - num_of_complements(a-1,c,d)
print(ans)
Problem p03023 (python)

Fixed submission:
N = int(input())
print((N-2)*180)

Buggy submission (verdict: Runtime Error):
N = input()
print((N-2)*180)
Problem p03129 (python)

Fixed submission:

A, B = map(int, input().split())
line = []
for k in range(0,A+1):
    line.append(k)
line = line[1::2]

if len(line) >= B:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
import math
K,A,B = map(int, input().split())
cookie = 0

if K < A + 1 or B - A <  A + 1 or B - A < 2:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)
Problem p03131 (python)

Fixed submission:
import math
K,A,B = map(int, input().split())
cookie = 0

if abs(A-B) <= 1:
    print(K + 1)
elif A > B:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)

Buggy submission (verdict: Runtime Error):
import math
K,A,B = map(int, input().split())
cookie = 0

if K >= A  or B  > 1 + 2A :

    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)
else:
    print(K + 1)

Buggy submission (verdict: Runtime Error):
import math
K,A,B = map(int, input().split())
cookie = 0

if B > 2A :

    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)
else:
    print(K + 1)
Problem p02755 (python)

Fixed submission:
a ,b = list(map(int,(input().split())))
ans = 0
for i in range(1,10000):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    ans = i
    break
  else  :
    ans = -1
    
    
print(ans)

Buggy submission (verdict: Runtime Error):
a,b = list(map(int,(input().split())))
temp_a = int(a/0.08)
temp_b = int(b/0.1)
ans = 0
#print(temp_a,temp_b)
for i in range(min(temp_a,temp_b)/2,max(temp_b,temp_a)+1):
  if  int(i* 0.08) == int(i * 0.1) or temp_a == temp_b:
    ans = i
    break
    
if ans:
  print(ans)
else:
  print(-1)
Problem p02789 (python)

Fixed submission:
a =list(map(int,input().split(' ')))
[print('Yes') if a[0] == a[1] else print('No')]

Buggy submission (verdict: Runtime Error):
a =list(map(int,input().split(' ')))
[print('Yes') if a[0] == a[1] print('No')]
Problem p02911 (python)

Fixed submission:
n, k, q = list(map(int,input().split(' ')))
import numpy as np
point =np.full(n,k-q)
for i in range(q):
  win = int(input())
  point[win-1]+=1
  
  
#print(np.where(point>0,'Yes','No'))
for i in point:
  if i>0:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
n, k, q = list(map(int,input().split(' ')))
import numpy as np
point =np.full(k, n)
for i in range(q):
  point-=1
  point[int(input())-1]+=1

for i in point:
  if i>0:
    print('Yes')
  else:
    print('No')
Problem p02923 (python)

Fixed submission:
#import numpy as np
n = int(input())
h = list(map(int,input().split(' ')))
#h_d = np.diff(h)

ans = 0
ans_a = [0]
#first_h_d = h_d[0]
first_h = h[0]
#print(h_d)
for i in h[1:]:
  #print(first_h,i,first_h >= i)
  if first_h >= i:
    ans+=1
    first_h = i
  else:
    ans_a.append(ans)
 #   print(ans)
    ans = 0
    first_h = i

ans_a.append(ans)

print(max(ans_a))

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
h = list(map(int,input().split(' ')))
h_d = np.diff(h)

ans = 0
ans_a = [0]
first_h_d = h_d[0]

#print(h_d)
for i in h_d:
  if first_h_d <= i and  h_d[0]<= 0 :
    ans+=1
    first_h_d = i
  else:
    ans_a.append(ans)
    ans = 0
    first_h_d = i

print(max(ans_a))

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
h = list(map(int,input().split(' ')))
h_d = np.diff(h)

ans = 0
ans_a = [0]
first_h_d = h_d[0]
#print(h_d)
for i in h_d:
  if first_h_d <= i:
    ans+=1
    first_h_d = i
  else:
    ans_a.append(ans)
    ans = 0
    first_h_d = i
    
    
    
print(max(ans_a))
Problem p03059 (python)

Fixed submission:
n = list(map(int,input().split()))
print(int((n[2]+0.5)/n[0])*n[1])

Buggy submission (verdict: Runtime Error):
import fractions
import itertools
n = int(input())
x = list(map(int,input().split()))
p = list(itertools.combinations(x,2))
ar = []
for n in range(0,len(p)):
	ar.append(fractions.gcd(p[n][0],p[n][1]))
print(max(ar))
Problem p03071 (python)

Fixed submission:
n = input().split()
count = 0
if int(n[0]) > int(n[1]):
  count +=int(n[0])
  if int(n[0])-1 > int(n[1]):
    count +=int(n[0])-1
  else:
    count +=int(n[1])
else:
  count +=int(n[1])
  if int(n[1])-1 > int(n[0]):
	  count +=int(n[1])-1
  else:
	  count +=int(n[0])

print(count)

Buggy submission (verdict: Runtime Error):
n = list(input())
n_size = len(n)
count = 0
#print(n_size)  
new_list = []
new_list.append(int(n[0]))
for i in range(n_size-1):
  if new_list[i] == 0:
    new_list.append(1)
  else:
    new_list.append(0)

#print(new_list)
    
for i in range(n_size):
  if (int(n[i]) != int(new_list[i])):
    count+=1

#print(new_list)    
if n_size == 1:
  print(0)
else:
#  ans = n_size-count    
  print(count)
Problem p03251 (python)

Fixed submission:
N, M, X, Y = list(map(int,input().split(' ')))
x = list(map(int,input().split(' ')))
y = list(map(int,input().split(' ')))

ans = 'War'
for i in range(X+1,Y+1):
  if  max(x) < i <= min(y):
    ans ='No War'
    break
    

print(ans)

Buggy submission (verdict: Runtime Error):
N, M, X, Y = list(map(int,input().split(' ')))
x = list(map(int,input().split(' ')))
y = list(map(int,input().split(' ')))

ans = 'War'
for i in range(X,Y+1):
  if  max(x) < i <= min(y) and X < i <=y:
    ans ='No War'
    break
    

print(ans)
Problem p03324 (python)

Fixed submission:
D,N = list(map(int,input().split(' ')))
#ar = [ar.append(100**D*i) for i in range(1,N+1)
ar = []
if N <100:
  for i in range(1,N+1):
    ar.append(100**D*i)
else:
  for i in range(1,N+2):
    ar.append(100**D*i)
    
  
print(ar[-1])

Buggy submission (verdict: Runtime Error):
D,N = list(map(int,input().split(' ')))
#ar = [ar.append(100**D*i) for i in range(1,N+1)

for i in range(1,N+1):
  ar.append(100**D*i)
 
  
print(ar[-1])
Problem p03556 (python)

Fixed submission:
N = int(input())
import math
for i in range(N,-1,-1):
  sq = math.sqrt(i)
  if sq.is_integer():
    ans = i
    break

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
import math
for i in range(N,1,-1):
  sq = math.sqrt(i)
  if sq.is_integer():
    ans = i
    break

print(ans)
Problem p03796 (python)

Fixed submission:
N  = int(input())
#N = 10**5
p = 1
#x = [p*i for i in range(1,N+1)]
for i in range(1,N+1):
  p =i*p%(10**9+7)
#  print(p)
  
  
  
print(p)

Buggy submission (verdict: Runtime Error):
N  = int(input())
p = 1
for i in range(1,N+1):
  p*=i
  
print(p/(10**9+7)  )
Problem p02853 (python)

Fixed submission:
s = 0
for i in map(int, input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if s== 600000:
    s = 1000000
print(s)

Buggy submission (verdict: Runtime Error):
s = 0
for i in map(int, input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if s== 600000:
    s = 1000000
print(s)

Buggy submission (verdict: Runtime Error):
total = 0
for i in map(int, input().split()):
    if i == 1:
        total=total+300000
    elif i == 2:
        total=total+200000
    elif i == 3:
        total=total+100000
if total==600000:
    total=1000000
print(total)

Buggy submission (verdict: Runtime Error):
n=0
for i in map(int, input().split()):
    if i==1:
        n+= 300000
    elif i==2:
        n+= 200000
    elif i==3:
        n+= 100000
if n==600000:
    n=1000000
print(n)

Buggy submission (verdict: Runtime Error):
total = 0
for i in map(int, input().split()):
    if i == 1:
        total+= 300000
    elif i == 2:
        total+= 200000
    elif i == 3:
        toal+= 100000
if total == 600000:
    total = 1000000
print(total)