problem_id stringlengths 6 6 | user_id stringlengths 10 10 | time_limit float64 1k 8k | memory_limit float64 262k 1.05M | problem_description stringlengths 48 1.55k | codes stringlengths 35 98.9k | status stringlengths 28 1.7k | submission_ids stringlengths 28 1.41k | memories stringlengths 13 808 | cpu_times stringlengths 11 610 | code_sizes stringlengths 7 505 |
|---|---|---|---|---|---|---|---|---|---|---|
p02723 | u953753178 | 2,000 | 1,048,576 | 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. | ['N = input()\nif (N[2] == N[3]) and (N[4] == N[5]):\n return True\nelse:\n return False', 'N = input()\nN = str(N)\nif (N[2] == N[3]) and (N[4] == N[5]):\n print(True)\nelse:\n print(False)', "N = input()\nN = str(N)\nif (N[2] == N[3]) and (N[4] == N[5]):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s737015141', 's926150531', 's961968637'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [84, 99, 99] |
p02723 | u954489496 | 2,000 | 1,048,576 | 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. | ['from sys import stdin, stdout \n\nN,X,Y = [int(c) for c in input().split()]\n\n\nres=[0]*N \nfor x in range(0,N):\n for y in range(0,N):\n #print(x,y,abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1),min(abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1)))\n r=min(abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1))\n res[r]=res[r]+1\n if(x>y):\n res[r]=res[r]-1\n\n\nfor i in range(1,N):\n print(res[i])\n', 'from sys import stdin, stdout \n\nN,X,Y = [int(c) for c in input().split()]\n\n\nres=[0]*N \nfor x in range(0,N):\n for y in range(0,N):\n #print(x,y,abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1),min(abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1)))\n r=min(abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1))\n res[r]=res[r]+1\n if(x>y):\n res[r]=res[r]-1\n\n\nfor i in range(1,N):\n print(res[i])\n', 'from sys import stdin, stdout \n\nN,X,Y = [int(c) for c in input().split()]\n\n\nres=[0]*N \nfor x in range(0,N):\n for y in range(x,N):\n #print(x,y,abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1),min(abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1)))\n r=min(abs(x-y),abs(abs(X-1-x)+abs(Y-1-y)+1))\n res[r]=res[r]+1\n if(x>y):\n res[r]=res[r]-1\n\n\nfor i in range(1,N):\n print(res[i])\n', 'import sys\n\nfor S in sys.stdin:\n if(S[2]==S[3] and S[4]==S[5]):\n print("Yes")\n else:\n print ("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s045957528', 's412911260', 's439005240', 's187826420'] | [3060.0, 3060.0, 3064.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [405, 405, 405, 118] |
p02723 | u955251526 | 2,000 | 1,048,576 | 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. | ['import sys\nsys.setrecursionlimit(3*10**5)\n\nn = int(input())\nedge = [tuple(map(int, input().split())) for _ in range(n-1)]\nmod = 10 ** 9 + 7\ndef extGCD(a, b):\n if b == 0:\n return a, 1, 0\n g, y, x = extGCD(b, a%b)\n y -= a//b * x\n return g, x, y\n\ndef moddiv(a, b):\n _, inv, _ = extGCD(b, mod)\n return (a * inv) % mod\n\nN = 10 ** 5 + 10\nfact = [0] * (N)\nfact[0] = 1\nfor i in range(1, N):\n fact[i] = (fact[i-1] * i) % mod\n\ndef comb(a, b):\n return moddiv(moddiv(fact[a], fact[a-b]), fact[b])\n\nconnect = [set() for _ in range(n)]\nfor a, b in edge:\n connect[a-1].add(b-1)\n connect[b-1].add(a-1)\n\nd = [{} for _ in range(n)]\n\ndef dfs(v, p):\n if p in d[v]:\n return d[v][p]\n num, count = 0, 1\n for next in connect[v]:\n if next != p:\n i, c = dfs(next, v)\n num += i\n count *= c\n count %= mod\n count *= comb(num, i)\n count %= mod\n num += 1\n d[v][p] = num, count\n return num, count\n\nfor i in range(n):\n dfs(i, -1)\n print(d[i][-1][1])', "s = input()\n\nif s[2] == s[3] and s[4] == s[5]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s760574431', 's745881726'] | [3188.0, 2940.0] | [18.0, 18.0] | [1057, 85] |
p02723 | u956547804 | 2,000 | 1,048,576 | 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. | ["a=input()\nif a[3]==a[2]and a[5]==a[4]:\n print('YES')\nelse:\n print('NO')", "a=input()\nif a[3]==a[2]and a[5]==a[4]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s144957564', 's736396794'] | [2940.0, 2940.0] | [17.0, 17.0] | [77, 77] |
p02723 | u957513998 | 2,000 | 1,048,576 | 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. | ["s = input()\nprint('Yes' if s[2:4] == s[4:6] else 'No')", "s = input()\nprint('Yes' if s[2] == s[3] and s[4] == s[5] else 'No')"] | ['Wrong Answer', 'Accepted'] | ['s299966548', 's635842831'] | [2940.0, 2940.0] | [17.0, 17.0] | [54, 67] |
p02723 | u960250266 | 2,000 | 1,048,576 | 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. | ['S = input()\n\nif(S[4]==S[5] && S[6]==S[7]):\n print("Yes")\nelse:\n print("No")', 'S = input()\nif(S[4]==S[5] && S[6]==S[7]):\n print("Yes")\nelse:\n print("No")', 'S = input()\nif S[2]==S[3]:\n if S[4]==S[5]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s105031027', 's588908136', 's760703702'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [77, 76, 118] |
p02723 | u960524878 | 2,000 | 1,048,576 | 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. | ['s = input()\n\nif s[2]==[3] and s[4]==s[5]:\n print("Yes")\nelse:\n print("No")', 's = input()\n\nif s[2]==s[3] and s[4]==s[5]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s255917083', 's611960882'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 81] |
p02723 | u961548025 | 2,000 | 1,048,576 | 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. | ['s = input()\nif(s[2] == s[3] and s[4] == s[5]):\n print("YES")\nelse:\n print("NO")', 's = input()\nif(s[2] == s[3] and s[4] == s[5]):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s763551455', 's357324560'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 81] |
p02723 | u965397031 | 2,000 | 1,048,576 | 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. | ["S = input()\nif S[3] == S[4] and S[5] == S[6]:\n print('Yes')\nelse:\n print('No')", "S = input()\nif S[2] == S[3] and S[4] == S[5]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s477396248', 's674162368'] | [8820.0, 9048.0] | [28.0, 25.0] | [84, 84] |
p02723 | u967822229 | 2,000 | 1,048,576 | 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. | ['from math import floor\nfrom decimal import Decimal\n\nS = int(input())\n\nif S[2] == S[3] and S[4] === S[5]:\n print("Yes")\nelse:\n print("No")', 'from math import floor\nfrom decimal import Decimal\n\nS = input()\n\nif S[2] == S[3] and S[4] == S[5]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s526050644', 's855548705'] | [2940.0, 5844.0] | [17.0, 51.0] | [143, 137] |
p02723 | u967835038 | 2,000 | 1,048,576 | 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. | ['k,n=map(int,input().split())\na=[]\na=list(map(int,input().split()))\ndis=[]\ndis.append(a[0]+(k-a[n-1]))\nfor i in range(n-1):\n dis.append(a[i+1]-a[i])\nprint(k-min(dis))', "s=[]\ns=list(srt(input().split()))\nif s[2]==s[3] and s[4]==s[5]:\n print('Yes')\nelse:\n print('No')\n", "s=[]\ns=list((input()))\nif s[2]==s[3] and s[4]==s[5]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s819439270', 's938227268', 's643854259'] | [3060.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [168, 103, 91] |
p02723 | u969080040 | 2,000 | 1,048,576 | 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. | ['S=input()\nif S[2]=S[3] and S[4]=S[5]:\n print("Yes")\nelse:\n print("No")', 'a,b,c,d,e,f=map(str,input().split())\nif c=d,e=f:\n print("Yes")\nelse:\n print("No")', 's=input()\nif s[2]=s[3] and s[4]=s[5]:\n print("Yes")\nelse:\n print("No")', 'S=input()\nif S[2]=S[3],S[4]=S[5]:\n print("Yes")\nelse:\n print("No")', 'a,b,c,d,e,f=input()\nif c=d,e=f:\n print("Yes")\nelse:\n print("No")', 'a,b,c,d,e,f=map(int,input().split())\nif c=d,e=f:\n print("Yes")\nelse:\n print("No")', 'S=input()\nif s[2]=s[3] and s[4]=s[5]:\n print("Yes")\nelse:\n print("No")', 'S=input()\ns=str(S)\nif s[2]=s[3] and s[4]=s[5]:\n print("Yes")\nelse:\n print("No")', 'S=input()\nif S[2]=S[3] and S[4]=S[5]:\n print("Yes")\nelse:\n print("No")', 'S=input()\nif S[2]==S[3] and S[4]==S[5]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s138660572', 's286431151', 's499702702', 's533341131', 's576368212', 's646750186', 's698302945', 's736042786', 's802582078', 's991750396'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 18.0, 17.0, 17.0, 17.0] | [72, 83, 72, 68, 66, 83, 72, 81, 72, 74] |
p02723 | u969601826 | 2,000 | 1,048,576 | 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. | ['str=input()\nif (str[2]==str[3])&&(str[4]==str[5]):\n print("Yes")\nelse:\n print("No")', 'str=input()\nif str[2]==str[3] and str[4]==str[5]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s188841951', 's086680915'] | [2940.0, 2940.0] | [18.0, 17.0] | [84, 82] |
p02723 | u970020450 | 2,000 | 1,048,576 | 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. | ['S = str(input())\nif (S[3]) == (S[4]):\n if (S[5]) == (S[6]):\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'S = str(input())\nif (S[3]) == (S[4]):\n if (S[5]) == (S[6]):\n print("Yes")\nelse:\n print("No")\n', 'S = str(input())\nif (S[2]) == (S[3]):\n if (S[4]) == (S[5]):\n print("Yes")\n else:\n print("No")\n\nelse:\n print("No")\n\n\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s623488376', 's653770566', 's558266852'] | [3060.0, 2940.0, 2940.0] | [20.0, 17.0, 18.0] | [135, 106, 140] |
p02723 | u970490119 | 2,000 | 1,048,576 | 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. | ['K, N = map(int, input().split())\nA = list(map(int, input().split()))\nif 2 <= K <= 10 ** 6 and 2 <= N <= 2 * 10 ** 5:\n if 0 in A:\n A.remove(0)\n x = max(A) - min(A)\n print(x)', 'K, N = input().split()\nA = list(map(int, input().split()))\nif 0 in A:\n A.remove(0)\nx = max(A) - min(A)\nprint(x)\n', 'K, N = map(int, input().split())\nA = list(map(int, input().split()))\nif 0 in A:\n A.remove(0)\nx = max(A) - min(A)\nprint(x)\n', 'S = str(input())\nif len(S) == 6:\n if S[2] == S[3] and S[4] == S[5]:\n print("Yes")\n else:\n print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s419215025', 's472023036', 's673155002', 's954635251'] | [2940.0, 2940.0, 3064.0, 2940.0] | [17.0, 18.0, 17.0, 17.0] | [189, 115, 125, 122] |
p02723 | u973900850 | 2,000 | 1,048,576 | 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. | ['n = input()\nif n[3] == n[4] and n[5] == n[6]:\n print("Yes")\nelse:\n print("No")', 'n = input()\nif n[2] == n[3] and n[4] == n[5]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s416261942', 's426328228'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 80] |
p02723 | u980205854 | 2,000 | 1,048,576 | 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. | ["# A - Coffee\nS = int(input())\nif S[2]==S[3] and S[4]==S[5]:\n print('Yes')\nelse:\n print('No')", "# A - Coffee\nS = input()\nif S[2]==S[3] and S[4]==S[5]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s379893864', 's775771404'] | [2940.0, 2940.0] | [17.0, 17.0] | [98, 93] |
p02723 | u984664611 | 2,000 | 1,048,576 | 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. | ["s = input()\nif s[3] == s[4] and s[5] == s[6]:\n print('Yes')\nelse:\n print('No')\n", "s = input()\nif s[2] == s[3] and s[4] == s[5]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s922575968', 's462482106'] | [2940.0, 2940.0] | [17.0, 17.0] | [85, 85] |
p02723 | u985419292 | 2,000 | 1,048,576 | 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. | ["N = input()\nif N[3] == N[4] and N[5] == N[6]:\n print('Yes')\nelse:\n print('No')", "n = input()\nif n[2] == n[3] and n[4] == n[5]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s290072712', 's072556841'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 81] |
p02723 | u989978298 | 2,000 | 1,048,576 | 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. | ['def nearcoffee(str):\n return("Yes" if str[2] == str[3] and str[4] == str[5] else "No")\nnearcoffee(input())', 'str = input().lower()\nprint("Yes" if len(str) == 6 and str[2] == str[3] and str[4] == str[5] else "No")'] | ['Wrong Answer', 'Accepted'] | ['s194435234', 's806594398'] | [2940.0, 3064.0] | [17.0, 17.0] | [109, 103] |
p02723 | u992497910 | 2,000 | 1,048,576 | 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. | ["import sys\n\nword = sys.argv[1]\nif word[2]==word[3] and word[4]==word[5]:\n print('Yes')\n sys.exit(0)\nprint('No')\n\n", "word = list(input())\nif word[2]==word[3] and word[4]==word[5]:\n print('Yes')\nelse: print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s392792702', 's665491839'] | [2940.0, 2940.0] | [17.0, 17.0] | [119, 98] |
p02723 | u995419623 | 2,000 | 1,048,576 | 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. | ['s = input()\n\nif s[3] == s[4] and s[5] == s[6]:\n print("Yes")\nelse:\n print("No")', 's = list(input())\n\nif s[3] == s[4] and s[5] == s[6]:\n print("Yes")\nelse:\n print("No")', 's = list(input())\n\nif s[2] == s[3] and s[4] == s[5]:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s043823487', 's114897026', 's120599646'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [81, 87, 88] |
p02723 | u995861601 | 2,000 | 1,048,576 | 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. | ['s = input()\nif s[2] == s[3] and [4] == s[5]:\n print("Yes")\nelse:\n print("No")', 's = input()\nif s[2] == s[3] and s[4] == s[5]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s840076240', 's556708728'] | [2940.0, 3060.0] | [17.0, 19.0] | [79, 80] |
p02723 | u996665352 | 2,000 | 1,048,576 | 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. | ['x=int(input())\nprint(x//500*1000+x%500//5*5)', 's=input()\nprint("Yes" if s[2]==s[3] and s[4]==s[5] else "No")'] | ['Runtime Error', 'Accepted'] | ['s381966721', 's651173328'] | [2940.0, 2940.0] | [17.0, 17.0] | [44, 61] |
p02723 | u998867748 | 2,000 | 1,048,576 | 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. | ['s = input()\n\nif s[2] == s[3] and s[4]== s[5]:\n\tprint(‘Yes’)\nelse:\n\tprint(‘No’)\n', "s = input()\n\nif s[2] == s[3] and s[4]== s[5]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s641209406', 's246676676'] | [2940.0, 2940.0] | [17.0, 17.0] | [87, 80] |
p02724 | u000037600 | 2,000 | 1,048,576 | 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.) | ['a=int(input())\nans=a//500+(a-(a//500)*500)//5\nprint(ans)', 'a=int(input())\nb=a//500\nans=b*1000+((a-b*500)//5)*5\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s993018504', 's703218385'] | [9152.0, 9164.0] | [26.0, 22.0] | [56, 62] |
p02724 | u000770457 | 2,000 | 1,048,576 | 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.) | ['en=int(input())\n\na=en/500\nb=(en%500)/5\n\nprint(a*1000+b*5)', 'en=int(input())\n\nres = en/500*1000+(en%500)/5*5\nprint(res)', 'en=int(input())\n\nres=en/500+(en%500)/5\n\nprint(res)', 'en = int(input())\n\na = int(en/500)\nb = int(en%500/5)\n\nprint(a*1000+b*5)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s021652886', 's090268332', 's974290998', 's393129690'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 20.0] | [57, 58, 50, 71] |
p02724 | u002166247 | 2,000 | 1,048,576 | 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.) | ['n = int(input())\n\nprint(int((n/500))*1000 + int((n%500)/5))*5', 'n = int(input())\n\nprint(int((n/500))*1000 + int((n%500)/5)*5)\n'] | ['Runtime Error', 'Accepted'] | ['s270381070', 's352195901'] | [2940.0, 2940.0] | [17.0, 18.0] | [61, 62] |
p02724 | u012955130 | 2,000 | 1,048,576 | 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.) | ['X = map(int, input())\n\nnum_500 = X // 500\nnum_5 = (X - (X // 500)*500 ) % 5\n\nprint(1000*num_500 + 5 * num_5)', 'X = map(int, input())\n\nhappy = ((X // 500) * 1000 ) + ((X % 5) * 5)\nprint(happy)', 'X = int(input())\n \nnum_500 = X // 500\nnum_5 = (X - (X // 500) * 500 ) // 5\n \nprint(1000*num_500 + 5 * num_5)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s003662818', 's715320447', 's292669515'] | [2940.0, 2940.0, 2940.0] | [17.0, 19.0, 18.0] | [108, 80, 108] |
p02724 | u015993380 | 2,000 | 1,048,576 | 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.) | ['n = int(input())\na = n//500\nb = a//5\nprint(1000*a+b)', 'n = int(input())\na = n//500\nb = n-500*a\nprint(a*1000+b//5*5)'] | ['Wrong Answer', 'Accepted'] | ['s386197207', 's419822164'] | [2940.0, 2940.0] | [21.0, 17.0] | [52, 60] |
p02724 | u019075898 | 2,000 | 1,048,576 | 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.) | ['#B\nx = int(input())\ny500 = x // 500\ny5 = y500 // 5\nprint(y500 * 1000 + y5 * 5)', '#B\nx = int(input())\ny500 = x // 500\ny5 = (x - 500 * y500) // 5\nprint(y500 * 1000 + y5 * 5)'] | ['Wrong Answer', 'Accepted'] | ['s045377704', 's973780643'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 90] |
p02724 | u023185908 | 2,000 | 1,048,576 | 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.) | ["a = list(input())\nif (a[2] == a[3]) & (a[4] == a[5]):\n print('Yes')\nelse:\n print('No')", 'a = int(input());\nb = a//500\nc = a % 500 //5\nprint(b*1000+c*5)'] | ['Runtime Error', 'Accepted'] | ['s873413065', 's905873020'] | [2940.0, 2940.0] | [17.0, 17.0] | [92, 62] |
p02724 | u031132940 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\nprint(1000*(X//500) + (X%500)//5)\n', 'X = int(input())\nprint(1000*(X//500) + 5*((X%500)//5))\n'] | ['Wrong Answer', 'Accepted'] | ['s566050518', 's909595563'] | [2940.0, 2940.0] | [17.0, 17.0] | [51, 55] |
p02724 | u039881995 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\nif X >0: \n num = X / 500\n w = X-(int(num)*500)\n p = w / 5 \n sum = (int(num)*1000)+(int(p)*5)\n else:\n sum = 0 \nprint(sum)', 'x = int(input())\n if x >0: \n num = x / 500\n w = x-(int(num)*500)\n p = w / 5 \n sum = (int(num)*1000)+(int(p)*5)\n else:\n sum = 0 ', 'x = int(input())\n if x >0: \n num = x / 500\n w = x-(int(num)*500)\n p = w / 5 \n sum = (int(num)*1000)+(int(p)*5)\n else:\n sum = 0 \nprint(sum)', 'x = int(input())\nnum = x / 500\nw = x-(int(num)*500)\np = w / 5\nsum = (int(num)*1000)+(int(p)*5)', 'X = int(input())\nif X >0: \n num = X / 500\n w = X-(int(num)*500)\n p = w / 5 \n sum = (int(num)*1000)+(int(p)*5)\nelse:\n sum = 0 \nprint(sum)\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s196025088', 's255079095', 's785644675', 's861249887', 's455959414'] | [2940.0, 2940.0, 2940.0, 3064.0, 2940.0] | [17.0, 18.0, 17.0, 18.0, 17.0] | [159, 147, 160, 94, 159] |
p02724 | u044138790 | 2,000 | 1,048,576 | 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.) | ['n = int(input())\nm = n%500\nprint(int((n - m)*1000/ 500 + m*5//5))', 'n = int(input())\nm = n%500\nprint(int((n - m)*1000/ 500 + m*5//5))', 'n = int(input())\nm = n%500\nk = m%5\nprint(int((n - m)*1000/ 500 + (m - k)*5//5))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s993789293', 's997871671', 's170634644'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 19.0] | [65, 65, 79] |
p02724 | u046158516 | 2,000 | 1,048,576 | 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.) | ['X=int(input())\nans=(X-X%500)*2\nX=X-X%500\nans=ans+(X-X%5)\nprint(ans)', 'X=int(input())\nans=(X-X%500)*2\nX=X%500\nans=ans+(X-X%5)\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s770049788', 's802401190'] | [2940.0, 2940.0] | [17.0, 17.0] | [67, 65] |
p02724 | u053535689 | 2,000 | 1,048,576 | 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.) | ['def atc_160b(X: int) -> int:\n return X // 500 * 1000 + X % 500 // 5 * 5\n\nX_input = input()\nprint(atc_160b(X_input))\n', 'def atc_160b(X: int) -> int:\n return X // 500 * 1000 + X % 500 // 5 * 5\n\n\nX_input = int(input())\nprint(atc_160b(X_input))\n'] | ['Runtime Error', 'Accepted'] | ['s473693595', 's482511491'] | [8964.0, 9016.0] | [21.0, 28.0] | [119, 125] |
p02724 | u055244973 | 2,000 | 1,048,576 | 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.) | ['X=int(input()) #1200\na=X//500 #2\nb=(X-500*a)//5 #\nprint(a+b)', 'X=int(input()) #1200\na=X//500 #2\nb=(X-500*a)//5 #\nprint(1000*a+5*b)'] | ['Wrong Answer', 'Accepted'] | ['s629565524', 's192218080'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 68] |
p02724 | u055854974 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\n\ncount=(X//500)*1000\nX=X//500\ncount+=(X//5)*5\n\nprint(count)', 'X = int(input())\n\ncount=(X//500)*1000\nX=X%500\ncount+=(X//5)*5\n\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s601628562', 's152068687'] | [2940.0, 2940.0] | [17.0, 18.0] | [76, 75] |
p02724 | u067986264 | 2,000 | 1,048,576 | 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.) | ['X = input()\na = X // 500\nb = X % 500\nc = b // 5\nprint(a * 1000 + c * 5)', 'X = int(input())\na = X // 500\nb = (X - a * 500) // 5 \nprint(a * 500 + b * 5)', 'X = int(input())\nprint((X//500)*1000+((X%500)//5)*5)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s742018067', 's966534424', 's696750806'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [71, 77, 52] |
p02724 | u069273180 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\nfh = x // 500\nf = x - 2*fh // 5\npint(f+fh)', 'X = int(input())\nfh = x // 500\nf = (x - (500*fh)) // 5\npint(f*5+fh*1000)', 'X = int(input())\nfh = x // 500\nf = (x - (500*fh)) // 5\npint(f*1000+fh*5)', 'X = int(input())\nfh = x // 500\nf = (x - (500*fh)) // 5\npint(f+fh)', 'x = int(input())\nfh = x // 500\nf = (x - (500*fh)) // 5\nsum = f*5+fh*1000\nprint(sum)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s628028630', 's699879050', 's804072155', 's933796143', 's546769064'] | [2940.0, 3188.0, 2940.0, 2940.0, 3064.0] | [17.0, 22.0, 17.0, 17.0, 18.0] | [59, 72, 72, 65, 83] |
p02724 | u077671688 | 2,000 | 1,048,576 | 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.) | ['input_X = int(input())\n\nresult_500 = input_X // 500\nresult_500ureshi = result_500 * 1000\nresult_5ureshi = (input_X - result_500 * 500) // 5 * 5\n\nprint(result_500ureshi)\nprint(result_5ureshi)\nresult = int(result_500ureshi + result_5ureshi)\nprint(result)', 'input_X = int(input())\n\nresult_500 = input_X // 500\nresult_500ureshi = result_500 * 1000\nresult_5ureshi = (input_X - result_500 * 500) // 5 * 5\n\nresult = int(result_500ureshi + result_5ureshi)\nprint(result)'] | ['Wrong Answer', 'Accepted'] | ['s109175141', 's392844525'] | [9080.0, 9064.0] | [27.0, 27.0] | [252, 206] |
p02724 | u080685822 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\nha = 0\n\nif x >= 500:\n x %= 500\n ha += (x // 500)*1000\n \nif x >= 5:\n ha += (x // 5)*5\n \nprint(ha)', 'x = int(input())\nha = 0\n\nif x >= 500:\n ha += (x // 500)*1000\n x %= 500\n \nif x >= 5:\n ha += (x // 5)*5\n \nprint(ha)'] | ['Wrong Answer', 'Accepted'] | ['s686388307', 's842802021'] | [2940.0, 2940.0] | [18.0, 19.0] | [118, 118] |
p02724 | u084411645 | 2,000 | 1,048,576 | 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.) | ['a = int(input())\nprint(2*(a//500) + (a - a//500)//5)\n', 'a = int(input())\na -= a%5\nprint(2*a - a%500)\n'] | ['Wrong Answer', 'Accepted'] | ['s133409075', 's838627398'] | [9112.0, 9080.0] | [26.0, 30.0] | [53, 45] |
p02724 | u088061627 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\n\nyen500 = X // 500\nnokori = X - yen500\nyen5 = nokori // 5\n\nprint(yen500 * 1000 + yen5 * 5)', 'X = int(input())\n\nyen500 = X // 500\nnokori = X - yen500 * 500\nyen5 = nokori // 5\n\nprint(yen500 * 1000 + yen5 * 5)'] | ['Wrong Answer', 'Accepted'] | ['s148737280', 's392927267'] | [3064.0, 2940.0] | [17.0, 17.0] | [107, 113] |
p02724 | u088115428 | 2,000 | 1,048,576 | 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.) | ['n =input()\na= 500\nb = 5\nsum = 0\nif(n%a==0):\n sum = n*2\nprint(sum)', 'n =int(input())\na= 500\nb = 5\nsum = 0\nif(n%a==0):\n sum = n*2\nelse:\n sum = (1000*(n//a)) + 5*((n%a)//b)\n \nprint(sum)\n'] | ['Runtime Error', 'Accepted'] | ['s456826154', 's051754540'] | [2940.0, 2940.0] | [17.0, 18.0] | [66, 118] |
p02724 | u088552457 | 2,000 | 1,048,576 | 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.) | ['def count_section_by_zero(data):\n count = 0\n flg = False\n start = 0\n for i, d in enumerate(data):\n if flg is False and d != 0:\n count += 1\n flg = True\n \n if d == 0:\n flg = False\n return count\n\ndef input_list():\n return list(map(int, input().split()))\n\ndef input_list_str():\n return list(map(str, input().split()))\n\ndef lcm_base(x, y):\n return (x * y) // fractions.gcd(x, y)\n\ndef lcm_list(numbers):\n return reduce(lcm_base, numbers, 1)\n\ndef gcd(*numbers):\n return reduce(fractions.gcd, numbers)\n\ndef gcd_list(numbers):\n return reduce(fractions.gcd, numbers)\n\ndef combinations_count(n, r):\n return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))\n\n\ndef divide_two(arg):\n c = 0\n while True:\n if c >= 2:\n break\n if arg % 2 != 0:\n break\n arg //= 2\n c += 1\n return c\n\n\ndef prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\ndef main():\n x = int(input())\n x_500 = 0\n x_5 = 0\n if x > 500:\n x_500 = x//500\n x -= x_500 * 500\n if x > 5:\n x_5 = x/5\n \n print(int(x_500*1000 + x_5 *5))\nimport math\nimport fractions\nimport collections\nimport itertools\nfrom functools import reduce\nmain()', 'def count_section_by_zero(data):\n count = 0\n flg = False\n start = 0\n for i, d in enumerate(data):\n if flg is False and d != 0:\n count += 1\n flg = True\n \n if d == 0:\n flg = False\n return count\n\ndef input_list():\n return list(map(int, input().split()))\n\ndef input_list_str():\n return list(map(str, input().split()))\n\ndef lcm_base(x, y):\n return (x * y) // fractions.gcd(x, y)\n\ndef lcm_list(numbers):\n return reduce(lcm_base, numbers, 1)\n\ndef gcd(*numbers):\n return reduce(fractions.gcd, numbers)\n\ndef gcd_list(numbers):\n return reduce(fractions.gcd, numbers)\n\ndef combinations_count(n, r):\n return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))\n\n\ndef divide_two(arg):\n c = 0\n while True:\n if c >= 2:\n break\n if arg % 2 != 0:\n break\n arg //= 2\n c += 1\n return c\n\n\ndef prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\ndef main():\n x = int(input())\n x_500 = 0\n x_5 = 0\n if x >= 500:\n x_500 = x//500\n x -= x_500 * 500\n if x >= 5:\n x_5 = x//5\n print(int(x_500*1000 + x_5 *5))\nimport math\nimport fractions\nimport collections\nimport itertools\nfrom functools import reduce\nmain()'] | ['Wrong Answer', 'Accepted'] | ['s947437668', 's743247303'] | [5048.0, 5304.0] | [37.0, 41.0] | [1448, 1438] |
p02724 | u093041722 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\na = X // 500\ny = X % 500\nb = y // 5\nz = y % 5\nprint(a)\nprint(y)\nprint(b)\nprint(z)\nprint(a * 1000 + b * 5)', 'X = int(input())\na = X // 500\ny = X % 500\nb = y // 5\nz = y % 5\nprint(a * 1000 + b * 5)'] | ['Wrong Answer', 'Accepted'] | ['s269249804', 's681406944'] | [3060.0, 2940.0] | [18.0, 17.0] | [122, 86] |
p02724 | u095844416 | 2,000 | 1,048,576 | 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.) | ['x=int(input())\na=500\nb=5\ny=x//500\nif x>=500:\n num=(y*1000)+(x%500//5*5)\n print(x%500//5*5)\n print(num)\nelse:\n num=x//5\n print(num)', 'x=int(input())\na=500\nb=5\nif x>=500:\n num=(x//500*1000)+(x-x//500*500)//500\n print(num)\nelse:\n num=x//5\n print(num)', 'x=int(input())\na=500\nb=5\ny=x//500\nnum=(y*1000)+((x%500)//5*5)\nprint(num)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s351136682', 's418485359', 's818202355'] | [2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [135, 118, 72] |
p02724 | u098994567 | 2,000 | 1,048,576 | 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.) | ['\n\n\nclass A:\n def __init__(self, money, yorokobi):\n self.money = money\n self.yorokobi = yorokobi\n\n def calc_yorokobi(self, credit): \n return int(credit / self.money) * self.yorokobi\n\n \n \n\ndef calc_yorokobi(input_money, x, yorokobi):\n ret = input_money // x * yorokobi\n return ret\n\n\ninput_x = int(input())\n\nyorokobi_500 = A(500, 1000)\nyorokobi_5 = A(5, 5)\n\nresult = 0 \nif input_x >= 500:\n print("1回目:{}".format(result))\n result += yorokobi_500.calc_yorokobi(input_x) \n print("2回目:{}".format(result))\n result += yorokobi_5.calc_yorokobi(input_x % 500) \n print("3回目:{}".format(result))\nelse:\n result += yorokobi_5.calc_yorokobi(input_x)\n\nprint(result)', '\n\n\nclass Yorokobi:\n def __init__(self, money, yorokobi):\n self.money = money\n self.yorokobi = yorokobi\n\n def calc_yorokobi(self, credit): \n return (credit // self.money) * self.yorokobi\n\n\ninput_x = int(input())\n\nyorokobi_500 = Yorokobi(500, 1000)\nyorokobi_5 = Yorokobi(5, 5)\n\nresult = 0 \nif input_x >= 500:\n result += yorokobi_500.calc_yorokobi(input_x) \n result += yorokobi_5.calc_yorokobi(input_x % 500) \nelse:\n result += yorokobi_5.calc_yorokobi(input_x)\n\nprint(result)\n\n\n# ret2 = ret1 * 1000 \n\n\n# ret5 = ret4 * 5 \n# print(ret2 + ret5)\n'] | ['Wrong Answer', 'Accepted'] | ['s261740201', 's172633367'] | [9124.0, 9112.0] | [24.0, 27.0] | [1540, 1604] |
p02724 | u103902792 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\nans = 0\nans += (x//500)*1000\nx %= 500\nans += x//5\nprint(ans)', 'x = int(input())\nans = 0\nans += (x //500)*1000\nx %= 500\nans += (x//5)*5\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s625604159', 's617617707'] | [2940.0, 2940.0] | [17.0, 17.0] | [77, 83] |
p02724 | u105659451 | 2,000 | 1,048,576 | 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.) | ['X =int(input())\nanswer = (X//500)*1000+((X%500)//5)*6\nprint(answer)', 'X =int(input())\nanswer = (X//500)*1000+((X%500)//5)*5\nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s662587556', 's082508956'] | [2940.0, 2940.0] | [18.0, 17.0] | [67, 67] |
p02724 | u106181248 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\n\nprint(int((x/500)*2) + int((x%500)/5))', 'x = int(input())\n\nprint(int(x/500) * 1000 + int(int(x%500)/5) *5)'] | ['Wrong Answer', 'Accepted'] | ['s539707228', 's721989904'] | [3064.0, 2940.0] | [23.0, 17.0] | [56, 65] |
p02724 | u106778233 | 2,000 | 1,048,576 | 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.) | ['x=int(input())\na=x//500\nb=(x-a)//5\nprint(a*1000+b*5)', 'x=int(input())\na=x//500\nb=(x-a*500)//5\nprint(a*1000+b*5)\n'] | ['Wrong Answer', 'Accepted'] | ['s780537074', 's086358447'] | [2940.0, 2940.0] | [17.0, 17.0] | [52, 57] |
p02724 | u122428774 | 2,000 | 1,048,576 | 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.) | ['#coin : happy\n#500 : 1000\n#5 : 5\nX = int(input())\nx500 = X // 500 * 1000\nx5 = (X - x500) // 5 * 5\nprint((x500 + x5)*2)', '#coin : happy\n#500 : 1000\n#5 : 5\nX = int(input())\nx500 = X // 500 * 1000\nx5 = (X - X // 500 * 500) // 5 * 5\nprint(x500 + x5)'] | ['Wrong Answer', 'Accepted'] | ['s069324755', 's302632019'] | [2940.0, 2940.0] | [17.0, 18.0] | [118, 124] |
p02724 | u122557489 | 2,000 | 1,048,576 | 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.) | ['X = input()\nY = int(X) / 500\nZ = (int(X) - Y * 500) / 5\nprint(Y * 1000 + Z * 5)', 'X = int(input())\nY = X // 500\nZ = (X - Y * 500) // 5\nprint(Y * 1000 + Z * 5)'] | ['Wrong Answer', 'Accepted'] | ['s614933564', 's423867347'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 76] |
p02724 | u124499550 | 2,000 | 1,048,576 | 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.) | ['X= int(input())\n\ntotal = (X//500)*1000 + (X%500)//5*5\n', 'X= int(input())\n\nprint((X//500)*1000 + (X%500)//5*5)\n'] | ['Wrong Answer', 'Accepted'] | ['s524571123', 's316677461'] | [2940.0, 2940.0] | [18.0, 17.0] | [54, 53] |
p02724 | u128661070 | 2,000 | 1,048,576 | 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.) | ['# coding:utf-8\ncoin = int(input())\nreward = (coin // 500) *1000\nreward += int(((coin - (reward / 2)) // 5) * 10)\nprint(reward)', '# coding:utf-8\ncoin = int(input())\nreward = (coin // 500) *1000\ncoin = coin - (coin // 500)*500\nreward += (coin // 5) * 5\nprint(reward)'] | ['Wrong Answer', 'Accepted'] | ['s691684415', 's256371269'] | [2940.0, 2940.0] | [19.0, 18.0] | [126, 136] |
p02724 | u131406572 | 2,000 | 1,048,576 | 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.) | ['x=int(input())\nimport math\na=x//500\nb=(x-a*500)//50\nprint(1000*a+5*b)', 'x=int(input())\nimport math\na=x//500\nb=(x-a*500)//5\nprint(1000*a+5*b)\n'] | ['Wrong Answer', 'Accepted'] | ['s702722472', 's079597223'] | [2940.0, 2940.0] | [18.0, 18.0] | [69, 69] |
p02724 | u131881594 | 2,000 | 1,048,576 | 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.) | ['x=int(input())\n(a,b)=divmod(x/500)\nprint(a*1000+b//5*5)', 'x=int(input())\n(a,b)=divmod(x,500)\nprint(a*1000+b//5*5)'] | ['Runtime Error', 'Accepted'] | ['s535825054', 's580247171'] | [9032.0, 9096.0] | [25.0, 27.0] | [55, 55] |
p02724 | u132049876 | 2,000 | 1,048,576 | 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.) | ['s = int(input())\nres = (s//500*1000) + ((s%500)//5)\nprint(res)', 's = int(input())\nres = (s//500)*1000 + (s%500)//5\nprint(res)', 's = int(input())\nres = (s//500)*1000 + ((s%500)//5)*5\nprint(res)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s261886841', 's770865058', 's179328801'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [62, 60, 64] |
p02724 | u135389999 | 2,000 | 1,048,576 | 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.) | ['n = int(input())\n\na = n//500\nb = (n - a * 500) //5\nans = a * 1000 + b\nprint(ans)\n\n', 'n = int(input())\n \na = n//500\nb = (n - a * 500) //5\nans = a * 1000 + b * 5\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s247919469', 's183282092'] | [2940.0, 3064.0] | [17.0, 17.0] | [82, 85] |
p02724 | u137930457 | 2,000 | 1,048,576 | 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.) | ['def main():\n n = int(input())\n l = []\n \n if(n<0 or n>1000000000):\n main()\n \n \n if(n!=0):\n h1 = int(n/500)*1000\n ar = n - (int(n/500)*500)\n h1+=int(ar/5)*5\n h2 = int(n/5)*5\n print(ar)\n l.append(h1)\n l.append(h2)\n print(max(l))\n else:\n print(0)\n\nmain() \n', 'def main():\n n = int(input())\n l = []\n \n if(n<0 or n>1000000000):\n main()\n \n \n if(n!=0):\n h1 = int(n/500)*1000\n ar = n - (int(n/500)*500)\n h1+=int(ar/5)*5\n h2 = int(n/5)*5\n \n l.append(h1)\n l.append(h2)\n print(max(l))\n else:\n print(0)\n\nmain() \n'] | ['Wrong Answer', 'Accepted'] | ['s710491372', 's748977109'] | [3064.0, 3064.0] | [18.0, 17.0] | [349, 340] |
p02724 | u141419468 | 2,000 | 1,048,576 | 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.) | ['n = int(input())\n\nS = n // 500\nR = n - S\nx = R // 5\n\nH = 1000 * S + x * 5\nprint(H)', 'n = int(input())\n\nS = n // 500\nmod = n % 500\nx = mod // 5\n\nH = 1000 * S + x * 5\nprint(H)'] | ['Wrong Answer', 'Accepted'] | ['s802939354', 's239784258'] | [2940.0, 3060.0] | [17.0, 19.0] | [82, 88] |
p02724 | u152891327 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\npleasure += (X // 500) * 1000\nX //= 500\npleasure += (X // 5) * 5\nprint(pleasure)', 'X = int(input())\npleasure = (X // 500) * 1000\nX %= 500\npleasure += (X // 5) * 5\nprint(pleasure)\n'] | ['Runtime Error', 'Accepted'] | ['s890104114', 's281484037'] | [2940.0, 2940.0] | [17.0, 17.0] | [97, 96] |
p02724 | u165268875 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\n\nprint( (X//500)*1000 + ((X%500)//5)*5 ', 'X = int(input())\n\nprint( (X//500)*1000 + ((X%500)//5)*5 )'] | ['Runtime Error', 'Accepted'] | ['s146656056', 's326613081'] | [2940.0, 2940.0] | [17.0, 17.0] | [56, 57] |
p02724 | u166807268 | 2,000 | 1,048,576 | 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.) | ['num = int(input())\npoint = 0\nwhile num >= 500:\n point+=1000\n num-=500\nwhile num >=5:\n point+=5\n num-=5\nprint(re)', 'num = int(input())\nre = 0\nwhile num >= 500:\n re+=1000\n num-=500\nwhile num >=5:\n re+=5\n num-=5\nprint(re)'] | ['Runtime Error', 'Accepted'] | ['s264460319', 's640867688'] | [2940.0, 2940.0] | [410.0, 408.0] | [124, 115] |
p02724 | u169866975 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\n\nprint(int(X/500)*500 + int((X%500)/5)*5) ', 'X = int(input())\n \nprint(int(X/500)*1000 + int((X%500)/5)*5) '] | ['Wrong Answer', 'Accepted'] | ['s787019528', 's139035979'] | [2940.0, 2940.0] | [17.0, 17.0] | [59, 61] |
p02724 | u175746978 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\na = x // 500\nprint((x // 500) * 1000 + x - 500 * a)', 'x = int(input())\na = x // 500\nprint((x // 500) * 1000 + ((x - 500 * a) // 5) * 5)'] | ['Wrong Answer', 'Accepted'] | ['s834810150', 's303662603'] | [2940.0, 2940.0] | [17.0, 17.0] | [68, 81] |
p02724 | u176915127 | 2,000 | 1,048,576 | 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.) | ['num_origin = input()\ngohyoku = int(num_origin/500)\nnum_zan = num_origin - gohyoku*500\ngo = int(go/5)\n\nnum = go*5 + gohyoku*1000\n\nprint(num)', 'num_origin = int(input())\ngohyoku = int(num_origin/500)\nnum_zan = num_origin - gohyoku*500\ngo = int(num_zan/5)\n \nnum = go*5 + gohyoku*1000\n \nprint(num)'] | ['Runtime Error', 'Accepted'] | ['s145877518', 's439388673'] | [2940.0, 2940.0] | [17.0, 17.0] | [139, 151] |
p02724 | u179034267 | 2,000 | 1,048,576 | 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.) | ['big_ple=X/500*1000\nremain=X%500\nsmall_ple=remain/5*5\nSum=big_ple+small_ple\n\nif X<5:\n print(0)\nelif X<500:\n print(small_ple)\nelse:\n print(Sum)', 'big_ple=X//500*1000\nremain=X%500\nsmall_ple=remain//5*5\nSum=big_ple+small_ple\n\nif X<5:\n print(0)\nelif X<500:\n print(small_ple)\nelse:\n print(Sum)', 'X=int(input())\nbig_ple=X//500*1000\nremain=X%500\nsmall_ple=remain//5*5\nSum=big_ple+small_ple\n \nif X<5:\n print(0)\nelif X<500:\n print(small_ple)\nelse:\n print(Sum)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s082052208', 's839937743', 's602282867'] | [2940.0, 2940.0, 3060.0] | [18.0, 17.0, 17.0] | [151, 153, 169] |
p02724 | u187883751 | 2,000 | 1,048,576 | 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.) | ['x=int(input())\nn=x//500\nm=x%500//5\nans=500*n+5*m\nprint(ans)\n', 'x=int(input())\nn=x//500\nm=x%500//5\nans=1000*n+5*m\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s948481369', 's340954791'] | [9000.0, 9144.0] | [30.0, 28.0] | [60, 61] |
p02724 | u189089176 | 2,000 | 1,048,576 | 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.) | ['\n\n\n\nX = int(input())\n\n\nhappy = 0\n\n\nmax_five_hundred = int(X/500)\nmax_five = (X-(max_five_hundred*500))/5\n\n\nprint(int((max_five_hundred*1000)+(max_five*5)))', '\n\n\n\nX = int(input())\n\n\nhappy = 0\n\n\nmax_five_hundred = X//500\nmax_five = (X-(max_five_hundred*500))//5\n\n\nprint((max_five_hundred*1000)+(max_five*5))'] | ['Wrong Answer', 'Accepted'] | ['s263171217', 's175563709'] | [2940.0, 2940.0] | [18.0, 17.0] | [367, 359] |
p02724 | u199120400 | 2,000 | 1,048,576 | 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.) | ['s = int(input())\n\nresult = (s/500) * 1000 + ((s%500)/5) * 5\n\nprint(int(result))', 's = int(input())\n \nresult = int(s/500) * 1000 + int((s%500)/5)*5\n \nprint(int(result))'] | ['Wrong Answer', 'Accepted'] | ['s777351095', 's418142085'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 85] |
p02724 | u200228637 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\n\na = X // 500\nb = (X % 500) // 5\n\nprint(a+b)', 'X = int(input())\n \na = X // 500\nb = (X - a * 500) // 5\n \nprint(a + b)', 'X = int(input())\n \na = X // 500\nb = (X % 500) // 5\n \nprint(a + b)', 'X = int(input())\n \na = X // 500\nb = (X - a * 500) // 5\n \nprint(1000 * a + 5 * b)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s021866249', 's087063741', 's255860642', 's377359378'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [61, 69, 65, 80] |
p02724 | u200316926 | 2,000 | 1,048,576 | 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.) | ['\nX = 1000000000\nuresisa_500yen = (X // 500) * 1000\nmod = (X % 500)\nuresisa_5yen = (mod // 5) * 5\n\nuresisa_total = uresisa_500yen + uresisa_5yen\nprint(uresisa_total)', 'X = int(input("input:"))\nuresisa_500yen = (X // 500) * 1000\nmod = (X % 500)\nuresisa_5yen = (mod // 5) * 5\n\nuresisa_total = uresisa_500yen + uresisa_5yen\nprint(uresisa_total)', 'X = int(input("input:"))\nuresisa_500yen = (X // 500) * 1000\nmod = (X % 500)\nuresisa_5yen = (mod // 5) * 5\n\nuresisa_total = uresisa_500yen + uresisa_5yen\nprint(uresisa_total)', 'X = input()\nuresisa_500yen = (X // 500) * 1000\nmod = (X % 500)\nuresisa_5yen = (mod // 5) * 5\n\nuresisa_total = uresisa_500yen + uresisa_5yen\nprint(uresisa_total)', 'X = int(input(""))\n\nhappy_1 = (X // 500) * 1000\nhappy_2 = ((X % 500) // 5) * 5\n\nval = happy_1 + happy_2\n\nprint(val)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s104608936', 's190492822', 's593700056', 's838429182', 's207336434'] | [2940.0, 2940.0, 2940.0, 3064.0, 2940.0] | [18.0, 17.0, 17.0, 17.0, 17.0] | [172, 173, 173, 160, 115] |
p02724 | u204616996 | 2,000 | 1,048,576 | 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.) | ['X=int(input())\nans=0\nif X>=500:\n ans+=X//500\n X=X-ans*500\nif X>=5:\n ans+=X//5\nprint(ans)', 'X=int(input())\nans=0\nif X>=500:\n ans+=(X//500)*1000\n X=X-(ans//1000)*500\nif X>=5:\n ans+=(X//5)*5\nprint(ans)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s942631537', 's886847858'] | [2940.0, 2940.0] | [17.0, 23.0] | [91, 112] |
p02724 | u205087376 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\na = int((x//500)*1000)\nb = int(((x-(x//500))//5)*5)\nprint(int(a+b))', 'x = int(input())\na = int((x//500)*1000)\nb = int(((x-(x//500)*500)//5)*5)\nprint(int(a+b))\n'] | ['Wrong Answer', 'Accepted'] | ['s345030299', 's663681195'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 89] |
p02724 | u207326980 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\n\ndiv = x//500\nrem = x-div*500\nres = div*1000 + (rem//5)*5', 'x = int(input())\n\ndiv = x//500\nrem = x-div*500\nres = div*1000 + (rem//5)*5\n\nprint(res)'] | ['Wrong Answer', 'Accepted'] | ['s291478265', 's224706676'] | [2940.0, 2940.0] | [18.0, 17.0] | [74, 86] |
p02724 | u209313313 | 2,000 | 1,048,576 | 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.) | ['X = input()\nnum500=X//500\nnum5=(X%500)//5\nprint (1000*num500+5*num5)', 'X = input()\nnum_500=X//500\nnum_5=(X%500)//5\nprint (1000*num_500+5*num_5)', 'X = int(input())\nnum500=//500\nnum5=(X%500)//5\nprint (1000*num500+5*num5)', 'X = int(input())\nnum500=X//500\nnum5=(X%500)//5\nprint (1000*num500+5*num5)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s017909888', 's435090725', 's447169064', 's533390853'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [68, 72, 72, 73] |
p02724 | u223442335 | 2,000 | 1,048,576 | 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.) | ["X = int(input('Enter Input: '))\nif X > 5:\n a = int(X/500)\n b = X % 500\n c = int(b/5)\n d = a * 1000 + c * 5\n print(d)\nelse:\n print(0)", "X = int(input('Enter Input: '))\nif X in range(0, 10**9):\n if X > 500:\n a = int(X/500)\n b = X % 500\n c = int(b/5)\n d = a * 1000 + c * 5\n print(d)\n elif X <500 and X>5:\n a = int(X/5)\n d = a * 5\n print(d)", 'X = int(input())\nif X>=0 and X<=10**9:\n a, b = divmod(X, 500)\n if X >= 500:\n c = int(b/5)\n d = int(a*1000) + c*5\n print(d)\n elif X >= 5 and X <500:\n c = int(X/5)*5\n print(c)\n else:\n print(0)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s236224038', 's445151900', 's619567546'] | [2940.0, 3064.0, 3060.0] | [17.0, 22.0, 17.0] | [150, 263, 244] |
p02724 | u224119985 | 2,000 | 1,048,576 | 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.) | ['x=input()\na=x//500\nb=(x%500)//5\nprint(1000*a+5*b)', 'x=input()\na=x//500\nb=a//5\nprint(1000*a+5*b)', 'x=int(input())\na=x//500\nb=(x%500)//5\nprint(1000*a+5*b)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s033115519', 's064027861', 's832152330'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [49, 43, 54] |
p02724 | u224554402 | 2,000 | 1,048,576 | 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.) | ['a=int(input())\nn = math.floor(a/500)\ntotal_price= n * 1000 + (a - n * 500)\nprint(total_price)', 'import math\na=int(input())\nn = math.floor(a/500)\nm = math.floor((a - n * 500)/5)\ntotal_price= n * 1000 + m*5\nprint(total_price)'] | ['Runtime Error', 'Accepted'] | ['s226398197', 's282445164'] | [2940.0, 3060.0] | [18.0, 17.0] | [93, 127] |
p02724 | u228232845 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\nans = 0\n\nans += (x // 500) * 1000\nx -= (x // 500) * 500\nprint(x, ans)\nans += (x // 5) * 5', 'x = int(input())\nans = 0\n\nans += (x // 500) * 1000\nx -= (x // 500) * 500\nans += (x // 5) * 5\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s202566850', 's351032975'] | [3064.0, 2940.0] | [17.0, 18.0] | [106, 103] |
p02724 | u228303592 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\na = x//500\nb = (x%500)//50\n\nprint(a*1000 + b*5)', 'x = int(input())\na = x//500\nb = (x%500)//5\n\nprint(a*1000 + b*5)\n'] | ['Wrong Answer', 'Accepted'] | ['s638763184', 's627480028'] | [9156.0, 9096.0] | [29.0, 33.0] | [64, 64] |
p02724 | u236536206 | 2,000 | 1,048,576 | 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.) | ['def registar(nyukin,coin):\n oturi=nyukin-coin*int(nyukin/coin)\n return oturi,int(nyukin/coin)\n\nx,coin_500=registar(x,500)\n#print(coin_500)\nx,coin_5=registar(x,5)\nx,coin_1=registar(x,1)\n\n#print(coin_500,coin_5,coin_1)\nuresisa=coin_500*1000+coin_5*5\nprint(uresisa)', 'x=int(input())\n\ncoin_1=0\ncoin_5=0\ncoin_500=0\n\ndef registar(nyukin,coin):\n oturi=nyukin-coin*int(nyukin/coin)\n return oturi,int(nyukin/coin)\n\nx,coin_500=registar(x,500)\n#print(coin_500)\nx,coin_5=registar(x,5)\nx,coin_1=registar(x,1)\n\n#print(coin_500,coin_5,coin_1)\nuresisa=coin_500*1000+coin_5*5\nprint(uresisa)'] | ['Runtime Error', 'Accepted'] | ['s806904656', 's447885315'] | [2940.0, 3064.0] | [18.0, 19.0] | [268, 314] |
p02724 | u237299453 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\n\na = X * 0.01 // 5 \n\npointa = a * 1000\n\nb = X - a * 500\n\n\npointb = b // 5 * 5\n\n\n\nprint(pointa + pointb)', 'X = int(input())\n\na = X * 0.01 // 5 \n\npointa = a * 1000\n\nb = X - a * 500\n\n\npointb = b // 5 * 5\n\n\nz = round(pointa + pointb)\nprint(z)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s390950824', 's814859615'] | [2940.0, 2940.0] | [17.0, 18.0] | [120, 134] |
p02724 | u238084414 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\n\ngh = X//500\ng = X%500//5\n\nprint(gh * 1000 + g * 1)', 'X = int(input())\n\ngh = X//500\ng = X%500//5\n\nprint(gh * 1000 + g * 5)'] | ['Wrong Answer', 'Accepted'] | ['s931150964', 's260669795'] | [2940.0, 2940.0] | [18.0, 17.0] | [68, 68] |
p02724 | u244836567 | 2,000 | 1,048,576 | 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.) | ['a=int(input())\nb=a//500\nc=(a-b)//5\nprint(1000*b+5*c)', 'a=int(input())\nb=a//500\nc=(a-b*500)//5\nprint(1000*b+5*c)'] | ['Wrong Answer', 'Accepted'] | ['s550077868', 's780770014'] | [9036.0, 9100.0] | [33.0, 27.0] | [52, 56] |
p02724 | u247211039 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\nprint(X//500*1000+5*(X-500*(X//500))//5)', 'X = int(input())\nprint(int(X/500)*1000+int((X-500*int(X/500))/500)*5)', 'X = int(input())\nprint(X//500*1000+(X % 500)//5*5)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s548389501', 's799342705', 's418116889'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [57, 69, 50] |
p02724 | u252964975 | 2,000 | 1,048,576 | 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.) | ["X=int(input())\nprint(print('{:.0f}'.format(round(X/500)*1000+round(rem(X/500)/5)*5)))", "import math\nX=int(input())\nA=math.floor(X/500)*1000+math.floor(X%500/5)*5\nprint('{:.0f}'.format(A))"] | ['Runtime Error', 'Accepted'] | ['s168434700', 's331121191'] | [2940.0, 2940.0] | [17.0, 17.0] | [85, 99] |
p02724 | u254066052 | 2,000 | 1,048,576 | 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.) | [' coin = int(input())\n fivet_yen = 0\n five_yen = 0\n if coin == 0:\n print(0)\n else:\n while(coin > 0):\n if coin >= 500:\n coin = coin - 500\n fivet_yen = fivet_yen + 1000\n else:\n if coin >= 5:\n coin = coin - 5\n five_yen = five_yen + 5\n else: \n coin = coin - 1\n\n\n print(fivet_yen + five_yen)\n \n \n ', 'coin = int(input())\nfivet_yen = 0\nfive_yen = 0\nif coin == 0:\n print(0)\nelse:\n while(coin > 0):\n if coin >= 500:\n coin = coin - 500\n fivet_yen = fivet_yen + 1000\n else:\n if coin >= 5:\n coin = coin - 5\n five_yen = five_yen + 5\n else: \n coin = coin - 1\n print(fivet_yen + five_yen)\n\n\n \n \n ', 'coin = int(input())\ncoin = coin * 2\n\nif coin == 0:\n print(0)\nelse:\n print(coin)', 'coin = int(input())\nfivet_yen = 0\nfive_yen = 0\nif coin == 0:\n print(0)\nelse:\n while(coin > 0):\n if coin >= 500:\n coin = coin - 500\n fivet_yen = fivet_yen + 1000\n else:\n if coin >= 5:\n coin = coin - 5\n five_yen = five_yen + 5\n else: \n coin = coin - 1\n print(fivet_yen + five_yen)\n\n\n \n \n '] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s498200997', 's707106822', 's853808761', 's221050817'] | [3064.0, 23740.0, 2940.0, 3060.0] | [17.0, 1958.0, 18.0, 426.0] | [448, 379, 85, 378] |
p02724 | u254221913 | 2,000 | 1,048,576 | 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.) | ['X = int(input())\n\nres500 = X // 500\nX %= 500\nres5 = X // 5\nprint(res500 + res5)', 'X = int(input())\n\nres500 = X // 500\nX %= 500\nres5 = X // 5\nprint(res500 * 1000 + res5 * 5)'] | ['Wrong Answer', 'Accepted'] | ['s028500946', 's715800568'] | [2940.0, 2940.0] | [17.0, 18.0] | [79, 90] |
p02724 | u257265865 | 2,000 | 1,048,576 | 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.) | ['X = input()\na=X//500\nb=(X-500*a)//5\nprint(1000*a+5*b)', 'X = int(input())\na=X//500\nb=(X-500*a)//5\nprint(1000*a+5*b)\n'] | ['Runtime Error', 'Accepted'] | ['s133012410', 's086731009'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 59] |
p02724 | u259265086 | 2,000 | 1,048,576 | 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.) | ['Y = int(input())\n\nC500 = Y // 500\nC5 = (Y - C500*500) // 5 if (Y - C500*500) // 5>0 else 0\n\nprint(C500, C5)\nprint(C500*1000+C5*5)', 'Y = int(input())\n \nC500 = Y // 500\nC5 = (Y - C500*500) // 5 if (Y - C500*500) // 5>0 else 0\n\nprint(C500*1000+C5*5)'] | ['Wrong Answer', 'Accepted'] | ['s035747266', 's973456244'] | [2940.0, 2940.0] | [18.0, 17.0] | [129, 114] |
p02724 | u262543030 | 2,000 | 1,048,576 | 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.) | ['import math\n\nN = int(input())\n#print(N)\n\nA = math.floor(N / 500)\n#print(A)\nN = N - A * 500\n#print(N)\nB = math.floor(N / 5)\nprint(B)\n\nAA = A * 1000\nBB = B * 5\nprint(AA + BB)', 'import math\n\nN = int(input())\n#print(N)\n\nA = math.floor(N / 500)\n#print(A)\nN = N - A * 500\n#print(N)\nB = math.floor(N / 5)\n\n\nAA = A * 1000\nBB = B * 5\nprint(AA + BB)'] | ['Wrong Answer', 'Accepted'] | ['s347466848', 's918777859'] | [9160.0, 9160.0] | [31.0, 26.0] | [172, 173] |
p02724 | u262955682 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\n\nf = int(x / 500) * 1000\n\ns = int((f % 500) / 5) * 5\n\nprint(f + s)\n', 'x = int(input())\n\nf = int(x / 500) * 1000\n\ns = int((x % 500) / 5) * 5\n\nprint(f + s)\n'] | ['Wrong Answer', 'Accepted'] | ['s535835243', 's610304764'] | [3060.0, 2940.0] | [19.0, 17.0] | [84, 84] |
p02724 | u265154666 | 2,000 | 1,048,576 | 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.) | ['x = int(input())\n\nc_500 = x // 500\nx = c_500 * 500\nc_5 = x // 5\n\nprint(c_500 * 1000 + c_5 * 5)\n\n', 'x = int(input())\n \nc_500 = x // 500\nx = x - c_500 * 500\nc_5 = x // 5\n \nprint(c_500 * 1000 + c_5 * 5)'] | ['Wrong Answer', 'Accepted'] | ['s684958512', 's625486252'] | [2940.0, 3064.0] | [18.0, 17.0] | [96, 100] |
p02724 | u266264498 | 2,000 | 1,048,576 | 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.) | ['n=int(input())\nprint(1000*(n/500)+((n%500))', 'n=int(input())\nprint(1000*(n//500)+5*((n%500)//5))'] | ['Runtime Error', 'Accepted'] | ['s065059302', 's813598176'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 50] |
p02724 | u266436174 | 2,000 | 1,048,576 | 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.) | ['n=int(input())\n\nct = n // 1000\n\nost = n % 1000\n\nans = ct * 500 + (ost // 5) * 5\n\nprint(ans)', 'n=int(input())\n\nct = n // 500\n\nost = n - ct * 500\n\nans = ct * 1000 + (ost // 5) * 5\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s081626173', 's244492207'] | [2940.0, 2940.0] | [17.0, 17.0] | [91, 96] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.