qyliang/CodeNanoFix huggingface dataset:
Buggy code:
Y = input()
X = int(Y)
A = (X//500)*1000
B = (X-X//500*500)
print(A+B)


Fixed code:
Y = input()
X = int(Y)
A = (X//500)*1000
B = (X-X//500*500)//5*5
print(A+B)
Buggy code:
X = int(input())
x1 = X%500
x2 = x1%5
print(x1*1000+x2*5)

Fixed code:
X = int(input())
x1 = X//500
x2 = (X%500)//5
print(x1*1000+x2*5)
Buggy code:
x=input()

a=int(x//500)

b=int((x-a)//5)

c=1000*a+5*b

print(c)

Fixed code:
x = int(input())
a = x // 500
b = (x-a*500) // 5
print(a*1000+b*5)
Buggy code:
n = int(input())
m = n%500
print(int((n - m)*1000/ 500 + m*5//5))

Fixed code:
n = int(input())
m = n%500
k = m%5
print(int((n - m)*1000/ 500 + (m - k)*5//5))
Buggy code:
coin_value = [[500, 1000], [5, 5]]
result = 0
x = int(input().strip())
idx = 0
for coin, value in coin_values:
    result += value * (x // coin)
    x = x - x // coin * coin
  
print(result)
  
  

Fixed code:
coin_values = [[500, 1000], [5, 5]]
result = 0
x = int(input().strip())
idx = 0
for coin, value in coin_values:
    result += value * (x // coin)
    x = x - x // coin * coin
  
print(result)
Buggy code:
input_X = int(input())

result_500 = input_X // 500
result_500ureshi = result_500 * 1000
result_5ureshi = (input_X - result_500 * 500) // 5 * 5

print(result_500ureshi)
print(result_5ureshi)
result = int(result_500ureshi + result_5ureshi)
print(result)

Fixed code:
input_X = int(input())

result_500 = input_X // 500
result_500ureshi = result_500 * 1000
result_5ureshi = (input_X - result_500 * 500) // 5 * 5

result = int(result_500ureshi + result_5ureshi)
print(result)
Buggy code:
X = input()

y = X//500
z = X%500
a = z//5 

A = 1000*y+5*a
print(a)

Fixed code:
X = input()
X = int(X)
y = X//500
z = X%500
a = z//5 

A = 1000*y+5*a
print(A)
Buggy code:
X=input()
a=X/500
X%=500
b=X/5
print(1000*a+5*b)

Fixed code:
X=int(input())
a=X//500
X%=500
b=X//5
print(1000*a+5*b)
Buggy code:
x = int(input())

a = x//500
x %= 500
b = x//5

print(a*1000 + b)

Fixed code:
x = int(input())
a = x // 500 * 1000
b = x % 500 // 5 * 5
print(a + b)
Buggy code:

x = int(input())

print(x//500 + x%500//5*5)

Fixed code:
x = int(input())

print(x//500*1000 + x%500//5*5)
Buggy code:
X = int(input())

ans = X // 500
X = X - 500 * ans
ans += X // 5
print(ans)

Fixed code:
X = int(input())

ans = (X // 500) * 1000
X = X - 500 * (X // 500)
ans += (X // 5) * 5
print(ans)
Buggy code:
x = int(input())

ans = x // 500 + (x - (x // 500) * 500) // 5
print(ans)

Fixed code:
x = int(input())

ans = 1000 * (x // 500) + 5 * ((x - (x // 500) * 500) // 5)
print(ans)
Buggy code:
import math

X = int(input())
happy_1000 = X//500
X = math.floor(X/500)
happy_5 = X//5
res = happy_1000*1000 + happy_5*5
print(res)

Fixed code:
import math

X = int(input())
happy_1000 = X//500
X = math.floor(X%500)
happy_5 = X//5
res = happy_1000*1000 + happy_5*5
print(res)
Buggy code:
x = input()

print(x//500*1000 + (x%500)//5*5)

Fixed code:
x = int(input())
 
print(x//500*1000 + (x%500)//5*5)
Buggy code:
s = int(input())
a = s // 500
b = s % 500
c = b // 5
print(a, c)
print(a * 1000 + c * 5)


Fixed code:
s = int(input())
a = s // 500
b = s % 500
c = b // 5
print(a * 1000 + c * 5)
Buggy code:
n=int(input())
print(1000*(n//500) + 5*((n//500)//5))

Fixed code:
n=int(input())
print(1000*(n//500) + 5*((n%500)//5))
Buggy code:

n=int(input())
k=n%500
n -= k*500
n //= 5
print(k*1000+n*5)

Fixed code:
n=int(input())
k=n//500
n -= k*500
n //= 5
print(k*1000+n*5)
Buggy code:
X = int(input())
print(int(X/500)*1000+int((X-500*int(X/500))/500)*5)

Fixed code:
X = int(input())
ans = (X // 500) * 1000
X -= (X // 500) * 500
ans += (X // 5) * 5
print(ans)
Buggy code:
X=int(input()) #1200
a=X//500 #2
b=(X-500*a)//5  #
print(a+b)

Fixed code:
X=int(input()) #1200
a=X//500 #2
b=(X-500*a)//5  #
print(1000*a+5*b)
Buggy code:
n=int(input())
print((n//500)*500+((n%500)//5)*5)

Fixed code:
n=int(input())
print((n//500)*1000+((n%500)//5)*5)
Buggy code:
x=int(input())
n=x//500
m=x%500//5
ans=500*n+5*m
print(ans)


Fixed code:
x=int(input())
n=x//500
m=x%500//5
ans=1000*n+5*m
print(ans)
Buggy code:
import sys
X = sys.stdin.readline()
score = X//500 * 1000
X %= 500
score += X//5 * 5
print(score)

Fixed code:
import sys
X = sys.stdin.readline()
X = int(X)
score = (X//500) * 1000
X %= 500
score += (X//5) * 5
print(score)
Buggy code:
a = int(input())
b = a//500*1000
c = (a%500)/5*5
print(int(b+c))

Fixed code:
a = int(input())
b = a//500*1000
c = (a%500)//5*5
print(int(b+c))
Buggy code:
x = int(input())
print(x//500*500*2+x%500)

Fixed code:
x = int(input())
print(x//500*500*2+x%500//5*5)
Buggy code:
coin = int(input())

happy1 = ( coin // 500 ) * 1000
happy2 = (coin // 500 ) // 5 * 5

print( happy1 + happy2 )

Fixed code:
coin = int(input())
 
happy1 = ( coin // 500 ) * 1000
happy2 = (coin % 500 ) // 5 * 5
 
print( happy1 + happy2 )
Buggy code:
x = int(input())
print(x // 500 * 1000 + x % 500)

Fixed code:
x = int(input())
print(x // 500 * 1000 + (x%500) // 5 * 5)
Buggy code:
import bisect,collections,copy,itertools,math,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
X = I()
_500 = X//500
_nokori = (X%500)//5
print(_nokori)
print(_500*1000+_nokori*5)


Fixed code:
import bisect,collections,copy,itertools,math,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
X = I()
_500 = X//500
_nokori = (X%500)//5
print(_500*1000+_nokori*5)
Buggy code:
x = int(input())
print(x // 500 * 1000 + x // 5 * 5)


Fixed code:
x = int(input())
print(1000*(x//500) + 5*((x-500*(x//500))//5))
Buggy code:
X = int(input())

gh = X//500
g = X%500//5

print(gh * 1000 + g * 1)

Fixed code:
X = int(input())

gh = X//500
g = X%500//5

print(gh * 1000 + g * 5)
Buggy code:
x = int(input())

q1, mod1 = divmod(x, 500)
q2, mod2 = divmod(mod1, 5)

print(mod1*1000 + mod2*5)

Fixed code:
x = int(input())

q1, mod1 = divmod(x, 500)
q2, mod2 = divmod(mod1, 5)

print(q1*1000 + q2*5)
Buggy code:
n = int(input)
print(int(n//500*1000+(n%500)//5*5))

Fixed code:
n=int(input())
ans=1000*(n//500)
n%=500
print(ans+5*(n//5))
Buggy code:
x=int(input())
i=x//500
a=(x-i)//5
print(i*1000+a*5)

Fixed code:
x=int(input())
i=x//500
a=(x-i*500)//5
print(i*1000+a*5)
Buggy code:
x = int(input())
s = 1000*(x//500)+(x%5)//5
print(s)

Fixed code:
x=int(input())
print((x//500)*1000 + (x%500)//5*5)
Buggy code:
x=int(input())
import math
a=x//500
b=(x-a*500)//50
print(1000*a+5*b)

Fixed code:
x=int(input())
import math
a=x//500
b=(x-a*500)//5
print(1000*a+5*b)
Buggy code:
X= int(input())
ans = X // 500 * 1000
X -= X // 500 * 
ans += (X // 5) * 5
print(ans)

Fixed code:
X= int(input())
ans = X // 500 * 1000
X -= X // 500 * 500
ans += (X // 5) * 5
print(ans)
Buggy code:
X = int(input())
 
a = X // 500
b = (X - a * 500) // 5
 
print(a + b)

Fixed code:
X = int(input())

a = X // 500
b = (X-(a*500)) // 5

print(1000 * a + 5 * b)
Buggy code:
x=int(input())
a=x // 500
y=x-500a
b= y // 5
happy = a*1000+b*5
print(happy)

Fixed code:
x=int(input())
a =x // 500
y = x-500*a
b = y // 5
happy = a*1000+b*5
print(happy)
Buggy code:
import sys, re
import math
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

# -*- coding: utf-8 -*-

x = INT()
a = math.floor(x / 500)
b = math.floor((x - (a * 500)) / 5)
print(a)
print(b)
print(a * 1000 + b * 5)

Fixed code:
import sys, re
import math
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

# -*- coding: utf-8 -*-

x = INT()
if x == 0:
    print(0)
else:
    a = math.floor(x / 500)
    b = math.floor((x - (a * 500)) / 5)
    print(a * 1000 + b * 5)
Buggy code:
x=input()
a=x//500*1000
b=x%500//5*5
print(a+b)

Fixed code:
x=int(input())
a=x//500*1000
b=x%500//5*5
print(a+b)
Buggy code:
x=input()
print(((x//500)*1000)+((x%500//5)*5))

Fixed code:
x=int(input())
print(((x//500)*1000)+((x%500//5)*5))
Buggy code:
x=int(input())
(a,b)=divmod(x/500)
print(a*1000+b//5*5)

Fixed code:
x=int(input())
(a,b)=divmod(x,500)
print(a*1000+b//5*5)
Buggy code:
x = int(input())
(x//500)*1000+(x%500//5)*5

Fixed code:
x = int(input())
print((x//500)*1000+(x%500//5)*5)
Buggy code:
x = int(input())

div = x//500
rem = x-div*500
res = div*1000 + (rem//5)*5

Fixed code:
x = int(input())

div = x//500
rem = x-div*500
res = div*1000 + (rem//5)*5

print(res)
Buggy code:
a=int(input())
hp = (a-(a%500))/500
f=(a%500)
ct=int(hp)*1000
ct+=int((f-(a%5))/5)*5

Fixed code:
a=int(input())
hp = (a-(a%500))/500
f=(a%500)
ct=int(hp)*1000
ct+=int((f-(a%5))/5)*5
print(ct)
Buggy code:
n=int(input())
ans += 1000*(n//500)
n=n%500
ans += n//5
print(ans)

Fixed code:
n=int(input())
ans = 1000*(n//500)
n=n%500
ans += 5*(n//5)
print(ans)
Buggy code:
def solve():
  val = int(input())
  print(val/500 * 1000 + (val%500)/5 * 5)
solve()

Fixed code:
def solve():
  val = int(input())
  print(val//500 * 1000 + (val%500)//5 * 5)
solve()
Buggy code:
x = int(input())

c_500 = x // 500
x = c_500 * 500
c_5 = x // 5

print(c_500 * 1000 + c_5 * 5)



Fixed code:
x = int(input())
 
c_500 = x // 500
x = x - c_500 * 500
c_5 = x // 5
 
print(c_500 * 1000 + c_5 * 5)
Buggy code:
X = int(input())
n_500 = X / 500
n_5 = (X % 500) / 5
ans = 1000 * n_500 +  5 * n_5
print(ans)

Fixed code:
X = int(input())
n_500 = X // 500
n_5 = (X % 500) // 5
ans = 1000 * n_500 +  5 * n_5
print(int(ans))
Buggy code:
X=int(input())
print(1000*(X//500)+5*((X-500*A)//5))

Fixed code:
X=int(input())
print(X//500*1000+(X-X//500*500)//5*5)
Buggy code:
s = int(input())
count1=-1
count2=-1
while s>=0:
 s=s-500
 count1=count1 +1
s=s+500
print(count1)
if s==0:
  yasashisa=count1*1000
  print(yasashisa)
else:
   while s >=0:
     s=s-5
     count2=count2 +1
   yasashisa=count1*1000+count2* 5
   print(yasashisa)





Fixed code:
s = int(input())
count1=-1
count2=-1
while s>=0:
 s=s-500
 count1=count1 +1
s=s+500
if s==0:
  yasashisa=count1*1000
  print(yasashisa)
else:
   while s >=0:
     s=s-5
     count2=count2 +1
   yasashisa=count1*1000+count2* 5
   print(yasashisa)
Buggy code:
X = int(input())

count=(X//500)*1000
X=X//500
count+=(X//5)*5

print(count)

Fixed code:
X = int(input())

count=(X//500)*1000
X=X%500
count+=(X//5)*5

print(count)
Buggy code:
Y = int(input())

C500 = Y // 500
C5 = (Y - C500*500) // 5 if (Y - C500*500) // 5>0 else 0

print(C500, C5)
print(C500*1000+C5*5)

Fixed code:
Y = int(input())
 
C500 = Y // 500
C5 = (Y - C500*500) // 5 if (Y - C500*500) // 5>0 else 0

print(C500*1000+C5*5)
Buggy code:
X = int(input())
print(1000*(X//500) + (X%500)//5)


Fixed code:
X = int(input())
print(1000*(X//500) + 5*((X%500)//5))
Buggy code:
x=int(input())
ans=(x//500)*1000
rem=x%500
ans+=(rem//5)*5


Fixed code:
x=int(input())
ans=(x//500)*1000
rem=x%500
ans+=(rem//5)*5
print(ans)
Buggy code:
x = input(int())
a = x//500
b = (x%500)//5
h = a*1000+b*5
print(h)


Fixed code:
x = int(input())
a = x//500
b = (x%500)//5
h = a*1000+b*5
print(h)
Buggy code:
import math;
x = int(input())

q, mod = divmod(x, 500)
mmod = math.floor(mod/5)
print(q, mod, mmod)

ans = 1000*q + 5*mmod
print(ans)

Fixed code:
import math;
x = int(input())

q, mod = divmod(x, 500)
mmod = math.floor(mod/5)
ans = 1000*q + 5*mmod
print(ans)
Buggy code:
x = int(input())
x500 = x / 500
x5 = (x % 500) / 5
print(1000 * x500 + 5 * x5)


Fixed code:
x = int(input())
x500 = x // 500
x5 = (x % 500) // 5
print(1000 * x500 + 5 * x5)
Buggy code:
num = int(input().strip())
ans = 0
ans += (num//500)*1000
num = num%500
ans += (num//5)
print(ans)


Fixed code:
num = int(input().strip())
ans = 0
ans += (num//500)*1000
num = num%500
ans += (num//5)*5
print(ans)
Buggy code:
x = int(input())
ans = 0
ans += (x//500)*1000
x %= 500
ans += x//5
print(ans)

Fixed code:
x = int(input())
ans = 0
ans += (x //500)*1000
x %= 500
ans += (x//5)*5
print(ans)
Buggy code:
X = input()
Y = int(X) / 500
Z = (int(X) - Y * 500) / 5
print(Y * 1000 + Z * 5)

Fixed code:
X = int(input())
Y = X // 500
Z = (X - Y * 500) // 5
print(Y * 1000 + Z * 5)
Buggy code:
a=int(input())
b=a//500
c=(a-b)//5
print(1000*b+5*c)

Fixed code:
a=int(input())
b=a//500
c=(a-b*500)//5
print(1000*b+5*c)
Buggy code:
user = int(input())
c500 = user//500
user -= c500*500
c5 = user/5
ans = (c500*1000)+(c5*5)
print(ans)

Fixed code:
user = int(input())
c500 = user//500
user -= c500*500
c5 = user//5
ans = (c500*1000)+(c5*5)
print(ans)
Buggy code:
#coin : happy
#500 : 1000
#5 : 5
X = int(input())
x500 = X // 500 * 1000
x5 = (X - x500) // 5 * 5
print((x500 + x5)*2)

Fixed code:
#coin : happy
#500 : 1000
#5 : 5
X = int(input())
x500 = X // 500 * 1000
x5 = (X - X // 500 * 500) // 5 * 5
print(x500 + x5)
Buggy code:
# B - Golden Coins
X = int(input())
ans = 1000*(X%500)
X //= 500
ans += 5*(X%5)
print(ans)

Fixed code:
# B - Golden Coins
X = int(input())
ans = 1000*(X//500)
X %= 500
ans += 5*(X//5)
print(ans)
Buggy code:
X = input()
coin500, X = divmod(X, 500)
coin5, X = divmod(X, 5)
print(1000 * coin500 + 5 * coin5)

Fixed code:
X = int(input())
coin500, X = divmod(X, 500)
coin5, X = divmod(X, 5)
print(1000 * coin500 + 5 * coin5)
Buggy code:
n = int(input())
print(n%1000*5+n//500*1000)

Fixed code:
n = int(input())

ans = n // 500 * 1000
n %= 500
ans += n // 5 * 5

print(ans)
Buggy code:
X = int(input())
print(1000 * (X // 500) + 5 * (X - 500 * (X // 500)) // 5)

Fixed code:
X = int(input())
ans = (X // 500) * 1000
X -= X // 500 * 500
ans += (X // 5) * 5
print(ans)
Buggy code:
X=int(input())
print(X//500*1000+(X-X//500)//5*5)


Fixed code:
X=int(input())
print(X//500*1000+(X-X//500*500)//5*5)
Buggy code:
n = int(input())
a = n//500
b = a//5
print(1000*a+b)

Fixed code:
n = int(input())
a = n//500
b = n-500*a
print(a*1000+b//5*5)
Buggy code:
X = int(input())
happy = (X // 500) * 1000 + ((X % 500) // 5) * 5
happy

Fixed code:
X = int(input())
happy = (X // 500) * 1000 + ((X % 500) // 5) * 5
print(happy)
Buggy code:
x = int(input())
a = (x/500)*1000
x -= 500*(x/500)
b = 5*(x/5)
print(a+b)


Fixed code:
x = int(input())
a = x // 500
a1 = a * 500
b = (x - a1) // 5
print(a * 1000 + b * 5)
Buggy code:
x = int(input())
glad = x//*1000 + x%500//5*5
print(glad)


Fixed code:
x = int(input())
glad = x//500*1000 + x%500//5*5
print(glad)
Buggy code:
x = int(input())
res = 1000 * x // 500;
x = x % 500;
x -= x % 5
res += x
print(res)

Fixed code:
x = int(input())
res = 1000 * (x // 500);
x = x % 500;
x -= x % 5
res += x
print(res)
Buggy code:
#!/usr/bin/env python3

x = int(input())
a = x//500
x -= a*500
b = x//5
print(a*1000+b*5)
~                  

Fixed code:
#!/usr/bin/env python3

x = int(input())
a = x//500
x -= a*500
b = x//5
print(a*1000+b*5)
Buggy code:
n = int(input())

div_500, mod_500 = divmod(n,500)
if mod_500 > 0:
    div_5, mod = divmod(mod_500, 5)
    print(div_500*1000 + div_5*5)
else:
    print(div_500*100)

Fixed code:
n = int(input())

div_500, mod_500 = divmod(n,500)
if mod_500 > 0:
    div_5, mod = divmod(mod_500, 5)
    print(div_500*1000 + div_5*5)
else:
    print(div_500*1000)
Buggy code:
X =int(input())
answer = (X//500)*1000+((X%500)//5)*6
print(answer)

Fixed code:
X =int(input())
answer = (X//500)*1000+((X%500)//5)*5
print(answer)
Buggy code:
X = int(input())
print((X // 500) * 1000 + (X % 500) // 5)

Fixed code:
X = int(input())
h = X // 500 * 1000
h += X % 500 // 5 * 5
print(h)
Buggy code:
X = int(input())
print((X // 500) * 1000 + (X // 500) // 5 * 5)


Fixed code:
X = int(input())
print((X // 500) * 1000 + (X % 500) // 5 * 5)
Buggy code:
X=int(input())
g500=X//500
g5=(X%500)//5
print(g500*500+g5*5)

Fixed code:
X=int(input())
g500=X//500
g5=(X%500)//5
print(g500*1000+g5*5)
Buggy code:
def atc_160b(X: int) -> int:
    return X // 500 * 1000 + X % 500 // 5 * 5

X_input = input()
print(atc_160b(X_input))


Fixed code:
def atc_160b(X: int) -> int:
    return X // 500 * 1000 + X % 500 // 5 * 5


X_input = int(input())
print(atc_160b(X_input))
Buggy code:
N = int(input())
A = N//500
B = (N-A)//5
print(A*1000+B*5)

Fixed code:
N = int(input())
A = N//500
B = (N-A*500)//5
print(A*1000+B*5)
Buggy code:
x = int(input())
a = int(x/500)
b = x%500
print(a*1000+b*5)

Fixed code:
x = int(input())

a = x // 500
b = (x % 500) // 5

ans = a * 1000 + b * 5

print(ans)
Buggy code:
X = int(input())
m500 = X // 500
X -= m500 * 500
m5 = X // 5
print(1000 * m500 + 100 * m5)

Fixed code:
X = int(input())
m500 = X // 500
X -= m500 * 500
m5 = X // 5
print(1000 * m500 + 5 * m5)
Buggy code:
X = int(input())
ans = 0
ans += X//500 * 1000
x = x % 500
ans += X // 500 * 5

print(ans)

Fixed code:
x = int(input())
ans = 0
ans += 1000*(x//500)
ans += 5*((x%500)//5)
print(ans)
Buggy code:
x = int(input())

print((x / 500) * 1000 + ((x % 500) / 5) * 5)


Fixed code:
x = int(input())
ans = (x//500)*1000
x%=500
ans += (x//5)*5
print(ans)
Buggy code:
money = int(input())
# 500yen = 1000happy, 5yen = 1happy

n_500 = int(money//500)
n_5 = int((money - 500*n_500)//5)

happiness = 1000 * n_500 + n_5
print(happiness)

Fixed code:
money = int(input())
# 500yen = 1000happy, 5yen = 5happy
 
n_500 = int(money//500)
n_5 = int((money - 500*n_500)//5)

happiness = 1000 * n_500 + 5 * n_5
print(happiness)
Buggy code:
x = int(input())
print((x/500)*1000 + ((x%500)/5)*5)


Fixed code:
x = int(input())
print((x // 500)*1000 + ((x%500)//5)*5)
Buggy code:
x = int(input())
a = int((x//500)*1000)
b = int(((x-(x//500))//5)*5)
print(int(a+b))

Fixed code:
x = int(input())
a = int((x//500)*1000)
b = int(((x-(x//500)*500)//5)*5)
print(int(a+b))
Buggy code:
x = int(input())
a = x//500
b = (x%500)//5
print(a,b)
print(a*1000+b*5)

Fixed code:
x = int(input())
a = x//500
b = (x%500)//5
print(a*1000+b*5)
Buggy code:
X=int(input())
g=X//500
h=X-g
i=h//5
j=1000*g+5*i
input(j)

Fixed code:
X=int(input())
g=X//500
h=X-500*g
i=h//5
j=1000*g+5*i
print(j)
Buggy code:
x = int(input())
ans = 0

ans += (x // 500) * 1000
x -= (x // 500) * 500
print(x, ans)
ans += (x // 5) * 5

Fixed code:
x = int(input())
ans = 0

ans += (x // 500) * 1000
x -= (x // 500) * 500
ans += (x // 5) * 5
print(ans)
Buggy code:
n = int(input())
print(int(n / 500) * 1000 + int((n % 500) / 5))

Fixed code:
n=int(input())
print((n//500)*1000+(n%500//5)*5)
Buggy code:
x = int(input())
t = x//500
f = (x-t)//5
print((t*1000) + (f*5))

Fixed code:
x = int(input())
t = x//500
f = (x-t*500)//5
print((t*1000) + (f*5))
Buggy code:
s = int(input())
res = (s//500*1000) + ((s%500)//5)
print(res)

Fixed code:
s = int(input())
res = (s//500)*1000 + ((s%500)//5)*5
print(res)
Buggy code:
n = int(input())
s=n//500
r=n%500
r=r//5
print(s*1000+r)

Fixed code:
n = int(input())
s=n//500
r=n%500

r=r//5
print(s*1000+r*5)
Buggy code:
x=int(input())

a=x/500
d=x%500
b=d%5

print(a*1000+b*5)

Fixed code:
x=int(input())



a=x//500
d=x%500
b=d//5

print(a*1000+b*5)
Buggy code:
x = int(input())
a = x // 500
b = (x - a * 500) // 5
print(1000*5+5*b)

Fixed code:
x = int(input())
a = x // 500
b = (x - a * 500) // 5
print(1000*a+5*b)
Buggy code:
S = input()

U500 = int(S) // 500
U5 = (int(S) % 500)//5
happy = U500*1000+U5
print(str(happy))

Fixed code:
S = input()

U500 = int(S) // 500
U5 = (int(S) % 500)//5
happy = U500*1000+U5*5
print(str(happy))
Buggy code:
N = int(input())

print(N/500*1000+N%500/5*5)

Fixed code:
N = int(input())
print(N//500*1000+N%500//5*5)
Buggy code:
n = int(input())
a = n // 500
b = (n-n%500) // 5
print(1000 * a + 5 * b)

Fixed code:
n = int(input())
a = n // 500
b = (n-500*a) // 5
print(1000 * a + 5 * b)
Buggy code:
n = int(input())
pl = 0

q, mod = divmod(10, 500)
pl += q * 1000

q, mod = divmod(10, 5)
pl += q * 5

print(pl)


Fixed code:
n = int(input())
pl = 0
 
q, mod = divmod(n, 500)
pl += q * 1000

q, mod = divmod(mod, 5)
pl += q * 5

print(pl)
Buggy code:
x = int(input())

count_a = x // 500
x = x % 10
count_b = x // 5

print(count_a * 1000 + count_b*5)

Fixed code:
x = int(input())

count_a = x // 500
x = x % 500
count_b = x // 5
print(count_a * 1000 + count_b*5)
Buggy code:
a = int(input())
print(a//5*500+a//5*5)

Fixed code:
a = int(input())
print(a//500*500+a//5*5)
Buggy code:
X = int(input())
a = X // 500
X -= a * 500
b = X // 5
print(a,b)
print(a*1000+5*

Fixed code:
X = int(input())
a = X // 500
X -= a * 500
b = X // 5
print(a*1000+5*b)
Buggy code:
X = int(input())import math
X = int(input())
A = X/500
A=math.floor(A)
Q=1000*A
D=A*500
Y=X-D
B = Y/5
B = math.floor(B)
B= 5*B
print(Q+B)

Fixed code:
import math
X = int(input())
A = X/500
A=math.floor(A)
Q=1000*A
D=A*500
Y=X-D
B = Y/5
B = math.floor(B)
B= 5*B
print(int(Q+B))
Buggy code:
def main():
    n = int(input())
    print(n//500+(n%500)//5*5)

if __name__ == "__main__":
    main()

Fixed code:
def main():
    n = int(input())
    print(n//500*1000+(n%500)//5*5)

if __name__ == "__main__":
    main()
Buggy code:
X = int(input())

a = X * 0.01 // 5 

pointa = a * 1000

b = X - a * 500


pointb = b // 5 * 5



print(pointa + pointb)

Fixed code:
X = int(input())

a = X * 0.01 // 5 

pointa = a * 1000

b = X - a * 500


pointb = b // 5 * 5


z = round(pointa + pointb)
print(z)
Buggy code:
X=int(input())
ans=(X-X%500)*2
X=X-X%500
ans=ans+(X-X%5)
print(ans)

Fixed code:
X=int(input())
ans=(X-X%500)*2
X=X%500
ans=ans+(X-X%5)
print(ans)
Buggy code:
X = int(input())
a = X // 500
y = X % 500
b = y // 5
z = y % 5
print(a)
print(y)
print(b)
print(z)
print(a * 1000 + b * 5)

Fixed code:
X = int(input())
a = X // 500
y = X % 500
b = y // 5
z = y % 5
print(a * 1000 + b * 5)
Buggy code:
money = int(input())

gohyakuen = money // 500

goen = (money-(gohyaken*500)) // 5

happy = 1000 * gohyakuen + 5 * goen

print(happy)

Fixed code:
money = int(input())

gohyakuen = money // 500

goen = (money-(gohyakuen*500)) // 5

happy = 1000 * gohyakuen + 5 * goen

print(happy)
Buggy code:
X = int(input())

ans = 0

ans = (X // 500) * 1000
X = X % 500

ans = X // 5

print(ans)

Fixed code:
X = int(input())

ans = 0

ans = (X // 500) * 1000
X = X % 500

ans += (X // 5) * 5

print(ans)
Buggy code:
a=int(input())
k=0
c=a//500
d=a%500
s=d//5
s1=a-d
print(s1*c+s*5)


Fixed code:
a=int(input())
k=0
c=a//500
d=a%500
s=d//5
s1=a-d
print(c*1000+s*5)
Buggy code:
x=int(input())
a=x//500
b=(x-a)//5
print(a*1000+b*5)

Fixed code:
x=int(input())
a=x//500
b=(x-a*500)//5
print(a*1000+b*5)
Buggy code:
X = int(input())

print( (X//500)*1000 + ((X%500)//5)*5 

Fixed code:
X = int(input())

print( (X//500)*1000 + ((X%500)//5)*5 )
Buggy code:
X = int(input())
print(1000*(X//500)+5*((X%500)/5))

Fixed code:
X = int(input())

sum_num = (X//500)*1000
X %= 500
sum_num += (X//5)*5

print(sum_num)
Buggy code:
N = int(input())
a = N // 500
N -= 500 * a
b = N // 5
print(a * 500 + b * 5)

Fixed code:
N = int(input())
a = N // 500
N -= 500 * a
b = N // 5
print(a * 1000 + b * 5)
Buggy code:
x = int(input())
a = x//500
b = (x%500)//50

print(a*1000 + b*5)

Fixed code:
x = int(input())
a = x//500
b = (x%500)//5

print(1000*a + 5*b)
Buggy code:
n=int(input())
d=n//500
e=n%500
f=e//5
print('d*1000 + f*5)


Fixed code:
n=int(input())
d=n//500
e=n%500
f=e//5
print(d*1000+f*5)
Buggy code:
money = int(input())
c_500 = money/500
c_5 = (money%500)/5
print(1000*c_500+5*c_5)

Fixed code:
money = int(input())
c_500 = money//500
c_5 = (money%500)//5
print(1000*c_500+5*c_5)
Buggy code:
x = int(input())

a=0
b=0
aper=0
if x!=0:
    a=x//500
    aper=x%500

if aper != 0:
    b= b/5
    bper = b%5

result = (a * 1000) + (b*5)

print(int(result))


Fixed code:
x = int(input())

a=0
b=0
aper=0
if x!=0:
    a=x//500
    aper=x%500

if aper != 0:

    b= aper//5
    bper = aper%5

result = (a * 1000) + (b*5)

print(int(result))
Buggy code:
X = int(input())

yen500 = X // 500
nokori = X - yen500
yen5 = nokori // 5

print(yen500 * 1000 + yen5 * 5)

Fixed code:
X = int(input())

yen500 = X // 500
nokori = X - yen500 * 500
yen5 = nokori // 5

print(yen500 * 1000 + yen5 * 5)
Buggy code:
# -*- coding: <encoding name> -*-

x = int(input())
print(1000 * (x // 500) + 5 * (x % 500))

Fixed code:
# -*- coding: <encoding name> -*-

x = int(input())
print(1000 * (x // 500) + 5 * (x % 500 // 5))