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

Fixed submission:
import fractions
A,B,C,D=map(int,input().split())
L=C*D//fractions.gcd(C,D)

if A%C!=0 and A%D!=0:
    print((B-A+1)-((B-(A//C+1)*C)//C+1+(B-(A//D+1)*D)//D+1-(((B-(A//L+1)*L)//L)+1)))
elif A%C==0 and A%D!=0:
    print((B-A+1)-(((B-(A//C)*C)//C+1)+((B-(A//D+1)*D)//D+1)-((B-(A//L+1)*L)//L+1)))
elif A%C!=0 and A%D==0:
    print((B-A+1)-((B-(A//C+1)*C)//C+1+(B-(A//D)*D)//D+1-(B-(A//L+1)*L)//L-1))
elif A%C==0 and A%D==0 and A%L==0:
    print((B-A+1)-((B-(A//C)*C)//C+1+(B-(A//D)*D)//D+1-(B-(A//L)*L)//L-1))
elif A%C==0 and A%D==0 and A%L!=0:
    print((B-A+1)-((B-(A//C)*C)//C+1+(B-(A//D)*D)//D+1-(B-(A//L+1)*L)//L-1))

Buggy submission (verdict: Runtime Error):
import fractions
A,B,C,D=map(int,input().split())
L=C*D//fractions.gcd(C,D)

if A%C!=0 and A%D!=0:
    print((B-A+1)-((B-(A//C+1)*C)//C+1+(B-(A//D+1)*D)//D+1-(((B-(A//L+1)*L)//L)+1)))
elif A%C==0 and A%D!=0:
    print((B-A+1)-(((B-(A//C)*C)//C+1)+((B-(A//D+1)*D)//D+1)-((B-(A//L+1)*L)//L+1)))
elif A%C!=0 and A%D==0:
    print((B-A+1)-((B-(A//C+1)*C)//C+1+(B-(A//D)*D)//D+1-(B-(A//L+1)*L)//L-1))
elif A%C==0 and A%D==0 and A%L==0:
    print((B-A+1)-((B-(A//C)*C)//C+1+(B-(A//D)*D)//D++1(B-(A//L)*L)//L-1))
elif A%C==0 and A%D==0 and A%L!=0:
    print((B-A+1)-((B-(A//C)*C)//C+1+(B-(A//D)*D)//D+1+(B-(A//L+1)*L)//L-1))

Buggy submission (verdict: Runtime Error):
import math
A,B,C,D=map(int,input().split())
L=C*D//math.gcd(C,D)

if A%C!=0 and A%D!=0:
    print((B-A+1)-((B-(A//C+1)*C)//C+1+(B-(A//D+1)*D)//D+1-(((B-(A//L+1)*L)//L)+1)))
elif A%C==0 and A%D!=0:
    print((B-A+1)-(((B-(A//C)*C)//C+1)+((B-(A//D+1)*D)//D+1)-((B-(A//L+1)*L)//L+1)))
elif A%C!=0 and A%D==0:
    print((B-A+1)-((B-(A//C+1)*C)//C+1+(B-(A//D)*D)//D+1-(B-(A//L+1)*L)//L-1))
elif A%C==0 and A%D==0 and A%L==0:
    print((B-A+1)-((B-(A//C)*C)//C+1+(B-(A//D)*D)//D++1(B-(A//L)*L)//L-1))
elif A%C==0 and A%D==0 and A%L!=0:
    print((B-A+1)-((B-(A//C)*C)//C+1+(B-(A//D)*D)//D+1+(B-(A//L+1)*L)//L-1))

Buggy submission (verdict: Runtime Error):
import math
A,B,C,D=map(int,input().split())
L=C*D//math.gcd(C,D)

if A%C!=0 and A%D!=0:
    print((B-A+1)-((B-(A//C+1)*C)//C+1+(B-(A//D+1)*D)//D+1-(((B-(A//L+1)*L)//L)+1)))
elif A%C==0 and A%D!=0:
    print((B-A+1)-(((B-(A//C)*C)//C+1)+((B-(A//D+1)*D)//D+1)-((B-(A//L+1)*L)//L+1)))
elif A%C!=0 and A%D==0:
    print((B-A+1)-((B-(A//C+1)*C)//C+1+(B-(A//D)*D)//D+1-(B-(A//L+1)*L)//L-1))
elif A%C==0 and A%D==0 and A%L==0:
    print((B-A+1)-((B-(A//C)*C)//C+1+(B-(A//D)*D)//D++1(B-(A//L)*L)//L-1))
elif A%C==0 and A%D==0 and A%L!=0:
    print((B-A+1)-((B-(A//C)*C)//C+1+(B-(A//D)*D)//D+1+(B-(A//L+1)*L)//L-1))
Problem p02628 (python)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.

Author : Takeshi Saga

"""

import itertools
import numpy as np

tmp = input()
#tmp = "5 3"
N,K = tmp.split()
que = input()
#que = "50 100 80 120 80"
try:
    N = int(N)
except:
    pass
try:
    K = int(K)
except:
    pass



que = [int(x) for x in que.split()]

#print(que)
"""
tmp = []
for x in que:
    for xx in range(K):
        tmp.append(x)
que = tmp
"""
min_val = 999999999

que = sorted(que)

#for x in itertools.combinations(que, K):

x = [que[i] for i in range(K)]
min_val = np.sum(x)

print(min_val)

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

N, K = input()
que = input()
try:
    N = int(N)
except:
    pass
try:
    K = int(K)
except:
    pass



que = [int(x) for x in que.split()]

#print(que)
"""
tmp = []
for x in que:
    for xx in range(K):
        tmp.append(x)
que = tmp
"""
min_val = 999999999

for x in itertools.combinations(que, K):
    tmp = np.sum(x)
    if tmp < min_val:
        min_val = tmp

print(min_val)

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

que = input()

que = [x for x in que.split()]
# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.

Author : Takeshi Saga

"""

import itertools
import numpy as np

N, K = input()
que = input()
try:
    N = int(N)
except:
    pass
try:
    K = int(K)
except:
    pass



que = [int(x) for x in que.split()]

#print(que)
"""
tmp = []
for x in que:
    for xx in range(K):
        tmp.append(x)
que = tmp
"""
min_val = 999999999

for x in itertools.combinations(que, K):
    tmp = np.sum(x)
    if tmp < min_val:
        min_val = tmp

print(min_val)
Problem p02658 (python)

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

ans,flag = 1,0
for elem in sorted(arr):
    ans = ans*elem
    if ans>1e18:
        flag = 1
        break
    if ans==0: break
    
if flag==1: print(-1)
else: print(ans)

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

ans,flag = 1,0
for elem in arr:
  ans = ans*elem
  if ans>1e18:
  	flag=1
    break
    
if flag==1: print(-1)
else: print(ans)
Problem p03262 (python)

Fixed submission:
import fractions
from functools import reduce

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

for i in range(len(a)):
	a[i] = abs(a[i] - x)

print(reduce(fractions.gcd, a))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

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

for i in range(len(a)):
	a[i] = abs(a[i] - x)

print(reduce(math.gcd, a))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

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

ans = []
for i in x:
	ans.append(abs(i - X))

print(reduce(math.gcd, ans))

Buggy submission (verdict: Runtime Error):
import math

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

for i in range(len(arr)):
    arr[i] -= X
    
df = []
for i in range(1, len(arr)):
    df.append(arr[i] - arr[i-1])

if(N == 1):
    df.append(arr[0])

ans = 0
for num in df:
    ans = math.gcd(ans, num)
    
print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

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

for i in range(len(arr)):
    arr[i] -= X
    
df = []
for i in range(1, len(arr)):
    df.append(arr[i] - arr[i-1])

if(N == 1):
    df.append(arr[0])

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

print(gcd_list(df))
Problem p03274 (python)

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

ans = 999999999

for i in range(n - k + 1):
    a = abs(x[i]) + (x[i + k - 1] - x[i])
    b = abs(x[i + k - 1]) + (x[i + k - 1] - x[i])
    ans = min(ans, a, b)
    
print(ans)

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

ans = 999999999

for i in range(n - k + 1):
	if(x[i] <= 0 and x[i + k - 1] >= 0):
    	a = abs(x[i]) + (x[i + k - 1] - x[i])
    	b = abs(x[i + k - 1]) + (x[i + k - 1] - x[i])
    	ans = min(ans, a, b)

print(ans)

Buggy submission (verdict: Runtime Error):

n, k = map(int,input().split())
x = list(map(int, input().split()))

ns = 999999999

for i in range(n - k + 1):
    a = abs(x[i]) + (x[i + k - 1] - x[i])
    b = abs(x[i + k - 1]) + (x[i + k - 1] - x[i])
    ans = min(ans, a, b)
    
print(ans)

Buggy submission (verdict: Runtime Error):
#my answer
n, k = map(int,input().split())
x = list(map(int,input().split()))

ns = 999999999

for i in range(n - k + 1):
    a = abs(x[i]) + (x[i + k - 1] - x[i])
    b = abs(x[i + k - 1]) + (x[i + k - 1] - x[i])
    ans = min(ans, a, b)
    
print(ans)

Buggy submission (verdict: Runtime Error):
#my answer
n, k = map(int,input().split())
li = list(map(int,input().split()))

L = []
R = [0]

for x in li:
    if(x < 0):
        L.append(abs(x))
    elif(x > 0):
        R.append(abs(x))
    else:
        k -= 1
        
x = L + R

l = len(L) - k
if(l < 0):
    l = 0
r = l + k

ans = 99999999;
for i in range(n - k):
    ans = min(ans, x[r]*2 + x[l])
    ans = min(ans, x[l]*2 + x[r])
    r += 1
    l += 1
    
if(k == 1):
    ans = min(x[r], x[r-1])
    
print(ans)

Buggy submission (verdict: Runtime Error):
#my answer
n, k = map(int,input().split())
li = list(map(int,input().split()))

L = []
R = []

for x in li:
    if(x < 0):
        L.append(abs(x))
    elif(x >= 0):
        R.append(abs(x))

x = L + R

l = len(L) - k
if(l < 0):
    l = 0
r = l + k - 1

ans = 99999999;
for i in range(n - k):
    ans = min(ans, x[r]*2 + x[l])
    ans = min(ans, x[l]*2 + x[r])
    r += 1
    l += 1
    
if(k == 1):
    ans = min(x[r], x[r-1])
    
print(ans)

Buggy submission (verdict: Runtime Error):
#my answer
n = int(input())
k = int(input())

L = []
R = []

for i in range(n):
    x = int(input())
    if(x < 0):
        L.append(abs(x))
    elif(x >= 0):
        R.append(abs(x))

x = L + R

l = len(L) - k
if(l < 0):
    l = 0
r = l + k - 1

ans = 99999999;
for i in range(n - k):
    ans = min(ans, x[r]*2 + x[l])
    ans = min(ans, x[l]*2 + x[r])
    r += 1
    l += 1
    
if(k == 1):
    ans = min(x[r], x[r-1])
    
print(ans)
Problem p02613 (python)

Fixed submission:
N = int(input())

import collections
l = []
for n in range(N):
  S = input()
  l.append(S)

c = collections.Counter(l)


print("AC x " + str(c['AC']))
print("WA x " + str(c['WA']))
print("TLE x " + str(c['TLE']))
print("RE x " + str(c['RE']))

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

import collections
l = []
for n in range(N):
  S = input()
  l.append(S)

c = collections.Counter(l)


print("AC x " + c['AC'])
print("WA x " + c['WA'])
print("TLE x " + c['TLE'])
print("RE x " + c['RE'])

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

import collections
l = []
for n in range(N):
  S = input()
  l.append(S)

c = collections.Counter(l)


print("AC x " c['AC'])
print("WA x " c['WA'])
print("TLE x " c['TLE'])
print("RE x " c['RE'])

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

import collections
l = []
for n in range(N):
  S = input()
  l.append(S)

c = collections.Counter(l)


print("AC x "c['AC'])
print("WA x "c['WA'])
print("TLE x "c['TLE'])
print("RE x "c['RE'])
Problem p02657 (python)

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

print(A*B)

Buggy submission (verdict: Runtime Error):
print(A*B)
Problem p02687 (python)

Fixed submission:
S = input()
if S == "ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S = int(input())
if S == "ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S = input()
if S = "ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S = int(input())
if S = "ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S = int(input())
if S = "ABC":
  print("ARC")
else":
  print("ABC")
Problem p02702 (python)

Fixed submission:
S = input()
r = 1
arr = [0]

for c in S[::-1]:
  arr.append((arr[-1] + int(c) * r) % 2019)
  r *= 10
  r %= 2019
from collections import Counter
ctr = Counter(arr)
ans = 0
for v in ctr.values():
  ans += v*(v-1)//2
print(ans)

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

r = 1
arr = [0]
for c in S[::-1]:
  arr.append((arr[-1] + int(c) * r) % 2019)
  r *= 10
  r %= 2019
from collections import Counter
ctr = Counter(arr)
ans = 0
for v in ctr.values():
  ans += v*v(v-1)//2
print(ans)

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

r = 1
 arr = [0]
 for c in S[::-1]:
   arr.append((arr[-1] + int(c) * r) % 2019)
   r *= 10
   r %= 2019
from collections import Counter
ctr = Counter(arr)
ans = 0
for v in ctr.values():
  ans += v*v(v-1)//2
print(ans)
Problem p02713 (python)

Fixed submission:
import math

def gcd(*numbers):
    return reduce(math.gcd, numbers)

K = int(input())

ans = 0
for a in range(1, K+1):
  for b in range(1, K+1):
    for c in range(1, K+1):
      ans += math.gcd(math.gcd(a, b), c)

print(ans)

Buggy submission (verdict: Runtime Error):
import math

def gcd(*numbers):
    return reduce(math.gcd, numbers)

K = int(input())

ans = 0
for a in range(1, K+1):
  for b in range(1, K+1):
    for c in range(1, K+1):
      ans += gcd(a, b, c)

print(ans)
Problem p03355 (python)

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

subs = set()
for i in range(N):
  for j in range(K):
    subs.add(s[i:i+1+j])
  
print(sorted(subs)[K-1])

Buggy submission (verdict: Runtime Error):
import collections
s = input()
K = int(input())

res = [s[i: j] for i in range(len(s)) for j in range(i + 1, len(s) + 1)] 
  
s = list(set(res))
s.sort()
print(s[K-1])
Problem p04045 (python)

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

i = N
while True:
  flg = True
  for j in str(i):
    if int(j) in D:
      flg = False
      break

  if flg == True:
    print(i)
    exit()

  i += 1

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

i = N
while True:
  flg = True
  for j in str(i):
    if int(j) in D:
      flg = False
      break

  if flg == True:
    print(i)
    exit()

  i += 1

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
D = list(map(int, input().split()))
for
ans = ""
for n in str(N):
  a = 0
  while True:
    if int(n) in D:
      n = int(n) + 1
      a = int(n)+1
    else:
      a = int(n)
      ans += str(a)
      break

print(ans)
Problem p02612 (python)

Fixed submission:
import math
N = int(input())
print(1000*math.ceil(N/1000)-N)

Buggy submission (verdict: Runtime Error):
N = int(input())
print(1000*math.ceil(N/1000)-N)
Problem p03337 (python)

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

if  (type(a)==int) and( type(b)==int) and (-1000 <= a and 1000>=a ) and (-1000 <= b and 1000>=b ):
    print(max(a+b,a-b,a*b))

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

if  (type(a)=b==int) and (-1000 <= a=b <=1000):
    print(max(a+b,a-b,a*b))
Problem p03351 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
print("Yes" if abs(a-c)<=d  or  (abs(a-b)<=d and abs(b-c)<=d) else 'No')

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

if a.isdigit() and b.isdigit() and  c.isdigit() and d.a.isdigit():
    if 1<=a<=100 and 1<=b<=100 and 1<=c<=100 and 1<=d<=100:
        if (abs(a-b))>=d and (abs(b-c))>=d:
            print("Yes")
        else:
            print("No")

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

if a.isdigit() and b.isdigit() and  c.isdigit() and d.a.isdigit():
    if 1<=a<=100 and 1<=b<=100 and 1<=c<=100 and 1<=d<=100:
        if (abs(a-b))>=d and (abs(b-c))>=d:
            print("Yes")
        else:
            print("No")
Problem p03456 (python)

Fixed submission:
check = int(input().replace(" ",""))
print("Yes" if (check**0.5)%1==0 else "No" )

Buggy submission (verdict: Runtime Error):
heck = int(input().replace(" ",""))
print("Yes" if (check**0.5)%1==0 else "No" )
Problem p03636 (python)

Fixed submission:
s=input()
print(s[0]+str((len(s)-2))+s[-1])

Buggy submission (verdict: Runtime Error):
 s = input()
print("{}{}{}".format(s[0],len(s)-2,s[-1]))
Problem p04044 (python)

Fixed submission:
n,l = map(int,input().split())
s = sorted([input() for i in range(n)])
print(*s,sep="")

Buggy submission (verdict: Runtime Error):
record = sorted([input() for i in range(int(input().split()[1]))])
print("".join(record))
Problem p02613 (python)

Fixed submission:
listSi = [0,0,0,0]
ic = int(input())
icz = 0
while True:
  icz += 1
  i = input()
  if i == "AC":
    listSi[0] += 1
  elif i == "WA":
    listSi[1] += 1
  elif i == "TLE":
    listSi[2] += 1
  elif i == "RE":
    listSi[3] += 1
  if icz == ic:
    break
print(f"AC x {listSi[0]}")
print(f"WA x {listSi[1]}")
print(f"TLE x {listSi[2]}")
print(f"RE x {listSi[3]}")

Buggy submission (verdict: Runtime Error):
listSi = [0,0,0,0]
i = int(input())
while (i = input()):
    if i == "AC":
        listSi[0] += 1
    elif i == "WA":
        listSi[1] += 1
    elif i == "TLE":
        listSi[2] += 1
    elif i == "RE":
        listSi[3] += 1
print("AC x {listSi[0]}")
print("WA x {listSi[1]}")
print("TLE x {listSi[2]}")
print("RE x {listSi[3]}")
Problem p02612 (python)

Fixed submission:
a=int(input())%1000
if a==0:
  print(0)
else:
  print(1000-a)

Buggy submission (verdict: Runtime Error):
fun main(args:Array<String>) {
var a = readLine()!!.toInt()
var b = a%1000
  if (b==0) {
  println(0)
  }else{
  println(1000-b)
}
}

Buggy submission (verdict: Runtime Error):
a=int(input())%1000
if a=0:
  print(0)
else:
  print(1000-a)
Problem p03433 (python)

Fixed submission:
a=int(input())
b=int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a%500 =< b:
  print("YES")
else:
  print("NO")
Problem p02787 (python)

Fixed submission:
H, N = map(int, input().split())
A = []
B = []
for i in range(N):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
dp = [10000000000] * 10001
dp[0] = 0
for i in range(N):
    for j in range(10001):
        next = min(j + A[i], H)
        dp[next] = min(dp[next], dp[j] + B[i])
print(dp[H])

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<int, int> pint;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
#define IMAX INT_MAX
#define IMIN INT_MIN
#define LMAX LLONG_MAX
#define LMIN LLONG_MIN
template<typename T> inline void chmin(T &a, T b){ if(a > b) a = b; }
template<typename T> inline void chmax(T &a, T b){ if(a < b) a = b; }
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }


int main() {
    int H, N;
    cin >> H >> N;
    int A[N], B[N];
    REP(i, N){
        cin >> A[i] >> B[i];
    }
    ll dp[10001];
    REP(i, 10001) dp[i] = (ll)1e10;
    dp[0] = 0;
    REP(i, N){
        REP(j, 10001){
            int next = min(j + A[i], H);
            dp[next] = min(dp[next], dp[j] + B[i]);
        }
    }
    cout << dp[H] << endl;
    return 0;
}

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<int, int> pint;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
#define IMAX INT_MAX
#define IMIN INT_MIN
#define LMAX LLONG_MAX
#define LMIN LLONG_MIN
template<typename T> inline void chmin(T &a, T b){ if(a > b) a = b; }
template<typename T> inline void chmax(T &a, T b){ if(a < b) a = b; }
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }


int main() {
    int H, N;
    cin >> H >> N;
    int A[N], B[N];
    REP(i, N){
        cin >> A[i] >> B[i];
    }
    ll dp[10001];
    REP(i, 10001) dp[i] = (ll)1e10;
    dp[0] = 0;
    REP(i, N){
        REP(j, 10001){
            int next = min(j + A[i], H);
            dp[next] = min(dp[next], dp[j] + B[i]);
        }
    }
    cout << dp[H] << endl;
    return 0;
}
Problem p03351 (python)

Fixed submission:




a,b,c,d = map(int, input().split())


if abs(c-a) <= d:
    print('Yes')
elif abs(b-a)<=d and abs(c-b)<=d:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):

a=int(input())
b=int(input())
c=int(input())
d=int(input())

if abs(b-a)<d and abs(c-b)<d:
    print("Yes")
else:
    print("No")
Problem p03455 (python)

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


if (a*b)%2 ==0:
    print('Even')
else:
    print('Odd')

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

int(a)
int(b)

if a*b%2 ==0:
    print('Even')
else:
    print('Odd')

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

c=int(a)*int(b)

if c%2 ==0:
    print('Even')
else:
    print('Odd')

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


if (int(a)*int(b))%2 ==0:
    print('Even')
else:
    print('Odd')
Problem p04029 (python)

Fixed submission:




#他人のコピー
n=input()
candy = (1 / 2) * int(n) * (int(n) + 1)
print(int(candy))
#他人のコピー

Buggy submission (verdict: Runtime Error):




#他人のコピー
n=input()
n = int(input())
candy = (1 / 2) * n * (n + 1)
print(int(candy))
#他人のコピー
Problem p02612 (python)

Fixed submission:
n = int(input())
if n%1000 == 0:
    print(0)
else:
    print(1000-n%1000)

Buggy submission (verdict: Runtime Error):
n = input()
if n[-3] == 0:
  print(0)
else:
  print((10-int(n[-3]))**100)
Problem p02628 (python)

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

p.sort()
ans = 0
for i in range(k):
  ans += p[i]
print(ans)

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

p.sort()
ans = 0
for i in range(k):
  ans += p[i]
print(ans)
Problem p02641 (python)

Fixed submission:
x,n = map(int,input().split())
if n != 0:
    p = list(map(int,input().split()))

    num = []
    for i in range(-49,150):
        num.append(abs(x-i))

    for i in range(n):
        num[p[i]+49] = 1000

    min = 1000
    ansnum = -49
    for i in range(len(num)):
        if min > num[i]:
            min = num[i]
            ansnum = i-50

    print(ansnum+1)
else:
    print(x)

Buggy submission (verdict: Runtime Error):
x,n = map(int,input().split())
if n != 0:
    p = list(map(int,input().split()))

    num = []
    for i in range(1,100):
        num.append(abs(x-i))

    for i in range(n):
        num[p[i]-1] = 1000

    min = 1000
    ansnum = 0
    for i in range(len(num)):
        if min > num[i]:
            min = num[i]
            ansnum = i

    print(ansnum+1)
else:
    print(x)
Problem p02658 (python)

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

for i in range(len(a)):
    if a[i] == 0:
        print(0)
        exit()

ans = 1
for i in range(len(a)):
  ans *= a[i]
  if ans > 10**18:
    print(-1)
    exit()

print(ans)

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

ans = 1
for i in range(len(a)):
    ans *= a[i]
    if ans > 10**18:
  	  print(-1)
      exit()

print(ans)

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

ans = 1
for i in range(len(a)):
	if ans > 10**18:
    	print(-1)
        exit()
    else:
    	ans *= a[i]
if ans > 10**18:
	print(-1)
    exit()
print(ans)
Problem p02663 (python)

Fixed submission:
h1,m1,h2,m2,k = map(int,input().split())
if h2 < h1:
    h2 += 24
if m2 < m1:
    m2 += 60
    h2 -= 1
print((h2-h1)*60+m2-m1-k)

Buggy submission (verdict: Runtime Error):
h1,m1,h2,m2,k = map(int,input().split())
if m2 < m1:
	m2 += 60
    h2 -= 1
m = m2-m1
h = h2-h1

if 60*h+m <= k:
	print(60*h+m)
else:
	print(k)
Problem p02681 (python)

Fixed submission:
s = input()
t = input()
l = len(s)
if s[:l]==t[:l]:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
l = len(t)
judge = True
for i in range(l-1):
	if s[i] == t[i]:
    	judge = False
if judge == True:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
l = len(t)
judge = True
for i in range(l-1):
	if s[i] == t[i]:
    	judge = False
if judge == True:
	print('Yes')
else:
	print('No')