TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
s=input()
if s[2]==s[3] and s[4]==s[5]:print("Yes")
else :print("No")

i=int(input())
gohyaku = i // 500
go = (i % 500) // 5
print(int(gohyaku*1000+go*5))

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X=int(input())
a=X/500
X%=500
b=X/5
print(1000*a+5*b)

X=input()
a=X/500
X%=500
b=X/5
print(1000*a+5*b)

X=int(input())
a=X//500
X%=500
b=X//5
print(1000*a+5*b)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X=int(input())
print(1000*(X//500)+5*((X-500*A)//5))

X=int(input())
A=X//500
B=(X-500*A)//5
print(1000*A+5*B)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
res = 1000 * x // 500;
x = x % 500;
x -= x % 5
res += x
print(res)

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
a = 500
b = 5
q = x // a
mod = x % a
if q > 0:
  c = q * 1000
elif mod // b > 0:
  d = (mod // b) * 5
  print('c + d')
else:
  print('0')

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


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

x = int(input())
a = 500
b = 5
q = x // a
mod = x % a
if q > 0:
  c = q * 1000
elif mod // b > 0:
  d = (mod // b) * 5
  print('c + d')
  exit()

x = int(input())
a = 500
b = 5
q = x//a
mod = x%a
if q > 0:
  c = q * 1000
elif mod // b > 0:
  d = (mod // b) * 5
  print(c + d)
else:
  print('0')
  

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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())
print((X // 500) * 1000 + (X % 500) // 5)

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
import sys
X = sys.stdin.readline()
score = X//500 * 1000
X %= 500
score += X//5 * 5
print(score)

import sys
X = sys.stdin.readline()
X = int(X)
score = (X//500) * 1000
X %= 500
score += (X//5) * 5
print(score)


Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
inp = input()
inp = int(float(inp))
aaa =0
bbb =0
nega = 0
big = 0

if 0 <= inp and inp <= 10**9:
  if 500 <= inp:
    big = (inp // 500)
    sma = big % 500
    if 5 <= sma:
      nega = (sma // 5)
      
  aaa = 1000*big
  bbb = 5*nega
  print(aaa + bbb)
else:
  print(0)
      

inp = input()
inp = int(float(inp))
aaa = 0
bbb = 0
yyy = 0

if 0 <= inp and inp <= 10**9:
  if 500 <= inp:
    big = inp // 500
    aaa = big * 1000
    amari = inp % 500
    if 5 <= amari:
      smo = amari //5
      bbb = smo *5
    print(aaa+bbb)
  else if 5 <= inp:
    hhh = inp // 5
    yyy = hhh * 5
    print(yyy)
else:
  print(0)

inp = input()
inp = int(float(inp))
aaa =0
bbb =0
nega = 0
big = 0

if 0 <= inp and inp <= 10**9:
    if 500 <= inp:
        big = (inp // 500)
        sma = big % 500
        if 5 <= sma:
          nega = (sma // 5)
      
        aaa = 1000*big
        bbb = 5*nega
        print(aaa + bbb)
    elif 5 <= inp:
        nega = (inp // 5)
        bbb = 5*nega
        print(bbb)
else:
    print(0)
      

inp = input()
inp = int(float(inp))
aaa = 0
bbb = 0
yyy = 0

if 0 < inp and inp <= 10**9:
  if 500 <= inp:
    big = inp // 500
    aaa = big * 1000
    amari = inp % 500
    if 5 <= amari:
      smo = amari //5
      bbb = smo *5
    print(aaa+bbb)
  elif 5 <= inp:
    hhh = inp // 5
    yyy = hhh * 5
    print(yyy)
else:
  print(0)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
waru_500 = x // 500
amari = x % 500
waru_5 = amari // 5

print(waru_500 + waru_5)

x = int(input())

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

print(a * 1000 + b * 5)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
print((x/500)*1000 + ((x%500)/5)*5)


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


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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
a = int("1000000000")
result = 0

result = int(a/500) * 1000
b = a % 500
result += int(b/5) * 5

print(result)

a = int(input())
result = 0

result = int(a/500) * 1000
b = a % 500
result += int(b/5) * 5

print(result)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())

q_1 = x//500
r_1 = x%500

r_2 = r_1//5

print(r_1*1000+r_2*5)

x = int(input())

q_1 = x//500
r_1 = x%500

q_2 = r_1//5

print(q_1*1000+q_2*5)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
# coding: utf-8
# Your code here!
I =int(input())


if I ==0:
    print(I)
    
if I>=500:
    J=I//500
    
    K=J*500*2#
    print(K)
    
    P=I-500*J
    if K==0:
        print(K)
    
    if P>=5:
        Q=P//5
        R=Q*5#
        
        A=K+R
        print(A)

if I<500:
        M=I//5
        A=M*5#
        
        
        print(A)

# coding: utf-8
# Your code here!
I =int(input())


# if I ==0:
#     print(I)
    
if I>=500:
    J=I//500
    
    K=J*500*2#
    
    
    P=I-500*J
    if P==0:
        print(K)
    
    if P>=5:
        Q=P//5
        R=Q*5#
        
        A=K+R
        print(A)

if I<500:
        M=I//5
        A=M*5#
        
        
        print(A)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
five_hundred = int(X / 500)
five = int((X - five_hundred*500)/5)
print(five_hundred*1000+five*5)

five_hundred = int(X / 500)
five = int((X - five_hundred*500)/5)
print(five_hundred*1000+five*5)

X = int(input())

five_hundred = int(X / 500)
five = int((X - five_hundred*500)/5)
print(five_hundred*1000+five*5)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
N = int(input())
a = N // 500
N -= 500 * a
b = N // 5
print(a * 500 + b * 5)

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


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())

ans = 0
ans += (X // 500) * 1000
ans += ((X % 500) // 5) * 5


X =  int(input())

ans = 0
ans += (X // 500) * 1000
ans += ((X % 500) // 5) * 5
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
i=int(input())

print((i//500)*1000+(i-(i//500*500)//5*5))


i=int(input())

print((i//500)*1000+((i-(i//500*500))//5*5))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = input()
big = x // 500
small = x % 500 // 5
grace = big + small
print(grace)

x = int(input())
big = x // 500
small = x % 500 // 5
grace = big + small
print(grace)

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):

s = int(input())

print(int(s / 500) * 1000) + (int(s % 10 / 5) * 5)


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

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())

a = x//500
b = x-(a*500)
c = b//5
print(sum((a*1000)+(c*5)))


x = int(input())

a = x//500
b = x-(a*500)
c = b//5
d = (a*1000)+(c*5)
print(d)


Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
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)

import math;
x = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
glad = x//*1000 + x%500//5*5
print(glad)


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


Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
import math
x = int(input())

a = math.floor(x/500)
a_1000 = a*1000
print(a)

amari = x % 500
b = math.floor(amari/5)
b_5 = b*5
print(amari)
###
print(a_1000 + b_5)

import math
x = int(input())

a = math.ceil(x/500)
a_1000 = a*1000

amari = x % 500
b_5 = amari*5
###
print(a_1000 + b_5)


import math
x = int(input())

a = math.floor(x/500)
a_1000 = a*1000

amari = x % 500
b = math.floor(amari/5)
b_5 = b*5
###
print(a_1000 + b_5)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())
tmp = 0

if X >= 500:
    tmp = X // 500 * 1000

if 5 <= X < 500:
    tmp += X // 5 * 5

print(tmp)    

X = int(input())
tmp = 0

if X >= 500:
    tmp += (X // 500) * 1000
    X = X % 500

if 5 <= X < 500:
    tmp += (X // 5) * 5

print(tmp)

        
    

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())

print((X//5)*5)

X = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
n=int(input())
print(n//500 * 1000 + x//5 * 5)

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
num = int(input())

hap1000 = num/500
hap5    = (num-hap1000*500)/5

print(int(1000*hap1000+5*hap5))

num = int(input())

hap1000 = num/500
hap5    = (num-hap1000*500)/5

print(int(1000*hap1000+5*hap5))

num = int(input())

hap1000 = int(num/500)
hap5    = int((num-hap1000*500)/5)
print(int(1000*hap1000+5*hap5))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
a = (x/500)*1000
x -= 500*(x/500)
b = 5*(x/5)
print(a+b)


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


X = int(input())
 
thousand = X // 500
rest = X - thousand * 500
five = rest // 5
 
print(1000 * thousand + 5 * five)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())

500_cnt = X//500
new_X = X - 500_cnt * 500
5_cnt = new_X // 5
print(500_cnt*1000 + 5_cnt*5)

X = int(input())
 
cnt = X//500
new_X = X - cnt * 500
ncnt = new_X // 5
print(cnt*1000 + ncnt*5)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x=int(input('x: '))
tot=int(x/500)
y=x-tot*500
tot=tot*1000 + int(y/5)*5
print(tot)

X=int(input())
tot=int(X/500)
y=X-tot*500
tot=tot*1000 + int(y/5)*5
print(tot)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())

if X == 0:
    print('高橋君は一文無しです。')
elif X > 10 ** 9:
    print('高橋君は大富豪です。')
else:
    point_thousand = X // 500
    point_five = (X - (point_thousand * 500)) // 5
    total = (point_thousand * 1000) + (point_five * 5)
    print('500円硬貨' + str(point_thousand) + '枚。5円硬貨' + str(point_five) + '枚を含むように両替することで' +
          str(total) + 'の嬉しさを得ます。これが嬉しさの最大です。')

X = int(input())
point_thousand = X // 500
point_five = (X - (point_thousand * 500)) // 5
total = (point_thousand * 1000) + (point_five * 5)
print(total)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())
a = X // 500

Y = X - 500 * a
b = Y // 5
print(a)
print(a * 1000 + b * 5)


X = int(input())

a, X= divmod(X, 500)

b, X= divmod(X, 5)

print(a * 1000 + b * 5)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())

div = int(X/500)
mod = int(X%500)
hap = 0

if div != 0:
  hap = i
q = int(p/5)
hap += q

print(hap)

X = int(input())
 
div = int(X/500)
mod = int(X%500)
hap = 0
 
if div != 0:
  hap = div*2
q = int(mod/5)
hap += q
 
print(hap)

X = int(input())
 
div = int(X/500)
mod = int(X%500)
hap = 0
 
if div != 0:
  hap = div*2
q = int(mod/5)
hap += q*5
 
print(hap)

X = int(input())
 
div = int(X/500)
mod = int(X%500)
hap = 0
 
if div != 0:
  hap = div*1000
q = int(mod/5)
hap += q*5
 
print(hap)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
def main():
    X = int(input())
    cnt500 = 0
    cnt5 = 0

    while X > 0:
        if X >= 500:
            X -= 500
            cnt500 += 1

        if 500 > X >= 0:
            X -= 5
            cnt5 += 1

    print(cnt5*5 + cnt500*1000)


if __name__ == '__main__':
    main()

def main():
    X = int(input())
    cnt500 = 0
    cnt5 = 0

    while X > 0:
        if X >= 500:
            X -= 500
            cnt500 += 1

        if 500 > X > 0 :
            X -= 5
            cnt5 += 1

    print(cnt5*5 + cnt500*1000)


if __name__ == '__main__':
    main()

def main():
    x = int(input())

    a = x // 500
    b = (x - (a * 500)) // 5
    c = (a * 1000) + (b * 5)
    print(c)


if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
print(x//500*500*2+x%500)

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
n=int(input())
d=n//500
e=n%500
f=e//5
print('d*1000 + f*5)


n=int(input())
d=n//500
e=n%500
f=e//5
print(d*1000+f*5)



Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x=int(input())

five_hundred=int(x/500)

five=int((x-five_hundred)/5)

print(five_hundred*1000+five*5)

x=int(input())

five_hundred=int(x/500)

five=int((x-five_hundred*500)/5)

print(five_hundred*1000+five*5)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
user = int(input())
c500 = user//500
user -= c500*500
c5 = user/5
ans = (c500*1000)+(c5*5)
print(ans)

user = int(input())
c500 = user//500
user -= c500*500
c5 = user//5
ans = (c500*1000)+(c5*5)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = input()

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

X = int(input())

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
a = int(input())
b = a/5
print(b/100 * 1000 + b%200 *5)

a = int(input())
b = (a/5)/200
c= (a/5)%200
print(b * 2000 + c*5)

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
money = int(input())

gohyakuen = money // 500

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

happy = 1000 * gohyakuen + 5 * goen

print(happy)

money = int(input())

gohyakuen = money // 500

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

happy = 1000 * gohyakuen + 5 * goen

print(happy)


Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
(x//500)*1000+(x%500//5)*5

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
def main():
    n = int(input())
    print(n//500+(n%500)//5*5)

if __name__ == "__main__":
    main()

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


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
n = int(input())
print(1000 * (n // 500) + (n % 500) // 5)


#codeforces
gi = lambda : list(map(int,input().split()))
n, = gi()
print(1000 * (n // 500) + ((n % 500) // 5) * 5)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())

#500
X_500 = X // 500 * 2
#5
X_5 = (X % 500) // 5

print(X_500 + X_5)


X = int(input())

#500
X_500 = X // 500 * 2
#5
X_5 = (X % 500) // 5 * 5

print(X_500 + X_5)


X = int(input())

#500
X_500 = X // 500 * 1000
#5
X_5 = (X % 500) // 5 * 5

print(X_500 + X_5)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
n = int(input());x=n//500
k=x*1000+5*(n-x*500)//5
print(k)

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X=int(input())
a=int(X//500)
X=X%500
b=int(X//5)
print(a+b)

X=int(input())
a=int(X//500)
X=X%500
b=int(X//5)
print(a*1000+b*5)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
print(x // 500 * 1000 + x % 500)

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


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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())
a = X%500
print(a*1000+a%5*5)

X = int(input())
print((X%500)%5)

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
q, mod = divmod(x, 500)
print(q*2000 + 5*(mod//5))

x = int(input())
q, mod = divmod(x, 500)
print(q*1000 + 5*(mod//5))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
HP = 0
while x > 500:
  x -= 500
  HP += 1000
while x > 5:
  x -= 5
  HP += 5
if x < 5:
  print(0)
print(HP)


using namespace std;

int main() {
    int x;
    int HP = 0;
    bool FUCK = false;
    
    cin >> x;

    if(x < 5){
        cout << 0 << endl;
        FUCK = true;
    }
    
    while(x >= 500){
        HP += 1000;
        x -= 500;
    }
    
    while(x >= 5){
        HP += 5;
        x -= 5;
    }
        
    if(FUCK == false){
        cout << HP << endl;
    }
    
}

x = input()
HP = 0
while x > 500:
  x -= 500
  HP += 1000
while x > 5:
  x -= 5
  HP += 5
if x < 5:
  print(0)
print(HP)

x = int(input())
HP = 0
FUCK = False

if x < 5:
  print(0)
  FUCK = True

while x >= 500:
  x -= 500
  HP += 1000

while x >= 5:
  x -= 5
  HP += 5

if not FUCK:
    print(HP)


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
a = int(input())
b = a//500*1000
c = (a%500)/5*5
print(int(b+c))

a = int(input())
b = a//500*1000
c = (a%500)//5*5
print(int(b+c))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
k,n=map(int,input().split())
lista=list(map(int,input().split())) 
ans=[]
for i in range(n):
  ans.append(lista[i+1]-lista[i])
print(k-max(ans))

x=int(input())
goh=x//500
go=(x-goh*500)//5
print(1000*goh+go*5)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
n = int(input())
pl = 0

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

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

print(pl)


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

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

print(pl)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())
print((X // 500) * 1000 + (X // 500) // 5 * 5)


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


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())
t = X % 500
T = X // 500 * 1000
T += t // 5 * 5

X = int(input())
t = X % 500
T = X // 500 * 1000
T += t // 5 * 5
print(T)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X = int(input())
ans =0 
while(1):
    print(X)
    if X < 5:
        break
    elif X<500:
        tmp = X // 5
        ans +=tmp*5
        X = X% 5
    else:
        tmp = X // 500
        ans +=tmp*1000
        X = X %500
print(ans)

X = int(input())
ans =0 
while(1):
    if X < 5:
        break
    elif X<500:
        tmp = X // 5
        ans +=tmp*5
        X = X% 5
    else:
        tmp = X // 500
        ans +=tmp*1000
        X = X %500
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
coin = int(input())
siawase = 0
if coin >= 500:
    siawase = siawase + coin / 500 * 1000
    amari = coin % 500
    siawase = siawase + amari/5 *5
elif coin >= 5:
    siawase = siawase + coin / 5 * 5
    
print(int(siawase))

coin = int(input())
siawase = 0
if coin >= 500:
    siawase = siawase + int(coin / 500) * 1000
    amari = coin % 500
    print(siawase)
    print(amari)
    siawase = siawase + int(amari / 5) *5
elif coin >= 5:
    siawase = siawase + int(coin / 5) * 5
    
print(int(siawase))



coin = int(input())
siawase = 0
if coin >= 500:
    siawase = siawase + int(coin / 500) * 1000
    amari = coin % 500
    siawase = siawase + int(amari / 5) *5
elif coin >= 5:
    siawase = siawase + int(coin / 5) * 5
    
print(int(siawase))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())
a = x//500
b = (x%500)//5
print(a+b)

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


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
n = int(input())

print(1000*(n//500)+5*(n//5))

n = int(input())

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

print(1000*a+5*b)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x=int(input())

if n!=0:
	ans1=n//500
	sub=n-(ans1*500)
	ans2=sub//5

	print((ans1*1000)+(ans2*5))

else:
	print(0)

n=int(input())
 
if n!=0:
	ans1=n//500
	sub=n-(ans1*500)
	ans2=sub//5
 
	print((ans1*1000)+(ans2*5))
 
else:
	print(0)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
X=int(input())
g=X//500
h=X-500*g
i=h//5
j=1000*g+5*i
input(j)

X=int(input())
g=X//500
h=X-g
i=h//5
j=1000*g+5*i
input(j)

X=int(input())
g=X//500
h=X-500*g
i=h//5
j=1000*g+5*i
print(j)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves gold coins. He gains 1000 _happiness points_ for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)  Takahashi has X yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?  (We assume that there are six kinds of coins available: 500-yen, 100-yen, 50-yen, 10-yen, 5-yen, and 1-yen coins.)

Submission attempts (in order):
x = int(input())

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


x = int(input())

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


Verdicts: Wrong Answer

Accepted