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
p02627
u911612592
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a = str(input())\n\nif str.isupper() == True:\n print("A")\nelse:\n print("a")\n\n', 'a = str(input())\n\nif str.isupper == True:\n print("A")\nelse:\n print("a")\n\n', 'a = input()\n\nif a.isupper():\n print("A")\nelse:\n print("a")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s825160284', 's934687731', 's083137303']
[8932.0, 9004.0, 8980.0]
[25.0, 24.0, 27.0]
[77, 75, 60]
p02627
u912728973
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["a = input()\nif (a >= 'a' and a <= 'z')\n print(A)\nelif(a >= 'A' and a <= 'Z')\n print(a)\n", "a = input()\nif (a >= 'a' and a <= 'z'):\n print(A)\nelif(a >= 'A' and a <= 'Z'):\n print(a)\n", 'a = input()\nif a.isupper():\n print(A)\nelse:\n print(a)\n', "a = input()\nif a.isupper():\n print('A')\nelse:\n print('a')\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s501581958', 's604695749', 's963099987', 's307849629']
[8892.0, 8852.0, 9020.0, 9080.0]
[24.0, 29.0, 24.0, 26.0]
[93, 95, 60, 64]
p02627
u919681556
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["a = input()\nprint('A') if c.isupper() is True else print('a')", "a = input()\nprint('A') if c.isupper() is True else print('B')", "a = input()\nprint('A') if a.isupper() is True else print('a')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s219648574', 's312266012', 's899100048']
[9068.0, 8972.0, 9004.0]
[25.0, 25.0, 29.0]
[61, 61, 61]
p02627
u921352252
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a=input()\n\nif a.isupper():\n print(a)\nelse:\n print(a.lower())', "a=input()\n\nif a.isupper():\n print('A')\nelse:\n print('a')"]
['Wrong Answer', 'Accepted']
['s871205756', 's108772150']
[9020.0, 9020.0]
[31.0, 29.0]
[62, 58]
p02627
u921729430
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["a = input()\nif a >= 'a' && a <='z':\n print('a')\nif a >= 'A' && a <='Z':\n print('A')", "a = input()\nif a >= 'a' and a <='z':\n print('a')\nif a >= 'A' and a <='Z':\n print('A')"]
['Runtime Error', 'Accepted']
['s874486846', 's886820294']
[9004.0, 9028.0]
[25.0, 28.0]
[85, 87]
p02627
u923270446
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['n=int(input())\ns=""\nwhile n>0:n-=1;s+=chr(97+n%26);n//=26\nprint(s[::-1])', 'print("A"if input().isupper()else"a")']
['Runtime Error', 'Accepted']
['s805307256', 's163820756']
[9100.0, 8996.0]
[25.0, 33.0]
[72, 37]
p02627
u929996201
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["L = [chr(ord('a') + i) for i in range(26)]\nU = [chr(ord('A') + i) for i in range(26)]\n\na = input()\nif a in U:\n print(a.lower())\nif a in L:\n print(a.upper())", "L = [chr(ord('a') + i) for i in range(26)]\nU = [chr(ord('A') + i) for i in range(26)]\n \na = input()\nif a in U:\n print('a')\nif a in L:\n print('A')", "L = [chr(ord('a') + i) for i in range(26)]\nU = [chr(ord('A') + i) for i in range(26)]\n \na = input()\nif a in U:\n print('A')\nif a in L:\n print('a')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s165624932', 's610399899', 's154683244']
[9040.0, 9072.0, 9112.0]
[33.0, 27.0, 26.0]
[162, 151, 151]
p02627
u932868243
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["a=input()\nif ord(a)<ord('a'):\n print(chr(ord(a)+32))\nelse:\n print(chr(ord(a)-32))", "a=input()\nif ord(a)<ord('a'):\n print(chr(ord(a)+32))\nelse:\n print(a)", "a=input()\nif ord(a)<ord('a'):\n print(A)\nelse:\n print(a)", "a=input()\nif ord(a)<ord('a'):\n print('A')\nelse:\n print('a')"]
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s066147750', 's149353091', 's566009034', 's409551882']
[9076.0, 8952.0, 9012.0, 8952.0]
[25.0, 27.0, 30.0, 28.0]
[83, 70, 57, 61]
p02627
u933650305
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a=input()\nlist=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]\nif a in list==False:\n print("A")\nelse:\n print("a")\n', 'a=input()\nlist=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]\nif list(a)==False:\n print("A")\nelse:\n print("a")\n', "a = input()\nprint('A' if a.islower() else 'a')", 'a=input()\nlist=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]\nif list(a)=False:\n print("A")\nelse:\n print("a")', 'a=str(input())\nlist=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]\nif list(a)=False:\n print("A")\nelse:\n print("a")\n', 'TN=input()\nlist=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]\nif TN not in list:\n print("A")\nelse:\n print("a")\n', 'a=input()\nlist=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]\nif a not in list:\n print("A")\nelse:\n print("a")\n', "a = input()\nprint('a' if a.islower() else 'A')\n"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s079143439', 's172288623', 's313273287', 's347080200', 's511320250', 's661682881', 's977829419', 's145750684']
[9080.0, 9000.0, 8984.0, 9016.0, 9032.0, 9100.0, 9076.0, 9004.0]
[24.0, 19.0, 27.0, 24.0, 22.0, 26.0, 26.0, 33.0]
[122, 120, 46, 118, 124, 121, 119, 47]
p02627
u935642171
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["c = input()\nord_c = ord(c)\nif ord_c >= 65 and ord_c <= 90:\u3000\n print('A')\nelse:\n print('a')", '# -*- coding: utf-8 -*-\n\nN = int(input())\nA = [int(a) for a in input().split()]\nQ = int(input())\nprocess = []\nproc_append = process.append\nfor i in range(Q):\n\tproc_append(tuple(input().split()))\n\tprocess[i] = tuple(map(int,process[i]))\n\nA.sort()\n\nfor b,c in process:\n\tif b in set(A):\n\t\tfor i in range(N):\n\t\t\tif b==A[i]:\n\t\t\t\tbegin = i\n\t\t\t\tbreak\n\t\tfor i in range(begin,N):\n\t\t\tif b!=A[i]:\n\t\t\t\tend = i-1\n\t\t\t\tbreak\n\t\t\tif i==N-1:\n\t\t\t\tend = i\n\t\tfor i in range(begin,end+1):\n\t\t\tA[i] = c\n\tprint(sum(A))', "# -*- coding: utf-8 -*-\ndef conv(a): #convert the num to character\n a += 97\n return chr(a)\n\n\nn = int(input())\nname = ''\n\nwhile n>0:\n n -= 1\n name += conv(n%26)\n n //= 26\n\n\nprint(name[::-1])", "c = input()\noc = ord(c)\n\nif 65<=oc<=90:\n print('A')\nelse:\n print('a')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s136502126', 's273068362', 's789123776', 's854305002']
[8924.0, 9216.0, 9116.0, 9100.0]
[26.0, 21.0, 32.0, 27.0]
[103, 510, 219, 71]
p02627
u937238023
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['s = input()\nx = ord(s[0])\nif x>=65 and x<=90:\n print("A")\nelse if x>=97 and x<=122:\n print("a")', 's = input()\nx = ord(s[0])\nif x>=65 and x<=90:\n print("A")\nelif x>=97 and x<=122:\n print("a")\n']
['Runtime Error', 'Accepted']
['s145401739', 's023653999']
[8848.0, 8820.0]
[28.0, 26.0]
[97, 95]
p02627
u938718404
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a=str(input())\nif "a".isupper()==True:\n print("A")\nelse:\n print("a")', 'a=str(input())\nif a.isupper()==True:\n print("A")\nelse:\n print("a")']
['Wrong Answer', 'Accepted']
['s106915928', 's255253286']
[9012.0, 9052.0]
[24.0, 25.0]
[74, 72]
p02627
u938785734
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['import string\nL=string.ascii_lowercase\nn=input()\nif n in L:\n print(str(n.upper()))\nelse:\n print(n)', "import string\nL=string.ascii_lowercase\nn=input()\nif n in L:\n print('a')\nelse:\n print('A')"]
['Wrong Answer', 'Accepted']
['s869469907', 's483279290']
[9904.0, 9844.0]
[40.0, 40.0]
[104, 95]
p02627
u939172252
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a = input()\nif a.islower():\n print(a)\nelse:\n print(A)', "A = input()\n\nif A.isupper():\n print('A')\nelse:\n print('a')"]
['Runtime Error', 'Accepted']
['s801757760', 's890751038']
[8944.0, 8960.0]
[28.0, 23.0]
[55, 64]
p02627
u939847032
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["X = input()\n\nif X.isupper == True:\n print('A')\nelse:\n print('a')", "X = input()\n\nif X.isupper() == True:\n print('A')\nelse:\n print('a')"]
['Wrong Answer', 'Accepted']
['s515026141', 's378306862']
[8964.0, 8852.0]
[27.0, 30.0]
[70, 72]
p02627
u941644149
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['N = input()\nif N.islower(): print("a")\nelse: print("a")\n\n', 'N = input()\nif N.islower(): print("a")\nelse: print("A")\n\n']
['Wrong Answer', 'Accepted']
['s782860709', 's503833628']
[9072.0, 9072.0]
[31.0, 28.0]
[57, 57]
p02627
u942280986
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["N=int(input())\nList='a b c d e f g h i j k l m n o p q r s t u v d x y z'.split()\nprint(List)\n\nAns=''\n\nwhile N>=1:\n Amari=N%26\n \n if Amari==0:\n Ans='z'+Ans\n else:\n Ans=List[Amari-1]+Ans\n \n N=(N-1)//26\n \nprint(Ans)", "a=input()\nif a.islower():\n print('a')\nelse:\n print('A')"]
['Runtime Error', 'Accepted']
['s688797105', 's510482619']
[9112.0, 9020.0]
[30.0, 26.0]
[252, 61]
p02627
u944886577
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["a=input()\nif a.isupper():\n print('A')\nelse:\n print('a')", 'n=int(input())\na_list=list(map(int,input().split()))\ncnt = [0] * int(1e5 + 10)\nsum=0\nfor i in a_list:\n cnt[i] +=1\n sum+=i\n \nq=int(input())\nans=0\n \nfor j in range(q):\n x,y=map(int,input().split())\n sum+=(y-x)*cnt[x]\n print(sum)\n cnt[x]+=cnt[y]\n cnt[y]=0', 'n=int(input())\na_list=list(map(int,input().split()))\ncnt = [0] * int(1e5 + 10)\nsum=0\nfor i in a_list:\n cnt[i] +=1\n sum+=i\n \nq=int(input())\nans=0\n \nfor j in range(q):\n x,y=map(int,input().split())\n sum+=(y-x)*cnt[x]\n cnt[y]+=cnt[x]\n cnt[y]=0\n print(sum)', 'import re\nn=int(input())\ns=[]\ns=input().split()\nq=int(input())\n\nfor i in range(q):\n x,y=map(str, input().split())\n s.replace(x,y)\n \nfor j in range(q):\n ans+=int(s[j])\n \nprint(ans)', 'n=int(input())\na_list=list(map(int,input().split()))\ncnt = [0] * int(1e5 + 10)\nsum=0\nfor i in a_list:\n cnt[i] +=1\n sum+=i\nq=int(input())\nans=0\n \nfor j in range(q):\n x,y=map(int,input().split())\n sum+=(x-y)*cnt[x]\n print(sum)\n cnt[x]+=cnt[y]', 'n=int(input())\na_list=list(map(int,input().split()))\ncnt = [0] * int(1e5 + 10)\nsum=0\nfor i in a_list:\n cnt[i] +=1\n sum+=i\n \nq=int(input())\nans=0\n \nfor j in range(q):\n x,y=map(int,input().split())\n sum+=(y-x)*cnt[x]\n cnt[y]+=cnt[b]\n cnt[x]=0\n print(sum)', "a=input()\nif a.isuppder():\n print('A')\nelse:\n print('a')", 'a=input()\nif a.isupper():\n print("A")\nelse:\n print(\'a\')\n ']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s272853147', 's288984475', 's516565904', 's626481820', 's682999756', 's738245326', 's933821779', 's115603429']
[8956.0, 9012.0, 9116.0, 9908.0, 9096.0, 9140.0, 8924.0, 8992.0]
[21.0, 26.0, 25.0, 31.0, 25.0, 29.0, 24.0, 26.0]
[61, 253, 253, 179, 240, 253, 62, 66]
p02627
u946145127
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['N=int(input())\ni=0\nx=""\nwhile(N > 26**i):\n i +=1\ni -= 1\nwhile(i!=-1):\n if(N//26**i==26):\n x += "z"\n N=N-(26**i)*26\n elif(N//26**i==1):\n x += "a"\n N=N-(26**i)\n elif(N//26**i==2):\n x += "b"\n N=N-(26**i)*2\n elif(N//26**i==3):\n x += "c"\n N=N-(26**i)*3\n elif(N//26**i==4):\n x += "d"\n N=N-(26**i)*4 \n elif(N//26**i==5):\n x += "e"\n N=N-(26**i)*5\n elif(N//26**i==6):\n x += "f"\n N=N-(26**i)*6\n elif(N//26**i==7):\n x += "g"\n N=N-(26**i)*7\n elif(N//26**i==8):\n x += "h"\n N=N-(26**i)*8\n elif(N//26**i==9):\n x += "i"\n N=N-(26**i)*9\n elif(N//26**i==10):\n x += "j"\n N=N-(26**i)*10\n elif(N//26**i==11):\n x += "k"\n N=N-(26**i)*11\n elif(N//26**i==12):\n x += "l"\n N=N-(26**i)*12\n elif(N//26**i==13):\n x += "m"\n N=N-(26**i)*13\n elif(N//26**i==14):\n x += "n"\n N=N-(26**i)*14 \n elif(N//26**i==15):\n x += "o"\n N=N-(26**i)*15\n elif(N//26**i==16):\n x += "p"\n N=N-(26**i)*16\n elif(N//26**i==17):\n x += "q"\n N=N-(26**i)*17\n elif(N//26**i==18):\n x += "r"\n N=N-(26**i)*18\n elif(N//26**i==19):\n x += "s"\n N=N-(26**i)*19\n elif(N//26**i==20):\n x += "t"\n N=N-(26**i)*20\n elif(N//26**i==21):\n x += "u"\n N=N-(26**i)*21\n elif(N//26**i==22):\n x += "v"\n N=N-(26**i)*22\n elif(N//26**i==23):\n x += "w"\n N=N-(26**i)*23\n elif(N//26**i==24):\n x += "x"\n N=N-(26**i)*24 \n elif(N//26**i==25):\n x += "y"\n N=N-(26**i)*25\n i -= 1\nprint(x)', 'a=input(str())\nif(a.isupper()):\n print("A")\nelse:\n print("a")']
['Runtime Error', 'Accepted']
['s382665184', 's440962700']
[9264.0, 9044.0]
[26.0, 33.0]
[1746, 67]
p02627
u949315872
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a = int(input())\n\nif True == a.isupper():\n Print("A")\nelse :\n print("a")\n \n', 'a = int(input())\n\nif a.isupper() = True:\n Print("A")\nelse :\n print("a")\n ', 'a = int(input())\n\nif True = a.isupper():\n Print("A")\nelse :\n print("a")\n \n', 'a = input()\n \nif True == a.isupper():\n Print("A")\nelse :\n print("a")', 'a = input()\n\nif True = a.isupper():\n Print("A")\nelse :\n print("a")\n \n', 'a = input()\n \nif True == a.isupper():\n print("A")\nelse :\n print("a")\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s066363810', 's249608790', 's292990756', 's495287126', 's941276675', 's074354350']
[9120.0, 8720.0, 8936.0, 9004.0, 8924.0, 9024.0]
[24.0, 24.0, 25.0, 28.0, 25.0, 29.0]
[78, 76, 77, 70, 72, 71]
p02627
u957198490
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['ch = input()\nif ord(ch) <= 90:\n print(chr(ord(ch) + 32))\nelse:\n print(chr(ord(ch) - 32))', "ch = input()\nif ord(ch) <= 90:\n print('A')\nelse:\n print('a')"]
['Wrong Answer', 'Accepted']
['s729022143', 's320649082']
[9028.0, 8904.0]
[30.0, 29.0]
[94, 66]
p02627
u957872856
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a = input()\nif a.isupper():\n print(a.lower())\nelse:\n print(a.upper())', 'a = input()\nif a.isupper():\n print("A")\nelse:\n print("a")\n']
['Wrong Answer', 'Accepted']
['s370523160', 's341812109']
[9052.0, 9016.0]
[27.0, 25.0]
[71, 60]
p02627
u960611411
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["inpt = input()\ncap = {Q,W,E,R,T,Y,U,I,O,P,A,S,D,F,G,H,J,K,L,Z,X,C,V,B,N,M}\nif inpt in cap:\n print('A')\nelse:\n print('a')", "inpt = input()\ncap = {'Q','W','E','R','T','Y','U','I','O','P','A','S','D','F','G','H','J','K','L','Z','X','C','V','B','N','M'}\nif inpt in cap:\n print('A')\nelse:\n print('a')"]
['Runtime Error', 'Accepted']
['s721050391', 's908017694']
[9108.0, 9048.0]
[25.0, 36.0]
[126, 178]
p02627
u960956996
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["a = input()\nif a.isupper() = True:\n print 'A'\nelse:\n print 'a'", "α = input()\nif α.isupper() = True:\n print 'A'\nelse:\n print 'a'", "α = input()\nif α.isupper() == True:\n print ('A')\nelse:\n print ('a')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s086512104', 's536015239', 's377978467']
[8984.0, 8944.0, 9148.0]
[25.0, 25.0, 27.0]
[64, 66, 71]
p02627
u963944915
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a=input()\nli=[q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m]\nif a in li:\n print("a")\nelse:\n print("A")', 'a=input()\nli=["q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m"]\nif a in li:\n print("a")\nelse:\n print("A")\n']
['Runtime Error', 'Accepted']
['s224664270', 's511530282']
[9132.0, 9108.0]
[27.0, 26.0]
[110, 163]
p02627
u964763428
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["n = int(input())\n\nans = ''\n\nwhile n > 0:\n n -= 1\n ans += chr(ord('a') + n % 26)\n n //= 26\n\nprint(ans[::-1])\n", "s = input()\n\nif s == s.upper():\n print('A')\nelse:\n print('a')\n"]
['Runtime Error', 'Accepted']
['s214169466', 's924512239']
[9156.0, 9072.0]
[23.0, 36.0]
[117, 68]
p02627
u966891144
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['a = input()\nif a.islower:\n print(a)\nelif a.isupper:\n print(a)\n', "a = input()\nif a.isupper==True:\n print('A')\nelse:\n print('a')\n", "a = input()\nif a.islower:\n print('a')\nelif a.isupper:\n print('A')\n", "a = input()\nif a.isupper():\n print('A')\nelse:\n print('a')"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s119051324', 's171533410', 's784056522', 's749408019']
[9012.0, 9012.0, 9076.0, 9020.0]
[29.0, 28.0, 30.0, 32.0]
[64, 64, 68, 59]
p02627
u968580153
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['#!/usr/bin/env python\n# ---------------------------------------------------------------------------------------!\nimport os\nimport sys\nfrom io import BytesIO, IOBase\n# from bisect import bisect_left as bl #c++ lowerbound bl(array,element)\n# from bisect import bisect_right as br #c++ upperbound br(array,element)\n\n\n# ---------------------------------------MAIN()-----------------------------------------------!\ndef main():\n sys.stdin = open(\'input.txt\', \'r\')\n sys.stdout = open(\'output.txt\', \'w\')\n a = input()\n if(a.isupper()):\n print("A")\n else:\n print("a")\n\n\n# -----------------------------------------------------------------------------------------!\n# region fastio\nBUFSIZE = 8192\n\n\nclass FastIO(IOBase):\n newlines = 0\n\n def _init_(self, file):\n self._fd = file.fileno()\n self.buffer = BytesIO()\n self.writable = "x" in file.mode or "r" not in file.mode\n self.write = self.buffer.write if self.writable else None\n\n def read(self):\n while True:\n b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))\n if not b:\n break\n ptr = self.buffer.tell()\n self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)\n self.newlines = 0\n return self.buffer.read()\n\n def readline(self):\n while self.newlines == 0:\n b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))\n self.newlines = b.count(b"\\n") + (not b)\n ptr = self.buffer.tell()\n self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)\n self.newlines -= 1\n return self.buffer.readline()\n\n def flush(self):\n if self.writable:\n os.write(self._fd, self.buffer.getvalue())\n self.buffer.truncate(0), self.buffer.seek(0)\n\n\nclass IOWrapper(IOBase):\n def _init_(self, file):\n self.buffer = FastIO(file)\n self.flush = self.buffer.flush\n self.writable = self.buffer.writable\n self.write = lambda s: self.buffer.write(s.encode("ascii"))\n self.read = lambda: self.buffer.read().decode("ascii")\n self.readline = lambda: self.buffer.readline().decode("ascii")\n\n\nsys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)\ndef input(): return sys.stdin.readline().rstrip("\\r\\n")\n\n\n\n\nif __name__ == "__main__":\n main()\n', ' a = input()\n if(a.isupper()):\n print("A")\n else:\n print("a")', 'if(a.isupper()==True):\n print("A")\n else:\n print("a")', 'a=input()\nif(a.isupper()):\n print("A")\nelse:\n print("a")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s120793173', 's415169899', 's963604646', 's461776850']
[9180.0, 9012.0, 8964.0, 9000.0]
[27.0, 29.0, 25.0, 28.0]
[2431, 81, 70, 62]
p02627
u969133463
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['class henkan:\n\n def __init__(self, a):\n\n if(a.islower()):\n henkan.upper1(a)\n else:\n henkan.lower1(a)\n \n def upper1(a):\n print(a.upper())\n \n def lower1(a):\n print(a.lower())\n\n\n\na = input()\nhenkan(a)\n\n', 'class henkan:\n\n def __init__(self, a):\n\n if(a.islower()):\n henkan.upper1(a)\n else:\n henkan.lower1(a)\n \n def upper1(a):\n print("a")\n \n def lower1(a):\n print("A")\n\n\n\na = input()\nhenkan(a)\n\n']
['Wrong Answer', 'Accepted']
['s108246032', 's632614311']
[9036.0, 9004.0]
[28.0, 25.0]
[264, 252]
p02627
u970443992
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['N=0\n\nN = int(input())\nK = int(input())\np = [int(input()) for i in range(N)]\n\np.sort()\nprint(sum(p[0:K]))\n', "S = input()\nif(S.isupper()):\n printf('A')\nelse:\n printf('a')", "\nS = input()\nif(S.isupper()):\n print('A')\nelse:\n print('a')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s038216527', 's581818678', 's541891498']
[9152.0, 9016.0, 8968.0]
[24.0, 25.0, 30.0]
[105, 66, 65]
p02627
u971124021
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["a = input()\n\ndic = {\n 'A':'a','B':'b','C':'c','D':'d','E':'e','F':'f','G':'g',\n 'H':'h','I':'i','J':'j','K':'k','L':'l','M':'m','N':'n',\n 'O':'o','P':'p','Q':'q','R':'r','S':'s','T':'t','U':'u',\n 'V':'v','W':'w','X':'x','Y':'y','Z':'z'\n }\n\nif a in list(dic.keys()):\n print(dic[a])\n exit()\n\nprint(a)", "a = input()\n\nif a.isupper():\n print('A')\n exit()\n\nprint('a')"]
['Wrong Answer', 'Accepted']
['s447613318', 's079436962']
[9000.0, 8904.0]
[28.0, 29.0]
[305, 62]
p02627
u975243484
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
["\n\nimport string\n\nN = int(input())\nalpha = list(string.ascii_lowercase)\nalpha.append('')\n\n\nvalue = []\nvalue.append(alpha[N // (26**10) - 1])\n\nfor i in range(10,1,-1):\n value.append(alpha[(N % (26**i)) // (26**(i-1)) - 1])\n\nvalue.append(alpha[N % (26**1) - 1])\n\nvalue = ''.join(value)\nprint(value)", "alpha = input()\n\nif alpha.islower():\n print('a')\nelse:\n print('A')"]
['Runtime Error', 'Accepted']
['s755365460', 's650011818']
[9900.0, 8960.0]
[34.0, 28.0]
[399, 68]
p02627
u976169012
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['import sys\nimport math\ndef II():\n\treturn int(sys.stdin.readline())\n\ndef LI():\n\treturn list(map(int, sys.stdin.readline().split()))\n\ndef MI():\n\treturn map(int, sys.stdin.readline().split())\n\ndef SI():\n\treturn sys.stdin.readline().strip()\ns = SI()\nif s.isLower():\n\tprint("a")\nelse:\n\tprint("A")', 'import sys\nimport math\ndef II():\n\treturn int(sys.stdin.readline())\n\ndef LI():\n\treturn list(map(int, sys.stdin.readline().split()))\n\ndef MI():\n\treturn map(int, sys.stdin.readline().split())\n\ndef SI():\n\treturn sys.stdin.readline().strip()\ns = SI()\nif s.islower():\n\tprint("a")\nelse:\n\tprint("A")']
['Runtime Error', 'Accepted']
['s837117745', 's664454077']
[9048.0, 9112.0]
[28.0, 28.0]
[291, 291]
p02627
u981884699
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['# coding: utf-8\n\nN = int(input())\nA = list(map(int, input().split()))\n\nA.sort()\n\ndict_a = dict()\n\nfor a in A:\n if not (a in dict_a):\n dict_a[a] = 1\n else:\n dict_a[a] += 1\n\n\nQ = int(input())\n\nB = []\nC = []\n\nsums = []\nfor i in range(Q):\n b, c = list(map(int, input().split()))\n B.append(b)\n C.append(c)\n\nfor b, c in zip(B, C):\n if (b in dict_a):\n num = dict_a[b]\n \n if not (c in dict_a):\n dict_a[c] = num\n else:\n dict_a[c] += num\n\n dict_a.pop(b)\n\n keys = dict_a.keys()\n vals = dict_a.values()\n\n sumval = 0\n for k, v in zip(keys, vals):\n sumval += k * v\n\n print(sumval)\n ', "\nchar = input()\n\nflg = char.isupper()\n\nif flg:\n print('A')\nelse:\n print('a')\n\n "]
['Runtime Error', 'Accepted']
['s516122851', 's788311020']
[9244.0, 9008.0]
[28.0, 29.0]
[678, 88]
p02627
u983664930
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['t = input()\nif(t.islower()):\n print(t.upper())\nelse:\n print(t.lower())', "t = input()\nif(t.islower()):\n print('A')\nelse:\n print('a')", "t = input()\nif(t.islower()):\n print('a')\nelse:\n print('A')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s201232626', 's261370484', 's135042680']
[9092.0, 9016.0, 9084.0]
[32.0, 29.0, 27.0]
[72, 60, 60]
p02627
u989089752
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['s = input()\n\nif s.islower():\n print(s.upper())\nelse:\n print(s.lower())', "s = input()\n \nif s.islower():\n print('a')\nelse:\n print('A')"]
['Wrong Answer', 'Accepted']
['s635837487', 's780980612']
[8960.0, 9016.0]
[30.0, 28.0]
[72, 61]
p02627
u999503965
2,000
1,048,576
An uppercase or lowercase English letter \alpha will be given as input. If \alpha is uppercase, print `A`; if it is lowercase, print `a`.
['n=int(input())\nl=list(map(int,input().split()))\nq=int(input())\nbefore=[]\nafter=[]\nfor i in range(q):\n a,b=input().split()\n before.append(int(a))\n after.append(int(b))\n \nfor i in range(q):\n if before[i] in l:\n l=[after[i] if j == before[i] else j for j in l]\n print(sum(l))\n', 'a=str(input())\n\nif a.isupper()==True:\n print("A")\n\nelse:\n print("a")']
['Runtime Error', 'Accepted']
['s652830342', 's518970465']
[9200.0, 9000.0]
[26.0, 31.0]
[290, 70]
p02628
u000875186
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a=input()\nl=a.split(" ")\nn=int(l[0])\nk=int(l[1])\nf=input()\nfruits=int(f.split(" "))\nfor d in range(0, len(fruits)):\n fruits[d]=int(fruits[d])\nans=0\nb=0\nwhile(b<k):\n g=max(fruits)\n ans+=g\n fruits.remove(g)\n b+=1\nprint(ans)', 'a=input()\nl=a.split(" ")\nn=int(l[0])\nk=int(l[1])\nf=input()\nfruits=f.split(" ")\nfor d in range(0, len(fruits)):\n fruits[d]=int(fruits[d])\nans=0\nb=0\nwhile(b<k):\n g=min(fruits)\n ans+=g\n fruits.remove(g)\n b+=1\nprint(ans)']
['Runtime Error', 'Accepted']
['s149886609', 's262625551']
[9212.0, 9072.0]
[24.0, 32.0]
[236, 231]
p02628
u007771307
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,m=map(int,input().split())\nl=list(map(int,input().split()))\ns=0\nl.sort()\nx=l[:m]\nprint(x) \nprint(sum(x))\n', 'n,m=map(int,input().split())\nl=list(map(int,input().split()))\ns=0\nl.sort()\nx=l[:m]\nprint(sum(x))\n']
['Wrong Answer', 'Accepted']
['s249154143', 's272537436']
[9180.0, 9088.0]
[28.0, 24.0]
[109, 97]
p02628
u014562811
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
["prices = []\ntotal_fruits = 0\nmax_numb = 0\n\ntotal_fruits, max_numb = input().split(' ')\ntmp_prices = input().split(' ')\ntmp_prices.sort()\nans = 0\nfor i in range(int(max_numb)):\n ans += int(tmp_prices[i])\n \nprint(ans)\n ", "prices = []\ntotal_fruits = 0\nmax_numb = 0\n\ntotal_fruits, max_numb = input().split(' ')\ntmp_prices = input().split(' ')\ntmp_prices = [int(i) for i in tmp_prices]\ntmp_prices.sort()\nans = 0\nfor i in range(int(max_numb)):\n ans += int(tmp_prices[i])\n \nprint(ans)\n "]
['Wrong Answer', 'Accepted']
['s932345784', 's839974717']
[9192.0, 9180.0]
[26.0, 30.0]
[220, 262]
p02628
u014646120
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input().split())\np=list(map(int,input().split()))\nprint (p.sort(),sum(p[0:K]))', 'N,K=map(int,input().split())\np=list(map(int,input().split()))\npa=sorted(p)\nprint (sum(pa[0:K]))']
['Wrong Answer', 'Accepted']
['s331946847', 's831894078']
[9128.0, 9196.0]
[29.0, 26.0]
[90, 95]
p02628
u020272575
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = input().split()\nprint(sum(sorted([int(i) for i in input().split()])[:k]))', 'n, k = input().split()\nsum(input().split().sorted()[:k])', 'n, k = input().split()\nsum(sorted([int(i) for i in input().split()])[:k])', 'n, k = [int(i) for i in input().split()]\nprint(sum(sorted([int(i) for i in input().split()])[:k]))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s789859013', 's847649214', 's980729118', 's183335868']
[9160.0, 9084.0, 9212.0, 9248.0]
[27.0, 22.0, 23.0, 33.0]
[80, 56, 73, 98]
p02628
u021387650
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = input().split()\nnum_list = list(map(int,input().split()))\n\nnum_list.sort()\nans = 0\n\nfor i in range(k):\n ans += num_list[i]\nelse:\n print(ans)', 'n,k = map(int,input().split())\nnum_list = list(map(int,input().split()))\n\nnum_list.sort()\nans = 0\n\nfor i in range(k):\n ans += num_list[i]\nelse:\n print(ans)\n']
['Runtime Error', 'Accepted']
['s650397661', 's434861981']
[9264.0, 9240.0]
[28.0, 33.0]
[148, 158]
p02628
u024609780
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['A=list(input().split(" "))\nB=list(input().split(" "))\nC=sorted(B)\nD=[]\nM=0\nfor i in range(int(A[1])):\n D.append(int(C[i]))\nfor j in range(len(D)):\n M=D[j]+M\nprint(M)', 'A=list(input().split(" "))\nB=list(input().split(" "))\nfor i in range(len(B)):\n B[i]=int(float(B[i]))\nC=sorted(B)\nD=[]\nM=0\nfor i in range(int(A[1])):\n D.append(int(C[i]))\nfor j in range(len(D)):\n M=D[j]+M\nprint(M)']
['Wrong Answer', 'Accepted']
['s146257312', 's041915480']
[9264.0, 9040.0]
[26.0, 29.0]
[171, 221]
p02628
u029056424
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = input().split()\nP = list(map(int,input().split()))\n\nP.sort()\n \ntotal=0\n\nfor i in range(int(K)+1):\n total=total+P[i]\n \nprint(total)', 'N, K = input().split()\nP = list(map(int,input().split()))\n\n# N=5\n# K=2\n# P=[10, 20, 40, 2, 6]\n\nP.sort()\n \ntotal=0\n\nfor i in range(int(K)+1):\n total=total+P[i]\n \nprint(total)', 'N, K = input().split()\nP = list(map(int,input().split()))\n\nP.sort()\n\ntotal=0\nfor i in range(K):\n total=total+P[i]\n \nprint(total)\n\n', 'N, K = input().split()\nP = list(map(int,input().split()))\n \nP.sort()\n \ntotal=0\nfor i in range(K+1):\n total=total+P[i]\n \nprint(total)', 'N, K = input().split()\nP = list(map(int,input().split()))\n\nP.sort()\n \ntotal=0\n\nfor i in range(int(K)):\n total=total+P[i]\n \nprint(total)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s067975552', 's123547457', 's136777370', 's267513047', 's816663942']
[9112.0, 9128.0, 9192.0, 9192.0, 9156.0]
[26.0, 33.0, 30.0, 31.0, 29.0]
[138, 174, 131, 133, 138]
p02628
u030879708
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['l=map(int,open(0).read().split());print(sum(sorted(l[2:])[:l[1]]))', 'n,k=input().split();print(sum(sorted(int,input().split())[:int(k)]))', 'a,b,*l=map(int,open(0).read().split());print(sum(sorted(l)[:b]))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s215288040', 's893442623', 's002085469']
[9120.0, 9048.0, 9204.0]
[22.0, 27.0, 31.0]
[66, 68, 64]
p02628
u034194513
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['fluit_num,fluit_buy=input().split()\nprint(fluit_num,fluit_buy)\np = input().split()\nprint(p[:4])\n\n', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\nprint(sum(sorted(p)[:K]))']
['Wrong Answer', 'Accepted']
['s953538981', 's447308057']
[9056.0, 9164.0]
[33.0, 26.0]
[97, 94]
p02628
u035044350
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int,input().split())\nprices = input().split()\n\nfor i in range(len(prices)):\n prices[i] = int(prices[i])\n\npricesSum = 0\nwhile K > 0:\n newFruit = min(prices) \n index = prices.index(newFruit)\n prices.pop(index)\n pricesSum += newFruit\n K -= 1', 'N, K = map(int,input().split())\nprices = input().split()\n\nfor i in range(len(prices)):\n prices[i] = int(prices[i])\n\npricesSum = 0\nwhile K > 0:\n newFruit = min(prices) \n index = prices.index(newFruit)\n prices.pop(index)\n pricesSum += newFruit\n K -= 1\n \nprint(pricesSum)']
['Wrong Answer', 'Accepted']
['s887003741', 's486116252']
[9184.0, 9228.0]
[40.0, 39.0]
[267, 289]
p02628
u035445296
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nans = 0\nfor i in p:\n ans += i\nprint(ans)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nans = 0\nfor i in range(k):\n ans += p[i]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s104616002', 's315706779']
[9260.0, 9252.0]
[30.0, 54.0]
[119, 129]
p02628
u036914910
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\np = [int(i) for i in input().split()]\np.sort()\nfor i in range(k) :\n s += p[i]\nprint(s)', 'n,k = map(int,input().split())\np = [int(i) for i in input().split()]\np.sort()\ns = 0\nfor i in range(k) :\n s += p[i]\nprint(s)']
['Runtime Error', 'Accepted']
['s997278723', 's768725617']
[9252.0, 9236.0]
[25.0, 29.0]
[120, 126]
p02628
u039065404
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nS = 0\n\nfor i in range(K):\n S = S + p[K]\n \nprint(S)', 'N,K = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nS = 0\n \nfor i in range(K):\n S = S + p[i]\n \nprint(S)']
['Runtime Error', 'Accepted']
['s258680670', 's316226967']
[9180.0, 9020.0]
[30.0, 26.0]
[127, 128]
p02628
u039355749
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = list(map(int, input().split())).sort()\n\nprint(sum(p[:k]))', 'n, k = map(int, input().split())\np = sorted(list(map(int, input().split())))\nprint(sum[:k])', 'n, k = map(int, input().split())\np = list(map(int, input().split()).sort()\nprint(sum(p[:k]))\n', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\n\np = sorted(p)\n\nprint(sum(p[:k]))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s301448697', 's797110150', 's827921082', 's234163371']
[9268.0, 9236.0, 8884.0, 9192.0]
[25.0, 26.0, 25.0, 31.0]
[94, 91, 93, 103]
p02628
u054825571
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input())\nP=sorted(list(map(int,input().split())))\nprint(sum(P[:K]))', 'N,K=map(int,input().split())\nP=sorted(list(map(int,input().split())))\nprint(sum(P[:K]))']
['Runtime Error', 'Accepted']
['s000778835', 's833669381']
[9180.0, 9232.0]
[29.0, 28.0]
[79, 87]
p02628
u060770263
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = sorted(map(int, input().split()))\nprint(sum([:k]))', 'n, k = map(int, input().split())\np = sorted(map(int, input().split()))\nprint(sum(p[:k]))']
['Runtime Error', 'Accepted']
['s917682610', 's898977459']
[8908.0, 9236.0]
[25.0, 28.0]
[87, 88]
p02628
u062691227
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\n\npp = sorted(map(int, input().split()), reverse=True)\n\nprint(sum(pp[:k]))', 'n, k = map(int, input().split())\n\npp = sorted(map(int, input().split()))\n\nprint(sum(pp[:k]))']
['Wrong Answer', 'Accepted']
['s561481274', 's835175845']
[9240.0, 9244.0]
[29.0, 28.0]
[106, 92]
p02628
u062808720
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\nprices = sorted(list(map(int, input().split())))\nprint(prices)\nsum = 0\nfor i in range(0,K) :\n sum = sum + prices[i]\n\nprint(sum)\n\n', 'N, K = map(int, input().split())\nprices = sorted(list(map(int, input().split())))\nsum = 0\nfor i in range(0,K) :\n sum = sum + prices[i]\n\nprint(sum)\n\n']
['Wrong Answer', 'Accepted']
['s844890283', 's690386196']
[9112.0, 9168.0]
[31.0, 29.0]
[165, 151]
p02628
u063232468
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[0:n+1]))', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[0:n]))', 'n,k = map(int,input().split())\np = list(input().split())\np.sort()\nprint(sum(p[0:n]))', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[0:k+1]))', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[0:k]))']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s330519107', 's435819202', 's614853668', 's840033988', 's693956774']
[9020.0, 9020.0, 9220.0, 9240.0, 9156.0]
[29.0, 27.0, 25.0, 29.0, 25.0]
[95, 93, 84, 95, 93]
p02628
u063346608
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\np = list(map(int,input().split()))\n\np.sort()\nprint(p)\n\nsum = 0\nfor i in range(K):\n\tsum = sum + p[i]\nprint(sum)', 'N,K = map(int,input().split())\np = list(map(int,input().split()))\n\np.sort()\n#print(p)\n\nsum = 0\nfor i in range(K):\n\tsum = sum + p[i]\nprint(sum)']
['Wrong Answer', 'Accepted']
['s280626344', 's753717335']
[9268.0, 9232.0]
[26.0, 30.0]
[141, 142]
p02628
u068538925
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = input().split()\nlist_in = list(map(int, input().split()))\nprint(list_in)\nlist_in.sort()\n\nsum = 0\nfor i in range(int(k)):\n sum = sum + list_in[i]\n\nprint(sum)', 'n, k = input().split()\nlist_in = list(map(int, input().split()))\nlist_in.sort()\n\nsum = 0\nfor i in range(int(k)):\n sum = sum + list_in[i]\n\nprint(sum)']
['Wrong Answer', 'Accepted']
['s382509361', 's115215802']
[9172.0, 9252.0]
[31.0, 30.0]
[166, 151]
p02628
u069978048
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N = input()\nK = input()\nlists = []\nA = 0\n\nfor i in range(int(N)):\n lists.append((input()))\n \nlists.sort()\n \nfor j in range(int(K)):\n A += int(lists[j])\n \nprint(A)', 'N = input()\nK = input()\nlists = []\nB = 0\n\nfor i in range(int(N)):\n A = input()\n lists.append(int(A))\n #print(A)\n\nlists.sort()\n#print(lists)\n\nfor j in range(int(K)):\n B += int(lists[j])\n \nprint(B)', 'N = input()\nK = input()\nlists = []\nA = 0\n\nfor i in range(int(N)):\n lists.append((input()))\n \nlists.sort()\n \nA = sum(lists[:K])\n \nprint(A)', 'N = input()\nK = input()\n\nfor i in range(N):\n list.append(input())\n\nlist.sort()\n\nfor j in range(K):\n A += list[j]\n\nprint(A)', 'N = input()\nK = input()\n \nfor i in range(N):\n list[i] = input()\n \nlist.sort()\n \nfor j in range(K):\n A += list[j]\n \nprint(A)', 'N,K = input().split()\nlists = []\nB = 0\n\nlists = list(map(int, input().split()))\n\nlists.sort()\n#print(lists)\n\nfor j in range(int(K)):\n B += int(lists[j])\n \nprint(B)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s082752096', 's179586094', 's280558583', 's383863780', 's482366175', 's070157218']
[9084.0, 9028.0, 9072.0, 8964.0, 8924.0, 9076.0]
[22.0, 21.0, 24.0, 25.0, 26.0, 31.0]
[164, 205, 138, 124, 125, 164]
p02628
u072719787
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nprint(p[:k])', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nprint(sum(p[:k]))\n']
['Wrong Answer', 'Accepted']
['s108415117', 's863332197']
[9196.0, 9108.0]
[30.0, 27.0]
[90, 96]
p02628
u077296371
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort()\nprint(sum(l[:k])', 'n,k=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort()\nprint(sum(l[:k]))']
['Runtime Error', 'Accepted']
['s570727017', 's780234289']
[8932.0, 9264.0]
[19.0, 27.0]
[87, 88]
p02628
u078181689
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = list(map(int,input().split()))\narr = list(map(int,input().split()))\narr.sort()\nprint(sum(arr[:k])', 'n,k = list(map(int,input().split()))\narr = list(map(int,input().split()))\narr.sort()\nprint(sum(arr[:k]))']
['Runtime Error', 'Accepted']
['s407258151', 's798604595']
[8888.0, 9252.0]
[27.0, 31.0]
[103, 104]
p02628
u078731915
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['line = [input() for i in range(2)]\n\nstatus = line[0].split()\nfruits = line[1].split()\n\ni = 1\ntotal = 0\nfor fruit in fruits:\n i += 1\n total += int(fruit)\n if int(status[1]) < i:\n break\nprint(total)\n', 'line = [input() for i in range(2)]\n\nstatus = [int(x) for x in line[0].split()]\nfruits = [int(x) for x in line[1].split()]\n\nstatus\nfruits = sorted(fruits)\n\ni = 1\ntotal = 0\nfor fruit in fruits:\n i += 1\n total += int(fruit)\n if int(status[1]) < i:\n break\nprint(total)\n']
['Wrong Answer', 'Accepted']
['s041074973', 's641690690']
[9208.0, 9264.0]
[25.0, 26.0]
[213, 281]
p02628
u079142126
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\na = list(map(int, input().split()))\nsorted(a)\nprint(sum(a[:k])', 'n, k = map(int, input().split())\na = list(map(int, input().split())).sort()\nprint(sum(a[:k]))', 'n, k = map(int, input().split())\na = list(map(int, input().split()))\nsorted(a)\nprint(sum(a[:k]))', 'n, k = map(int, input().split())\na = sorted(list(map(int, input().split())))\nprint(sum(a[:k]))']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s454096340', 's801907988', 's862715561', 's267797027']
[8912.0, 9208.0, 9072.0, 9100.0]
[31.0, 24.0, 29.0, 30.0]
[95, 93, 96, 94]
p02628
u081714930
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['import itertools\nprod = functools.partial(functools.reduce, operator.mul)\nn,k=map(int,input().split())\nprice=list(map(int,input().split()))\n\nn_list=[]\nfor com in itertools.combinations(price,k):\n s=sum(com)\n n_list.append(s)\nprint(min(n_list))', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\nprint(sum(sorted(p)[:K]))']
['Runtime Error', 'Accepted']
['s660949834', 's934553132']
[9044.0, 9140.0]
[24.0, 28.0]
[249, 94]
p02628
u084411645
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = input().split(" ")\nn = int(n)\nk = int(k)\na = input.split(" ")\na = sorted(a)\nans = 0\nfor i in range(k):\n ans += int(a[i])\nprint(ans)', 'n, k = input().split(" ")\nn = int(n)\nk = int(k)\na = input().split(" ")\nfor i in a:\n i = int(i)\na = sorted(a)\nans = 0\nfor i in range(k):\n ans += int(a[i])\nprint(ans)\n', 'n, k = input().split(" ")\nn = int(n)\nk = int(k)\na = input().split(" ")\na = sorted(a)\nans = 0\nfor i in range(k):\n ans += int(a[i])\nprint(ans)\n', 'n, k = input().split(" ")\nn = int(n)\nk = int(k)\na = [int(x) for x in input().split(" ")]\na.sort()\nans = 0\nfor i in range(k):\n ans += int(a[i])\nprint(ans)\n']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s087664769', 's584813567', 's847915323', 's257511619']
[8948.0, 9156.0, 9168.0, 9256.0]
[23.0, 29.0, 25.0, 30.0]
[138, 165, 141, 154]
p02628
u085603966
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
["N,K = map(int,input().split(' '))\nP = list(map(int,input().spllit(' ')))\nif(k==1):\n print(min(P))\nelse:\n res=[]\n for i in range(K):\n res[i].append(min(P))\n P.remove(min(P))\n print(sum(res)) ", "N,K = map(int,input().split(' '))\nP = list(map(int,input().split(' ')))\nif(K==1):\n print(min(P))\nelse:\n res=[]\n for i in range(K):\n res.append(min(P))\n P.remove(min(P))\n print(sum(res))\n"]
['Runtime Error', 'Accepted']
['s454595590', 's064812186']
[9176.0, 9120.0]
[31.0, 49.0]
[200, 196]
p02628
u087118202
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\np=list(map(int,input().split()))\np.sort()\n_sum=0\nfor i in range(k):\n _sum += p[k]\nprint(_sum)', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\np.sort()\n_sum=0\nfor i in range(k):\n _sum += p[i]\nprint(_sum)']
['Runtime Error', 'Accepted']
['s890463654', 's289756965']
[9252.0, 9072.0]
[26.0, 28.0]
[123, 125]
p02628
u089925107
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input())\naa = list(map(int,input()))\naa.sort()\naaa = aa[:K]\nprint(sum(aaa))', 'N,K = map(int,input().split())\naa = list(map(int,input().split()))\naa.sort()\naaa = aa[:K]\nprint(sum(aaa))']
['Runtime Error', 'Accepted']
['s238130830', 's152061703']
[8916.0, 9144.0]
[27.0, 25.0]
[89, 105]
p02628
u091307273
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = (int(i) for i in input().split())\np = [input().split()]\n\nsp = sorted(p)\nprint(sum(sp[:K]))\n', 'N, K = (int(i) for i in input().split())\np = [int(i) for i in input().split()]\n\nsp = sorted(p)\nprint(sum(sp[:K]))\n']
['Runtime Error', 'Accepted']
['s927789922', 's898055393']
[9216.0, 9164.0]
[23.0, 26.0]
[98, 114]
p02628
u094102716
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nb.sort()\nprint(b)\nd = b[0:a[1]]\nprint(sum(d))\n\n', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nb.sort()\nd = b[0:a[1]]\nprint(sum(d))\n\n']
['Wrong Answer', 'Accepted']
['s130855841', 's981818774']
[9264.0, 9252.0]
[34.0, 33.0]
[117, 108]
p02628
u094300401
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = input()\nx = p.split()\nl = int(x)\n\nif n == len(l):\n pass\nelse:\n return\n\nfor i in range(k):\n shukei += min(l)\n l.remove(min(l))\n\nprint(shukei)', 'n, k = map(int, input().split())\np = input()\nx = p.split()\nl = [int(s) for s in x]\nshukei = 0\n\ndef shukei_def():\n global shukei\n if n == len(l):\n for i in range(k):\n shukei += min(l)\n l.remove(min(l))\n else:\n return\n\nshukei_def()\n\nprint(shukei)']
['Runtime Error', 'Accepted']
['s038384563', 's387999407']
[9036.0, 9152.0]
[31.0, 47.0]
[181, 297]
p02628
u094425865
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\n', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\n\np.sort()\nprint(sum(p[:k]))']
['Wrong Answer', 'Accepted']
['s276341135', 's599119041']
[9088.0, 9240.0]
[29.0, 31.0]
[31, 93]
p02628
u124040548
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['import sys\n\ninput_list = sys.stdin.readlines()\n\ncount = 1\nget_count = 0\nget_value_count = 0\nfor i in input_list:\n get_values = i.split()\n if count == 1:\n get_value_count = int(get_values[0])\n get_count = int(get_values[1])\n else:\n if get_value_count == 1:\n print(get_values[0])\n else:\n get_values.sort()\n count_value = 1\n p = 0\n for c in get_values:\n if count_value > get_count:\n print(str(p))\n else:\n p = p + int(c)\n count_value = count_value + 1\n count = count + 1', 'import sys\n\ninput_list = sys.stdin.readlines()\n\ncount = 1\nget_count = 0\nget_value_count = 0\noutput = 0\nfor i in input_list:\n get_values = i.split()\n if count == 1:\n get_value_count = int(get_values[0])\n get_count = int(get_values[1])\n else:\n if get_value_count == 1:\n output = get_values[0]\n else:\n new_list = sorted(get_values, key=int)\n count_value = 1\n for c in new_list:\n if count_value > get_count:\n break\n else:\n output = output + int(c)\n count_value = count_value + 1\n count = count + 1\nprint(str(output))']
['Wrong Answer', 'Accepted']
['s117537311', 's453819619']
[9128.0, 9200.0]
[32.0, 27.0]
[546, 587]
p02628
u125269142
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\nprices = list(map(int, input().split()))\n\nprices = prices.sorted()\n\nanswer = 0\nfor i in range(0, k, 1):\n answer = answer + prices[i]\nprint(answer)', 'import numpy as np\n\nn, k = map(int, input().split())\nprices = list(map(int, input().split()))\nprices.sort()\n\nprices_arr = np.array(prices)\nanswer = prices_arr[0:k].sum()\n\nprint(answer)']
['Runtime Error', 'Accepted']
['s189215669', 's690371181']
[9084.0, 26924.0]
[21.0, 114.0]
[180, 184]
p02628
u129749062
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['5 3\n50 100 80 120 80', 'N, K = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[:K]))']
['Runtime Error', 'Accepted']
['s293143307', 's009905578']
[9028.0, 9208.0]
[24.0, 30.0]
[20, 93]
p02628
u135197221
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = mapt(int, input().split(" "))\np = mapt(int, input().split(" "))\nprint(sum(sorted(p)[:3]))', 'n, k = map(int, input().split(" "))\np = map(int, input().split(" "))\nprint(sum(sorted(p)[:k]))']
['Runtime Error', 'Accepted']
['s986728074', 's295866870']
[8988.0, 9152.0]
[25.0, 27.0]
[96, 94]
p02628
u136869985
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['_,k=map(int,input().split())\nprint(sum(sorted(list(map(int,input(),split())))[:k]))', '_,k=map(int,input().split())\nprint(sum(sorted(list(map(int,input().split())))[:k]))']
['Runtime Error', 'Accepted']
['s040534723', 's462252911']
[9172.0, 9212.0]
[23.0, 29.0]
[83, 83]
p02628
u139132412
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a,b = map(int, input().split())\narr = list(map(int, input().split()))\nprint(sum(arr[:b]))', 'a,b = map(int, input().split())\narr = list(map(int, input().split()))\narr.sort()\nprint(sum(arr[:b]))']
['Wrong Answer', 'Accepted']
['s305549576', 's033612849']
[9232.0, 9248.0]
[26.0, 30.0]
[89, 100]
p02628
u141574039
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input().split())\nS=[0]*(N+1);w=0\nP=list(map(int,input().split()))\nfor i in range(1,N+1):\n S[i-1]=[i,P[i-1]]\nS[-1]=[0,1000]\nS.sort(key=lambda x: x[1])\nprint(S)\nfor i in range(K):\n w=w+S[i][1]\nprint(w)', 'N,K=map(int,input().split())\nS=[0]*(N+1);w=0\nP=list(map(int,input().split()))\nfor i in range(1,N+1):\n S[i-1]=[i,P[i-1]]\nS[-1]=[0,1000]\nS.sort(key=lambda x: x[1])\n#print(S)\nfor i in range(K):\n w=w+S[i][1]\nprint(w)']
['Wrong Answer', 'Accepted']
['s118952529', 's896974530']
[9248.0, 9184.0]
[31.0, 28.0]
[213, 214]
p02628
u151163404
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a,b=(int(x) for x in input().split())\nnum_list = list(map(int, input().split())).sort\nans = 0\n\nfor i in range(b):\n ans += num_list[i]\n\nprint(ans)\n', 'a,b=(int(x) for x in input().split())\nnum_list = list(map(int, input().split())).sort\nans = 0\n\nfor i in range(b):\n ans += num_list[b]\n\nprint(ans)\n', 'a,b=(int(x) for x in input().split())\nnum_list = list(map(int, input().split())).sort()\nans = 0\n \nfor i in range(b):\n ans += num_list[i]\n \nprint(ans)', 'a,b=(int(x) for x in input().split())\nnum_list = list(map(int, input().split()))\nnum_list.sort()\nans = 0\n \nfor i in range(b):\n ans += num_list[i]\n \nprint(ans)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s063196037', 's097079193', 's482076287', 's575185687']
[9084.0, 9160.0, 8960.0, 9184.0]
[27.0, 28.0, 22.0, 28.0]
[147, 147, 150, 159]
p02628
u152165814
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=input().split()\nN=int(N)\nK=int(K)\na=[]\na=[int(a) for a in input().split()]\na.sort()\nprint(sum(a[0:K-1])', 'N,K=input().split()\nN=int(N)\nK=int(K)\na=[]\na=[int(a) for a in input().split()]\na.sort()\nprint(sum(a[0:K-1]))', 'N,K=input().split()\nN=int(N)\nK=int(K)\na=[]\na=[int(a) for a in input().split()]\na.sort()\nprint(sum(a[0:K]))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s152045742', 's248751953', 's369653513']
[8940.0, 9192.0, 8964.0]
[25.0, 27.0, 27.0]
[107, 108, 106]
p02628
u156931988
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a,b = map(int,input().split())\nl = map(int,input().split())\nl = sorted(l)\nprint(l)\nif(a<=b):\n print(sum(l))\nelse:\n print(sum(l[:b]))', 'a,b = map(int,input().split())\nl = map(int,input().split())\nl = sorted(l)\nprint(l)\nprint(sum(l[:b]))', 'a,b = map(int,input().split())\nl = list(map(int,input().split()))\nl = sorted(l)\nprint(sum(l[:b]))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s415950065', 's829292555', 's654570805']
[9244.0, 9264.0, 9232.0]
[29.0, 30.0, 28.0]
[138, 100, 98]
p02628
u161868822
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['sum = 0\nn, k = list(map(int, input().split()))\np = list(map(int, input().split()))\nfor i in range(k):\n sum += p[i]\nprint(sum)', 'sum = 0\nn, k = list(map(int, input().split()))\np = list(map(int, input().split()))\np.sort()\nfor i in range(k):\n sum += p[i]\nprint(sum)']
['Wrong Answer', 'Accepted']
['s052855410', 's296130090']
[9256.0, 9156.0]
[26.0, 31.0]
[126, 135]
p02628
u179034267
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\np=list(map(int,input().split()))\ns=0\nsort(p)\nfor i range k:\n s+=p[i]\n\nprint(s)', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\n\nsort(p)\nfor i range k:\n s+=a[i]\n\nprint(s)', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\ns=0\nsort(p)\nfor i in range(k):\n s+=p[i]\n\nprint(s)', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\ns=0\np.sort()\nfor i in range(k):\n s+=p[i]\n\nprint(s)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s281987558', 's399842723', 's463460013', 's031196020']
[8968.0, 8976.0, 9112.0, 9256.0]
[28.0, 28.0, 24.0, 34.0]
[110, 107, 114, 115]
p02628
u186121428
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['def main():\n\tn, k = map(int, input().split())\n\tP = list(map(int, input().split()))\n\tsorted_p = sorted(P)\n\tans = sum(sorted_p[:k])\n\tprint(ans)\n\treturn\n\nif __name__ == "__main__":\n\tmain(', 'def main():\n\tn, k = map(int, input().split())\n\tP = list(map(int, input().split()))\n\tsorted_p = sorted(P)\n\tans = sum(sorted_p[:k])\n\tprint(ans)\n\treturn\n\nif __name__ == "__main__":\n\tmain()']
['Runtime Error', 'Accepted']
['s245514717', 's445094719']
[8980.0, 9232.0]
[31.0, 28.0]
[184, 185]
p02628
u188305619
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int,input().split())\nP = list(map(int,input().split()))\nP_sorted = sorted(P)\nprint(P_sorted)\nans = 0\nfor i in range(K):\n ans += P_sorted[i]\nprint(ans)', 'N, K = map(int,input().split())\nP = list(map(int,input().split()))\nP_sorted = sorted(P)\nans = 0\nfor i in range(K):\n ans += P_sorted[i]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s142904508', 's363753446']
[9188.0, 9196.0]
[27.0, 27.0]
[164, 148]
p02628
u193771328
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\np = list(map(int, input().split()))\n\np.sort\ntotal=0\n\nfor i in range(K):\n total += p[i]\n \nprint(total)', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\n\np.sort()\ntotal=0\n\nfor i in range(K):\n total += p[i]\n \nprint(total)']
['Wrong Answer', 'Accepted']
['s714685751', 's520475740']
[9092.0, 9068.0]
[28.0, 27.0]
[140, 142]
p02628
u197833153
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K=map(int,input().split())\n\nfruit = list(input().split())\nprice = list(map(int, input().split()))\n\nprice2 = sorted(price)\ni = 0\nsum = 0\nwhile (i < K):\n sum += price2[i]\n i += 1\n\nprint(sum)', 'N, K=map(int,input().split())\n\nprice = list(map(int, input().split()))\n\nprice2 = sorted(price)\ni = 0\nsum = 0\nwhile (i < K):\n sum += price2[i]\n i += 1\n\nprint(sum)']
['Runtime Error', 'Accepted']
['s805140109', 's369868327']
[9036.0, 9140.0]
[26.0, 29.0]
[193, 163]
p02628
u201878104
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\nA = list(map(int, input().split()))\nxxx = sorted(A)\nzzz = 0\nfor i in range(K):\n zzz += A[i]\nprint(zzz)', 'N, K = map(int, input().split())\nA = list(map(int, input().split()))\nxxx = sorted(A)\nzzz = 0\nfor i in range(K):\n zzz += xxx[i]\nprint(zzz)']
['Wrong Answer', 'Accepted']
['s930912918', 's061818865']
[9264.0, 9244.0]
[26.0, 30.0]
[138, 140]
p02628
u203239974
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['if __name__ == "__main__":\n N,k = [int(item) for item in input().split()]\n price_arr = [int(p) for p in input().split()]\n print(sum(sorted(price_arr,reverse=True)[:k]))', 'if __name__ == "__main__":\n N,k = [int(item) for item in input().split()]\n price_arr = [int(p) for p in input().split()]\n print(sum(sorted(price_arr)[:k]))']
['Wrong Answer', 'Accepted']
['s395280268', 's871383797']
[9072.0, 9072.0]
[27.0, 26.0]
[177, 164]
p02628
u204616996
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N.K=map(int,input().split())\nP=sorted(list(map(int,input().split())))\nprint(sum(P[:K]))', 'N,K=map(int,input().split())\nP=sorted(list(map(int,input().split())))\nprint(sum(P[:K]))\n']
['Runtime Error', 'Accepted']
['s070110093', 's731888411']
[9032.0, 9176.0]
[30.0, 27.0]
[87, 88]
p02628
u205145698
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
["N, K = list(map(int, input().split()))\nA = list(map(int, input().split()))\n\nans = 0\n\nB=sorted(A)\n\nfor a in B[::-K]:\n ans += a\n if ans > 10**18:\n print('-1')\n break\nelse:\n print(ans)", "N, K = list(map(int, input().split()))\nA = list(map(int, input().split()))\n\nans = 0\n\nB=sorted(A)\n\nfor a in B[:K]:\n ans += a\n if ans > 10**18:\n print('-1')\n break\nelse:\n print(ans)"]
['Wrong Answer', 'Accepted']
['s136381839', 's615052751']
[9244.0, 9172.0]
[29.0, 30.0]
[190, 188]
p02628
u208512038
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\nfruits = list(map(int, input().split()))\n\nmix = []\n\nfor mix in range(k):\n mix.append(min(fruits))\n fruits.remove(min(fruits))\n\nprint(sum(mix))', 'n, k = map(int, input().split())\nfruits = list(map(int, input().split()))\n\nmix = []\na = 0\n\nwhile a < k:\n mix.append(min(fruits))\n fruits.remove(min(fruits))\n a += 1\n\nprint(sum(mix))']
['Runtime Error', 'Accepted']
['s081899379', 's988971774']
[9168.0, 9200.0]
[30.0, 44.0]
[181, 190]
p02628
u212523618
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
["(N, K) = input().split(' ')\na = input().split(' ')\na.sort()\nx = 0\nprint(a)\nfor i in range(int(K)):\n x += int(a[i])\nprint(x)", "(N, K) = input().split(' ')\na = list(map(int, input().split()))\na.sort()\nx = 0\nfor i in range(int(K)):\n x += int(a[i])\nprint(x)"]
['Wrong Answer', 'Accepted']
['s708449690', 's042659223']
[9216.0, 9124.0]
[26.0, 29.0]
[126, 130]
p02628
u214209871
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\nplist = list(map(int, input().split()))\n\nplist.sort()\nans = sum(plist, k)\n\nprint(ans)', 'n, k = map(int, input().split())\nplist = list(map(int, input().split()))\n\nplist.sort()\nans = 0\nfor i in rangr(k):\n ans += plist[i]\n\nprint(ans)\n', 'n, k = map(int, input().split())\nplist = list(map(int, input().split()))\n\nplist.sort()\nans = 0\nfor i in range(k):\n ans += plist[i]\n\nprint(ans)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s370723043', 's425052505', 's578914701']
[9176.0, 9172.0, 9176.0]
[28.0, 23.0, 26.0]
[118, 146, 146]
p02628
u214639130
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\n\np=list(map(int,input().split()))\n\ntotal=0\n\nfor i in range(k):\n total += p[i]\nprint(total)', 'n,k=map(int,input().split())\n\np=list(map(int,input().split()))\np.sort()\ntotal=0\n\nfor i in range(k):\n total += p[i]\nprint(total)']
['Wrong Answer', 'Accepted']
['s509057811', 's851527682']
[9056.0, 9080.0]
[30.0, 24.0]
[120, 128]
p02628
u217571418
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\nPn = list(map(int, input().split()))\n\nPn.sort()\nsum = 0\nfor i in range(K):\n\tsum += Pn[K]\n\nprint(sum)', 'N, K = map(int, input().split())\nPn = []\nfor i in range(N):\n\tPn.append(input())\n\nPn.sort()\nsum = 0\nfor i in range(K):\n\tsum += Pn[K]\n\nprint(sum)', 'N, K = map(int, input().split())\nPn = list(map(int, input().split()))\n\nPn.sort()\ns = 0\nfor i in range(K):\n\ts += Pn[K]\n\nprint(s)', 'N, K = map(int, input().split())\nP = map(int, input().split())\n\nP.sort()\ns = 0\nfor i in range(K):\n\ts += P[i]\n\nprint(s)', 'N, K = map(int, input().split())\nPn = []\nfor i in range(N):\n\tPn.append(input())\n\nQn = sorted(Pn)\nsum = 0\nfor i in range(K):\n\tsum += Qn[K]\n\nprint(sum)', 'N = int(input())\nK = int(input())\nPn = []\nfor i in range(N):\n\tPn.append(input())\n\nQn = sorted(Pn)\nsum = 0\nfor i in range(K):\n\tsum += Qn[K]\n\nprint(sum)', 'N, K = map(int, input().split())\nP = list(map(int, input().split()))\n\nP.sort()\ns = 0\nfor i in range(K):\n\ts += P[i]\n\nprint(s)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s096512934', 's144696120', 's302894230', 's388805387', 's404866375', 's961554494', 's909254269']
[9012.0, 9112.0, 9056.0, 9156.0, 9080.0, 9084.0, 9124.0]
[26.0, 23.0, 26.0, 29.0, 20.0, 30.0, 26.0]
[133, 143, 127, 118, 149, 150, 124]
p02628
u218375549
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\nP = map(int,input().split())\nsum(sorted(P)[:K])', 'N, K = map(int, input().split())\nP = map(int,input().split())\nprint(sum(sorted(P)[:K]))']
['Wrong Answer', 'Accepted']
['s839484002', 's729844818']
[9124.0, 9196.0]
[33.0, 36.0]
[80, 87]