Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7

###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
for i in range(n):
    sum+=A[i]
sum=sum*sum

s=0
for i in range(n):
    s+=A[i]**2

ans=(sum-j)//2
ans%=J
print(ans)


Fixed submission:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7

###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
for i in range(n):
    sum+=A[i]
sum=sum*sum

s=0
for i in range(n):
    s+=A[i]**2

ans=(sum-s)//2
ans%=J
print(ans)

Buggy python submission (verdict: Runtime Error):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7

###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
for i in range(n):
    sum+=A[i]
    sum%=J 
sum=sum*sum  
sum%=J  
s=0
for i in range(n):
    s+=A[i]**2
    s%=j  
ans=sum-j  
ans%=J  
print(ans)

Fixed submission:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7

###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
for i in range(n):
    sum+=A[i]
sum=sum*sum

s=0
for i in range(n):
    s+=A[i]**2

ans=(sum-s)//2
ans%=J
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7

###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
for i in range(n):
    for j in range(i+1,n):
        sum+=(A[i]*A[j])%J
        sum%=J
print(sum%J)


Fixed submission:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7

###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
for i in range(n):
    sum+=A[i]
sum=sum*sum

s=0
for i in range(n):
    s+=A[i]**2

ans=(sum-s)//2
ans%=J
print(ans)
Buggy python submission (verdict: Runtime Error):
vfrom sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
###############################################################################\
n=int(input())
A=INPUT()
B=[A[0]]

currmax=A[0]
ans=0
for i in range(1,n):
    if A[i]<=currmax:
        ans+=currmax-A[i]
    currmax=max(currmax,A[i])
print(ans)


Fixed submission:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
###############################################################################\
n=int(input())
A=INPUT()
B=[A[0]]

currmax=A[0]
ans=0
for i in range(1,n):
    if A[i]<=currmax:
        ans+=currmax-A[i]
    currmax=max(currmax,A[i])
print(ans)
Buggy python submission (verdict: Runtime Error):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
###############################################################################\
def power(a,p,m):
    res=1
    while(p>0):
        if p&1:
            res=(res*a)%m
        a=(a*a)%m
        p//=2
    return res%m
n=int(input())
s=input()
A=list(int(i) for i in s)
R=[]
for i in range(n-1,-1,-1):
    R.append(A[i])
one=0
for e in A:
    if e==1:
        one+=1
max=one+1
min=one-1
ansmax=0
ansmin=0
#print(one)
for i in range(n):
    ansmax=(ansmax+power(2,i,max)*(R[i]))%max
    ansmin=(ansmin+power(2,i,min)*R[i])%min
def popcount(z):
    ans=0
    while(z!=0):
        if z%2==1:
            ans+=1
        z//=2
    return ans
#print(ansmax,ansmin)
B=[]
for i in range(n):
    if R[i]==1:
        r=(ansmin-power(2,i,min))%min
        count=1
        while(r!=0):
            count+=1
            r=r%popcount(r)
        B.append(count)
        #print(count)
    else:
        r=(ansmax+power(2,i,max))%max
        count=1
        while(r!=0):
            count+=1
            r=r%popcount(r)
        B.append(count)
B.reverse()
for ele in B:
    print(ele)


Fixed submission:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
###############################################################################\
def power(a,p,m):
    if m==0:
        return 0
    res=1
    while(p>0):
        if p&1:
            res=(res*a)%m
        a=(a*a)%m
        p//=2
    return res%m
n=int(input())
s=input()
A=list(int(i) for i in s)
R=[]
for i in range(n-1,-1,-1):
    R.append(A[i])
one=0
for e in A:
    if e==1:
        one+=1
max=one+1
min=one-1
ansmax=0
ansmin=0
#print(one)
for i in range(n):
    ansmax=(ansmax+power(2,i,max)*(R[i]))%max
    if min!=0:
        ansmin=(ansmin+power(2,i,min)*R[i])%min
def popcount(z):
    ans=0
    while(z!=0):
        if z%2==1:
            ans+=1
        z//=2
    return ans
