TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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

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

Verdicts: Wrong Answer

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

Submission attempts (in order):
from math import floor
from decimal import Decimal

S = int(input())

if S[2] == S[3] and S[4] === S[5]:
    print("Yes")
else:
    print("No")

from math import floor
from decimal import Decimal

S = input()

if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

Submission attempts (in order):
k,n=map(int,input().split())
a=[]
a=list(map(int,input().split()))
dis=[]
dis.append(a[0]+(k-a[n-1]))
for i in range(n-1):
    dis.append(a[i+1]-a[i])
print(k-min(dis))

s=[]
s=list(srt(input().split()))
if s[2]==s[3] and s[4]==s[5]:
    print('Yes')
else:
    print('No')


s=[]
s=list((input()))
if s[2]==s[3] and s[4]==s[5]:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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

a,b,c,d,e,f=map(str,input().split())
if c=d,e=f:
  print("Yes")
else:
  print("No")

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

S=input()
if S[2]=S[3],S[4]=S[5]:
  print("Yes")
else:
  print("No")

a,b,c,d,e,f=input()
if c=d,e=f:
  print("Yes")
else:
  print("No")

a,b,c,d,e,f=map(int,input().split())
if c=d,e=f:
  print("Yes")
else:
  print("No")

S=input()
if s[2]=s[3] and s[4]=s[5]:
  print("Yes")
else:
  print("No")

S=input()
s=str(S)
if s[2]=s[3] and s[4]=s[5]:
  print("Yes")
else:
  print("No")

S=input()
if S[2]=S[3] and S[4]=S[5]:
  print("Yes")
else:
  print("No")

S=input()
if S[2]==S[3] and S[4]==S[5]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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

str=input()
if str[2]==str[3] and str[4]==str[5]:
 print("Yes")
else:
 print("No")

Verdicts: Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

Submission attempts (in order):
S = str(input())
if (S[3]) == (S[4]):
    if (S[5]) == (S[6]):
        print("Yes")
    else:
        print("No")
else:
    print("No")

S = str(input())
if (S[3]) == (S[4]):
    if (S[5]) == (S[6]):
        print("Yes")
else:
    print("No")


S = str(input())
if (S[2]) == (S[3]):
    if (S[4]) == (S[5]):
        print("Yes")
    else:
        print("No")

else:
    print("No")





Verdicts: Runtime Error

Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

Submission attempts (in order):
K, N = map(int, input().split())
A = list(map(int, input().split()))
if 2  <= K <= 10 ** 6 and 2 <= N <= 2 * 10 ** 5:
    if 0 in A:
        A.remove(0)
    x = max(A) - min(A)
    print(x)

K, N = input().split()
A = list(map(int, input().split()))
if 0 in A:
    A.remove(0)
x = max(A) - min(A)
print(x)


K, N = map(int, input().split())
A = list(map(int, input().split()))
if 0 in A:
    A.remove(0)
x = max(A) - min(A)
print(x)


S = str(input())
if len(S) == 6:
    if S[2] == S[3] and S[4] == S[5]:
        print("Yes")
    else:
        print("No")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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

n = input()
if n[2] == n[3] and n[4] == n[5]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

Submission attempts (in order):
# A - Coffee
S = int(input())
if S[2]==S[3] and S[4]==S[5]:
    print('Yes')
else:
    print('No')

# A - Coffee
S = input()
if S[2]==S[3] and S[4]==S[5]:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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


s = input()
if s[2] == s[3] and s[4] == s[5]:
    print('Yes')
else:
    print('No')


Verdicts: Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

Submission attempts (in order):
N = input()
if N[3] == N[4] and N[5] == N[6]:
  print('Yes')
else:
  print('No')

n = input()
if n[2] == n[3] and n[4] == n[5]:
  print('Yes')
else:
  print('No')


Verdicts: Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

Submission attempts (in order):
def nearcoffee(str):
    return("Yes" if str[2] == str[3] and str[4] == str[5] else "No")
nearcoffee(input())

str = input().lower()
print("Yes" if len(str) == 6 and str[2] == str[3] and str[4] == str[5] else "No")

Verdicts: Wrong Answer

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

Submission attempts (in order):
import sys

word = sys.argv[1]
if word[2]==word[3] and word[4]==word[5]:
    print('Yes')
    sys.exit(0)
print('No')



word = list(input())
if word[2]==word[3] and word[4]==word[5]:
    print('Yes')
else: print('No')


Verdicts: Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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

if s[3] == s[4] and s[5] == s[6]:
  print("Yes")
else:
  print("No")

s = list(input())

if s[3] == s[4] and s[5] == s[6]:
  print("Yes")
else:
  print("No")

s = list(input())

if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
else:
  print("No")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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

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

Verdicts: Wrong Answer

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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

