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
p02681
u941438707
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['print("Yes" if input()==input()[:-1])', 'print("Yes" if input()==input()[:-1] else "No")']
['Runtime Error', 'Accepted']
['s411528506', 's075920235']
[9024.0, 9088.0]
[23.0, 21.0]
[37, 47]
p02681
u941736004
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["from sysimport stdin\n\ninput_list = []\nfor line in stdin:\n input_list.append(line.rstrip('\\n'))\n\nif input_list[0] == input_list[1][:len(input_list[0])]:\n print('Yes')\nelse:\n print('No)", "from sys import stdin\n \ninput_list = []\nfor line in stdin:\n input_list.append(line.rstrip('\\n'))\n \nif input_list[0] == input_list[1][:len(input_list[0])]:\n print('Yes')\nelse:\n print('No)", "from sys import stdin\n \ninput_list = []\nfor line in stdin:\n input_list.append(line.rstrip('\\n'))\n \nif input_list[0] == input_list[1][:len(input_list[0])]:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s651140741', 's771060516', 's515787776']
[8868.0, 9012.0, 9028.0]
[20.0, 20.0, 21.0]
[186, 189, 190]
p02681
u941794834
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s=list(input())\nt=list(input())\nif s==t[:-1]:\n print("YES")\nelse:\n print("NO")', 's=list(input())\nt=list(input())\nif s==t[:-1]:\n print("YES")\nelse:\n print("NO")', 's=(input())\nt=(input())\nif s[:-1]==t[:-1]:\n print("YES")\nelse:\n print("NO")', 's=list(input())\nt=list(input())\nif s==t[:-1]:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s020550428', 's851677420', 's953144725', 's506881469']
[9040.0, 9096.0, 9100.0, 9088.0]
[23.0, 23.0, 21.0, 22.0]
[84, 84, 81, 85]
p02681
u944325914
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['a=int(input())\nb,c = map(str,input().split())\ns=input()\nprint({} {}.format(a+b+c,s))', 'a,b,c,k=map(int,input().split())\nif a>=k:\n print(a)\nelse:\n s=k-a\n if a+b>=s:\n print(a)\n else:\n c=k-a-b\n print(a-c)', 'a=str(S)\nb=str(T)\ndel b[-1:]\nif a=b:\n print"yes"\nelse:\n print"No"', 'a=int(input())\nb,c = map(int,input.split())\ns=input()\nprint({} {}.format(a+b+c,s))', 's=list(input())\nt=list(input())\nif s==t[:-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s078461912', 's217002795', 's551260049', 's878764187', 's727884202']
[9012.0, 8964.0, 8884.0, 8900.0, 8972.0]
[20.0, 23.0, 23.0, 22.0, 20.0]
[84, 127, 67, 82, 80]
p02681
u944886577
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['import re\ns=str(input())\nt=str(input())\nt2=s.replace(t[0:],"",1)\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=s.replace(t[0:],"",1)\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=re.sub(r^s,"",t)\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=re.sub(r\'^[a-z]*\',"",t)\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=replace(s,t[:-1])\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=s.replace(t[0:-1],"",1)\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=re.match(s,t)\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=s.replace(t[:-1],"",1)\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=re.sub(s,"",t)\nif len(t2)=1:\n print("Yes")\nelse:\n print("No")', 's=str(input())\nt=str(input())\nfor i in range s:\n if s[i]!=t[i]:\n print("No")\n else:\n pass\nif len(t2)==1 and re.sub(r"[a-z]","",t2)=="":\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nt2=t.replace(s,"",1)\nif re.match([a-z]):\n print("Yes")\nelse:\n print("No")', 'import re\ns=str(input())\nt=str(input())\nfor i in range(len(s)):\n if s[i]!=t[i]:\n print("No")\n exit()\n else:\n pass\nif re.sub(r"[a-z]","",t)=="":\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s036756915', 's123146706', 's243141658', 's260762662', 's447403661', 's600201968', 's659021349', 's800239515', 's833109440', 's833880682', 's964354410', 's711984795']
[9808.0, 9712.0, 9800.0, 9868.0, 9712.0, 9844.0, 9704.0, 9696.0, 8964.0, 8780.0, 9864.0, 9940.0]
[36.0, 35.0, 30.0, 34.0, 29.0, 35.0, 34.0, 33.0, 26.0, 20.0, 32.0, 34.0]
[145, 145, 140, 147, 141, 147, 137, 146, 106, 172, 115, 181]
p02681
u945046250
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['import numpy as np\n\na, b, c, k = map(int, input().split())\n\nif k <= a:\n sum = k * 1\nelif a < k and k <= a + b:\n sum = a\nelif a + b < k <= a + b + c:\n sum = a + (-1) * (k - a - b)\n\nprint(sum)\n', 'a, b, c, k = map(int, input().split())\n\nif k <= a:\n sum = k * 1\nelif a < k and k <= a + b:\n sum = a\nelif a + b < k <= a + b + c:\n sum = a + (-1) * (k - a - b)\n\nprint(sum)\n', 's, t = map(str, input().split())\n\nif (s[:len(s)] == t[:len(s)]):\n print("Yes")\nelse:\n print("No")\n', 's = input()\nt = input()\n\nif (s[:len(s)] == t[:len(s)]):\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s155946015', 's664718140', 's756758064', 's380458646']
[27040.0, 9140.0, 8928.0, 9012.0]
[104.0, 24.0, 20.0, 20.0]
[200, 180, 104, 95]
p02681
u945065638
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["n = input()\ns = input()\n\nif n == s[-1] and len(n) == len(s)-1:\n print('Yes')\nelse :\n print('No')", "n = input()\ns = input()\n\nif n == s[:-1] and len(n) == len(s)-1:\n print('Yes')\nelse :\n print('No')"]
['Wrong Answer', 'Accepted']
['s376438450', 's308248351']
[9048.0, 8928.0]
[25.0, 27.0]
[102, 103]
p02681
u945335181
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s = input()\nt = input()\n\nif s + t[-1] == t:\n print("Yes")\nelse:\n print("No")\n~ ', 's = input()\nt = input()\n\nstring = s + t[-1]\n\nif string == t:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s398693498', 's603679605']
[9032.0, 9084.0]
[20.0, 22.0]
[101, 100]
p02681
u948050032
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["from sys import stdin\n\nS = list(stdin.readline().rstrip())\nT = list(stdin.readline().rstrip())\n\nS[:len(S)]\nT[:len(S)]\n\nif S == T:\n print('Yes')\nelse:\n print('No')", "from sys import stdin\n\nS = list(stdin.readline().rstrip())\nT = list(stdin.readline().rstrip())\n\nif S[:len(S)] == T[:len(S)]:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s178622323', 's864588900']
[9100.0, 9100.0]
[27.0, 19.0]
[168, 163]
p02681
u949210009
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['A = input()\nB = input()\ndel B[-1]\nif A == B:\n print(Yes)\nelse:\n print(No)', 'a = str(input())\nb = str(input())\nc = b[-1]\nif a + c == b:\n print("Yes")\nelse:\n print("No"', 'A = input()\nB = input()\nif len(A&B) == 1:\n print(Yes)\nelse:\n print(No)', 'a = str(input())\nb = str(input())\nc = b[-1]\nif a + c == b:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s462836056', 's958416555', 's976728814', 's796491889']
[8988.0, 8852.0, 9100.0, 9000.0]
[22.0, 20.0, 24.0, 23.0]
[79, 96, 76, 97]
p02681
u949353021
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s = input()\nt = input()\nu = t[0:len(t)-1]\nprint(t)\nif s == u:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nu = t[0:len(t)-1]\nif s == u:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s748134901', 's129734711']
[9096.0, 9100.0]
[23.0, 21.0]
[100, 91]
p02681
u949831615
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["s = input()\nt = input()\n\nif t[0:len(s)-1] == s:\n print('Yes')\nelse:\n print('No') ", "s = input()\nt = input()\n\nif t[0:len(s)] == s:\n print('Yes')\nelse:\n print('No') \n\n"]
['Wrong Answer', 'Accepted']
['s062723191', 's116154151']
[9016.0, 9052.0]
[22.0, 21.0]
[84, 84]
p02681
u950052018
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['S = input()\nT = input()\n\nT_plus = T[-1]\nT_a = T[:-1]\n\nprint("Yes" if S==T else "No")', 'S = "snuke"\nT = "snekee"\n\nT_plus = T[-1]\nT_a = T[:-1]\n\nif S == T_a:\n print("Yes")\nelse:\n print("Yes" if S==T else "No")', 'T_plus = T[-1]\nT_a = T[:-1]\n\nif S == T_a:\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nT = input()\n\nT_plus = T[-1]\nT_a = T[:-1]\n\nif S == T_a:\n print("Yes")\nelse:\n print("No")\n print("Yes" if S==T else "No")', 'S = input()\nT = input()\n\nT_plus = T[-1]\nT_a = T[:-1]\n\nprint("Yes" if S==T_a else "No")']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s123098895', 's277970164', 's920130411', 's998800931', 's888563219']
[9096.0, 9044.0, 9088.0, 8968.0, 9100.0]
[23.0, 20.0, 19.0, 25.0, 20.0]
[84, 121, 77, 133, 86]
p02681
u950337877
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["s = input()\ns2 = input()\n\ns3=s2[:-1]\nprint(s3)\nif len(s)+1 == len(s2) and s in s3:\n print('Yes')\nelse:\n print('No')", "s = input()\ns2 = input()\n\ns3=s2[:-1]\n\nif len(s)+1 == len(s2) and s == s3:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s843057007', 's203031031']
[9100.0, 9040.0]
[23.0, 19.0]
[121, 112]
p02681
u951582245
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["S = input()\nT = input()\ntmp = T[:len(S)]\ntmp2 = T[len(S)]\nresult = 'No'\nif S == tmp:\n\tif tmp2.isdigit():\n\t\tresult = 'Yes'\nprint(result)", "S = input()\nT = input()\nresult = 'Yes'\nfor i in range(len(S)):\n\tif S[i] != T[i]:\n\t\tresult = 'No'\n\t\tbreak\nif not(T[len(T)-1].isdigit()):\n\t\tresult = 'No'\nprint(result)", "S = input()\nT = input()\nresult = 'Yes'\nfor i in range(len(S)):\n\tif S[i] != T[i]:\n\t\tresult = 'No'\n\t\tbreak\nprint(result)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s616147505', 's895109229', 's882292004']
[8880.0, 9116.0, 9040.0]
[21.0, 21.0, 23.0]
[135, 165, 118]
p02681
u953794676
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s = input()\nt = input()\n\nif len(s)+1 == len(t)+1:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\n\nif s == t[0:len(s)] and len(s)+1 == len(t):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s720755654', 's296520098']
[8968.0, 8940.0]
[21.0, 25.0]
[88, 107]
p02681
u954153335
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['import numpy as np\nn,k=map(int,input().split())\ntwon=np.zeros(n)\ntwon=list(map(int,input().split()))\ndata=twon[0]\narray=[-1]*n\narray[0]=1\ncount=0\nfor i in range(1,k-1):\n if array[data-1]==-1:\n array[data-1]=i+1\n else:\n count=(k-i-1)%(i+1-array[data-1])\n array=[-1]*n\n count=k-count\n data=twon[data-1]\n if count!=0:\n break\n print(count,array)\n \nfor j in range(count,k):\n data=twon[data-1]\n #print(j)\nprint(data,count)', 'S=input("S=")\nT=input("T=")\nl=len(S)\nif 1<=l and l<=10 and S.islower()==True and len(T)==l+1:\n if T.startswith(S)==True and T.islower()==True:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'S=input()\nT=input()\nif S==t[:-1] and S.islower()==True:\n print("Yes")\nelse:\n print("NO")', 'import numpy as np\nn,k=map(int,input().split())\ntwon=np.zeros(n)\ntwon=list(map(int,input().split()))\ndata=twon[0]\narray=[-1]*n\narray[0]=1\ncount=0\nfor i in range(1,k-1):\n if array[data-1]==-1:\n array[data-1]=i+1\n else:\n count=(k-i-1)%(i+1-array[data-1])\n array=[-1]*n\n count=k-count\n if count!=0:\n break\n data=twon[data-1]\nfor j in range(count,k):\n data=twon[data-1]\ndata=twon[data-1]\nprint(data)', 'S=input()\nT=input()\nl=len(S)\nif S==T[:-1] and S.islower==True and 1<=l and l<=10:\n print("Yes")\nelse:\n print("NO")', 'S=input()\nT=input()\nif S==T[:-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s083517259', 's257177555', 's789566021', 's791082464', 's970957320', 's957770870']
[27172.0, 9044.0, 9032.0, 27168.0, 8960.0, 8952.0]
[108.0, 21.0, 21.0, 108.0, 21.0, 22.0]
[475, 218, 90, 445, 116, 68]
p02681
u956547804
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["s=str(input())\nt=str(input())\nz=len(s)\nresult=0\nfor i in s:\n for h in t:\n if i==h:\n continue\n else:\n result+=1\nif result<=1:\n print('Yes')\nelse:\n print('No')", "s=str(input())\nt=str(input())\nz=len(s)\nresult=0\nfor i in s:\n for h in t:\n if i==h:\n continue\n else:\n result+=1\nif result==0:\n print('Yes')\nelse:\n print('No')", 's=input()\nt=input()\nif t[:-1]==s:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s213513799', 's923471438', 's708680945']
[9052.0, 9048.0, 8908.0]
[24.0, 21.0, 23.0]
[202, 202, 72]
p02681
u960046508
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["S = str(input())\nT = str(input())\n\nprint(S)\nprint(T)\n\nif (S in T) and T.startswith(S):\n print('Yes')\nelse:\n print('No')", "S = str(input())\nT = str(input())\n\nif (S in T) and T.startswith(S):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s608965657', 's471793355']
[9104.0, 9036.0]
[23.0, 24.0]
[125, 106]
p02681
u961059809
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['from sys import stdin as sin,stdout as sout\ns = sin.readline()\nt = sin.readline()\ns = s + t[-1]\nif s==t:\n sout.write("Yes\\n")\nelse:\n sout.write("No\\n")', 'from sys import stdin,stdout\ns = stdin.readline()\nt = stdin.readline()\nn = len(s)\nno = False\nfor i in range(n):\n if s[i] != t[i]:\n no = True\n break\nif no:\n print("No")\nelse:\n print("Yes")', 'from sys import stdin,stdout\ns = stdin.readline()\nt = stdin.readline()\ns = s + t[-1]\nif s==t:\n stdout.write("Yes")\nelse:\n stdout.write("No")', 'from sys import stdin as sin,stdout as sout\ns = sin.readline()\nt = sin.readline()\nif s==t[:-1]:\n sout.write("Yes\\n")\nelse:\n sout.write("No\\n")', 's = str(input())\nt = str(input())\ns = s + t[-1]\nif s==t:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s230591218', 's383680251', 's464929302', 's796617591', 's679910783']
[8892.0, 9120.0, 8896.0, 8996.0, 9068.0]
[22.0, 21.0, 24.0, 19.0, 21.0]
[153, 196, 142, 144, 91]
p02681
u962609087
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["def main():\n s = input()\n t = input()\n if s == t[0:len(t) - 1]:\n print('Yes')\n else:\n print('No')\n\nmain", "def main():\n s = input()\n t = input()\n if s == t[0:len(t) - 1]:\n print('Yes')\n else:\n print('No')\n\nmain()"]
['Wrong Answer', 'Accepted']
['s674500068', 's268682924']
[8992.0, 9028.0]
[30.0, 28.0]
[117, 119]
p02681
u962718741
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["def resolve():\n\tS, T = input().split()\n\tif T[:-1] == S:\n\t\tprint('Yes')\n\telse:\n\t\tprint('No')\nresolve()", "S, T = input().split()\nif T[:-1] == S:\n print('Yes')\nelse:\n print('No')", "S, T = input().split()\nif T[:-1] == S:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif T[:-1] == S:\n\tprint('Yes')\nelse:\n\tprint('No')\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s422746566', 's930687283', 's975445965', 's192531116']
[9092.0, 8988.0, 9072.0, 9088.0]
[26.0, 21.0, 26.0, 24.0]
[101, 73, 73, 73]
p02681
u962765087
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['S = input()\nT = input()\n\nif(S==T[0:len(S)]):\n print(True)\n else:\n print(False)\n\t\n\n', 'A, B, C, K = map(int, input().split())\nif((K-A)>0):\n Y = K-A\nelse:\n Y = 0\nif((Y-B)>0):\n Z = Y-B\nelse:\n Z = 0\n\nX = 1 * K + 0 * Y + (-1) * Z\nprint(X)\n\n\n\n\n\n\n\n\n\n\n\n\t\n\n', 'A, B, C, K = map(int, input().split())\nif((K-A)>0):\n Y = K-A\nelse:\n Y = 0\nif((Y-B)>0):\n Z = Y-B\nelse:\n Z = 0\n\nX = A * K + 0 * Y + (-1) * Z\nprint(X)', 'A, B, C, K = map(int, input().split())\nif((K-A)>0):\n Y = K-A\nelse:\n Y = 0\n print(K)\n exit()\nif((Y-B)>0):\n Z = Y-B\nelse:\n Z = 0\n\nX = A + 0 * Y + (-1) * Z\nprint(X)\n\n\n\n\n\n\n\n\n\n\n\n\t\n\n', 'S = input()\nT = input()\n\nif(S==T[0:len(S)]):\n print(Yes)\nelse:\n print(No)\n\t\n\n', "S = input()\nT = input()\n\nif(S==T[0:len(S)]):\n print('Yes')\nelse:\n print('No')\n\t\n\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s107113289', 's215389094', 's808858859', 's885135729', 's944997286', 's961712995']
[9008.0, 9168.0, 9172.0, 9108.0, 8944.0, 9028.0]
[22.0, 22.0, 29.0, 21.0, 22.0, 25.0]
[86, 174, 159, 194, 81, 85]
p02681
u963747475
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['string,string2=map(str,input().split())\nstring2=string2[0:len(string2)-1]\nprint("Yes" if string==string2 else "No")', "string,sub_string=map(str,input().split())\nresults = 0\nsub_len = len(sub_string)\nfor i in range(len(string)):\n if string[i:i+sub_len] == sub_string:\n if len(sub_string)-len(string) ==1:\n print('Yes')\n else:\n print('No')", 'string,string2=input(),input()\nstring2=string2[0:len(string2)-1]\nprint("Yes" if string==string2 else "No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s045970706', 's132650397', 's439495129']
[8976.0, 8948.0, 8948.0]
[20.0, 21.0, 20.0]
[115, 232, 106]
p02681
u966311314
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['S = input()\nT = in@ut()\n\nif(S==T[:-1]):\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\n \nif(S==T[:-1]):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s922848435', 's942672844']
[8984.0, 9008.0]
[20.0, 20.0]
[74, 75]
p02681
u967484343
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["S = input()\nT = input()\nans = 'yes'\nif len(S) + 1 == len(T):\n for i in range(len(S)):\n if S[i] != T[i]:\n ans = 'no'\nelse:\n ans = 'no'", "S = input()\nT = input()\nans = 'Yes'\nif len(S) + 1 == len(T):\n for i in range(len(S)):\n if S[i] != T[i]:\n ans = 'No'\nelse:\n ans = 'No'", "S = input()\nT = input()\nans = 'Yes'\nif len(S) + 1 == len(T):\n for i in range(len(S)):\n if S[i] != T[i]:\n ans = 'No'\nelse:\n ans = 'No'\n \nprint(ans)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s247581959', 's887958402', 's779117435']
[8816.0, 9040.0, 8980.0]
[24.0, 25.0, 23.0]
[157, 157, 173]
p02681
u968404618
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['n, k = map(int, input().split())\nA = list(map(int, input().split()))\n\nTown = []\n\nrec = [-1] * (n+1)\nidx = 1\n\nwhile (rec[idx] == -1):\n rec[idx] = len(Town)\n Town.append(idx)\n idx = A[idx-1]\n\nExce = rec.index(idx)\nCycl = len(Town) - Exce\n\nif Cycl > k:\n print(Town[k])\nelse:\n k -= Exce\n k %= Cycl\n print(Town[Exce+k])', 'def main():\n ## IMPORT MODULE\n #import sys\n\n \n #input=lambda :sys.stdin.readline().rstrip()\n\n #f_inf=float("inf")\n #MOD=10**9+7\n \n if \'get_ipython\' in globals(): \n ## SAMPLE INPUT\n S = "chokudai"\n T = "chokudaiz"\n\n else:\n ##INPUT \n #n = input()\n #a, b = map(int, input().split())\n S = input()\n T = input()\n\n ## SUBMITION CODES HERE\n for i in range(len(S)):\n if S[i] != T[i]:\n print("No")\n exit()\n \n print("Yes")\n \nmain()']
['Runtime Error', 'Accepted']
['s542314838', 's946794860']
[9196.0, 9000.0]
[22.0, 21.0]
[402, 513]
p02681
u981122970
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['def power_func(a,n,p):\n bi=str(format(n,"b"))\n res=1\n for i in range(len(bi)):\n res=(res*res) %p\n if bi[i]=="1":\n res=(res*a) %p\n return res\n\ndef cmb(n, r, p):\n if (r < 0) or (n < r):\n return 0\n r = min(r, n - r)\n return fact[n] * factinv[r] * factinv[n-r] % p\n\np = 998244353\nN = 10 ** 6\nfact = [1, 1] + [0] * (N-2)\nfactinv = [1, 1] + [0] * (N-2)\ninv = [0, 1] + [0] * (N-2)\n\nfor i in range(2, N + 1):\n fact[i] = (fact[i-1] * i) % p\n inv[i] = (-inv[p % i] * (p // i)) % p\n factinv[i] = (factinv[i-1] * inv[i-1]) % p\n\nn, m, k = [int(i) for i in input().split()]\n\nret = 0\nfor i in range(k+1):\n ret += ((cmb(n-1, i, p) * m % p) * (power_func(m-1, n-1-i, p))) % p\nprint(ret % p)\n', "s = input()\nt = input()\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s617669065', 's667869020']
[135340.0, 9004.0]
[1253.0, 23.0]
[729, 74]
p02681
u983853152
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['def main():\n S = input()\n T = input()\n\n if len(S)==len(T)-1 and S==(T[:-1]):\n ans = "YES"\n else:\n ans = "No"\n\n print(ans)\n\nif __name__ == \'__main__\':\n main()', 'def main():\n S = input()\n T = input()\n\n if len(S)==len(T)-1 and S==(T[:-1]):\n ans = "Yes"\n else:\n ans = "No"\n\n print(ans)\n\nif __name__ == \'__main__\':\n main()']
['Wrong Answer', 'Accepted']
['s576071996', 's040517849']
[9044.0, 9108.0]
[24.0, 25.0]
[189, 189]
p02681
u984081384
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['a = input()\nb = input()\nif a == b[-1]:\n print("Yes")\nelse:\n print("No")', 'a = input()\nb = input()\nif a[:-1] == b[:-1]:\n print("Yes")\nelif len(a) == 1:\n if a[0] == b[:-1]:\n print("Yes")\nelse:\n print("No")', 'a = input()\nb = input()\nif a == b[:-1]:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s569307064', 's965287594', 's221880102']
[9100.0, 9108.0, 9032.0]
[24.0, 24.0, 24.0]
[73, 135, 74]
p02681
u984592063
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['a = raw_input()\nb = raw_input()\na = str(a)\nb = str(b)\nlength = len(a)\nif a == b[0:length]:\n print("Yes")\nelse:\n print("No")\n', 'while(True):\n a = raw_input()\n b = raw_input()\n a = str(a)\n b = str(b)\n length = len(a)\n if a == b[0:length]:\n print("Yes")\n else:\n print("No")\n', 'n, k = map(int, input().split())\na = [0] + list(map(int, input().split()))\n\nrepeat = [0] * (n+1)\ncircle = [1]\npoint = 1\nflag = 0\nfor _ in range(k):\n circle.append(a[point])\n repeat[point] = 1\n point = a[point]\n if(repeat[point] == 1):\n flag = 1\n break\n\nif flag == 0:\n print(circle[-1])\nelse:\n index = circle.index(point)\n circle_cut = circle[index:-1]\n k = (k-index) % len(circle_cut)\n print(circle_cut[k])\n', 'a = input()\nb = input()\na = str(a)\nb = str(b)\nlength = len(a)\nif a == b[0:length]:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s282929273', 's810491486', 's814927830', 's509124401']
[9024.0, 9028.0, 9240.0, 9096.0]
[24.0, 21.0, 23.0, 22.0]
[130, 179, 448, 122]
p02681
u985033073
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['A,B,C,K=map(int, input().split())\nnum_list=[]\nfor i in range(A):\n num_list.append(1)\nfor j in range(B):\n num_list.append(0)\nfor k in range(C):\n num_list.append(-1)\nprint(sum(num_list[0:K]))\n', 'A,B,C,K=map(int, input().split())\nnum_list=()\nfor i in range(A):\n num_list.append(1)\nfor j in range(B):\n num_list.append(0)\nfor k in range(C):\n num_list.append(-1)\n\nprint(sum(num_list[0:K-1]))\n', 'A,B,C,K=map(int, input().split())\nnum_list=[]\nfor i in range(A):\n num_list.append(1)\nfor j in range(B):\n num_list.append(0)\nfor k in range(C):\n num_list.append(-1)\n\nprint(sum(num_list[0:K-1]))\n', "S=input()\nT=input()\n\nif S==T[0:-1] and len(S)<=10:\n print('Yes') \nelse:\n print('No')\n\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s027847090', 's056475481', 's417038571', 's699705437']
[9176.0, 9176.0, 9116.0, 9096.0]
[27.0, 23.0, 22.0, 22.0]
[199, 202, 202, 92]
p02681
u985419292
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['a,b,c,k = map(int,input().split())\n\nif a+b>=k:\n print(a)\nelse:\n print(a-(k-a-b))\n', "s = input()\nt = input()\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s697745962', 's774886504']
[9152.0, 9032.0]
[22.0, 22.0]
[83, 75]
p02681
u985445717
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s=input()\nt=input()\nif len(s) > 10 or len(t) == len(s) + 1:\n if t[1:len(s)] == s:\n print("Yes")\nelse:\n print("No")', 's=input()\nt=input()\nif len(s) > 10 or len(t) == len(s) + 1:\n if t[:-1] == s:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s639785943', 's109518990']
[9036.0, 9044.0]
[20.0, 21.0]
[119, 138]
p02681
u985949234
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["N,M,X = map(int, input().split())\ngrid = [[]]\nfor i in range(N):\n ls = list(map(int, input().split()))\n grid.append(ls)\n\ndef rec(r,progress,result):\n if r == N:\n progress = progress \n result.append(progress)\n progress = progress + [grid[N]]\n result.append(progress)\n return\n else:\n rec(r+1,progress,result)\n progress = progress + [grid[r]]\n rec(r+1,progress,result)\n\ndef rap():\n result = []\n progress = []\n rec(0,progress,result)\n ans = float('inf')\n for item in result:\n stals = [0]*(M+1)\n for item2 in item:\n for i, j in enumerate(item2):\n stals[i] += j\n f = True\n for m in stals[1:]:\n if m < X:\n f = False\n if f:\n ans = min(ans,stals[0])\n \n if ans == float('inf'):\n print(-1)\n else:\n print(ans)\n \n return \n \nrap()", "N,M,X = map(int, input().split())\ngrid = [[]]\nfor i in range(N):\n ls = list(map(int, input().split()))\n grid.append(ls)\n\ndef rec(r,progress,result):\n if r == N:\n progress = progress \n result.append(progress)\n progress = progress + [grid[N]]\n result.append(progress)\n return\n else:\n rec(r+1,progress,result)\n progress = progress + [grid[r]]\n rec(r+1,progress,result)\n\ndef rap():\n result = []\n progress = []\n rec(0,progress,result)\n ans = float('inf')\n for item in result:\n stals = [0]*(M+1)\n for item2 in item:\n for i, j in enumerate(item2):\n stals[i] += j\n f = True\n for m in stals[1:]:\n if m < X:\n f = False\n if f:\n ans = min(ans,stals[0])\n \n if ans == float('inf'):\n print(-1)\n else:\n print(ans)\n \n return \n \nrap()", "S = str(input())\nT = str(input())\n\nT = T[:(len(T)-1)]\nif S == T:\n print('Yes')\nelse:\n print('No')\n \n\n"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s154259239', 's434048014', 's550845733']
[9256.0, 9256.0, 9032.0]
[25.0, 22.0, 21.0]
[947, 947, 110]
p02681
u987188835
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["S = input()\nT = input()\nr = False\nr &= len(S) == len(T) + 1\nr &= S == T[:-1]\nprint('Yes' if r else 'No')", "S = input()\nT = input()\nr = True\nr &= len(S) == len(T) + 1\nr &= S == T[:-1]\nprint('Yes' if r else 'No')", "S = input()\nT = input()\nr = True\nr = r and len(S) == len(T) + 1\nr = r and S + T[-1] == T\nprint('Yes' if r else 'No')", "S = input()\nT = input()\nprint('Yes' if S + T[-1] == T and 'a' <= T[-1] <= 'z' else 'No')"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s393638868', 's537968544', 's596761704', 's889185969']
[9104.0, 9036.0, 9104.0, 9100.0]
[21.0, 21.0, 20.0, 20.0]
[104, 103, 116, 88]
p02681
u994400382
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s = input()\nt = input()\n\nif len(s) + 1 != t:\n print("No")\n exit\nelif s != t[:len(s)]:\n print("No")\n exit\nelse:\n print("Yes")', 's = input()\nt = input()\n\nif len(s) + 1 != len(t):\n print("No")\nelif s != t[:len(s)]:\n print("No")\nelse:\n print("Yes")']
['Wrong Answer', 'Accepted']
['s789748489', 's882155017']
[8916.0, 9104.0]
[26.0, 21.0]
[139, 126]
p02681
u995163736
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['A = list(map(int, input().split()))\n \nif A[0]>=A[3]:\n print(A[0])\nelse:\n if A[0]+A[1]>=A[3]:\n print(A[0])\n else:\n print(A[0]-A[3]+A[0]+A[1])', 'A = list(map(int, input().split()))\n \nif A[0]>=A[3]:\n print(A[0])\nelse:\n if A[0]+A[1]>=A[3]:\n print(A[0])\n else:\n print(A[0]-A[3]+A[0]+A[1])', 's = input()\nt = input()\n\n\nif s == t[:-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s667763628', 's750499387', 's415665477']
[9136.0, 9184.0, 9092.0]
[25.0, 23.0, 20.0]
[149, 149, 76]
p02681
u996150140
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['S = str(input())\nT = str(input())\nif T != S[-1]:\n print(S+T)\n', 'S = str(input())\nT = print(S+ S[-1])', "S = str(input())\nT = str(input())\nprint('Yes' if T[:-1] == S else 'No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s272736371', 's390857767', 's086148438']
[8992.0, 9024.0, 9064.0]
[23.0, 24.0, 20.0]
[64, 36, 71]
p02681
u996665352
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['def main():\n N,K = map(int,input().split())\n As = list(map(int,input().split()))\n route = [0]\n pre = 0\n i = 0\n r_append = route.append\n for _ in range(N):\n i = As[i]-1\n if i in route:\n pre = route.index(i)\n route = route[pre:]\n break\n r_append(i)\n len_route += 1\n # print(route)\n mod = len(route)\n print(route[(K-pre)%mod]+1)\n\nif __name__ == "__main__":\n main()', 'S = input()\nT = input()\ns_len = len(S)\nprint("Yes" if S==T[:len(S)] else "No")']
['Runtime Error', 'Accepted']
['s800501486', 's069814338']
[9208.0, 9096.0]
[22.0, 24.0]
[455, 78]
p02681
u997389162
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['n = input()\nn2 = input()\nif n == n[:-1]:\n print(\'Yes\')\nelse:\n print("No")', 'n = input()\nn2 = input()\nif n == n2[:-1]:\n print(\'Yes\')\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s048026674', 's226248606']
[9104.0, 9032.0]
[20.0, 20.0]
[75, 76]
p02681
u997393081
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s = input()\nt = input()\n\nif s[0:len(s)] == t[0:len(t)]:\n print("Yes")\neles:\n print("No")\n ', 's = input()\nt = input()\n \nif s[0:len(s)] == t[0:len(t)-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s545530204', 's911591337']
[8960.0, 9060.0]
[21.0, 20.0]
[95, 95]
p02681
u997648604
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['import math\nsys.setrecursionlimit(10**9)\n\ndef main():\n S = input()\n T = input()\n\n if S == T[:-1] and len(T) == 1 + len(S):\n print("Yes")\n exit()\n\n print("No")\n\n\n\n\nif __name__ == "__main__":\n main()\n', 'import sys\nimport math\nsys.setrecursionlimit(10**9)\n\ndef main():\n S = input()\n T = input()\n\n if S == T[:-1] and len(T) == 1 + len(S):\n print("Yes")\n exit()\n\n print("No")\n\n\n\n\nif __name__ == "__main__":\n main()']
['Runtime Error', 'Accepted']
['s846634078', 's414243434']
[9100.0, 9048.0]
[25.0, 21.0]
[225, 235]
p02682
u000037600
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,d=map(int,input().split())\nans=0\nif not a<k:\n print(k)\nelse:\n if not a+b<k:\n print(a)\n else:\n print(2*a+b-k)', 'a,b,c,d=map(int,input().split())\nans=0\nif not a<d:\n print(d)\nelse:\n if not a+b<d:\n print(a)\n else:\n print(2*a+b-d)']
['Runtime Error', 'Accepted']
['s654479050', 's962887417']
[9192.0, 9176.0]
[25.0, 28.0]
[123, 123]
p02682
u000085263
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['import math\nans = False\na, b, c, k = map(int, input().split()\nans += min(k, a)\nk -= min(k, a)\nk -= min(k, b)\nans -= min(k, c)\nprint(ans)', 'import math\nans = False\na, b, c, k = map(int, input().split())\nans += min(k, a)\nk -= min(k, a)\nk -= min(k, b)\nans -= min(k, c)\nprint(ans)']
['Runtime Error', 'Accepted']
['s244981151', 's302649239']
[8904.0, 9068.0]
[22.0, 28.0]
[136, 137]
p02682
u000623733
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = map(int, input().split())\n\nif K <= A:\n print(K)\n\nelif K <= B:\n print(A)\n\nelse:\n print(A - (K - A + B))', 'A, B, C, K = map(int, input().split())\n\nif K <= A:\n print(K)\n\nelif K <= A + B:\n print(A)\n\nelse:\n print(A - (K - A - B))\n']
['Wrong Answer', 'Accepted']
['s230700082', 's876236493']
[9160.0, 9020.0]
[26.0, 26.0]
[124, 129]
p02682
u005517181
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\ns=0\nimport sys\nif k>=a:\n k=k-a\n s=s+a*1\nelse:\n \n s=s+k*1\n print(s)\n sys.exit()\nif k>=b:\n k=k-b\n s=s+b*0\nelse:\n \n s=s+k*0\n print(s)\n sys.exit()\n\nif k>=c:\n k=k-c\n s=s+c*(-1)\nelse:\n \n s=s+k*(-1)\n sys.exit()\n \nprint(s)\n', 'a,b,c,k=map(int,input().split())\ns=0\nimport sys\nif k>=a:\n k=k-a\n s=s+a*1\nelse:\n \n s=s+k*1\n print(s)\n sys.exit()\nif k>=b:\n k=k-b\n s=s+b*0\nelse:\n \n s=s+k*0\n print(s)\n sys.exit()\n\nif k>=c:\n k=k-c\n s=s+c*(-1)\nelse:\n \n s=s+k*(-1)\n print(s)\n sys.exit()\n \nprint(s)\n']
['Wrong Answer', 'Accepted']
['s682339877', 's646946117']
[8924.0, 9200.0]
[23.0, 22.0]
[302, 315]
p02682
u007550226
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\nans=0\nif a>=k:\n ans=k\nelif a+b>=k:\n ans=a\nelse:\n ans=2*a+b-k', 'a,b,c,k=map(int,input().split())\nans=0\nif a>=k:\n ans=k\nelif a+b>=k:\n ans=a\nelse:\n ans=2*a+b-k\nprint(ans)']
['Wrong Answer', 'Accepted']
['s715316811', 's374257990']
[9092.0, 9160.0]
[26.0, 31.0]
[96, 107]
p02682
u008718882
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['L = list(map(int, input().split()))\nn = [1, 0, -1]\nmaxres = 0\n\nfor i in range(3):\n if L[3] == 0:\n break\n maxres += L[i] * n[i]\n L[3] -= L[i]\n print(L[3])\n if L[3] < 0:\n maxres -= abs(L[3]) * n[i]\n break\nprint(maxres)', 'A, B, C, K = map(int, input().split())\n\ndef f():\n if K <= A:\n return K\n elif K <= A + B:\n return A\n else:\n \n return A - (K - A - B)\n\nprint(f())\n']
['Wrong Answer', 'Accepted']
['s883990213', 's051339298']
[9196.0, 8908.0]
[23.0, 23.0]
[252, 260]
p02682
u022683706
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k = map(int,input().split(" "))\n\nif a < k or a + b < k:\n print(1 * k)\n \nelse:\n ans = 1 * a + (-1) * (k - a)\n print(ans)\n', 'a,b,c,k = map(int,input().split(" "))\n\nif a >= k or a + b >= k:\n print(1 * k)\n \nelse:\n ans = 1 * a + (-1) * (k - (a + b))\n print(ans)\n', 'a,b,c,k = map(int,input().split(" "))\n\nA = [1 for _ in range(a)]\nB = [0 for _ in range(b)]\nC = [-1 for _ in range(c)]\n\ncard = A + B + C\nMax_sum = sum(card[:k])\n\nprint(card,Max_sum)', 'a,b,c,k = map(int,input().split(" "))\n\nif a >= k:\n print(k)\n \nelif a + b >= k:\n print(a)\n \nelse:\n ans = a + (-1) * (k - (a + b))\n print(ans)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s178389725', 's201037777', 's923128027', 's924255853']
[9092.0, 9052.0, 622692.0, 9112.0]
[20.0, 21.0, 2227.0, 21.0]
[130, 138, 180, 146]
p02682
u028014940
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['\n\nimport sys\nread = sys.stdin.buffer.read \nreadline = sys.stdin.buffer.readline \nreadlines = sys.stdin.buffer.readlines \nsys.setrecursionlimit(10**7) \n\n\n\na,b,c,k=map(int,input().split())\n\nif k<=a:\n print(k)\n\nelif: k<=a+b:\n print(a)\n\nelse:\n print(a+b-c)', '\n\nimport sys\nread = sys.stdin.buffer.read \nreadline = sys.stdin.buffer.readline \nreadlines = sys.stdin.buffer.readlines \nsys.setrecursionlimit(10**7) \n\n\n\na,b,c,k=map(int,input().split())\n\nif k<=a:\n print(k)\n\nelif a<k<=a+b:\n print(a)\n\nelse:\n print(2*a+b-k)']
['Runtime Error', 'Accepted']
['s833798888', 's130667545']
[9044.0, 9188.0]
[25.0, 23.0]
[1836, 1839]
p02682
u029564691
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = map(int, input().split())\nif (K=<A):\n print(K)\nelif (K=<A+B):\n print(A)\nelse:\n print(2*A+B-K)', 'A=input() B=input() C=input() K=input()\nif (K<=A):\n print(K)\nelif (A<K<=A+B):\n print(A)\nelse:\n print(2A+B-k)', 'A=input() B=input() C=input() K=input()\nif (K<=A):\n print(K)\nelif (A<K<=A+B):\n print(A)\nelse:\n print(2A+B-K)', 'A, B, C, K = map(int, input().split())\nif (K=<A):\n print(K)\nelif (K=<A+B):\n print(A)\nelse:\n print(2*A+B-K)', 'A, B, C, K = map(int, input().split())\nif K <= A:\n print(K)\nelif K <= A+B:\n print(A)\nelse:\n print(2*A+B-K)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s405297520', 's518697214', 's575548876', 's693753031', 's813628295']
[8824.0, 9020.0, 9000.0, 9008.0, 8876.0]
[25.0, 24.0, 22.0, 21.0, 23.0]
[109, 111, 111, 109, 109]
p02682
u032955959
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\n\nif k<=a:\n print(a)\nelif a<k and k<=a+b:\n print(a)\nelse:\n print(2a+b-k)', 'a,b,c,k=map(int,input().split())\n\nif k<=a:\n print(k)\nelif a<k and k<=a+b:\n print(a)\nelse:\n print(2*a+b-k)']
['Runtime Error', 'Accepted']
['s901141599', 's167964976']
[9032.0, 9160.0]
[25.0, 25.0]
[107, 108]
p02682
u033360495
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = map(int, input().split())\n\nnmax = -1 * K \n\nif A > K:\n nmax = K\nelif B > K-A:\n nmax = A\nelse:\n nmax = K-A-C\n \nprint(nmax)', 'A, B, C, K = map(int, input().split())\n\nif A >= K:\n nmax = K\nelif B >= K-A:\n nmax = A\nelse:\n nmax = A-(K-A-B)\n \nprint(nmax)']
['Wrong Answer', 'Accepted']
['s812933248', 's998884690']
[9160.0, 9108.0]
[21.0, 24.0]
[153, 143]
p02682
u034777138
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A,B,C,K = map(int,input().split())\n\nif K > A:\n if K > A + B:\n print(A-(K-A-B))\n else:\n print(K)\nelse:\n print(A)', 'A,B,C,K = map(int,input().split())\n\nif K > A:\n if K > A + B:\n print(A-(K-A-B))\n else:\n print(A)\nelse:\n print(K)']
['Wrong Answer', 'Accepted']
['s910031252', 's511244136']
[9156.0, 9032.0]
[25.0, 23.0]
[134, 134]
p02682
u037754315
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int,input().split())\nsum = 0\n\nif k <= a+b:\n sum = k\nelif a+b < k:\n sum = a-(k-a-b)\n \nprint(sum)', 'a, b, c, k = map(int,input().split())\nsum = 0\n\nif k <= a:\n sum = k\nelif a < k <= a+b:\n sum = a\nelif a+b < k:\n sum = a-(k-a-b)\n \nprint(sum)']
['Wrong Answer', 'Accepted']
['s851031485', 's386061167']
[9140.0, 9068.0]
[28.0, 26.0]
[121, 150]
p02682
u038216098
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A,B,C,K=input().split(" ")\nif(A>=K):\n print(A)\nelse:\n if(K<=A+B):\n print(A)\n else:\n print(A-(K-A-B))', 'A,B,C,K=int(input().split(" "))\nif(A>=K):\n print(A)\nelse:\n if(K<=A+B):\n print(A)\n else:\n print(A-(K-A-B))\n', 'A,B,C,K=map(int,input().split())\nif(A>=K):\n print(K)\nelif(A<K and A+B>=K):\n print(A)\nelse:\n print(A-(K-(A+B)))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s539706784', 's850938543', 's927404887']
[9032.0, 9104.0, 9152.0]
[23.0, 21.0, 28.0]
[109, 115, 113]
p02682
u038404105
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k = map(int, input().split())\n\nprint(a,b,c,k)\n\nif a >= k:\n print(k)\nelif a+b >= k:\n print(a)\nelse:\n print(a-(k-a-b))\n', 'a,b,c,k = map(int, input().split())\n\nif a >= k:\n print(k)\nelif a+b >= k:\n print(a)\nelse:\n print(a-(k-a-b))\n']
['Wrong Answer', 'Accepted']
['s965809890', 's429065139']
[9152.0, 9068.0]
[21.0, 20.0]
[132, 116]
p02682
u039934639
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A,B,C,K = list(map(int, input().split()))\nsum = 0\n\nif A <= K:\n sum += A\n K -= A\nelse:\n sum += K\n K = 0\n \nif B < K:\n sum += 0\n K -= B\nelse:\n sum += 0\n \nif K > 0:\n sum -= K\nelse:\n sum += 0 \n \nprint(sum)', 'A,B,C,K = list(map(int, input().split()))\nsum = 0\n\nif A <= K:\n sum += A\n K -= A\nelse:\n sum += K\n K = 0\n \nif B < K:\n sum += 0\n K -= B\nelse:\n sum += 0\n K = 0\n \nif K > 0:\n sum -= K\nelse:\n sum += 0 \n \nprint(sum)']
['Wrong Answer', 'Accepted']
['s366903741', 's929483677']
[9096.0, 9204.0]
[22.0, 22.0]
[212, 220]
p02682
u041111386
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['# input\nA = input()\nB = input()\nC = input()\nK = input()\n\n# parse int\nA = int(A)\nB = int(B)\nC = int(C)\nK = int(K)\n\n\nmax_sum = 0\n\n\nmax_sum = min(A, K)\nK = K - max_sum\n\n\nif K > 0:\n K = K - min(B, K)\n\n\nif K > 0:\n max_sum = max_sum - min(K, B)\n# print result\nprint(max_sum)', 'import sys\nreadmi = lambda: map(int, sys.stdin.readline().split())\n\nA, B, C, K = readmi()\n\nmax_sum = 0\n\n\nmax_sum = min(A, K)\nK = K - max_sum\n\n\nif K > 0:\n K = K - min(B, K)\n\n\nif K > 0:\n max_sum = max_sum - min(K, C)\n# print result\nprint(max_sum)']
['Runtime Error', 'Accepted']
['s954130425', 's821887978']
[9100.0, 9192.0]
[20.0, 23.0]
[311, 287]
p02682
u047485390
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, d = [int(tmp) for tmp in input().split()]\nif k <= a :\n print(k)\nelif k <= a+b :\n print(a)\nelse :\n print(a-(k-a-b))', 'a, b, c, k = [int(tmp) for tmp in input().split()]\nif k <= a :\n print(k)\nelif k <= a+b :\n print(a)\nelse :\n print(a-(k-a-b))']
['Runtime Error', 'Accepted']
['s556699085', 's482296051']
[9020.0, 9172.0]
[23.0, 24.0]
[126, 126]
p02682
u048013400
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = map(int, input().split())\n\nsum =0\n\nif K > (A+B):\n sum += (A-(K-A-B))\nelse:\n sum += K\n \nprint(sum)', 'A, B, C, K = map(int, input().split())\n\nsum =0\n\nif K > (A+B):\n sum += (A-C)\nelse:\n sum += A\n \n', 'A, B, C, K = map(int, input().split())\n\nsum =0\n\nif K >= (A+B):\n sum += (A-(K-A-B))\nelse:\n sum += K\n \nprint(sum)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s199699940', 's635548193', 's457911020']
[9172.0, 9160.0, 9168.0]
[24.0, 24.0, 25.0]
[119, 103, 120]
p02682
u049182844
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['sum_num = []\ncard_num = [1,0,-1]\nfor i,card in enumerate(a[0:3]):\n if card > a[3]:\n sum_num.append(a[3] * card_num[i])\n a[3] -= a[3]\n else:\n sum_num.append(card * card_num[i])\n a[3] -= card\nprint(sum(sum_num))', 'a = list(map(int,input().split()))\n\n\n\n\n\n\n\nsum_num = []\ncard_num = [1,0,-1]\nfor i,card in enumerate(a[0:3]):\n if card > a[3]:\n sum_num.append(a[3] * card_num[i])\n a[3] -= a[3]\n else:\n sum_num.append(card * card_num[i])\n a[3] -= card\nprint(sum(sum_num))\n']
['Runtime Error', 'Accepted']
['s216843596', 's849908970']
[8956.0, 9188.0]
[25.0, 20.0]
[223, 611]
p02682
u050435651
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
["a, b, c, k = list(map(int, input().split(' ')))\nif k <= a + b:\n\tprint(k)\nelse:\n\tprint(a - (k - (a + b)))", "a, b, c, k = list(map(int, input().split(' ')))\nif k <= a + b:\n\tprint(min(a, k))\nelse:\n\tprint(a - (k - (a + b)))"]
['Wrong Answer', 'Accepted']
['s532696467', 's388747935']
[9096.0, 9068.0]
[29.0, 30.0]
[104, 112]
p02682
u054514819
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = map(int, input().split())\n\nif A>=K:\n print(K)\nelif A+B>=K:\n print(K)\nelse:\n print(A-(K-A-B))', 'A, B, C, K = map(int, input().split())\n\nif A>=K:\n print(K)\nelif A+B>=K:\n print(A)\nelse:\n print(A-(K-A-B))']
['Wrong Answer', 'Accepted']
['s164995735', 's599854691']
[9168.0, 9164.0]
[25.0, 21.0]
[114, 114]
p02682
u055875839
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int, input().split())\nans = 0\n\nif k - a >= 0:\n k -= a\n if k - b >= 0:\n k -= b:\n if k - c >= 0:\n ans = a - c\n else:\n ans = a - k\n else:\n ans = a\nelse:\n ans = k\n \nprint(ans)', 'a, b, c, k = map(int, input().split())\nans = 0\n \nif k - a >= 0:\n k -= a\n if k - b >= 0:\n k -= b\n if k - c >= 0:\n ans = a - c\n else:\n ans = a - k\n else:\n ans = a\nelse:\n ans = k\n \nprint(ans)']
['Runtime Error', 'Accepted']
['s452963145', 's736969037']
[8904.0, 9176.0]
[26.0, 24.0]
[215, 215]
p02682
u057942294
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = int(input()), int(input()), int(input()), int(input())\n\nif A >= K:\n print(K)\nelif A + B >= K:\n print(A)\nelse:\n print(A - (K - A - B))', 'A, B, C, K = map(int , input().split())\n\nif A >= K:\n print(K)\nelif A + B >= K:\n print(A)\nelse:\n print(A - (K - A - B))']
['Runtime Error', 'Accepted']
['s405844316', 's177820403']
[9176.0, 9032.0]
[23.0, 22.0]
[149, 121]
p02682
u071563580
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a = list(map(int, input().split()))\nn = a[0]\nm = a[1]\nl = a[2]\nk = a[3]\n\nif n > k:\n print(n)\nelif n + m > k:\n print(n)\nelse:\n print(n - l)', 'if n > k:\n print(n)\nelif n + m > k:\n print(n)\nelse:\n print(n - l)', 'a = list(map(int, input().split()))\nn = a[0]\nm = a[1]\nl = a[2]\nk = a[3]\n\nif 0 < k <= n:\n print(k)\n\nelif n < k <= n + m:\n print(n)\n\nelif n+m <= k < n+m+l:\n print(n -1*(k -n -m))\n\nelif n+m+l <= k:\n print(n - l)\nelse:\n print(0)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s014134019', 's420858971', 's338897522']
[9128.0, 9092.0, 9192.0]
[24.0, 22.0, 22.0]
[147, 74, 240]
p02682
u077003677
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
["import sys\nimport os\n\ndef file_input():\n f = open('/input.txt', 'r')\n sys.stdin = f\n\ndef main():\n # file_input()\n # int(input())\n A,B,C,K=int(map(int, input().split()))\n\n sum=0\n for i in K:\n if A!=0:\n A-=1\n sum+=1\n elif B!=0:\n B-=1\n elif C!=0:\n C-=1\n sum-=1\n print(sum)\n\nif __name__ == '__main__':\n main()\n", "import sys\nimport os\n\ndef file_input():\n f = open('ABC167/input.txt', 'r')\n sys.stdin = f\n\ndef main():\n #file_input()\n # int(input())\n A,B,C,K=map(int, input().split())\n\n sum=0\n if K>A:\n sum+=A\n K-=A\n if K>B:\n K-=B\n sum-=K \n else:\n sum+=K\n\n print(sum)\n\nif __name__ == '__main__':\n main()\n"]
['Runtime Error', 'Accepted']
['s107535080', 's341982981']
[9152.0, 9184.0]
[21.0, 22.0]
[409, 375]
p02682
u078527650
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=(int(x) for x in input().split())\na1 = a\ntensuu = 0\ncount = 0\nfor i in range(k):\n if a > 0:\n a = a-1\n tensuu +=1\n else:exit()\n\nif k-a1 >0:\n count = k-(a1+b)\n\nelse:exit()\n\nif k-a1-b > 0 :\n tensuu -=count\n\nprint(tensuu)', 'a,b,c,k=(int(x) for x in input().split())\n\na1 = a\nnokori = 0\nnokori_1 = 0\nnokori_2 = 0\ntensuu = 0\n\nif k-a1 > 0:\n tensuu +=a1\n nokori = k-a\n\nif nokori > 0:\n tensuu +=0\n nokori2 =nokori - b\n if nokori2 > 0:\n tensuu -= nokori2\nif k - a1 <= 0:\n tensuu = k\nprint(tensuu)']
['Wrong Answer', 'Accepted']
['s672639350', 's164925794']
[9180.0, 9164.0]
[2206.0, 24.0]
[251, 285]
p02682
u079827881
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int, input().split())\n\nif k = 1:\n print(k)\nelif k <= a + b:\n print(k)\nelse:\n r = k - a - b\n print(a-r)\n', 'a, b, c, k = map(int, input().split())\n\nif k == 1:\n print(k)\nelif k <= a + b:\n print(k)\nelse:\n r = k - a - b\n print(a-r)\n', 'a, b, c, k = map(int, input().split())\n\nval_a = [1] * a\nval_b = [0] * b\nval_c = [-1] * c\n\nval_a.extend(val_b)\nval_a.extend(val_c)\nprint(val_a)\n\nprint(sum(val_a[:k]))\n', 'a, b, c, k = map(int, input().split())\n\nif k <= a + b:\n print(k)\nelif k <= a + b + c:\n r = k - a - b\n print(a-r)\n', 'a, b, c, k = map(int, input().split())\n\n\nif k <= a:\n print(k)\nelif k <= a + b:\n print(a)\nelse:\n r = k - a - b\n print(a-r)\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s083068529', 's714035764', 's737713127', 's991924219', 's560430584']
[8940.0, 9088.0, 3288624.0, 9016.0, 9016.0]
[23.0, 23.0, 2292.0, 23.0, 24.0]
[132, 133, 166, 122, 134]
p02682
u084411645
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = [int(i) i in input().split(" ")]\nprint(min(a, k) - max(0, k-a-b))\n', 'a, b, c, k = [int(i) in input().split(" ")]\nprint(min(a, k) - max(0, k-a-b))', 'a, b, c, k = [int(i) for i in input().split(" ")]\nprint(min(a, k) - max(0, k-a-b))\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s588028456', 's656657963', 's888982626']
[8880.0, 9088.0, 9020.0]
[23.0, 23.0, 24.0]
[79, 76, 83]
p02682
u084865106
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int, input().split())\n\nans = 0\n\nif k <= a:\n ans = k\n\nif k >= a + b:\n ans = ans - (k - (a+b))\n\nprint(ans)\n', 'a, b, c, k = map(int, input().split())\n\nans = 1\n\nif k <= a:\n ans = k\n\nif k > a + b:\n ans = ans - (k - (a+b))\n\nprint(ans)\n', 'a, b, c, k = map(int, input().split())\n\nans = a\nif k < a:\n ans = k\n \nif k > a + b:\n ans = ans - (k - (a+b))\n\nprint(ans)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s451301209', 's522542660', 's499477486']
[9156.0, 9148.0, 9160.0]
[22.0, 22.0, 20.0]
[128, 127, 129]
p02682
u087118202
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\nai=0\nbi=0\nci=0\nif a >= k:\n ai=k\nelse:\n ai=a\n if b>= k-ai:\n bi=k-ai\n else:\n bi=b\n ci= k - ai - bi\nprint(ai-ci)\n \n', 'a,b,c,k=map(int,input().split())\nai=0\nbi=0\nci=0\nif a >= k:\n ai=k\nelse:\n ai=a\n if b>= k-ai:\n bi=k-ai\n else:\n bi=b\n ci= k - ai - bi\nprint(ai-ci)\n \n']
['Runtime Error', 'Accepted']
['s945031856', 's099468865']
[8840.0, 9116.0]
[27.0, 23.0]
[171, 165]
p02682
u093783313
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A,B,C,D = map(int,input().split())\n# a = [1] * A + [0] * B + [-1] * C\nif (A+B+C) == D:\n \n a = 1 * A + 0 * B + (-1 * C)\n \nelif (B >= (D-A)) and (C >= (D-A+B)):\n a = 1 * A + 0 * B + (-1 * (D-A+B))\n \nelif A >= D:\n a = 1 * D\n \nprint(a)', 'A,B,C,D = map(int,input().split())\n\nif D > A:\n \n ancer = 1 * A + 0 * (D - A) + (-1 *(D - A - B))\n \nelse:\n ancer = 1 * D\n\nprint(ancer)']
['Runtime Error', 'Accepted']
['s885023483', 's774954759']
[9192.0, 9172.0]
[23.0, 22.0]
[252, 142]
p02682
u095844416
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\nB=0\nif a+b>=k:\n\tprint(a+b)\nelse:\n\tprint((a+B)-1*(k-a-b))', 'a,b,c,k=map(int,input().split())\nB=0\nif a+b>=k:\n\tprint(a+(k-a)*b)\nelse:\n\tprint((a+B)-1*(k-a-b))\n', 'a,b,c,k=map(int,input().split())\nif a>=k:\n\tprint(k)\nelse:\n\tprint(a-(k-a-b))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s812155493', 's850140485', 's623152414']
[8932.0, 9100.0, 9004.0]
[20.0, 21.0, 23.0]
[89, 96, 75]
p02682
u102218630
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A,B,C,K=list(map(int,input().split()))\n\nwhile True:\n nokori=K\n maisu1=0\n maisu2=0\n maisu3=0\n if A<=nokori:\n maisu1=A\n nokori=nokori-maisu1\n else:\n maisu1=nokori\n break\n\n if B<=nokori:\n maisu2=B\n nokori=nokori-maisu2\n else:\n maisu2=nokori\n break\n \n maisu3=nokori\n\nprint(maisu1-maisu3)', 'A,B,C,K=list(map(int,input().split()))\nnokori=K\nmaisu1=0\nmaisu2=0\nmaisu3=0\nwhile True:\n if A<=nokori:\n maisu1=A\n nokori=nokori-maisu1\n else:\n maisu1=nokori\n break\n\n if B<=nokori:\n maisu2=B\n nokori=nokori-maisu2\n else:\n maisu2=nokori\n break\n \n maisu3=nokori\n break\n\nprint(maisu1-maisu3)']
['Time Limit Exceeded', 'Accepted']
['s554746017', 's259937840']
[9200.0, 9212.0]
[2205.0, 22.0]
[369, 362]
p02682
u107269063
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A,B,C,K = map(int, input().split())\nnum = 0\nans = 0\n \nif(A>=K):\n print(K)\nelif(A<K\u3000and K<=(A+B)):\n print(A)\nelse:\n ans = A-(K-(A+B))\n print(ans)', 'A,B,C,K = map(int, input().split())\nnum = 0\nans = 0\n \nif(A>=K):\n print(K)\nelif (A<K) and (K<=(A+B)):\n print(A)\nelse:\n ans = A-(K-(A+B))\n print(ans)']
['Runtime Error', 'Accepted']
['s984331240', 's614411078']
[9024.0, 9184.0]
[22.0, 20.0]
[150, 151]
p02682
u108918063
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,c,b,k=man(int,split())\nprint(min(k,a,2a+b-k))', 'a,b,c,k = map(int,input().split())\nprint(min(k,a,a*2+b-k))']
['Runtime Error', 'Accepted']
['s396810732', 's013475174']
[8924.0, 9068.0]
[22.0, 26.0]
[47, 58]
p02682
u109617108
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A,B,C,K=map(int,input().split())\nm=0\nif A-K>=0:\n print(A):\nelse:\n K=K-A\n if B>=K:\n print(A)\n else:\n K=K-B\n print(A-K)\n \n', 'A,B,C,K=map(int,input().split())\nm=0\nif A-K>=0:\n print(K)\nelse:\n K=K-A\n if B>=K:\n print(A)\n else:\n K=K-B\n print(A-K)\n ']
['Runtime Error', 'Accepted']
['s589082464', 's542178146']
[9024.0, 9164.0]
[21.0, 19.0]
[134, 132]
p02682
u111082563
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int, input().split())\n\nans = 0\nfor i in range(k):\n if a:\n ans += 1\n a -= 1\n\n if not a and b:\n b -= 1\n\n if not a and not b and c:\n ans -= 1\n c -= 1\n\nprint(ans)\n', 'a, b, c, k = map(int, input().split())\n\nans = 0\nif a < k:\n ans = a\nelse:\n ans = k\n\nminus = k - (a + b)\n\nif minus > 0:\n ans -= minus\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s451485020', 's920034739']
[9196.0, 9164.0]
[2205.0, 23.0]
[220, 153]
p02682
u112401982
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int, input().split())\nif a >= k :\n print(2*k)\n elif b >= (k-a):\n print(2*a + k-a)\n else:\n print(2*a+k-a-(k-a-b))\n ', 'a, b, c, k = map(int, input().split())\nif a >= k :\n print(2*k)\nelif b >= (k-a):\n print(2*a + k-a)\nelse:\n print(2*a+k-a-(k-a-b))\n ', 'a, b, c, k = map(int, input().split())\nif a >= k :\n print(k)\nelif b >= (k-a):\n print(a)\nelse:\n print(a-k+a+b)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s259988279', 's269474048', 's571957496']
[9016.0, 9196.0, 9112.0]
[26.0, 22.0, 23.0]
[173, 149, 118]
p02682
u117848972
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int, input().split())\n\nsum = 0\n\nif (a+b) >= k:\n sum = (k -a) * 1\n print(sum)\nelse:\n sum = a * 1\n sum += -1 * (k-a-b)\n print(sum)', 'a, b, c, k = map(int, input().split())\n\nsum = 0\n\nif (a+b) >= k:\n sum += min(a,k)\n print(sum)\nelse:\n sum = a * 1\n sum += -1 * (k-a-b)\n print(sum)\n']
['Wrong Answer', 'Accepted']
['s673817876', 's325438652']
[9104.0, 9076.0]
[24.0, 22.0]
[160, 160]
p02682
u119982001
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int, input().split())\n\nans = 0\n\nk = k-a\nif k >= a:\n ans += a\nelse:\n ans += k\n\nk = k-b\n\nif k >= c:\n ans -= k\nelse:\n ans -= c\n\nprint(ans)\n', 'a, b, c, k = map(int, input().split())\n\nif k <= a: print( k )\nelif k <= a+b: print( a )\nelse: print( a - (k-a-b) )\n']
['Wrong Answer', 'Accepted']
['s851094678', 's269072041']
[8912.0, 9140.0]
[21.0, 22.0]
[165, 115]
p02682
u122184618
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k = map(int, input().split())\nans = 0\n\nif a >= k:\n ans += k\n print(ans)\n k -=a\nelse:\n ans += a\n k -= a\n\nif k >0:\n if b >= k:\n print(ans)\n else:\n k -=b\n\nif k > 0:\n if c >= k:\n ans -=k\n print(ans)\n else:\n k -=c\n print(ans)\n\n\n', 'a,b,c,k = map(int, input().split())\n\nka = min(a,k)\nk -= ka\nkb = min(b,k)\nk -= kb\nkc = min(c,k)\nk -= kc\n\nans = ka - kc\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s631997791', 's950628584']
[9004.0, 9128.0]
[21.0, 22.0]
[298, 129]
p02682
u123745130
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\nans=0\nif(a>=k):\n ans+=k\n #print(k)\nelif(a<k):\n ans+=a\n if(k-a<=b):\n #print(ans)\n elif (k-a>b):\n ans+=b\n ans-=k-a-b\n #print(ans)\nprint(ans)', 'a,b,c,k=map(int,input().split())\nans=0\nif(a>=k):\n ans+=k\n #print(k)\nelif(a<k):\n ans+=a\n if(k-a<=b):\n ans+=(k-a)*0\n elif(k-a>b):\n ans+=b*0\n ans-=k-a-b\n #print(ans)\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s424826981', 's520636635']
[8888.0, 9180.0]
[25.0, 30.0]
[188, 211]
p02682
u125269142
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k = map(int, input().split())\n\nif k =< a:\n print(1 * k)\nelif a < k and k <= (a+b):\n print(a)\nelse:\n print(a - ((k -(a+b)) * -1))', 'a, b, c, k = map(int, input().split())\n\nif k <= a:\n print(1 * k)\nelif a < k and k <= (a + b):\n print(a)\nelse:\n print(a - ((k - (a + b)) * 1))']
['Runtime Error', 'Accepted']
['s818987521', 's801057504']
[9004.0, 9076.0]
[27.0, 31.0]
[140, 150]
p02682
u125348436
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\n\ndef calc(a,b,c,k):\n if k<=a+b:\n return k\n else:\n return a-(k-a-b)\nprint(calc(a,b,c,k))', 'a,b,c,k=map(int,input().split())\n \ndef calc(a,b,c,k):\n if k<a:\n return k\n elif k<=a+b:\n return a\n else:\n return a-(k-a-b)\nprint(calc(a,b,c,k))']
['Wrong Answer', 'Accepted']
['s829487291', 's654828883']
[9176.0, 9172.0]
[30.0, 27.0]
[140, 170]
p02682
u127285813
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = map(int, input().split())\n\nprint(A+B-max(0, K-A-B))', 'A, B, C, K = map(int, input().split())\n\nprint(min(A, K)-max(0, K-A-B))']
['Wrong Answer', 'Accepted']
['s784405921', 's797812807']
[9100.0, 9112.0]
[20.0, 22.0]
[64, 70]
p02682
u129749062
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A,B,C,K = map(int,input().split())\n \nif A >= K:\n print(K)\nelif A < K and A + B >= K:\n print(K)\nelse:\n print(K-(A+B))', 'A,B,C,K = map(int,input().split())\nif A >= K:\n print(K)\nelif A + B >= K:\n print(A)\nelse:\n print(A - (K-(A+B)))']
['Wrong Answer', 'Accepted']
['s631291646', 's834671357']
[9096.0, 9080.0]
[23.0, 28.0]
[119, 113]
p02682
u130492706
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\na,b,c,k = map(int, input().split())\n\nif a + b >= k:\n if a >= k:\n print(a)\n else:\n print(k)\nelse:\n print(a - (k - (a + b)))', '#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\na,b,c,k = map(int, input().split())\n\nif a + b >= k:\n if a <= k:\n print(a)\n else:\n print(k)\nelse:\n print(a - (k - (a + b)))']
['Wrong Answer', 'Accepted']
['s434973036', 's569341868']
[9176.0, 9164.0]
[23.0, 22.0]
[193, 193]
p02682
u130900604
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\nif k>a:\n ans=k\nelif k>a+b:\n ans=a\nelse:\n d=k-a-b\n ans=a-d\nprint(ans)', 'a,b,c,k=map(int,input().split())\nif k<a:\n ans=k\nelif k<a+b:\n ans=a\nelse:\n d=k-a-b\n ans=a-d\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s362577587', 's454640685']
[9196.0, 9164.0]
[21.0, 21.0]
[105, 106]
p02682
u137226361
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a, b, c, k= map(int, input().split())\n\nif k <= a+b:\n print(k)\n\nelse:\n print(a -(k-a-b))\n\n ', 'if k <= a:\n print(k)\nelif k <= a +b:\n print(a)\n\nelse:\n print(a -(k-a-b))', 'a, b, c, k= map(int, input().split())\n\nif k <= a:\n print(k)\nelif k <= a +b:\n print(a)\n\nelse:\n print(a -(k-a-b))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s215122383', 's482532896', 's414560928']
[9088.0, 8908.0, 9100.0]
[20.0, 23.0, 20.0]
[99, 81, 120]
p02682
u141596821
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = map(int, input().split())\n\nprint (A, B, C, K)\n\nsum = 0\n\nif K - A >= 0:\n K -= A\n sum += A\nelse:\n print(sum)\n exit\n\nif K - B >= 0:\n K -= B\n sum += 0\nelse:\n sum += 0\n print(sum)\n exit\n\nif K - C >= 0:\n K -= C\n sum += -C\nelse:\n sum += -1 * K\n\nprint (sum)', 'A, B, C, K = map(int, input().split())\n\nprint (A, B, C, K)\n\nsum = 0\nfor _ in range(K):\n\n if A - 1 >= 0:\n A -= 1\n sum += 1\n continue\n\n if B - 1 >= 0:\n B -= 1\n sum += 0\n continue\n\n if C - 1 >= 0:\n C -= 1\n sum += -1\n\nprint (sum)', 'A, B, C, K = map(int, input().split())\n\ncount = 0\n\nif A >= K:\n print (A)\nelse:\n K -= A\n count += A\nif B >= K:\n print (A)\nelse:\n K -= B\n count += 0\n\nif K > 0:\n print (A-(K))', 'A, B, C, K = map(int, input().split())\n\ncount = 0\n\ncount = min(A, K)\nmax = count\nK -= count\n\ncount = min(B, K)\nK -= count\n\nmax += K * (-1)\nprint (max)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s529487256', 's697894376', 's930877641', 's423936333']
[9204.0, 9196.0, 9172.0, 9124.0]
[22.0, 2206.0, 21.0, 23.0]
[274, 252, 179, 168]
p02682
u143189168
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['a,b,c,k=map(int,input().split())\nresult = 0\n\nif a+b >= k:\n result = a\nelse:\n result = a-c', 'a,b,c,k=map(int,input().split())\nresult = 0\n\nif a < k:\n result = k\nelif a+b >= k:\n result = a\nelse:\n result = a-c\nprint(result)', 'a,b,c,k=map(int,input().split())\nresult = 0\n\nif a > k:\n result = k\nelif a+b >= k:\n result = a\nelse:\n result = a-(k-a-b)\nprint(result)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s761279688', 's920524182', 's386752419']
[9052.0, 9004.0, 9148.0]
[24.0, 21.0, 21.0]
[91, 130, 136]
p02682
u145410317
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['if oneCard >= getCardNum: print(oneCard)\nelif oneCard + zeroCard >= getCardNum: print(oneCard)\nelse: print(oneCard - (getCardNum - oneCard - zeroCard))', 'oneCard, zeroCard, miniusOneCard, getCardNum = map(int, input().split())\n\nif oneCard >= getCardNum: print(getCardNum)\nelif oneCard + zeroCard >= getCardNum: print(oneCard)\nelse: print(oneCard - (getCardNum - oneCard - zeroCard))']
['Runtime Error', 'Accepted']
['s834207156', 's499265012']
[9012.0, 9168.0]
[24.0, 21.0]
[151, 228]
p02682
u146575240
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['\nA,B,C,K = map(int, input().split())\n\nif K >= A:\n a = A\nelse:\n print(K)\n exit()\nif A == 0 and C == 0:\n print(0)\n exit()\n\nif A == 0 and B == 0:\n print(-1*K)\n exit()\n\nif K - (A+B) >= C:\n c = -1*C\nelse:\n if K - (A+B) <= 0:\n c = -1*C\n else:\n c = -1*(K - (A+B))\n\nprint(a+c)\n', '\nA,B,C,K = map(int, input().split())\n\nif K >= A:\n a = A\nelse:\n print(K)\n exit()\nif A == 0 and C == 0:\n print(0)\n exit()\n\nif A == 0 and B == 0:\n print(-1*K)\n exit()\n\nif K - (A+B) >= 0:\n c = -1 * (K - (A + B))\nelse:\n c = 0\n\nprint(a+c)']
['Wrong Answer', 'Accepted']
['s373787763', 's026897277']
[9228.0, 9204.0]
[21.0, 23.0]
[342, 287]
p02682
u152376097
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['#-*- utf-8 -*-\n\nA, B, C, K = map(int, input().split())\n\nsum_mux = 0\n\nleast_A, least_B, least_C = A, B, C\nleast_K = K\n\nwhile 0 != least_K:\n print(least_K)\n if 0 != least_A:\n if least_K >= least_A:\n sum_mux += least_A\n least_K -= least_A\n least_A = 0\n else :\n sum_mux += least_K\n least_A -= least_K\n least_K = 0\n elif 0 != least_B:\n if least_K >= least_B:\n sum_mux += 0\n least_K -= least_B\n least_B = 0\n else :\n sum_mux += 0\n least_B -=least_K\n least_K = 0\n else:\n if least_K >= least_C:\n sum_mux -= least_C\n least_K -= least_C\n least_C = 0\n else :\n sum_mux -= least_K\n least_C -=least_K\n least_K = 0\n\nprint(sum_mux)', '#-*- utf-8 -*-\n\nA, B, C, K = map(int, input().split())\n\nsum_mux = 0\n\nleast_A, least_B, least_C = A, B, C\nleast_K = K\n\nwhile 0 != least_K:\n print(least_K)\n if 0 != least_A:\n if least_K >= least_A:\n sum_mux += least_A\n least_K -= least_A\n least_A = 0\n else :\n sum_mux += least_K\n least_A -= least_K\n least_K = 0\n elif 0 != least_B:\n if least_K >= least_B:\n sum_mux += 0\n least_K -= least_B\n least_B = 0\n else :\n sum_mux += 0\n least_B -=least_K\n least_K = 0\n else:\n if least_K >= least_C:\n sum_mux -= least_C\n least_K -= least_C\n least_C = 0\n else :\n sum_mux -= least_K\n least_C -=least_K\n least_K = 0\n\nprint(sum_mux)', '#-*- utf-8 -*-\n\nA, B, C, K = map(int, input().split())\n\nsum_mux = 0\n\nleast_A, least_B, least_C = A, B, C\nleast_K = K\n\nwhile 0 != least_K:\n if 0 != least_A:\n if least_K >= least_A:\n sum_mux += least_A\n least_K -= least_A\n least_A = 0\n else :\n sum_mux += least_K\n least_A -= least_K\n least_K = 0\n elif 0 != least_B:\n if least_K >= least_B:\n sum_mux += 0\n least_K -= least_B\n least_B = 0\n else :\n sum_mux += 0\n least_B -=least_K\n least_K = 0\n else:\n if least_K >= least_C:\n sum_mux -= least_C\n least_K -= least_C\n least_C = 0\n else :\n sum_mux -= least_K\n least_C -=least_K\n least_K = 0\n\nprint(sum_mux, flush=True)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s062626220', 's706595024', 's061872488']
[9228.0, 9224.0, 9216.0]
[23.0, 23.0, 20.0]
[867, 867, 860]
p02682
u152638361
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['A, B, C, K = map(int,input().split())\n\nmin(A, K) + min(0, (A + B) - K )', 'A, B, C, K = map(int,input().split())\nprint(min(A, K) + min(0, (A + B) - K ))']
['Wrong Answer', 'Accepted']
['s487144049', 's186080119']
[9156.0, 9188.0]
[22.0, 22.0]
[71, 77]
p02682
u155051961
2,000
1,048,576
We have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s. We will pick up K among these cards. What is the maximum possible sum of the numbers written on the cards chosen?
['def max_num():\n a, b, c, k = input().split()\n if k <= a:\n print(k)\n if a < k <= a + b:\n print(a)\n if a+b<k<=a+b+c:\n print(a-(k-a-b))\n \nmax_num()\n', 'def max_num():\n a, b, c, k = map(int, input().split())\n if k <= a:\n print(k)\n if a < k <= a + b:\n print(a)\n if a+b<k<=a+b+c:\n print(a-(k-a-b))\n\nmax_num()\n']
['Wrong Answer', 'Accepted']
['s772590902', 's637401607']
[9108.0, 9168.0]
[23.0, 20.0]
[185, 187]