#print(ansmax,ansmin)
B=[]
for i in range(n):
    if R[i]==1:
        if min!=0:
            r=(ansmin-power(2,i,min))%min
            count=1
            while(r!=0):
                count+=1
                r=r%popcount(r)
        else:
            count=0
        B.append(count)
    else:
        r=(ansmax+power(2,i,max))%max
        count=1
        while(r!=0):
            count+=1
            r=r%popcount(r)
        B.append(count)
B.reverse()
for ele in B:
    print(ele)
Buggy python submission (verdict: Runtime Error):
INT_MAX=10**11+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
#=======================================================================
h1,s1,h2,s2=INPUT()
while(h1>0 and h2>0):
    h2-=s1
    if h2<=0:
        print("Yes")
        break
    h1-=s2
    if h1<=0:
        print("No")
        break
        


Fixed submission:
INT_MAX=10**11+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
#=======================================================================
h1,s1,h2,s2=INPUT()
while(h1>0 and h2>0):
    h2-=s1
    if h2<=0:
        print("Yes")
        break
    h1-=s2
    if h1<=0:
        print("No")
        break
Buggy python submission (verdict: Runtime Error):
INT_MAX=10**11+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
#=======================================================================
# Python 3 implementation of the approach

# Function to return the count of sub-strings
# of str that are divisible by k
def countSubStr(str, l, k):
	count = 0

	for i in range(l):
		n = 0

		# Take all sub-strings starting from i
		for j in range(i, l, 1):
			n = n * 10 + (ord(str[j]) - ord('0'))

			# If current sub-string is divisible by k
			if (n % k == 0):
				count += 1
            n=n%2019



	# Return the required count

	return count

# Driver code
if __name__ == '__main__':
	str = input()
	l = len(str)
	k = 2019
	print(countSubStr(str, l, k))

# This code is contributed by
# Sanjit_Prasad


Fixed submission:
INT_MAX=10**11+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
#=======================================================================
s=input()
digits=list(int(i) for i in s)
n=len(s)
powermod=[0]*2019
powermod[0]=1
pow10=1
num=0
ans=0
for digit in reversed(digits):
    num+=digit*pow10
    rem=num%2019
    ans+=powermod[rem]
    pow10*=10
    powermod[rem]+=1
    num=rem
    pow10%=2019
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
INT_MAX=10**11+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
#=======================================================================
# Python 3 implementation of the approach

# Function to return the count of sub-strings
# of str that are divisible by k
def countSubStr(str, l, k):
	count = 0

	for i in range(l):
		n = 0

		# Take all sub-strings starting from i
		for j in range(i, l, 1):
			n = n * 10 + (ord(str[j]) - ord('0'))

			# If current sub-string is divisible by k
			if (n % k == 0):
				count += 1

	# Return the required count
	return count

# Driver code
if __name__ == '__main__':
	str = input()
	l = len(str)
	k = 2019
	print(countSubStr(str, l, k))

# This code is contributed by
# Sanjit_Prasad


Fixed submission:
INT_MAX=10**11+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
#=======================================================================
s=input()
digits=list(int(i) for i in s)
n=len(s)
powermod=[0]*2019
powermod[0]=1
pow10=1
num=0
ans=0
for digit in reversed(digits):
    num+=digit*pow10
    rem=num%2019
    ans+=powermod[rem]
    pow10*=10
    powermod[rem]+=1
    num=rem
    pow10%=2019
print(ans)
Buggy python submission (verdict: Runtime Error):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys
#####################################
a,b=INPUT()
if a>=2*b:
    print(a-2b)
else:
    print(0)


Fixed submission:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys
#####################################
a,b=INPUT()
if a>=2*b:
    print(a-2*b)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import bisect
#=================================================#
n=int(int(input()))
A=INPUT()
A.sort()
i=0
j=i+1
ans=0
while(i<n-2):
    k=j+1
    while(k<n and A[k]<(A[i]+A[j])):
        k+=1
    ans+=k-j-1
    j+=1
    if j>=n:
        i+=1
        j=i+1
print(ans)


Fixed submission:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import bisect
#####################################
n=int(input())
A=INPUT()
A.sort()
ans=0
for i in range(n):
    for j in range(i+1,n):
        ans+=bisect.bisect_left(A,A[i]+A[j],0,n)-1-j
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
dp=[[[] for i in range(3000)] for j in range(3000)]
n=int(input())
A=list(int(i) for i in input().split())
#dp=[[[] for i in range(n)] for j in range(n)]
for i in range(n-1,-1,-1):
    for j in range(i,n):
        if i<=j:
            if i==j:
                dp[i][j].append(A[i])
                dp[i][j].append(-A[i])
            else:
                dp[i][j].append(max(A[i]+dp[i+1][j][1],A[j]+dp[i][j-1][1]))
                dp[i][j].append(min(-A[i]+dp[i+1][j][0],-A[j]+dp[i][j-1][0]))
print(dp[0][n-1][0])


Fixed submission:
#dp=[[ for i in range(3000)] for j in range(3000)]
n=int(input())
A=list(int(i) for i in input().split())
dp=[[0 for i in range(n)] for j in range(n)]
for i in range(n-1,-1,-1):
    for j in range(i,n):
        if i==j:
            dp[i][j]=A[i]
        else:
            dp[i][j]=max(A[i]-dp[i+1][j],A[j]-dp[i][j-1])
print(dp[0][-1])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
A=list(int(i) for i in input().split())
dp=[[[0,0] for i in range(n)] for j in range(n)]
for i in range(n-1,-1,-1):
    for j in range(i,n):
        if i<=j:
            if i==j:
                dp[i][j][0]=A[i]
                dp[i][j][1]=-A[i]
            else:
                dp[i][j][0]=max(A[i]+dp[i+1][j][1],A[j]+dp[i][j-1][1])
                dp[i][j][1]=min(-A[i]+dp[i+1][j][0],-A[j]+dp[i][j-1][0])
print(dp[0][-1][0])


Fixed submission:
#dp=[[ for i in range(3000)] for j in range(3000)]
n=int(input())
A=list(int(i) for i in input().split())
dp=[[0 for i in range(n)] for j in range(n)]
for i in range(n-1,-1,-1):
    for j in range(i,n):
        if i==j:
            dp[i][j]=A[i]
        else:
            dp[i][j]=max(A[i]-dp[i+1][j],A[j]-dp[i][j-1])
print(dp[0][-1])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
A=list(int(i) for i in input().split())
dp=[[[0,0] for i in range(n)] for j in range(n)]
for i in range(n-1,-1,-1):
    for j in range(n):
        if i<=j:
            if i==j:
                dp[i][j][0]=A[i]
                dp[i][j][1]=-A[i]
            else:
                dp[i][j][0]=max(A[i]+dp[i+1][j][1],A[j]+dp[i][j-1][1])
                dp[i][j][1]=min(-A[i]+dp[i+1][j][0],-A[j]+dp[i][j-1][0])
print(dp[0][-1][0])


Fixed submission:
#dp=[[ for i in range(3000)] for j in range(3000)]
n=int(input())
A=list(int(i) for i in input().split())
dp=[[0 for i in range(n)] for j in range(n)]
for i in range(n-1,-1,-1):
    for j in range(i,n):
        if i==j:
            dp[i][j]=A[i]
        else:
            dp[i][j]=max(A[i]-dp[i+1][j],A[j]-dp[i][j-1])
print(dp[0][-1])
Buggy python submission (verdict: Time Limit Exceeded):
def calc(A,n,dp):
    if n==2:
        return A[0]+A[1]
    s=10**18
    for i in range(0,n-1):
        B=[]
        B=A[0:i]
        B.append(A[i]+A[i+1])
        B=B+A[i+2:]
        l=str(B)
        if l in dp:
            s=min(s,A[i]+A[i+1]+dp[l])
        else:
            d=calc(B,n-1,dp)
            s=min(s,A[i]+A[i+1]+d)
            dp[l]=d

    return s