s=input()
print("Yes" if s[2]==s[3] and s[4]==s[5] else "No")

Verdicts: Runtime Error

Accepted
Problem: A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.   Given a string S, determine whether it is coffee-like.

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

if s[2] == s[3] and s[4]== s[5]:
	print(‘Yes’)
else:
	print(‘No’)


s = input()

if s[2] == s[3] and s[4]== s[5]:
  print('Yes')
else:
  print('No')

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())
ans=a//500+(a-(a//500)*500)//5
print(ans)

a=int(input())
b=a//500
ans=b*1000+((a-b*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):
en=int(input())

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

print(a*1000+b*5)

en=int(input())

res = en/500*1000+(en%500)/5*5
print(res)

en=int(input())

res=en/500+(en%500)/5

print(res)

en = int(input())

a = int(en/500)
b = int(en%500/5)

print(a*1000+b*5)

Verdicts: Wrong Answer

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())

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

n = int(input())

print(int((n/500))*1000 + int((n%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 = map(int, input())

num_500 = X // 500
num_5 = (X - (X // 500)*500 ) % 5

print(1000*num_500 + 5 * num_5)

X = map(int, input())

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

X = int(input())
 
num_500 = X // 500
num_5 = (X - (X // 500) * 500 ) // 5
 
print(1000*num_500 + 5 * num_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
b = a//5
print(1000*a+b)

n = int(input())
a = n//500
b = n-500*a
print(a*1000+b//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):
#B
x = int(input())
y500 = x // 500
y5 = y500 // 5
print(y500 * 1000 + y5 * 5)

#B
x = int(input())
y500 = x // 500
y5 = (x - 500 * y500) // 5
print(y500 * 1000 + y5 * 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):
a = list(input())
if (a[2] == a[3]) & (a[4] == a[5]):
    print('Yes')
else:
    print('No')

a = int(input());
b = a//500
c = a % 500 //5
print(b*1000+c*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())
print(1000*(X//500) + (X%500)//5)


X = int(input())
print(1000*(X//500) + 5*((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):
X = int(input())
if X >0:   
    num = X / 500
    w = X-(int(num)*500)
    p = w / 5   
    sum = (int(num)*1000)+(int(p)*5)
 else:
     sum = 0   
print(sum)

x = int(input())
 if x >0:   
    num = x / 500
    w = x-(int(num)*500)
    p = w / 5   
    sum = (int(num)*1000)+(int(p)*5)
 else:
     sum = 0 

x = int(input())
 if x >0:   
    num = x / 500
    w = x-(int(num)*500)
    p = w / 5   
    sum = (int(num)*1000)+(int(p)*5)
 else:
     sum = 0   
print(sum)

x = int(input())
num = x / 500
w = x-(int(num)*500)
p = w / 5
sum = (int(num)*1000)+(int(p)*5)

X = int(input())
if X >0:   
    num = X / 500
    w = X-(int(num)*500)
    p = w / 5   
    sum = (int(num)*1000)+(int(p)*5)
else:
     sum = 0   
print(sum)


Verdicts: Runtime Error

Runtime Error

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):
n = int(input())
m = n%500
print(int((n - m)*1000/ 500 + m*5//5))

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

n = int(input())
m = n%500
k = m%5
print(int((n - m)*1000/ 500 + (m - k)*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())
ans=(X-X%500)*2
X=X-X%500
ans=ans+(X-X%5)
print(ans)

X=int(input())
ans=(X-X%500)*2
X=X%500
ans=ans+(X-X%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):
def atc_160b(X: int) -> int:
    return X // 500 * 1000 + X % 500 // 5 * 5

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


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


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


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()) #1200
a=X//500 #2
b=(X-500*a)//5  #
print(a+b)

X=int(input()) #1200
a=X//500 #2
b=(X-500*a)//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())

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

print(count)

X = int(input())

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

print(count)

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()
a = X // 500
b = X % 500
c = b // 5
print(a * 1000 + c * 5)

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

X = int(input())
print((X//500)*1000+((X%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):
X = int(input())
fh = x // 500
f = x - 2*fh // 5
pint(f+fh)

X = int(input())
fh = x // 500
f = (x - (500*fh)) // 5
pint(f*5+fh*1000)

X = int(input())
fh = x // 500
f = (x - (500*fh)) // 5
pint(f*1000+fh*5)

X = int(input())
fh = x // 500
f = (x - (500*fh)) // 5
pint(f+fh)

x = int(input())
fh = x // 500
f = (x - (500*fh)) // 5
sum = f*5+fh*1000
print(sum)

Verdicts: Runtime Error

Runtime Error

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):
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)

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)

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())
ha = 0

if x >= 500:
  x %= 500
  ha  += (x // 500)*1000
  
if x >= 5:
  ha += (x // 5)*5
 
print(ha)

x = int(input())
ha = 0

if x >= 500:
  ha  += (x // 500)*1000
  x %= 500
  
if x >= 5:
  ha += (x // 5)*5
 
print(ha)

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):
a = int(input())
print(2*(a//500) + (a - a//500)//5)


a = int(input())
a -= a%5
print(2*a - a%500)


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())

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

print(yen500 * 1000 + yen5 * 5)

X = int(input())

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

print(yen500 * 1000 + yen5 * 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 =input()
a= 500
b = 5
sum = 0
if(n%a==0):
  sum = n*2
print(sum)

n =int(input())
a= 500
b = 5
sum = 0
if(n%a==0):
  sum = n*2
else:
  sum = (1000*(n//a)) + 5*((n%a)//b)
  
print(sum)


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
y = X % 500
b = y // 5
z = y % 5
print(a)
print(y)
print(b)
print(z)
print(a * 1000 + b * 5)

X = int(input())
a = X // 500
y = X % 500
b = y // 5
z = y % 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())
a=500
b=5
y=x//500
if x>=500:
  num=(y*1000)+(x%500//5*5)
  print(x%500//5*5)
  print(num)
else:
  num=x//5
  print(num)

x=int(input())
a=500
b=5
if x>=500:
  num=(x//500*1000)+(x-x//500*500)//500
  print(num)
else:
  num=x//5
  print(num)

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

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):



class A:
    def __init__(self, money, yorokobi):
        self.money = money
        self.yorokobi = yorokobi

    def calc_yorokobi(self, credit):    
        return int(credit / self.money) * self.yorokobi

    
        

def calc_yorokobi(input_money, x, yorokobi):
    ret = input_money // x * yorokobi
    return ret


input_x = int(input())

yorokobi_500 = A(500, 1000)
yorokobi_5 = A(5, 5)

result = 0  
if input_x >= 500:
    print("1回目：{}".format(result))
    result += yorokobi_500.calc_yorokobi(input_x)   
    print("2回目：{}".format(result))
    result += yorokobi_5.calc_yorokobi(input_x % 500)   
    print("3回目：{}".format(result))
else:
    result += yorokobi_5.calc_yorokobi(input_x)

print(result)




class Yorokobi:
    def __init__(self, money, yorokobi):
        self.money = money
        self.yorokobi = yorokobi

    def calc_yorokobi(self, credit):    
        return (credit // self.money) * self.yorokobi


input_x = int(input())

yorokobi_500 = Yorokobi(500, 1000)
yorokobi_5 = Yorokobi(5, 5)

result = 0  
if input_x >= 500:
    result += yorokobi_500.calc_yorokobi(input_x)   
    result += yorokobi_5.calc_yorokobi(input_x % 500)   
else:
    result += yorokobi_5.calc_yorokobi(input_x)

print(result)


# ret2 = ret1 * 1000  


# ret5 = ret4 * 5 
# print(ret2 + ret5)


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
x %= 500
ans += x//5
print(ans)

x = int(input())
ans = 0
ans += (x //500)*1000
x %= 500
ans += (x//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):
X =int(input())
answer = (X//500)*1000+((X%500)//5)*6
print(answer)

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

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(int((x/500)*2) + int((x%500)/5))

x = int(input())

print(int(x/500) * 1000 + int(int(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())
a=x//500
b=(x-a)//5
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
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 : happy
#500 : 1000
#5 : 5
X = int(input())
x500 = X // 500 * 1000
x5 = (X - x500) // 5 * 5
print((x500 + x5)*2)

#coin : happy
#500 : 1000
#5 : 5
X = int(input())
x500 = X // 500 * 1000
x5 = (X - X // 500 * 500) // 5 * 5
print(x500 + x5)

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()
Y = int(X) / 500
Z = (int(X) - Y * 500) / 5
print(Y * 1000 + Z * 5)

X = int(input())
Y = X // 500
Z = (X - Y * 500) // 5
print(Y * 1000 + Z * 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())

total = (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):
# coding:utf-8
coin = int(input())
reward = (coin // 500) *1000
reward += int(((coin - (reward / 2)) // 5) * 10)
print(reward)

# coding:utf-8
coin = int(input())
reward = (coin // 500) *1000
coin = coin - (coin // 500)*500
reward +=  (coin // 5) * 5
print(reward)

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())
import math
a=x//500
b=(x-a*500)//50
print(1000*a+5*b)

x=int(input())
import math
a=x//500
b=(x-a*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())
(a,b)=divmod(x/500)
print(a*1000+b//5*5)

x=int(input())
(a,b)=divmod(x,500)
print(a*1000+b//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):
s = int(input())
res = (s//500*1000) + ((s%500)//5)
print(res)

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

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

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())

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



n = int(input())
 
a = n//500
b = (n - a * 500) //5
ans = a * 1000 + b * 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):
def main():
    n = int(input())
    l = []
    
    if(n<0 or n>1000000000):
        main()
    
    
    if(n!=0):
        h1 = int(n/500)*1000
        ar = n - (int(n/500)*500)
        h1+=int(ar/5)*5
        h2 = int(n/5)*5
        print(ar)
        l.append(h1)
        l.append(h2)
        print(max(l))
    else:
        print(0)

main()    


def main():
    n = int(input())
    l = []
    
    if(n<0 or n>1000000000):
        main()
    
    
    if(n!=0):
        h1 = int(n/500)*1000
        ar = n - (int(n/500)*500)
        h1+=int(ar/5)*5
        h2 = int(n/5)*5
        
        l.append(h1)
        l.append(h2)
        print(max(l))
    else:
        print(0)

main()    


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())

S = n // 500
R = n - S
x = R // 5

H = 1000 * S + x * 5
print(H)

n = int(input())

S = n // 500
mod = n % 500
x = mod // 5

H = 1000 * S + x * 5
print(H)

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())
pleasure += (X // 500) * 1000
X //= 500
pleasure += (X // 5) * 5
print(pleasure)

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


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())

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):
num = int(input())
point = 0
while num >= 500:
    point+=1000
    num-=500
while num >=5:
    point+=5
    num-=5
print(re)

num = int(input())
re = 0
while num >= 500:
    re+=1000
    num-=500
while num >=5:
    re+=5
    num-=5
print(re)

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())

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

X = int(input())
 
print(int(X/500)*1000 + int((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())
a = x // 500
print((x // 500) * 1000 + x - 500 * a)

x = int(input())
a = x // 500
print((x // 500) * 1000 + ((x - 500 * a) // 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):
num_origin = input()
gohyoku = int(num_origin/500)
num_zan = num_origin - gohyoku*500
go = int(go/5)

num = go*5 + gohyoku*1000

print(num)

num_origin = int(input())
gohyoku = int(num_origin/500)
num_zan = num_origin - gohyoku*500
go = int(num_zan/5)
 
num = go*5 + gohyoku*1000
 
print(num)

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):
big_ple=X/500*1000
remain=X%500
small_ple=remain/5*5
Sum=big_ple+small_ple

if X<5:
    print(0)
elif X<500:
    print(small_ple)
else:
     print(Sum)

big_ple=X//500*1000
remain=X%500
small_ple=remain//5*5
Sum=big_ple+small_ple

if X<5:
    print(0)
elif X<500:
    print(small_ple)
else:
     print(Sum)

X=int(input())
big_ple=X//500*1000
remain=X%500
small_ple=remain//5*5
Sum=big_ple+small_ple
 
if X<5:
    print(0)
elif X<500:
    print(small_ple)
else:
     print(Sum)

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())
n=x//500
m=x%500//5
ans=500*n+5*m
print(ans)


x=int(input())
n=x//500
m=x%500//5
ans=1000*n+5*m
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())


happy = 0


max_five_hundred = int(X/500)
max_five = (X-(max_five_hundred*500))/5


print(int((max_five_hundred*1000)+(max_five*5)))





X = int(input())


happy = 0


max_five_hundred = X//500
max_five = (X-(max_five_hundred*500))//5


print((max_five_hundred*1000)+(max_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):
s = int(input())

result = (s/500) * 1000 + ((s%500)/5) * 5

print(int(result))

s = int(input())
 
result = int(s/500) * 1000 + int((s%500)/5)*5
 
print(int(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())

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

print(a+b)

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

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

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

Verdicts: Wrong Answer

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 = 1000000000
uresisa_500yen = (X // 500) * 1000
mod = (X % 500)
uresisa_5yen = (mod // 5) * 5

uresisa_total = uresisa_500yen + uresisa_5yen
print(uresisa_total)

X = int(input("input:"))
uresisa_500yen = (X // 500) * 1000
mod = (X % 500)
uresisa_5yen = (mod // 5) * 5

uresisa_total = uresisa_500yen + uresisa_5yen
print(uresisa_total)

X = int(input("input:"))
uresisa_500yen = (X // 500) * 1000
mod = (X % 500)
uresisa_5yen = (mod // 5) * 5

uresisa_total = uresisa_500yen + uresisa_5yen
print(uresisa_total)

X = input()
uresisa_500yen = (X // 500) * 1000
mod = (X % 500)
uresisa_5yen = (mod // 5) * 5

uresisa_total = uresisa_500yen + uresisa_5yen
print(uresisa_total)

X = int(input(""))

happy_1 = (X // 500) * 1000
happy_2 = ((X % 500) // 5) * 5

val = happy_1 + happy_2

print(val)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted