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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03103 | u686036872 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int, input().split())\n\nA = []\nfor i in range(N):\n a, b = map(int, input().split())\n A.append([a, b])\n\nA.sort(key=lambda x:x[0])\n\nmoney = 0\ncnt = 0\nfor i in range(N):\n for j in range(A[i][1]):\n money += A[i][0]\n if cnt == N:\n print(money)\n break',... | ['Wrong Answer', 'Accepted'] | ['s129916145', 's487895633'] | [21204.0, 21224.0] | [2105.0, 427.0] | [300, 344] |
p03103 | u687343821 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M=list(map(int,input().split()))\nA=[]\nfor i in range(N):\n A.append(list(map(int,input().split())))\n# print(A)\nA.sort()\n#print(A)\nres,count=0,0\nfor i in range(N):\n res+=A[i][0]*A[i][1]\n count+=A[i][1]\n if(count==M):\n break \n if(count>M):\n res-=A[i][0]*A[i][1]\n count... | ['Runtime Error', 'Accepted'] | ['s140085923', 's551950558'] | [3064.0, 27884.0] | [17.0, 514.0] | [509, 508] |
p03103 | u691018832 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\na = [0] * n\nb = [0] * n\nfor i in range(n):\n a[i], b[i] = map(int, input().split())\nmatch = 0\nans = 0\nmini = min(a)\n\nfor j in range(n):\n for k in range(b[a.index(mini)]):\n if m <= match:\n break\n ans += mini\n match += 1\n \n b.po... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s242581385', 's481796129', 's492716397', 's139090171'] | [10868.0, 10868.0, 10868.0, 17740.0] | [2104.0, 288.0, 2104.0, 252.0] | [366, 320, 331, 322] |
p03103 | u693716675 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = [int(i) for i in input().split()]\ncost = 0\namount =0\ndic ={}\nfor _ in range(N):\n a,b = [int(i) for i in input().split()]\n if a in dic:\n dic[a] += b\n else:\n dic[a] = b\n\nfor a,b in dic.items():\n if amount+b<=M:\n amount += b\n cost += a*b\n else:\n re... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s513180970', 's565890576', 's680239194'] | [17808.0, 17808.0, 23008.0] | [351.0, 354.0, 475.0] | [368, 317, 387] |
p03103 | u693933222 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['lx = list(map(int,input().split(" ")))\n#la = [li[0]][li[1]]\nla = []\ncnt = 0\n\nfor i in range(0, lx[0]):\n la.append(list(map(int,input().split(" "))))\n\nprint("setok")\ncoin = 0\nbottle = 0\nfor i in range(1, 10 ** 9):\n for j in range(0, lx[0]):\n if (la[j][0] == i):\n while (bottle <= l... | ['Time Limit Exceeded', 'Accepted'] | ['s982184275', 's338058616'] | [27380.0, 28656.0] | [2105.0, 535.0] | [458, 347] |
p03103 | u698771758 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['a,b=map(int,input().split())\ne=[]\nfor i in range(a):\n c,d=map(int, input().split())\n e+=[[c,d]]\ne.sort()\nprint(e)\na=i=j=0\nwhile i < b:\n a+=(e[j][0]*e[j][1])\n i+=e[j][1]\n j+=1\nprint(a-((i-b)*e[j-1][0]))', 'a,b=map(int,input().split())\ne=[]\nfor i in range(a):\n c,d=map(int, input().split... | ['Wrong Answer', 'Accepted'] | ['s360286480', 's540360483'] | [26056.0, 19996.0] | [539.0, 482.0] | [216, 207] |
p03103 | u701743518 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['# coding: utf-8\nfrom sys import stdin.readline as input\n \nN, M = [int(i) for i in input().split()]\n \nplices = [[int(i) for i in input().split()] for _ in range(N)]\n \nplices.sort(key = lambda x:x[0])\n \nm = 0\ncost = 0\n \nfor i in range(N):\n if m >= M:\n break\n buy = min(M - m, plices[i][1])\n ... | ['Runtime Error', 'Accepted'] | ['s191159760', 's530935427'] | [2940.0, 22800.0] | [19.0, 320.0] | [358, 356] |
p03103 | u703130195 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\nsum = 0\nmoney = 0\nlist_ab = list()\nfor i in range(n):\n list_ab.append(list(map(int, input().split())))\nlist_ab = sorted(list_ab)\nfor i in range(n):\n print(i)\n if(list_ab[i][1] >= m - sum):\n money += list_ab[i][0] * (m - sum)\n break\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s105918090', 's078780362'] | [28656.0, 28656.0] | [577.0, 521.0] | [385, 372] |
p03103 | u711539583 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\na = []\nfor _ in range(n):\n a.append(list(map(int, input().split())))\na.sort()\npm = s = 0\nm_minus_1 = m - 1\nfor item in a:\n pm += item[1]\n if tmp > m_minus_1:\n print(s + item[0] * (m - pm + item[1]))\n break\n else:\n s += item[0] * item[1]\n'... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s266337924', 's281800849', 's809692544', 's368603434'] | [27756.0, 27880.0, 27884.0, 27880.0] | [487.0, 440.0, 465.0, 483.0] | [303, 284, 303, 286] |
p03103 | u712082626 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\nt = {}\nfor i in range(n):\n a,b = map(int, input().split())\n t[a] = b\nt = sorted(t.items())\nprint(t)\nr = 0\nfor i in t:\n if i[1] < m:\n r += i[0]*i[1]\n m -= i[1]\n else:\n r += i[0]*(m)\n break\nprint(r)\n', 'n, m = map(int, input().spli... | ['Wrong Answer', 'Accepted'] | ['s226645524', 's808421243'] | [22996.0, 17788.0] | [460.0, 407.0] | [270, 265] |
p03103 | u712975113 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M=map(int,input().split())\nA=[[]]\nfor i in range(N):\n A.append(list(map(int,input().split())))\nA.sort(key=lambda x:(x[0],x[1]))\nC=[A[0][0]*A[0][1]]\nD=A[0][1]\nfor i in range(N-1):\n C.append(C[i]+A[i+1][0]*A[i+1][1])\n D.append(D[i]+A[i+1][1])\nfor i in range(N):\n if M<D[i]:\n print(C[i]-(... | ['Runtime Error', 'Accepted'] | ['s252460688', 's144681664'] | [27380.0, 41672.0] | [349.0, 607.0] | [322, 368] |
p03103 | u720636500 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int, input().split())\nlis = []\nfor _ in range(N):\n a, b = map(int, input().split)\n for l in range(b):\n lis.append(a)\nlis.sort()\ntotal = 0\nfor i in range(M):\n total = total + lis[i]\nprint(total) ', 'N, M = map(int, input().split())\nlis = []\nfor _ in range(N):\n a, b = map(int, input().sp... | ['Runtime Error', 'Accepted'] | ['s000865271', 's932041393'] | [3060.0, 18168.0] | [18.0, 392.0] | [212, 433] |
p03103 | u732870425 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\nab = [tuple(map(int, input().split())) for _ in range(n)]\n\nab.sort(key=lambda x:x[0])\n\ncnt = 0\nprice = 0\ni = 0\nwhile cnt < m:\n price += ab[i][0] * ab[i][1]\n cnt += ab[i][1]\n if cnt > m:\n price -= ab[i][0] * (m - cnt)\n break\n i += 1\n\nprint(pric... | ['Wrong Answer', 'Accepted'] | ['s866810655', 's044841451'] | [18116.0, 18116.0] | [385.0, 397.0] | [304, 304] |
p03103 | u742385708 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N = list(map(int,input().split()))\ndrinks = [list(map(int,input().split())) for i in range(N[0])]\ndrinks.sort()\nprint(drinks)\ncounter=0\namount=0\nflag=0\n\nfor i in range(N[0]):\n if flag==1:\n break\n while(drinks[i][1]!=0):\n drinks[i][1] -=1\n counter +=1\n amount += drinks[i... | ['Wrong Answer', 'Accepted'] | ['s382708431', 's523435266'] | [33776.0, 27880.0] | [553.0, 480.0] | [393, 380] |
p03103 | u749770850 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\n\nab = []\n\nfor i in range(n):\n a, b = map(int, input().split())\n ab.append([a,b])\n\nab.sort()\nans = 0\nif len(ab) == 1:\n if m >= ab[0][1]:\n print(ab[0][0] * ab[0][1])\n exit()\n else:\n print(ab[0][0] * m)\n exit()\n\n\nfor i, j in ab:\n for k in range(j):\n ... | ['Wrong Answer', 'Accepted'] | ['s327297945', 's831214130'] | [20540.0, 20048.0] | [551.0, 447.0] | [397, 254] |
p03103 | u754022296 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\nab = sorted([ list(map(int, input().split())) for _ in range(n) ])\nc = 0\nfor a, b in ab:\n if n <= b:\n c += a*n\n print(c)\n break\n else:\n c += a*b\n n -= b', 'n, m = map(int, input().split())\nab = sorted([ list(map(int, input().split())) for _ in range(n) ])\n... | ['Wrong Answer', 'Accepted'] | ['s605287555', 's211324927'] | [28652.0, 28652.0] | [520.0, 489.0] | [202, 202] |
p03103 | u755027226 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int, input().split())\n\nAB = []\nfor i in range(N):\n AB.append(list(map(int, input().split())))\nAB.sort(key=lambda x: x[0])\ncount = 0\nans = 0\nfor ab in AB:\n if M > count+ab[1]:\n count += ab[1]\n ans += ab[0]*ab[1]\n print(count, ans)\n else:\n ans += ab[0] * (M-... | ['Wrong Answer', 'Accepted'] | ['s936182879', 's098542877'] | [29024.0, 29024.0] | [565.0, 446.0] | [361, 310] |
p03103 | u756429062 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = (int(i) for i in input().split())\na = [list(map(int,input().split())) for i in range(n)]\nb = sorted(a)\ncnt = 0\nmoney = 0\nprint(b)\n\nwhile True:\n\tfor x,y in b:\n\t\tcnt += y\n\t\tmoney += x * y\n\t\tprint(money)\n\t\tif m < cnt:\n\t\t\tmoney -= (cnt - m)*x\n\t\t\tprint(money)\n\t\t\texit()', 'n, m = (in... | ['Wrong Answer', 'Accepted'] | ['s262386030', 's405332946'] | [34544.0, 28648.0] | [596.0, 450.0] | [271, 247] |
p03103 | u756988562 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m=map(int,input().split())\na = []\nb = []\nans = 0\nfor i in range(n):\n tempa,tempb = map(int,input().split())\n a.append(tempa)\n b.append(tempb)\ntest = dict(zip(a,b))\ntest = sorted(test.items())\nprint(test)\n# test_item = test.values()\n# test_key = test.keys()\n# print(test_item)\n# print(test_key)... | ['Runtime Error', 'Accepted'] | ['s589341970', 's670989804'] | [24568.0, 19412.0] | [505.0, 447.0] | [563, 398] |
p03103 | u757446793 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['# coding: utf-8\n# Your code here!\n\nN,M = map(int,input().split())\nA = []\n\nans = 0\nfor _ in range(N):\n A.append(list(map(int,input().split())))\n\nA = sorted(A, key=lambda x: x[0])\nprint(A)\nfor a in A:\n if a[1] >= M:\n ans += a[0]*M\n break\n else:\n ans += a[0]*a[1]\n M... | ['Wrong Answer', 'Accepted'] | ['s852001812', 's532439674'] | [34640.0, 29792.0] | [525.0, 458.0] | [328, 330] |
p03103 | u760391419 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = map(int,input().split())\n\nA = [ list(map(int,input().split())) for _ in range(N) ]\nA.sort()\nans = 0\nfor M == 0:\n if M >= A[0][1]:\n ans += A[0][0] * A[0][1]\n M -= A[0][1]\n del A[0]\n else:\n ans += A[0][0] * M\n M = 0\nprint(ans)', 'N,M = map(int,input().split())\n \nA = [ list(map(int,... | ['Runtime Error', 'Accepted'] | ['s706634595', 's470075480'] | [3064.0, 27760.0] | [17.0, 1950.0] | [247, 249] |
p03103 | u764956288 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int,input().split())\nPNs = [list(map(int,input().split())) for _ in range(N)]\n#price_and_number_of_drinks\n\nPNs.sort(key=lambda x: x[0])\n\nans = 0\nsum_drinks = 0 #sum of drinks which Takahashi has bought\nfor i in range(N):\n nos = PNs[i][1] #number of drinks at i_th shop\n nob = min(M-sum_drink... | ['Runtime Error', 'Accepted'] | ['s816646796', 's718409911'] | [29032.0, 29028.0] | [397.0, 458.0] | [473, 465] |
p03103 | u772588522 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\n\nab = [[int(l[0]), int(l[1])] for l in (input().split() for i in range(n))]\nab.sort()\ntemp = sum(ab, []) \na, b = temp[0::2], temp[1::2]\nprint(a, b)\n\ncount, index, remainder = 0, 0, 0\n\nfor i in range(n):\n if count + b[i] < m: \n count += b[i]\n else:\n index = i\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s362954114', 's516226072', 's780031380'] | [22184.0, 23652.0, 22812.0] | [2105.0, 2105.0, 253.0] | [489, 482, 388] |
p03103 | u780475861 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nn,m=map(int,readline().split())\nd = map(int,read().split())\ndata = list(zip(d,d))\ndata.sort(key=lambda x:x[0])\nc=0\nfor x,y in data:\n if m-c<=y:\n c+=m-c\n break\n else:\n c+=y\npr... | ['Wrong Answer', 'Accepted'] | ['s953878473', 's828623535'] | [27496.0, 27496.0] | [144.0, 159.0] | [308, 341] |
p03103 | u785578220 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['from operator import itemgetter\nk, b = map(int, input().split())\na=[]\nfrom heapq import heappush, heappop\nfor i in range(k):\n ta,tb = map(int, input().split())\n a.append([ta,tb])\na = sorted(a, key=itemgetter(0), reverse=False)\nprint(a)\ns=0\nt = 0\nans = 0\ni = 0\nwhile s<b:\n s+=1\n if t<a[i][1]:... | ['Wrong Answer', 'Accepted'] | ['s725332659', 's241629256'] | [27016.0, 22076.0] | [497.0, 460.0] | [410, 401] |
p03103 | u787332781 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['from collections import OrderedDict\nif __name__ == "__main__":\n NM = list(map(int, input().split()))\n n = NM[0]\n m = NM[1]\n mydict = {}\n for i in range(n):\n money_can = list(map(int, input().split()))\n money = money_can[0]\n can = money_can[1]\n if(money not in mydic... | ['Runtime Error', 'Accepted'] | ['s431051550', 's782870363'] | [75844.0, 75844.0] | [953.0, 1022.0] | [897, 902] |
p03103 | u790865625 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['#!/usr/bin/env python3\nN, M = map(int, input().split())\nAB = [list(map(int, input().split())), for i in range(N)]\n\nAB.sort()\n\nans = 0\nfor i, j in AB\n\tans += i * min(M, j)\n\tM -= min(M, j)\n\nprint(ans)\n', '#!/usr/bin/env python3\nN, M = map(int, input().split())\nAB = [list(map(int, input().split())) for i... | ['Runtime Error', 'Accepted'] | ['s295247019', 's220267300'] | [2940.0, 27760.0] | [18.0, 506.0] | [199, 199] |
p03103 | u796789068 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M=map(int,input().split()) \nA=[list(map(int,input().split())) for i in range(N)]\nA=sorted(A) #A...en B..hon\nprint(A)\nprice=0\nnum=0\nfor i in range(N):\n if num+A[i][1]<M:\n price+=A[i][0]*A[i][1]\n num+=A[i][1]\n elif num<M and num+A[i][1]>=M:\n price+=A[i][0]*(M-num)\n break\... | ['Wrong Answer', 'Accepted'] | ['s927759518', 's878259354'] | [34656.0, 28656.0] | [600.0, 503.0] | [358, 359] |
p03103 | u798818115 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['# coding: utf-8\n# Your code here!\nN,M=map(int,input().split())\nl=[10**5]*M\n\nfor i in range(N):\n a,b=map(int,input().split())\n \n count=0\n for j in range(M):\n if l[j]>a:\n l[j]=a\n count+=1\n l.reverse()\n if count==b:\n break\n\nprint(l)\nprin... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s481907484', 's648040991', 's549313181'] | [3828.0, 3828.0, 20012.0] | [2104.0, 2104.0, 488.0] | [310, 345, 267] |
p03103 | u800704240 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m = map(int,input().split())\nplist = []\nfor _ in range(n):\n plist.append([int(x) for x in input().split()])\n\nplist.sort()\nprint(plist)\n\ncost=0\ni = 0\n\nwhile i < len(plist):\n tmp = plist[i]\n if tmp[1] < m:\n m -= tmp[1]\n cost += tmp[0] * tmp[1]\n i += 1\n continue\n ... | ['Wrong Answer', 'Accepted'] | ['s246833176', 's402117875'] | [27632.0, 21612.0] | [513.0, 473.0] | [362, 348] |
p03103 | u802772880 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M=list(map(int,input().split(" ")))\nl=[]\nl=[list(map(int,input().split(" "))) for i in range(n)]\ndrink=0\nprice=0\ni=0\nl.sort(key=lambda x: x[0])\nwhile drink<M:\n pri=l[i][0]\n num=l[i][1]\n i+=1\n drink+=num\n price+=pri*num\nif drink>M:\n price-=(drink-m)*pri\nprint(price)\n', 'n,m=map(int,... | ['Runtime Error', 'Accepted'] | ['s544912503', 's135843629'] | [3064.0, 21604.0] | [17.0, 469.0] | [286, 359] |
p03103 | u802977614 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m=map(int,input().split())\ndataset=sorted([tuple(map(int,input().split())) for i in range(n)])\nans=0\nfor data in dataset:\n if m==0:\n print(ans)\n exit()\n tmp=min(data[1],m)\n ans+=tmp*data[0]\n m-=tmp', 'n,m=map(int,input().split())\ndataset=sorted([tuple(map(int,input().split())) for i in range(n)]... | ['Wrong Answer', 'Accepted'] | ['s378251771', 's348450014'] | [17764.0, 17752.0] | [425.0, 429.0] | [209, 220] |
p03103 | u811132356 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['#!/usr/bin/env python\n# coding: utf-8\n\n# In[86]:\n\n\nN,M=map(int,input().split())\nab=[list(map(int,input().split())) for l in range(N)]\nct=0\nmoney=0\nl=[]\nfor i in range(N):\n l.append(ab[i][0])\nl.sort()\nfor i in range(N):\n # min_id=l.index(min(l))\n if ct+ab[i][1]<M:\n money+=ab[i][0]*ab[i]... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s643406830', 's747438396', 's580550870'] | [28684.0, 28684.0, 33800.0] | [2105.0, 409.0, 558.0] | [503, 522, 417] |
p03103 | u821251381 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int,input().split())\n\nAB = {}\nfor i in range(N):\n A, B = map(int,input().split())\n AB[A]=B\nAB = sorted(AB.items(),key = lambda x:x[0])\n\nacost = 0\n\nfor a,b in AB:\n cost += (min(max(M,0),b))*a\n M-=b\n if M<=0:\n break\nprint(cost)\n ', 'N, M = map(int,input().split())\n\nAB = []\nfor i i... | ['Runtime Error', 'Accepted'] | ['s742618790', 's074633707'] | [29076.0, 26240.0] | [239.0, 312.0] | [247, 246] |
p03103 | u821262411 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M=map(int,input().split())\nL=[]\n\nans=0\n\nfor i in range(N):\n a,b=map(int,input().split())\n\n L.append([a,b])\n\nL= sorted(L)\n\n\n\nfor i in range(N):\n\n if M < L[i][1]\n ans=L[i][0]*M\n\n print(ans)\n exit()\n \n else:\n\n\n ans = L[i][0]*L[i][1]\n M -= ... | ['Runtime Error', 'Accepted'] | ['s658214657', 's819226986'] | [2940.0, 20816.0] | [17.0, 507.0] | [509, 476] |
p03103 | u826929627 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = map(int,input().split())\n\ndct_a_tmp = {}\ndct_b = {}\nfor n in range(N):\n a,b = map(int, input().split())\n dct_a_tmp[n] = a\n dct_b[n] = b\n\n\nlist_a = sorted(dct_a_tmp.items(), key=lambda x: x[1])\n\n\n\n\ncnt_buied = 0\ncost = 0\ninf = 10 ** 18\n\n\nfor i in range(inf):\n want_buy = M - cnt_buied \n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s312624248', 's360716165', 's128069886'] | [33480.0, 3952.0, 33476.0] | [433.0, 233.0, 453.0] | [761, 515, 787] |
p03103 | u827885761 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int, input().split())\nd = dict([list(map(int, input().split()))[::-1] for i in range(N)])\nd = sorted(d.items(), key=lambda x: x[1])\nc = p = i = 0\n\nwhile c < M:\n if c + d[i][0] <= M:\n c += d[i][0]\n p += d[i][1] * d[i][0]\n i += 1\n else:\n p += d[i][1] * (M - c)\n ... | ['Runtime Error', 'Accepted'] | ['s561292819', 's046031666'] | [24748.0, 35292.0] | [401.0, 505.0] | [345, 308] |
p03103 | u829416877 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = map(int,input().split())\nlist = []\nfor _ in range(n):\n a,b = map(int,input().split())\n list.append([a,b])\nlist.sort()\nans = 0\nfor a,b in l:\n ans += min(b,M)*a\n M = max(0,M-b)\nprint(ans)', 'N,M = map(int,input().split())\nlist = []\nfor _ in range(N):\n a,b = map(int,input().split())\n list.appen... | ['Runtime Error', 'Accepted'] | ['s376724606', 's048466494'] | [9108.0, 24236.0] | [25.0, 369.0] | [195, 198] |
p03103 | u829895669 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = map(int, input().split())\nAB = [list(map(int, input().split())) for _ in range(N)]\n\nsortAB = sorted(AB)\n\nans = 0\nnum = M\nfor i in sortAB:\n a,b = i\n if num >= b:\n num -= b\n ans += a* b\n else:\n ans += i * num\n break\n\nprint(ans)', 'N,M = map(int, input().split()... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s681519750', 's757489815', 's511555903'] | [28768.0, 30248.0, 28648.0] | [451.0, 2105.0, 463.0] | [268, 426, 268] |
p03103 | u835283937 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['def main():\n N, M = map(int, input().split())\n store = list()\n for i in range(N):\n A, B = map(int, input().split())\n store.append([A, B])\n store.sort(key = lambda x : x[0])\n cost = 0\n drink = 0\n print(store)\n for i in range(N):\n if drink < M:\n if dri... | ['Wrong Answer', 'Accepted'] | ['s076297569', 's540065160'] | [26928.0, 21204.0] | [435.0, 377.0] | [603, 586] |
p03103 | u836737505 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m = map(int, input().split())\na = [list(map(int, input().split())) for _ in range(n)]\na.sort(key=lambda x:(x[0],x[1]))\nc = 0\nans = 0\nfor i in range(n):\n if c >= m:\n break\n for j in range(a[i][1]):\n if c < m:\n c += 1\n ans += a[i][0]', 'n,m = map(int, input().split... | ['Wrong Answer', 'Accepted'] | ['s038215768', 's726802410'] | [35292.0, 29028.0] | [510.0, 437.0] | [275, 373] |
p03103 | u840958781 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m=map(int,input().split())\nL=0\nR=n\nfor i in range(m):\n l,r=map(int,input().split())\n if l>L:\n L=l\n if r<R:\n R=r\nif R-L<0:\n print(0)\nelse:\n print(R-L)', 'n,m=map(int,input().split())\ns=[]\nfor i in range(n):\n a,b=map(int,input().split())\n \n s.append([a,b])\ns.sor... | ['Runtime Error', 'Accepted'] | ['s808866955', 's598044172'] | [3060.0, 20056.0] | [284.0, 501.0] | [180, 254] |
p03103 | u845620905 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['\n#include <algorithm>\n\n#include <string>\n#include <map>\n#include <set>\nusing namespace std;\nint main() {\n int n, m;\n long long ans = 0;\n cin >> n >> m;\n vector<int> a(n), b(n);\n vector<pair<int, int> > ab(n);\n for(int i = 0; i < n; i++) {\n cin >> a[i] >> b[i];\n }\n for(int i = 0; i < n; i++)... | ['Runtime Error', 'Accepted'] | ['s954692761', 's391432249'] | [2940.0, 20848.0] | [20.0, 612.0] | [554, 353] |
p03103 | u856234158 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['tmp = input()\nN = int(tmp.split()[0])\nM = int(tmp.split()[1])\nA = []\nB = []\nfor i in range(N):\n\ttmp = input()\n\tA[i] = int(tmp.split()[0])\n\tB[i] = int(tmp.split()[1])\n\ncnt=0\ntotal=0\nwhile cnt < M:\n\tmini = N\n\tminv = 999999999999999\n\tfor i in range(N):\n\t\tif minv > A[i]:\n\t\t\tminv = A[i]\n\t\t\t... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s824171548', 's910813450', 's221396262'] | [3064.0, 3064.0, 20012.0] | [17.0, 18.0, 452.0] | [398, 391, 297] |
p03103 | u858670323 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['# coding: utf-8\nimport os\nfrom sys import stdin\nfrom functools import total_ordering\n\n__dirname = os.path.dirname(__file__)\n__basename = os.path.splitext(os.path.basename(__file__))[0]\n__targetname = \'./input/\' + __basename + \'.txt\'\ntarget_path = os.path.join(__dirname, __targetname)\nstdin = open(target_... | ['Runtime Error', 'Accepted'] | ['s192397064', 's817014393'] | [3700.0, 27692.0] | [24.0, 682.0] | [1170, 1180] |
p03103 | u862479046 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = [int(s) for s in input().split()]\npre_lst=[]\nfor i in range(N):\n a,b = [int(s) for s in input().split()]\n pre_lst=lst+[[a,b,a*b]]\nlst = sorted(pre_lst, key=lambda x: x[0])\nm=0\ni=0\ncost=0\nwhile(m<M):\n m+=lst[i][1]\n cost+=lst[i][2]\n i+=1\nif(m>M):\n cost-=lst[i-1][0]*(m-M)\nprint(cost)\n', 'N,M ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s065487866', 's697591653', 's499092053'] | [3064.0, 2940.0, 21616.0] | [17.0, 17.0, 449.0] | [294, 289, 293] |
p03103 | u874333466 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int,input().split())\nA = []\nB = []\nfor i in range(N):\n a, b = map(int,input().split())\n A.append(a)\n B.append(b)\n\nvdic = {}\n\nfor i in range(N):\n if A[i] not in vdic.keys():\n vdic[A[i]] = B[i]\n else:\n vdic[A[i]] += B[i]\n \ncount = 0\ncost = 0\n \nfor i in vdic.keys():\n if v... | ['Wrong Answer', 'Accepted'] | ['s994984627', 's715707561'] | [20172.0, 24524.0] | [379.0, 491.0] | [426, 491] |
p03103 | u883203948 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m = list(map(int,input().split()))\na = []\nb = []\nfor i in range(n):\n x,y = list(map(int,input().split()))\n a.append(x)\n b.append(y)\ncount = 0\n\nwhile True:\n mi = min(a)\n print(mi,"mi")\n if m - b[a.index(min(a))] > 0 : \n m = m-b[a.index(min(a))]\n count += b[a.index(min(a)... | ['Wrong Answer', 'Accepted'] | ['s396667901', 's353074159'] | [11012.0, 22496.0] | [2108.0, 472.0] | [545, 1000] |
p03103 | u891482208 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = map(int, input().split())\nshop = []\nfor i in range(n):\n shop.append(list(map(int, input().split())))\nshop.sort()\nbought = 0\ncost = 0\nfor i in range(n):\n bought += min(m, b[i])\n cost += min(m, b[i]) * a[i]\n m -= min(m, b[i])\nprint(cost)', 'n, m = map(int, input().split())\nshop = []\nfor i in ran... | ['Runtime Error', 'Accepted'] | ['s672385892', 's766278360'] | [27760.0, 27760.0] | [504.0, 602.0] | [246, 270] |
p03103 | u892340697 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m = map(int,input().split())\nd = []\nfor i in range(n):\n a,b = map(int,input().split())\n d.append([a,b])\n \nd.sort(key=lambda x:x[0])\n\nsum_ = 0\ncnt = 0\nfor ab in d:\n if cnt + ab[1] > M:\n sum_ += ab[0] * (M-cnt)\n break\n else:\n cnt += ab[1]\n sum_ += ab[0]*ab[1]\np... | ['Runtime Error', 'Accepted'] | ['s073703199', 's519089810'] | [25172.0, 25292.0] | [254.0, 276.0] | [312, 312] |
p03103 | u899975427 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = (int(i) for i in input().split())\ndic = {}\ndrink = M\nmoney = 0\nfor i in range(N):\n a,b = (int(i) for i in input().split())\n dic[a] += b\nc = sorted(dic.keys())\nprint(c)\nfor j in c:\n if drink > dic[j]:\n money += j * dic[j]\n drink -= dic[j]\n else:\n money += j * drink\n break\nprint(mo... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s519300199', 's957254484', 's053320376'] | [3064.0, 19424.0, 17892.0] | [17.0, 445.0, 429.0] | [306, 350, 341] |
p03103 | u900688325 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int, input().split())\nAB = list(map(int, input().split()) for _ in range(N))\n\nsorted_ab = sorted(AB)\ncost = 0\nwhile M > 0:\n for i in range(N):\n for j in range(sorted_ab[i][1]):\n M -= 1\n cost += sorted_ab[i][0]\nprint(cost)', 'N, M = map(int, input().split())\nAB = [... | ['Runtime Error', 'Accepted'] | ['s939044298', 's078091653'] | [50420.0, 27752.0] | [377.0, 470.0] | [264, 292] |
p03103 | u903596281 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M=map(int,input().split())\nl=[]\nfor i in range(N):\n A,B=map(int,input().split())\n l.append([A,B])\nl.sort(key=lambda x:x[0])\ni=0\nans=0\nwhile M>l[i][1]:\n M-=l[i][1]\n i+=1\n ans+=l[i][0]*l[i][1]\nans+=l[i][0]*M\nprint(ans)', 'N,M=map(int,input().split())\nl=[]\nfor i in range(N):\n A,B=map(int,input().... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s947362661', 's975532105', 's977378811', 's330014766'] | [21208.0, 21268.0, 21208.0, 21208.0] | [432.0, 384.0, 424.0, 464.0] | [223, 223, 223, 223] |
p03103 | u904844073 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = [int(i) for i in input().split()]\nshops = []\n\nfor i in range(0, N):\n A, B = [int(i) for i in input().split()]\n shops.append((A, B))\n\nshops.sort()\n\nprint(shops)\nresult = 0\nrest_count = M\nfor shop in shops:\n if rest_count > shop[1]:\n result += shop[0] * shop[1]\n rest_count -... | ['Wrong Answer', 'Accepted'] | ['s225295770', 's546060490'] | [23028.0, 16956.0] | [468.0, 425.0] | [390, 377] |
p03103 | u905582793 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m=map(int,input().split())\na=[list(map(int,input().split())) for i in range(n)]\na.sort()\ndr=0\ni=0\npr=0\nwhile(dr<m):\n if dr+a[i][1]>=m:\n dr+=m-dr\n pr+=(m-dr)*a[i][0]\n else:\n dr+=a[i][1]\n pr+=a[i][0]*a[i][1]\n i+=1\nprint(pr)', 'n,m=map(int,input().split())\na=[list(map(int,input().split())... | ['Wrong Answer', 'Accepted'] | ['s420169521', 's019730005'] | [27760.0, 27760.0] | [496.0, 509.0] | [238, 239] |
p03103 | u912158215 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int, input().split())\nshops = sorted([list(map(int, input().split())) for i in range(n)])\ndrink = 0\ncost = 0\n\nfor i in range(N):\n cost += shops[i][0]*shops[i][1]\n drink += shops[i][1]\n if drink >= M:\n cost -= (drink -\u3000M) * shops[i][0]\n break\n \nprint(cost)', 'N... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s708826035', 's922477545', 's059098859'] | [3188.0, 3060.0, 28656.0] | [18.0, 18.0, 485.0] | [298, 296, 295] |
p03103 | u920204936 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['data = line.split(" ")\nshoplist = [] \nfor i in range(int(data[0])):\n shop = input()\n shopdata = shop.split(" ")\n shop_int = []\n for j in range(len(shopdata)):\n shop_int.append(int(shopdata[j]))\n shoplist.append(shop_int)\n\npayment = 0 \nwantdrink = int(data[1]) \npricelist = [] \nfor i... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s043833623', 's207869137', 's969469896'] | [3064.0, 3064.0, 27760.0] | [18.0, 18.0, 2000.0] | [966, 966, 484] |
p03103 | u921773161 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int, input().split())\nA = [0] * N \nB = [0] * N\nfor i in range(N):\n A[i], B[i] = map(int, input().split())\n\nA.sort()', 'N, M = map(int, input().split())\nA = [0] * N \nB = [0] * N\nfor i in range(N):\n A[i], B[i] = map(int, input().split())\n\nA.sort()\n\nprint(1)', 'N, M = map(int, input().spli... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s308404773', 's684405509', 's261425577'] | [11300.0, 11300.0, 27760.0] | [319.0, 314.0, 513.0] | [129, 139, 320] |
p03103 | u923105140 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = map(int, input().split())\nAB = [list(map(int, input().split())) for i in range(N)]\nAB.sort(key = lambda x: x[0])\n\ntotal = 0\ni = 0\n\nwhile True:\n total += AB[i][1]\n if total < m:\n i += 1\n else:\n break\n\nans = 0\nfor j in range(i):\n ans += AB[j][0]*AB[j][1]\nans += (m - sum... | ['Runtime Error', 'Accepted'] | ['s750508777', 's740648192'] | [29020.0, 29024.0] | [407.0, 485.0] | [343, 354] |
p03103 | u923279197 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m = map(int,input().split())\nAB = [list(map(int,input().split())) for i in range(n)]\nAB.sort(reverse = True)\nc = 0\nans = 0\ni = 0\nwhile c < m:\n if c + AB[i][1] <= m:\n c += AB[i][1]\n ans += AB[i][0]*AB[i][1]\n i += 1\n else:\n ans += AB[i][0]*(m-c)\n break\n\nprint(ans)\n', 'n,m = map(int,i... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s284077021', 's591227469', 's652864917'] | [27880.0, 27752.0, 27760.0] | [511.0, 557.0, 494.0] | [283, 282, 269] |
p03103 | u923341003 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['m = 0\ncnt = 0\nfor i in range(N):\n \n cnt += c[i][1]\n m += c[i][0] * c[i][1]\n \n if cnt == M:\n print(m)\n break\n elif cnt > M:\n print(m - c[i][0] * (cnt - M))\n break\n else:\n continue', 'N, M = map(int, input().split())\na, b = [0 for _ in range(N)], [... | ['Runtime Error', 'Accepted'] | ['s897742825', 's722489950'] | [3060.0, 26720.0] | [18.0, 494.0] | [235, 478] |
p03103 | u934868410 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m = map(int,input().split())\nl = [map(int, input().split()) for i in range(n)]\nans = 0\nfor a,b in l:\n if b >= m:\n ans += a * (b-m)\n break\n else:\n ans += a*b\n m -= b\nprint(ans)', 'n,m = map(int,input().split())\nl = [map(int, input().split()) for i in range(n)]\nans = 0\nl.sort()\nfor a,b in ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s120894945', 's273307915', 's580303718'] | [49652.0, 49652.0, 16892.0] | [378.0, 367.0, 412.0] | [191, 196, 228] |
p03103 | u939585142 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = map(int,input().split())\na = []\n\nfor i in range(N):\n a.append(list(map(int,input().split())))\n\na.sort()\n\nnum = 0\nans = 0\nfor i in range(N):\n ans = 0\n num = 0\n while i <= N - 1:\n ans += a[i][0] * a[i][1]\n num += a[i][1]\n if num > M:\n ans -= a[i][0] * (num - M)\n break\... | ['Wrong Answer', 'Accepted'] | ['s849959073', 's759482625'] | [27760.0, 28656.0] | [2105.0, 592.0] | [313, 278] |
p03103 | u941439555 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N, M = list(map(int, input().split()))\n\n# Insert all the data into dictionary\nstores = []\nwhile 1:\n\ttry:\n\t\ta, b = list(map(int, input().split()))\n\t\tstores.append([a,b])\n\texcept:\n\t\tbreak\n\nstores = sorted(stores, key=lambda x:x[0])\n\nm = 0\nmoney = 0\n\nfor store in stores:\n\tmoney += min(store[1],... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s497246683', 's959326217', 's775133363'] | [27368.0, 27344.0, 22492.0] | [556.0, 548.0, 519.0] | [366, 376, 362] |
p03103 | u947883560 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['print(AB)\n\nN, M = [int(x) for x in input().split()]\nAB = [[int(x) for x in input().split()] for _ in range(N)]\nAB.sort(key=lambda x: x[0])\n\ns = 0\nfor ab in AB:\n if ab[1] > M:\n s += M*ab[0]\n break\n else:\n s += ab[0]*ab[1]\n M -= ab[1]\n\nprint(s)\n', 'import numpy as np\nN... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s187237293', 's301528476', 's558112043', 's577773431'] | [3060.0, 12448.0, 2940.0, 16436.0] | [18.0, 147.0, 19.0, 193.0] | [277, 209, 204, 967] |
p03103 | u948911484 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m = map(int,input().split())\nab = [list(map(int,input().split())) for _ in range(n)]\nab = sorted(ab, key=lambda x:x[0])\nprint(ab)\nans = 0\nd = 0\ni = 0\nwhile d < m:\n ans += ab[i][0]*min(m-d,ab[i][1])\n d += ab[i][1]\n i += 1\nprint(ans)', 'n,m = map(int,input().split())\nab = [list(map(int,input().split())... | ['Wrong Answer', 'Accepted'] | ['s066303099', 's147000267'] | [34640.0, 29796.0] | [562.0, 460.0] | [236, 226] |
p03103 | u960171798 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = map(int, input().split())\nA = []\nquantity = 0\nprice = 0\n\nfor i in range(N):\n a = list(map(int, input().split()))\n A.append(a)\nprint(A)\nA = sorted(A)\nfor i in range(M):\n quantity += A[i][1]\n if quantity <= M:\n price += A[i][0]*A[i][1]\n else:\n price += A[i][0]*(M-(quanti... | ['Runtime Error', 'Accepted'] | ['s495762119', 's100365790'] | [33776.0, 28656.0] | [546.0, 592.0] | [341, 331] |
p03103 | u965075144 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n, m = [int(i) for i in input().split()]\ndat = [[int(i) for i in input().split()] for i in range(n)]\nsort(dat)\nsum = 0\n_m = 0\nfor i in dat:\n _m += dat[1]\n if _m > m:\n print(sum + dat[0]*(m - _m))\n break\n sum += dat[0] * dat[1]\n', 'n, m = [int(i) for i in input().split()]\ndat = [[int... | ['Runtime Error', 'Accepted'] | ['s943537199', 's470633847'] | [21164.0, 21604.0] | [312.0, 466.0] | [250, 250] |
p03103 | u970899068 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['n,m=map(int,input().split())\ns=[list(map(int, input().split())) for i in range(n)] \ns.sort()\ns.append([0,0])\na=0\nb=0\nfor i in range(n):\n if a<m:\n a+=s[i][1]\n b+=s[i][0]*s[i][1]\n else:\n print(a,b,s[i-1][1])\n b-=(a-m)*s[i-1][0]\n break\n \nprint(b)', 'n,m=map(... | ['Wrong Answer', 'Accepted'] | ['s505039593', 's083702625'] | [27756.0, 27756.0] | [458.0, 503.0] | [291, 264] |
p03103 | u973840923 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['N,M = map(int,input().split())\nlist = [list(map(int,input().split())) for _ in range(N)]\nlist.sort()\n\ncnt = 0\nsum = 0\n\nfor i in range(N):\n if cnt + list[i][1] <= M:\n cnt += list[i][1]\n sum += list[i][1]*list[i][0]\n else:\n sum += (M-cnt)*list[i][0]\n break\n\nprint(cnt,sum... | ['Wrong Answer', 'Accepted'] | ['s369508852', 's731343934'] | [27760.0, 116468.0] | [499.0, 538.0] | [304, 346] |
p03103 | u977885542 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['from sys import stdin\nimport heapq\nhq = [] \n\nNM = input()\nNM = NM.split()\nN = int(NM[0])\nM = int(NM[1])\n\nhq = []\nAB = {}\nfor i in range(N):\n temp = input()\n temp = temp.split()\n AB[int(temp[0])] = int(temp[1])\n heapq.heappush(hq, (int(temp[0]), int(temp[1])))\n\nprint(hq)\ncost = 0\namount = 0\nfo... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s272584634', 's466369097', 's555334235'] | [35476.0, 3064.0, 29616.0] | [456.0, 17.0, 534.0] | [479, 426, 493] |
p03103 | u990670021 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['s = input().split()\nN = int(s[0])\nM = int(s[1])\n\nAB = {}\nfor i in range(N):\n data = input().split()\n AB[int(data[0])] = int(data[1])\n\nmoney = 0\nnum = 0\nfor A,B in sorted(AB.items()):\n if num+B < M:\n money += A*B\n \tnum += B\n else:\n money += A*(M-num)\n break\n \nprint(money)', 's = inpu... | ['Runtime Error', 'Accepted'] | ['s365742612', 's024232494'] | [2940.0, 23008.0] | [17.0, 438.0] | [286, 432] |
p03103 | u995062424 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['def main():\n N, M = map(int, input().split())\n A = [[0, 0] for _ in range(N)]\n for i in range(N):\n A[i][0], A[i][1] = map(int, input().split())\n \n cnt = 0\n money = 0\n A.sort(key=lambda x:x[0])\n for i in range(N):\n if(cnt < M):\n money += A[i][0]*A[i][1]\n ... | ['Wrong Answer', 'Accepted'] | ['s689465359', 's561753508'] | [21156.0, 27556.0] | [382.0, 425.0] | [460, 446] |
p03103 | u998978987 | 2,000 | 1,048,576 | Hearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drinks. There are N stores that sell energy drinks. In the i-th store, he can buy at most B_i cans of energy drinks for A_i yen (the currency of Japan) each. What is the minimum amount of money with which he can bu... | ['text = input()\nvals = text.split(" ")\nlines = []\nfor i in range(int(len(vals) / 2)):\n lines.append([vals[i * 2], vals[i * 2 + 1]])\n\nn_and_m = lines[0]\nn = n_and_m[0]\nm = n_and_m[1]\n\na_and_b = lines[1:]\na = list(map(lambda x: x[0], a_and_b))\nb = list(map(lambda x:x[1], a_and_b))\n\ntmp = []\n\na_and_b =... | ['Wrong Answer', 'Accepted'] | ['s947038241', 's641322334'] | [3064.0, 38564.0] | [17.0, 420.0] | [607, 541] |
p03105 | u006576567 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['# -*- coding: utf-8 -*-\n\n\n\ndef calc(a, b, c):\n rest = b\n count = 0\n while True:\n if count >= c:\n break\n if rest < a:\n break\n count += 1\n rest -= a\n return count\n', '# -*- coding: utf-8 -*-\n\n\n\ndef calc(a, b, c):\n rest = b\n count =... | ['Wrong Answer', 'Accepted'] | ['s693905883', 's054396111'] | [2940.0, 2940.0] | [17.0, 17.0] | [274, 333] |
p03105 | u006721330 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['a, b, c = map(int, input().split())\n\nnum1 = 11 // 2\n\nif num <= c:\n print(num)\nelse:\n print(c)', 'a, b, c = map(int, input().split())\n\nnum = a // b\n\nif num <= c:\n print(num)\nelse:\n print(c)', 'a, b, k = map(int, input().split())\nlist = []\n\nfor i in range(1, 101):\n if a%i == 0 and b %i == 0:\n ... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s370819183', 's536796650', 's913396703', 's261626206'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [95, 93, 168, 93] |
p03105 | u014333473 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['A, B, C = map(int, input().split())\nmoney_time = A * C\nif money_time <= B:\n print(A)\nelse:\n print(B // A)', 'a,b,c=map(int,input().split());print(min(b//a,c))'] | ['Wrong Answer', 'Accepted'] | ['s661576195', 's339239949'] | [2940.0, 9140.0] | [17.0, 26.0] | [107, 49] |
p03105 | u016182925 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['a,b,c = map(int,input().split())\ncount = 0\nif a//b > c :\n an = (c)\nelse :\n an = (b//a)\nprint(an)\n ', 'a,b,c = map(int,input().split())\nif b//a > c :\n an = (c)\nelse :\n an = (b//a)\nprint(an)\n '] | ['Wrong Answer', 'Accepted'] | ['s303400474', 's215039770'] | [2940.0, 2940.0] | [18.0, 17.0] | [101, 91] |
p03105 | u017245095 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['# -*- coding: utf-8 -*-\n\n\nstring = input()\n\n\nmax = min(len(string), 100000)\n\n\ndel_count = 0\n\n\ndel_flg = True\n\n\nwhile del_flg:\n del_flg = False\n\n # \n for idx in range(max):\n if idx == max or idx > max:\n break\n \n \n target = string[idx : idx + 2... | ['Wrong Answer', 'Accepted'] | ['s582609490', 's101494435'] | [3064.0, 2940.0] | [18.0, 18.0] | [871, 172] |
p03105 | u019566983 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n \n divisors.sort()\n return divisors\n\n\na, b, c = map(int, input().split())\n\nc_set = ... | ['Runtime Error', 'Accepted'] | ['s688654750', 's916414122'] | [3060.0, 2940.0] | [17.0, 17.0] | [384, 86] |
p03105 | u020332228 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['A, B, K = (int(i) for i in input().split())\nlist = []\nfor i in range(1, 100):\n if A % == 0 and B % i == 0:\n list.append(i)\nprint(list[len(list)-K])', 'A, B, C = (int(i) for i in input().split())\nif B > (A*C):\n print(C)\nelse:\n print(B//A)'] | ['Runtime Error', 'Accepted'] | ['s965341260', 's870329246'] | [2940.0, 2940.0] | [17.0, 17.0] | [151, 88] |
p03105 | u020604402 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['if B / A >= C:\n print(C)\nelse:\n print(int(B/A))', 'A, B, C = map(int ,input().split())\nprint(min(B//A,C))'] | ['Runtime Error', 'Accepted'] | ['s005263418', 's050256712'] | [2940.0, 2940.0] | [17.0, 17.0] | [49, 54] |
p03105 | u022658079 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['A,B,C=(int(x) for x in input().split())\ncount=0\nfor i in range(1,C):\n if A*i>B:\n break\n else:\n count+=1\nprint(count)', 'A,B,C=(int(x) for x in input().split())\ncount=0\nfor i in range(C):\n if B*i>A:\n break\n else:\n count+=1\nprint(count) \n', 'A,B,K=(int(x) for x in input().split())\ncou... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s240598340', 's281533886', 's679818443', 's958770670'] | [2940.0, 2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [124, 127, 177, 126] |
p03105 | u023958502 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | [',b,c = map(int,input().split())\nprint(min(c,b // a))', 'a,b,c = map(int,input().split())\nprint(min(c,b // a))'] | ['Runtime Error', 'Accepted'] | ['s847366614', 's398019564'] | [2940.0, 2940.0] | [17.0, 17.0] | [52, 53] |
p03105 | u027403702 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['A,B,C = map(int,input())\nmin(B//A,C)', 'A,B,C = map(int,input())\nprint(min(B//A,C))', 'A,B,C = map(int,input().split())\nprint(min(B//A,C))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s337512309', 's436644972', 's546074604'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [36, 43, 51] |
p03105 | u027675217 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['A,B,C = map(int, input().split())\ns = B//A\nif C<=s:\n\tprint(C)\nelse\n\tprint(s)', 'A,B,C = map(int, input().split())\ns = B//A\nif C<=s:\n\tprint(C)\nelse:\n\tprint(s)'] | ['Runtime Error', 'Accepted'] | ['s802361092', 's313807101'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 77] |
p03105 | u032955959 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['a,b,c=map(int,input().split())\n\nd=a//b\n\nif d>=c:\n print(c)\nelse:\n print(d)', 'a,b,c=map(int,input().split())\n\nd=b//a\n\nif d>=c:\n print(c)\nelse:\n print(d)\n'] | ['Wrong Answer', 'Accepted'] | ['s773135948', 's914101742'] | [2940.0, 2940.0] | [18.0, 17.0] | [76, 77] |
p03105 | u035605655 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ["import sys\n\n\ndef main():\n one_try = int(sys.argv[1])\n money = int(sys.argv[2])\n count = int(sys.argv[3])\n n = 0\n while(True):\n if money >= one_try:\n money = money - one_try\n n = n + 1\n else:\n break\n if n == count:\n break\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s523472412', 's964593262', 's652554639'] | [3056.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [358, 394, 397] |
p03105 | u036340997 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['a, b, c = map(int, input().split())\nprint(max(b//a, c))\n', 'a, b, c = map(int, input().split())\nprint(min(b//a, c))\n'] | ['Wrong Answer', 'Accepted'] | ['s103047871', 's514159233'] | [2940.0, 2940.0] | [17.0, 17.0] | [56, 56] |
p03105 | u037074041 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ["from sys import stdin\n\n\ndef a(input_string):\n print(input_string)\n favorite_sound_fee ,my_money, count = [int(x) for x in input_string.split()]\n hear_count = 0\n while(hear_count < count and my_money >= favorite_sound_fee):\n my_money -= favorite_sound_fee\n hear_count += 1\n return... | ['Wrong Answer', 'Accepted'] | ['s592959016', 's304208671'] | [2940.0, 3060.0] | [17.0, 17.0] | [462, 438] |
p03105 | u037221289 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ["A, B, C = map(int,input().split(' '))\n\n\ndef calc1(A,B,C):\n if A*C <= B:\n return C\n else:\n \n N = 0\n while A*N <=B:\n N += 1\n return N-1\nprint(calc1(A,", "A, B, C = map(int,input().split(' '))\n\n\ndef calc1(A,B,C):\n if A*C <= B:\n return C\n else:\n \n N = 0\n while A*N ... | ['Runtime Error', 'Accepted'] | ['s549064755', 's072179188'] | [2940.0, 3060.0] | [17.0, 18.0] | [177, 182] |
p03105 | u038676814 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['S = input()\nS = list(S)\ncount = 0\n\n\npreviousCount = 0\nwhile(1) :\n if len(S) < 2:\n break\n \n if S[0] != S[1] :\n S.pop(0)\n S.pop(0)\n count+=2\n \n for i in range(1,len(S)-2) :\n if S[i] != S[i+1] :\n if S[i-1] != S[i+2] :\n S.pop(i)... | ['Wrong Answer', 'Accepted'] | ['s502218054', 's547372866'] | [3064.0, 2940.0] | [17.0, 17.0] | [481, 118] |
p03105 | u039360403 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['a,b,c=map(int,input().split())\nprint(max(c,b//a))\n', 'a,b,c=map(int,input().split())\nprint(min(c,b//a))\n'] | ['Wrong Answer', 'Accepted'] | ['s125965216', 's618843071'] | [2940.0, 2940.0] | [18.0, 18.0] | [50, 50] |
p03105 | u045953894 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ["a,b,c = map(int,input().split())\nif b >= a:\n print(round(b/a))\nelif round(b/a) > c:\n print(c)\nelse:\n print('0')", 'a,b,c = map(int,input().split())\n\nif b//a > c:\n print(c)\nelse:\n print(b//a)'] | ['Wrong Answer', 'Accepted'] | ['s019435573', 's539654661'] | [2940.0, 2940.0] | [17.0, 17.0] | [120, 81] |
p03105 | u046158516 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['a,b,c=map(int,input().split())\nd=a//b\nif (d+1)*b<=a:\n d+=1\nprint(min(d,c))', 'a,b,c=map(int,input().split())\nd=b//a\nif (d+1)*a<=b:\n d+=1\nprint(min(d,c))'] | ['Wrong Answer', 'Accepted'] | ['s973643908', 's467142676'] | [2940.0, 2940.0] | [18.0, 17.0] | [75, 75] |
p03105 | u052606232 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['a = int(input())\nb = int(input())\nc = int(input())\nif b//a > c:\n print(c)\nelse:\n print(b//c)\n\n', 'a,b,c = map(int,input().split())\na_set = {1}\nb_set = {1}\nfor i in range(1,a):\n if a % i == 0:\n a_set.add(i)\n\nfor i in range(1,b):\n if b % i == 0:\n b_set.add(i)\n\nc_list = list(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s256456896', 's441205592', 's698916518'] | [2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [169, 245, 209] |
p03105 | u054008010 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['class Solution:\n def solve(self, A, B, C):\n count = 0\n spent = 0\n while B >= 0:\n B -= A\n count += 1\n if count == C:\n return C\n return count\n\ndef main():\n A = int(input())\n B = int(input())\n C = int(input())\n print(Solution().solve(A, B, C))\n \nif __name__ ... | ['Runtime Error', 'Accepted'] | ['s579502361', 's290081163'] | [3060.0, 3060.0] | [18.0, 18.0] | [325, 328] |
p03105 | u055793529 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ['usr_input = input()\nlst = usr_input.split()\n\na = int(lst[0])\nb = int(lst[1])\nc = int(lst[2])\n\nprint(b//a)\n', 'usr_input = input()\nlst = usr_input.split()\n\na = int(lst[0])\nb = int(lst[1])\nc = int(lst[2])\n\ndevider_a=[]\ndevider_b=[]\nfor i in range(1,a,1):\n if a%i == 0:\n devider_a.append(i)\n... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s259447602', 's976858074', 's840295264'] | [2940.0, 3064.0, 2940.0] | [19.0, 18.0, 18.0] | [106, 430, 150] |
p03105 | u057993957 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ["A, B, C = list(map(int, input().split()))\n\nsum = 1\ncount = 0\n\nif B > A:\n for i in range(1, C):\n sum *= A\n if sum > B:\n count = i\n break\n print(count)\n\nelse:\n print('0')", 'from collections import Counter\nprint(2*min(Counter(list(input()).values()))', 'A, B, C = list(map(int, input().... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s266609372', 's626951004', 's363774258'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [187, 76, 61] |
p03105 | u058729328 | 2,000 | 1,048,576 | Takahashi likes the sound when he buys a drink from a vending machine. That sound can be heard by spending A yen (the currency of Japan) each time. Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time. How many times will he h... | ["string = input()\none = 0\nzero = 0\nfor s in string:\n if s == '1':\n ones += 1\n else:\n zeros += 1\n\nprint(2*min(one, zero))\n", 'import math\n\na, b, c = map(int, input().split())\n\nrequired = a * c\nlimit = b\n\nif required <= limit:\n print(c)\nelse:\n print(math.floor(b / a))\n'] | ['Runtime Error', 'Accepted'] | ['s848893448', 's532083930'] | [2940.0, 2940.0] | [17.0, 17.0] | [140, 148] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.