n=int(input())
A=list(int(i) for i in input().split())
dp={}
print(calc(A,n,dp))
#for i in range(n):


Fixed submission:
n=int(input())
A=list(int(i) for i in input().split())
prefixsum=[0 for i in range(n+1)]
for i in range(1,n+1):
    prefixsum[i]=A[i-1]+prefixsum[i-1]
#print(prefixsum)
dp=[[0 for i in range(n)] for j in range(n)]
for i in range(n-1,-1,-1):
    for j in range(i,n):
        #starting index i and ending j
        #finally we need to print first row last column
        #which represent the cost of all the elements
        if i==j:
            dp[i][j]=0
        else:
            dp[i][j]=10**18
            for k in range(i,j):
                dp[i][j]=min(dp[i][j],dp[i][k]+dp[k+1][j]+prefixsum[j+1]-prefixsum[i])
print(dp[0][-1])
Buggy python submission (verdict: Runtime Error):
#include <iostream>
using namespace std;

int main()
{
    long long A, B;
    cin >> A >> B;
    long long ans = A;
    if (A != B)
    {
        for (long long i = A + 1; i <= B; i++)
        {
            ans ^= i;
        }
    }
    cout << ans << endl;
}

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


def xor(n):
    m = 0
    if n % 4 == 0:
        m = n
    elif n % 4 == 1:
        m = 1
    elif n % 4 == 2:
        m = n + 1
    return m


p = xor(A-1)
q = xor(B)
print(p ^ q)

Buggy python submission (verdict: Runtime Error):
#include <iostream>
using namespace std;

int main()
{
    long long A, B;
    cin >> A >> B;
    long long ans = A;
    for (long long i = A + 1; i <= B; i++)
    {
        ans ^= i;
    }
    cout << ans << endl;
}

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


def xor(n):
    m = 0
    if n % 4 == 0:
        m = n
    elif n % 4 == 1:
        m = 1
    elif n % 4 == 2:
        m = n + 1
    return m


p = xor(A-1)
q = xor(B)
print(p ^ q)

Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int, input().split())
ans = A
for i in range(A+1, B+1):
    ans = ans ^ i
print(ans)


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


def xor(n):
    m = 0
    if n % 4 == 0:
        m = n
    elif n % 4 == 1:
        m = 1
    elif n % 4 == 2:
        m = n + 1
    return m


p = xor(A-1)
q = xor(B)
print(p ^ q)

Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int, input().split())
bin_nums = []
binB = bin(B)[2:]
for x in range(A, B+1):
    binx = bin(x)[2:]
    if len(binx) < len(binB):
        binx = '0' * (len(binB) - len(binx)) + binx
    bin_nums.append(binx)
ans = ''
for i in range(len(binB)):
    c1 = 0
    for j in range(len(bin_nums)):
        if bin_nums[j][i] == '1':
            c1 += 1
    if c1 % 2 == 0:
        ans += '0'
    else:
        ans += '1'
print(int(ans, 2))


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


def xor(n):
    m = 0
    if n % 4 == 0:
        m = n
    elif n % 4 == 1:
        m = 1
    elif n % 4 == 2:
        m = n + 1
    return m


p = xor(A-1)
q = xor(B)
print(p ^ q)
Buggy python submission (verdict: Runtime Error):
#include <iostream>
using namespace std;

int main() {
    int A, B;
    cin >> A >> B;
    if (B % A == 0) cout << (A+B) << endl;
    else cout << (B-A) << endl;
}


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

if (B % A == 0):
    print(A+B)
else:
    print(B-A)

Buggy python submission (verdict: Runtime Error):
#include <iostream>
using namespace std;

int main() {
    int A, B;
    cin >> A >> B;
    if (B % A == 0) cout << A+B << endl;
    else cout << B-A << endl;
}


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

if (B % A == 0):
    print(A+B)
else:
    print(B-A)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    D, N = list(map(int, input().split()))
    mod = 100 ** D
    cnt = 0
    i = 1
    while True:
        if i % 100 == 0:
            continue
        if i % mod == 0:
            cnt += 1
        if cnt == N:
            print(i)
            break
        i += 1


if __name__ == "__main__":
    main()


Fixed submission:
D, N = map(int, input().split())
if N < 100:
    print(N * (100**D))
else:
    print(101 * (100**D))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    D, N = list(map(int, input().split()))
    mod = 100 ** D
    cnt = 0
    i = 1
    while True:
        if i == mod:
            continue
        if i % mod == 0:
            cnt += 1
        if cnt == N:
            print(i)
            break
        i += 1


if __name__ == "__main__":
    main()


Fixed submission:
D, N = map(int, input().split())
if N < 100:
    print(N * (100**D))
else:
    print(101 * (100**D))
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    A, B, K = map(int, input().split())
    all_nums = [x for x in range(A, B+1)]
    cond_nums = all_nums[:K]
    for n in all_nums[-K:]:
        if n not in cond_nums:
            cond_nums.append(n)
    for x in cond_nums:
        print(x)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    A, B, K = map(int, input().split())
    if B - A + 1 <= 2 * K:
        for i in range(A, B+1):
            print(i)
    else:
        for i in range(K):
            print(A+i)
        for i in range(K):
            print(B-K+1+i)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    A, B, C, D = map(int, input().split())
    print(min(A, B) + min(C, D))


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    A, B, C, D = [int(input()) for _ in range(4)]
    print(min(A, B) + min(C, D))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
n,a=map(int, input().split());print(n**2-a)

Fixed submission:
n,a=[int(input()) for _ in range(2)];print(n**2-a)
Buggy python submission (verdict: Runtime Error):
print(int(input())-int(input()))

Fixed submission:
x,t=map(int,input().split());print(max(x-t,0))
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = sorted([int(input()) for _ in range(N)])
print(a[-1]-a[0N = int(input())
a = map(int, input().split())
a = sorted(a)
print(a[-1]-a[0])

Fixed submission:
N = int(input())
a = map(int, input().split())
a = sorted(a)
print(a[-1]-a[0])

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = sorted([int(input()) for _ in range(N)])
print(a[-1]-a[0])

Fixed submission:
N = int(input())
a = map(int, input().split())
a = sorted(a)
print(a[-1]-a[0])

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = sorted([int(input()) for _ in range(N)])
print(a[-1]-a[0])

Fixed submission:
N = int(input())
a = map(int, input().split())
a = sorted(a)
print(a[-1]-a[0])
Buggy python submission (verdict: Runtime Error):
a,b=input().split()
if a > b:
  print('GREATER')
elif a == b:
  print('EQUAL')
else:
  print('LESS')

Fixed submission:
a, b = [int(input()) for _ in range(2)]
if a > b:
    print('GREATER')
elif a == b:
    print('EQUAL')
else:
    print('LESS')
Buggy python submission (verdict: Time Limit Exceeded):
K, S = list(map(int, input().split()))

ans = 0
for x in range(0, K+1):
    for y in range(0, K+1):
        for z in range(0, K+1):
            if x + y + z == S:
                ans += 1
print(ans)


Fixed submission:
K, S = map(int, input().split())
ans = 0
for x in range(0, K+1):
    for y in range(0, K+1):
        z = S - x - y
        if 0 <= z <= K:
            ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
print(eval(input))

Fixed submission:
print(eval(input()))
Buggy python submission (verdict: Runtime Error):
n, k, x, y = [int(input()) for _ in range(4)]
ans = k * x + max(n-k, 0) * y
print(ans)
n, k, x, y = [int(input()) for _ in range(4)]
if k < n:
    ans = k * x + (n-k) * y
else:
    ans = n * x
print(ans)


Fixed submission:
n, k, x, y = [int(input()) for _ in range(4)]
if k < n:
    ans = k * x + (n-k) * y
else:
    ans = n * x
print(ans)