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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02755 | u936050991 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ["import math\na, b = list(map(int, input().split()))\n\nc = max((a/0.08),(b/0.1))\nif math.floor(c*0.1) - math.floor(c*0.08) < abs(a-b):\n print('-1')\nelse:\n print(c)", "import math\na, b = list(map(int, input().split()))\n\n\na1 = a/0.08\na2 = (a+1)/0.08\nb1 = b/0.1\nb2 = (b+1)/0.1\nc = 0\n\nfor i in range(10... | ['Wrong Answer', 'Accepted'] | ['s637060548', 's545659892'] | [3060.0, 3064.0] | [18.0, 18.0] | [166, 248] |
p02755 | u936285815 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split())\n\nc =0 \nfor n in range(0,10000):\n taxa = n*0.08\n taxb = n*0.1\n if a == taxa and b == taxb:\n print(n)\n break\n else:\n c += 1\nif c > 999:\n print(-1)\n \n ', 'a, b = map(int, input().split())\n\nc =0 \nfor n in range(0,10000):\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s143682255', 's150081106', 's502904822'] | [3060.0, 2940.0, 3060.0] | [24.0, 22.0, 24.0] | [227, 219, 229] |
p02755 | u939585142 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['A, B = map(int,input().split())\n\nfor i in range(10000):\n if i * 0.08 == A and i * 0.1 == B:\n print(i)\n exit()\n \nprint(-1)', 'A, B = map(int,input().split())\n\nfor i in range(10000):\n if i * 0.08 == A and i ** 0.1 == B:\n print(i)\n exit()\n \nprint(-1)', 'A, B = map(int,input().split())\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s466241928', 's582518302', 's513116883'] | [2940.0, 2940.0, 2940.0] | [20.0, 20.0, 21.0] | [131, 132, 141] |
p02755 | u944886577 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a,b =map(int,input().split())\n \nfor x in range(101):\n if (x*0.08*100)//1==a*100 and (x*1.10*100)//1==b*100 and x//1==int(x):\n print(int(x))\n exit()\n \nprint(-1)', 'a,b =map(int,input().split())\n \nfor x in range(1010):\n if (x*0.08*100)//1==a*100 and (x*0.10*100)//1==b*100 and x//1==int(x):\n print(int(x))... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s033005511', 's216840626', 's261295694', 's340792416', 's489892782', 's821059017', 's922963588', 's148855667'] | [9224.0, 9220.0, 9164.0, 9196.0, 9180.0, 9152.0, 8956.0, 9224.0] | [31.0, 29.0, 29.0, 30.0, 33.0, 30.0, 28.0, 29.0] | [162, 163, 114, 146, 163, 162, 149, 147] |
p02755 | u946996108 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['ret = -1\n\nA, B = [int(i) for i in input().split()]\n\nif A<0 or B<0:\n print("-1")\n exit()\n\nminA = int(A/0.08)\nmaxA = int((A+1)/0.08)\nminB = int(B/0.1)\nmaxB = int((B+1)/0.1)\n\nprint(minA, maxA, minB, maxB)\n\nfor i in range(minA, maxA):\n if i >= minB and i < maxB:\n ret = i\n break\n\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s186240776', 's273054760', 's667122137'] | [3064.0, 3064.0, 3060.0] | [17.0, 18.0, 18.0] | [309, 267, 174] |
p02755 | u949115942 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split())\n\na_tax = int(a / 0.08)\nb_tax = int(b / 0.1)\nn = min([a_tax, b_tax])\n\nif b_tax / a_tax > 1.3 or b_tax / a_tax < 1.2:\n n = -1\nelse:\n while True:\n if a == int(n * 0.08) and b == int(n * 0.1):\n break\n\n n += 1\n\nprint(n)', 'a, b = map(int, inpu... | ['Wrong Answer', 'Accepted'] | ['s586701375', 's622068110'] | [3060.0, 3060.0] | [19.0, 18.0] | [279, 154] |
p02755 | u952467214 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split())\n\npa = int(a * 100/8)\npb = int(b * 100/10)\n\nans1 = None\nans2 = None\n\nprint(pa,pb)\n\nfor price in range(pb-1, pa+2):\n if int(price * 0.08) == a and int(price * 0.1) == b:\n ans1 = price\n break\n\nfor price in range(pa-1, pb+2):\n if int(price * 0.08) == a ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s156871249', 's468007618', 's199886133'] | [3064.0, 2940.0, 3064.0] | [17.0, 17.0, 18.0] | [515, 203, 501] |
p02755 | u952708174 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['def c_tax_increase():\n A, B = [int(i) for i in input().split()]\n lower = max((25 * A + 2 - 1) / 2, 10 * B)\n upper = min(25 * (A + 1) // 2, 10 * (B + 1))\n return lower if lower < upper else -1\n\nprint(c_tax_increase())', 'def c_tax_increase():\n A, B = [int(i) for i in input().split()]\n lower =... | ['Wrong Answer', 'Accepted'] | ['s357027269', 's752068224'] | [3060.0, 3060.0] | [17.0, 17.0] | [228, 229] |
p02755 | u953379577 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['def tax8(n):\n return int(n*(25/2))\n \ndef tax10(n):\n return int(n*(10/1))\n\na , b = map(int,input().split())\n\nans = -1\n\nx = []\nfor i in range(1,a+1):\n if tax8(i) == a:\n x.append(i)\n \ny = []\nfor i in range(1,b+1):\n if tax10(i) == b:\n y.append(i)\n \nfor i in x... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s388233523', 's489150074', 's515910779', 's766525727'] | [3064.0, 2940.0, 3064.0, 3064.0] | [17.0, 18.0, 19.0, 18.0] | [360, 483, 359, 400] |
p02755 | u953499988 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['A,B=map(int,input().split())\nimport math\na=math.ceil(A*100/8)\nb=math.ceil((A+1)*100/8)\nwhile math.floor(a*0.1)!=B and a<b:\n a+=1\n if a==b:\n print(-1)\n else:\n print(a)', 'A,B=map(int,input().split())\nimport math\na=math.ceil(A*100/8)\nb=math.ceil((A+1)*100/8)\nwhile math.floor(a*0.1)!=B and a<b:\n ... | ['Wrong Answer', 'Accepted'] | ['s672191389', 's722793815'] | [3060.0, 3060.0] | [18.0, 18.0] | [175, 167] |
p02755 | u955488057 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['import sys\n\ndef input():\n return sys.stdin.readline()[:-1]\n\n\nA, B = map(int, input().split())\n\nA_ = []\nB_ = []\nfor i in range(1, 1001):\n\tif i*8 //100 == A:\n\t\tA_.append(i)\n\n\tif i//10 == B:\n\t\tB_.append(i)\n\nA_ = set(A_)\nB_ = set(B_)\nsel = A_ & B_\nprint(A_, B_)\nif sel == set():\n\tprint(-1)\... | ['Wrong Answer', 'Accepted'] | ['s128452652', 's629561098'] | [3064.0, 3060.0] | [18.0, 18.0] | [312, 266] |
p02755 | u955547613 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['def main():\n a, b = map(int, input().split())\n x = 13\n while x <= int(a/0.08):\n x+=1\n if int(x*0.08) == a:\n if int(x*0.1) == b:\n return x\n return -1\n\n\n\nif __name__ == "__main__":\n print(main()', 'import math\ndef main():\n a, b = map(int, input().... | ['Runtime Error', 'Accepted'] | ['s008086638', 's092731354'] | [3064.0, 3064.0] | [18.0, 19.0] | [247, 326] |
p02755 | u956223466 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split(" "))\nfor i in range(1, 1009):\n if int(i * 0.08) == a and int(i * 0.1) == b:\n print(i)\n return\nprint(-1)', 'a, b = map(int, input().split(" "))\nfor i in range(1, 10000):\n if int(i * 0.08) == a and int(i * 0.1) == b:\n print(i)\n break\n\nprint(-1)... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s053766800', 's217546834', 's599337453', 's949660939', 's958898873', 's590489780'] | [2940.0, 2940.0, 2940.0, 2940.0, 3064.0, 2940.0] | [17.0, 20.0, 19.0, 18.0, 18.0, 20.0] | [151, 152, 143, 152, 141, 206] |
p02755 | u957055646 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ["A, B = list(map(int, input().split(' '))) \n\nres = -1\n\nfor i in range(1, 1010):\n q_A = int(i / A)\n q_B = int(i / B)\n if q_A == q_B:\n res = i\n break\n else:\n continue\n\nprint(i)", "A, B = list(map(int, input().split(' '))) \n \nres = -1\n\nfor i in range(1, 1010):\n q_A = int(i * 0.08)\n q_B =... | ['Wrong Answer', 'Accepted'] | ['s368387514', 's792759845'] | [3064.0, 2940.0] | [18.0, 18.0] | [210, 230] |
p02755 | u959340534 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ["a, b = map(int, input().split())\n\nstart = b * 10\nflg = True\nfor i in range(10):\n tmp = (start + i) * 0.08\n if tmp == a:\n flg = False\n break\nif flg:\n print('-1')\nelse:\n print(int(tmp))", "a, b = map(int, input().split())\n\nstart = b * 10\nflg = True\nfor i in range(10):\n tmp = (start + i) * 0.... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s277439059', 's717862511', 's754221968'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [193, 199, 194] |
p02755 | u961945062 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['i = list(map(int, input().split()))\n\nA = int(i[0])\nB = int(i[1])\n\nA_min = A // 0.08 + 1\nA_max = ((A + 1) // 0.08)\nB_min = B // 0.1 + 1\nB_max = ((B+1) // 0.1)\n\nif A_max < B_min:\n print(-1)\nelif A_min > B_max:\n print(-1)\nelif A_min < B_min:\n print(B_min)\nelse:\n print(A_min)', 'A, B = map(in... | ['Wrong Answer', 'Accepted'] | ['s556468029', 's342805157'] | [3064.0, 2940.0] | [17.0, 18.0] | [284, 146] |
p02755 | u962423738 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a,b=map(int,input())\n\ne=0\nt=0\n\nfor i in range(1,100):\n\tif a<=i*0.08<a+1:\n\t\te=i\n\tif b<=i*0.1<b+1:\n\t\tt=i\n\tif e==t:\n\t\tprint(e)\n \nprint(-1)', 'A, B = map(int, input().split())\n\nfor i in range(2000):\n if int(i * 0.08) == A and int(i * 0.1) == B:\n print(i)\n exit()\nprint(-... | ['Runtime Error', 'Accepted'] | ['s670455726', 's937573703'] | [9036.0, 9044.0] | [27.0, 30.0] | [142, 146] |
p02755 | u967864815 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split())\n\nfor n in range(10000):\n xa = n * 0.08\n xb = n * 0.1\n if a == xa and b == xb:\n print(n)\n exit()\nprint(-1)', 'a, b = map(int, input().split())\n\nfor n in range(1000):\n xa = n * 0.08\n xb = n * 0.1\n if a == xa and b == xb:\n print(n)\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s560222718', 's674808196', 's313329599'] | [9128.0, 9160.0, 9128.0] | [33.0, 29.0, 31.0] | [161, 160, 171] |
p02755 | u969708690 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['import sys\nA,B=map(int,input().split())\nfor i in range(1,1010):\n if i*0.1==B and i*0.08==A:\n print(i)\n sys.exit()\nprint(-1)', 'import sys\nA,B=map(int,input().split())\nfor i in range(1,10000):\n if i*0.1==B and i*0.08==A:\n print(i)\n sys.exit()\nprint(-1)', 'import sys\nA,B=map(int,input().split... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s052375275', 's085956236', 's185026813'] | [3064.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [130, 131, 138] |
p02755 | u969848070 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split())\nmoney = 1\nwhile money <1010:\n if money==a//0.08 and money == b//0.10:\n print(money)\n money+=1\n if money == 1010:\n print(-1)', 'a, b = map(int, input().split())\n \nmoney = 1\nwhile money < 1010:\n if money ==int(0.08*a) and money == int(0.10*b):\n print(money)\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s578979162', 's694691842', 's767077071', 's639477219'] | [2940.0, 3060.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0, 18.0] | [165, 186, 175, 186] |
p02755 | u970133396 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['A, B = map(int, input().strip().split())\n\nAmin=A*8//100\nAmax=(A+1)*8//100\nif (A+1)%0.08==0:\n Amax-=1\n\nBmin=B*10\nBmax=(B+1)*10\nif (B+1)%0.1==0:\n Bmax-=1\n\nans=-1\nflag=False\nfor a in range(Amin,Amax+1):\n for b in range(Bmin,Bmax+1):\n if a==b:\n ans=a\n flag=True\n ... | ['Wrong Answer', 'Accepted'] | ['s695575117', 's864956029'] | [3064.0, 3064.0] | [17.0, 17.0] | [351, 392] |
p02755 | u973758681 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['#include <stdio.h>\n\nint main() {\n int a, b, x=-1;\n scanf("%d %d", &a, &b);\n for(int i=b*10; i<(b+1)*10; ++i) {\n if ((int)(i*0.08) == a) {\n x = i;\n break;\n }\n }\n printf("%d", x);\n return 0;\n}\n', '#include <stdio.h>\n\nint main() {\n int a, b, x=-1;\n scanf("%d %d", &a, &b);\n for... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s148165505', 's748535459', 's916883993'] | [2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0] | [213, 213, 128] |
p02755 | u974792613 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split())\n\nupper = 1300\n\nprice = -1\nfor i in range(1, upper):\n tax8 = int(i*0.08)\n tax10 = int(i*0.1)\n if a == tax8 ans b == tax10:\n price = i\n break\n \nprint(price)', 'a, b = map(int, input().split())\n\nupper = 1300\n\nprice = -1\nfor i in range(1, upper):\n tax8 = i... | ['Runtime Error', 'Accepted'] | ['s821458320', 's874036172'] | [3064.0, 2940.0] | [18.0, 18.0] | [199, 214] |
p02755 | u975039852 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split())\nfor x in range(1000):\n if int((x + 1) * 0.08) == a and int((x + 1) * 0.1 == b):\n print(x)\n break\nelse:\n print(-1)', 'a, b = map(int, input().split())\nfor x in range(1, 1001):\n if int(x * 0.08) == a and int(x * 0.1) == b:\n print(x)\n break\nelse:\n print(-1)\n'... | ['Wrong Answer', 'Accepted'] | ['s702589665', 's054981824'] | [2940.0, 2940.0] | [18.0, 17.0] | [154, 146] |
p02755 | u976169012 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['import math\na,b = map(int,input().split())\na1 = math.round(a/0.08)\nb1 = math.round(b/0.1)\nc = min(a1,b1)\nwhile True:\n\tif math.floor(c*0.08) == a and math.floor(c*0.1) == b:\n\t\tprint(c)\n\t\tbreak\n\telif math.floor(c*0.08) != a and math.floor(c*0.1) != b:\n\t\tprint(-1)\n\t\tbreak\n\telse:\n\t\tc+=1\n', 'imp... | ['Runtime Error', 'Accepted'] | ['s765071183', 's357758572'] | [3060.0, 3060.0] | [17.0, 18.0] | [284, 272] |
p02755 | u977193988 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['import math\n\nA, B = map(int, input().split())\na = math.ceil(A / 0.08)\nb = math.ceil(B / 0.1)\nans = max(a, b)\n\nif ans ** 0.08 == A and ans ** 0.1 == B:\n print(ans)\nelse:\n print(-1)', 'import math\n\nA, B = map(int, input().split())\na = math.ceil(A / 0.08)\nb = math.ceil(B / 0.1)\nans = max(a, b)\n\nif... | ['Wrong Answer', 'Accepted'] | ['s612482491', 's161901252'] | [3060.0, 2940.0] | [18.0, 17.0] | [185, 208] |
p02755 | u977771109 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['#!/usr/bin/env python\nimport sys\n\ninput = sys.stdin\n\ndef tax(pct8, pct10):\n pct8low = pct8 / 0.08\n pct8high_x10 = (pct8 + 1) * 125\n if pct8high_x10 % 10 == 0:\n pct8high = pct8high_x10 / 10 - 1\n else:\n pct8high = pct8high_x10 / 10\n\n\n pct10low = pct10 * 10\n pct10high = (pc... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s504959932', 's632885169', 's196188293'] | [3060.0, 2940.0, 3064.0] | [18.0, 17.0, 17.0] | [809, 690, 975] |
p02755 | u978640776 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['import math\n\na = list(map(int, input().split()))\nb = -1\nfor i in range(1250):\n x = math.floor(i*0.08)\n y = math.floor(i*0.1)\n if a[0] == x and a[1] == y:\n b = x\n break\n\nprint(b)', 'import math\n\na = list(map(int, input().split()))\nb = -1\nfor i in range(1001):\n x = math.floor(i... | ['Wrong Answer', 'Accepted'] | ['s238523069', 's159484042'] | [2940.0, 3064.0] | [20.0, 21.0] | [200, 200] |
p02755 | u981040490 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ["# -*- coding: utf-8 -*-\ndef main():\n A,B = map(int,input().split())\n for i in range(1,1010):\n if (0.08*i)==A and (0.1*i)==B:\n print(i)\n return\n print('-1')\n\nif __name__ == '__main__':\n main()", "# -*- coding: utf-8 -*-\ndef main():\n A,B = map(int,input().split())... | ['Wrong Answer', 'Accepted'] | ['s876720126', 's916224235'] | [3064.0, 2940.0] | [18.0, 17.0] | [232, 238] |
p02755 | u981206782 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a,b=map(int,input().split())\nxa=a/0.08\nxb=b/0.1\nif xa*0.08==xb*0.1:\n print(xa*0.08)\nelse:\n print(-1)', 'import math\na,b=map(int,input().split())\nxa=math.ceil(a/0.08)\nxb=int(b/0.1)\nif int(max(xa,xb)*0.08)==a and int(max(xa,xb)*0.1)==b:\n print(max(xa,xb))\nelse:\n print(-1)'] | ['Wrong Answer', 'Accepted'] | ['s050058918', 's435925353'] | [3064.0, 3060.0] | [18.0, 17.0] | [106, 172] |
p02755 | u984276646 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['A, B = map(int, input().split())\np = -1\nfor i in range(101):\n if (108 * i) // 100 == A and (11 * i) // 10 == B:\n p = i\n break\nprint(p)', 'A, B = map(int, input().split())\np = -1\nfor i in range(100001):\n if (108 * i) // 100 - i == A and (11 * i) // 10 - i == B:\n p = i\n break\nprint(p)\n'] | ['Wrong Answer', 'Accepted'] | ['s458732133', 's007249274'] | [3064.0, 3060.0] | [18.0, 39.0] | [141, 153] |
p02755 | u987164499 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a,b = map(int,input())\n\nfor i in range(0,100):\n if int(i*1.08) == a and int(i*1.1) == b:\n print(i)\n exit()\n \nprint(-1)', 'a,b = map(int,input().split())\n\nfor i in range(100):\n if int(i*1.08) == a and int(i*1.1) == b:\n print(i)\n exit()\n\nprint(-1)', 'from sys impor... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s917813826', 's946915051', 's127468231'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 19.0] | [142, 140, 179] |
p02755 | u987326700 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['import sys\nA,B = map(int,input().split())\nif A<13:\n print(-1)\n sys.exit()\nlast = 2000\n\nfor i in range(last):\n mA = int(i*0.08)\n mB = int(i*0.10)\n print(mA,mB,i)\n\n \n if mA==A and mB==B:\n print("match")\n print(i)\n break\n if i==last-1:\n print("-1")', 'import sys\nA,B = map(int,input... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s805302524', 's866918188', 's999976244', 's860236435'] | [3444.0, 3064.0, 3060.0, 2940.0] | [23.0, 19.0, 24.0, 18.0] | [265, 229, 203, 187] |
p02755 | u989348352 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ["\nA, B = [int(i) for i in input().split()]\n\naa = A / 0.08\nbb = B / 0.1\n\n\nif aa > (bb + 10) or bb > (aa + 12.5):\n print('-1')\nelse:\n if aa > bb:\n print(aa)\n else:\n print(bb)\n ", "\nA, B = [int(i) for i in input().split()]\n\naa = A / 0.08\nbb = B / 0.1\n\n\nif aa > bb:\n i... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s633193580', 's941172879', 's979436933', 's368780350'] | [2940.0, 3060.0, 2940.0, 3060.0] | [20.0, 19.0, 17.0, 19.0] | [203, 257, 252, 328] |
p02755 | u991567869 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['a, b = map(int, input().split())\n\npa = 0 - -a//0.08\npb = b/0.1\nans = pa\n\nta = pa//12.5\ntb = pa//10\n\nprint(ta, tb)\n\nif ta == a and tb == b:\n for i in range(100):\n ans = pa - 1\n if ans//12.5 != a or ans//10 != b:\n ans = ans + 1\n print(int(ans))\n break\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s739485146', 's882216252', 's886982623'] | [3064.0, 3064.0, 3064.0] | [19.0, 17.0, 18.0] | [319, 303, 134] |
p02755 | u995419623 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['import math\n\na,b = map(int,input().split())\n\nif math.floor(a*12.5) == math.floor(b*10):\n print(math.floor(b*10)\nelse:\n print("-1")', 'a,b=map(int,input().split())\nc=[]\n\nfor i in range(1240):\n if int(i*0.08) == a and int(i*0.1) == b:\n c.append(i)\nc.append(-1)\n\nprint(c[0])'] | ['Runtime Error', 'Accepted'] | ['s430086731', 's906574847'] | [2940.0, 3060.0] | [18.0, 18.0] | [132, 141] |
p02755 | u996506712 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ["a,b=map(int,input().split())\nam=a*(100/108)\naM=(a+1)*(100/108)\nbm=b*(100/110)\nbM=(b+1)/(100/110)\nfor i in range(101):\n if am<=i<aM and bm<=i<bM:\n print(i)\n exit(0)\n elif i==100:\n print('-1')", 'a, b = map(int, input().split())\nfor i in range(1, 2000):\n if int(i * 0.08) == a and... | ['Wrong Answer', 'Accepted'] | ['s773259080', 's861793310'] | [9164.0, 9092.0] | [29.0, 30.0] | [217, 143] |
p02755 | u998741086 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['#!/usr/bin/env python3\nimport math\n\na, b = map(int, input().split())\nx = math.floor((a-1)/0.08)\ny = math.floor((a+1)/0.08)\nz = math.floor((b-1)/0.1)\nw = math.floor((b+1)/0.1)\n\nif y<z:\n print(-1)\n exit(0)\n\nans = []\nfor i in range(min(x,z), min(y,w)):\n if math.floor(i*0.08) == a and math.floor(i... | ['Runtime Error', 'Accepted'] | ['s222567634', 's970692812'] | [3064.0, 3064.0] | [17.0, 17.0] | [397, 396] |
p02755 | u999482355 | 2,000 | 1,048,576 | Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.) Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded d... | ['from math import *\nA,B=list(map(input().split()))\nx=ceil(max(A/0.08,B/0.1))\ny=min((A+1)/0.08,(B+1)/0.1)\nif x<y:\n print(x)\nelse:\n print(-1)', 'from math import *\nA,B=list(map(int, input().split()))\nx=ceil(max(A/0.08,B/0.1))\ny=min((A+1)/0.08,(B+1)/0.1)\nif x<y:\n print(x)\nelse:\n print(-1)'] | ['Runtime Error', 'Accepted'] | ['s308983378', 's723610338'] | [3060.0, 3060.0] | [18.0, 18.0] | [140, 149] |
p02756 | u001839988 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['S = list(input())\nQ = int(input())\nS_r = []\nS_l = []\n\nn = 0\n\nfor i in range(Q):\n q = list(input().split())\n if int(q[0]) == 1:\n n += 1\n else:\n if int(q[1]) == 1:\n S_l.append(q[2])\n S_r = S\n n += 1\n break\n else:\n S_r.append(q[2])\n S_l = S\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s214902299', 's866090430', 's795405300'] | [9556.0, 3064.0, 7068.0] | [592.0, 18.0, 554.0] | [729, 822, 541] |
p02756 | u003644389 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['s = input()\nq = int(input())\n\nquery = []\nrev=1\n\nfor i in range(q):\n query.append(input().split())\n\nfor i in range(q):\n if query[i][0]=="1":\n rev*=-1\n else:\n if rev==1:\n if query[i][1]=="1":\n s.appendleft(query[i][2])\n else:\n s... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s159728697', 's458908941', 's658576873', 's983775937', 's513431062'] | [39156.0, 12492.0, 3064.0, 3188.0, 44524.0] | [406.0, 2108.0, 17.0, 18.0, 487.0] | [504, 269, 434, 427, 581] |
p02756 | u004423772 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["from collections import deque\n\nS = input().rstrip('\\r\\n')\nS_list = deque(S)\nreverse_flg = False\n\nQ = int(input())\nfor _ in range(Q):\n query = input().rstrip('\\r\\n')\n t, f, c = '', '', ''\n if len(query) == 1:\n t = query\n else:\n t, f, c = query.split(' ')\n if t == '1':\n ... | ['Wrong Answer', 'Accepted'] | ['s518443241', 's592438895'] | [8564.0, 8820.0] | [470.0, 483.0] | [501, 665] |
p02756 | u004482945 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = list(input())\nq = int(input())\njudge = 1\nfront = []\nback = []\nfor i in range(q):\n d = input()\n if d == '1':\n judge *= -1\n else:\n a, b, c = list(d.split())\n b = int(b)\n if (b == 1 and judge ==1) or (b == 2 and judge == -1):\n front.append(c)\n else:\n back.append(c)\nans = f... | ['Wrong Answer', 'Accepted'] | ['s584912308', 's363637252'] | [14076.0, 14176.0] | [637.0, 812.0] | [387, 385] |
p02756 | u007627455 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['# coding: utf-8\n\na, b = map(int, input().split())\n# print(a,b)\n# x=-1\n# y=-1\n\nxr=[]\nyr=[]\nfor i in range(101):\n if i*0.08//1==a:\n # print("x:{}".format(i))\n x=i\n xr.append(x)\nfor i in range(101):\n if i *0.1//1==b:\n # print("y:{}".format(i))\n y=i\n yr.ap... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s109393324', 's223387889', 's565049052'] | [3188.0, 42284.0, 40628.0] | [18.0, 2106.0, 1332.0] | [482, 740, 501] |
p02756 | u015593272 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["from collections import deque\n\nS = deque(input())\nQ = int(input())\nreverse = 1\n\n\nfor i in range(Q):\n \n q = input()\n \n if (q == 1):\n reverse *= -1\n else:\n integer, judge, cha = q.split()\n \n if (judge == '1'):\n if (reverse == 1):\n S.... | ['Runtime Error', 'Accepted'] | ['s856438947', 's621717493'] | [8436.0, 8436.0] | [405.0, 398.0] | [568, 578] |
p02756 | u017050982 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['S = input()\nQ = int(input())\n = 0\nans = []\nT = []\n\nfor i in range(Q):\n TS = input()\n if TS == "1":\n revcount += 1\n else:\n T.append(TS.rstrip().split(" "))\n T[len()-1][1] = str((int(T[len(T)-1][1]) + revcount % 2 + 1) % 2 + 1)\nif revcount % 2 == 1:\n ans.append(S[::-1])\nelse:\n ans.append(S... | ['Runtime Error', 'Accepted'] | ['s617063881', 's521621772'] | [2940.0, 6432.0] | [17.0, 591.0] | [1029, 544] |
p02756 | u017415492 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['s=input()\nq=int(input())\nque=[list(map(str,input().split())) for i in range(q)]\ncount=0\nfor i in que:\n if i[0]=="1":\n count+=1\nans=[[],[]]\n \nfor i in que:\n if i[0]=="1":\n count-=1\n else:\n if i[1]=="1":\n ans[count%2].append(i[2])\n else:\n ans[(count+1)%2].append(i[2])\nprint(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s953844961', 's957381233', 's301226248'] | [35176.0, 42648.0, 35864.0] | [449.0, 774.0, 454.0] | [335, 535, 447] |
p02756 | u021916304 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["from collections import deque\n\ns = input()\nn = int(input())\nquery = [0]*n\nrev = 0\nfor i in range(n):\n query[i] = list(map(str, input().split()))\n if query[i][0] == '1':\n rev = rev + 1\n\nbegin = deque()\nend = deque()\npal = 0\n\nfor i in range(n):\n if int(query[i][0]) == 1:\n pal = (... | ['Wrong Answer', 'Accepted'] | ['s230754914', 's249436240'] | [43060.0, 42336.0] | [826.0, 811.0] | [899, 829] |
p02756 | u023762741 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['S =input()\n\ninput_line = int(input())\n\nflag0 = ""\nflag1 = ""\nflag = 0\n\n\nfor i in range(input_line):\n action = list(input())\n # print(flag0,flag1)\n # print(action)\n if action[0]=="1":\n if flag == 0:\n flag = 1\n else:\n flag = 0\n else:\n # print(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s061763778', 's969460412', 's480940209'] | [4320.0, 4464.0, 4380.0] | [2104.0, 1628.0, 1617.0] | [722, 734, 722] |
p02756 | u024782094 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['import sys\ninput = sys.stdin.readline\n\ns=input()\nq=int(input())\nfor i in range(q):\n l=list(map(str,input().split()))\n if l[0]=="1":\n s=s[::-1]\n elif l[1]=="1":\n s=l[2]+s\n else:\n s=s+l[2]\nprint(s)', 's=input()\nq=int(input())\nl = [list(input().split()) for i in range(q)]\nc=0\nfor i in range... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s397611325', 's803124127', 's356252460'] | [3756.0, 2940.0, 40036.0] | [2104.0, 17.0, 602.0] | [208, 300, 398] |
p02756 | u027561659 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['S=input()\nQ=int(input())\nfb=True\nforward=""\nback=""\n\nfor i in range(Q):\n query=input()\n if(query=="1"):\n fb=False if(fb) else True\n print("query=1")\n else:\n query, F, C =query.split()\n if((F=="1")==fb):\n forward=C+forward\n else:\n back=b... | ['Wrong Answer', 'Accepted'] | ['s785885827', 's850802585'] | [6124.0, 4404.0] | [2104.0, 1451.0] | [376, 326] |
p02756 | u029399657 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['string = input()\ninp = []\nn = int(input())\nflag = 1\nfor i in range(n):\n j = input().split()\n if len(j) == 3 and j[1] == "1" and flag == 1:\n inp.insert(0,j[2])\n elif len(j) == 3 and j[1] == "2" and flag == 1:\n inp.append(j[2])\n elif len(j) == 3 and j[1] == "2" and flag == -1:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s069641478', 's429439922', 's021869708'] | [4088.0, 3188.0, 9036.0] | [2104.0, 18.0, 335.0] | [514, 77, 536] |
p02756 | u037098269 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["from collections import deque\n\nS = deque(input())\nQ = int(input())\n\nflag = 1\nfor i in range(Q):\n qry = input().split()\n\n if qry[0] == '1':\n if flag:\n flag = 0\n else:\n flag = 1\n \n elif qry[0] == '2':\n if flag:\n if qry[1] == '1':\n ... | ['Runtime Error', 'Accepted'] | ['s696949619', 's371094451'] | [5876.0, 8564.0] | [411.0, 407.0] | [565, 577] |
p02756 | u038021590 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["from collections import deque\nS = input()\nque = deque()\nque.append(S)\nQ = int(input())\nFront_flag = 1\n\nfor i in range(Q):\n Query = tuple(input().split())\n if len(Query) == 1:\n Front_flag = 1 - Front_flag\n else:\n a, b, c = Query\n if (Front_flag + int(b)) % 2 == 1:\n ... | ['Wrong Answer', 'Accepted'] | ['s220233945', 's149646974'] | [6768.0, 6900.0] | [765.0, 568.0] | [436, 440] |
p02756 | u044220565 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["# coding: utf-8\nS = input().split()\nQ = int(input())\n\ndef pop(left, right, rev, f, c):\n left_ = left\n if rev == 1:\n if f == '1':\n #left_ = [c] + left\n left.append(c)\n else:\n right.append(c)\n else:\n if f == '1':\n right.append(c)\n ... | ['Wrong Answer', 'Accepted'] | ['s676238057', 's941915681'] | [7680.0, 7656.0] | [528.0, 532.0] | [643, 567] |
p02756 | u044964932 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['from collections import deque\n\n\ndef main():\n s = deque([list(input())])\n q = int(input())\n rev = False\n for _ in range(q):\n query = input().split()\n if query[0] == "1":\n if not rev:\n rev = True\n else:\n rev = False\n else... | ['Wrong Answer', 'Accepted'] | ['s173204638', 's476105062'] | [11808.0, 12256.0] | [434.0, 454.0] | [727, 725] |
p02756 | u045408189 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s=list(input())\nq=int(input())\nfor i in range(q):\n query=input().split()\n print(query)\n if query==['1']:\n s.reverse()\n else:\n if query[1]=='1':\n s.insert(0,query[2])\n else:\n s.append(query[2])\nprint(''.join(s))\n", "s=list(input())\nq=int(input())\nan... | ['Wrong Answer', 'Accepted'] | ['s133610005', 's679993211'] | [4900.0, 9892.0] | [2104.0, 429.0] | [266, 530] |
p02756 | u046592970 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['from collections import deque\ns = deque(input())\nq = int(input())\nr = 0\nz = 0\nto = 0\nfor i in range(q):\n \n try:\n t,f,c = input().split()\n if (r + int(f)) % 2 == 1:\n s.appendleft(c)\n \n else:\n s.append(c)\n r = 0\n z = 1\n except:\n ... | ['Runtime Error', 'Accepted'] | ['s586608180', 's369190190'] | [137116.0, 35444.0] | [1844.0, 544.0] | [460, 406] |
p02756 | u047197186 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = input()\nq = int(input())\n\ncnt = 0\nllst = []\nrlst = []\nfor i in range(q):\n line = input()\n if line == '1':\n cnt += 1\n else:\n elems = line.split()\n if cnt % 2 == 0:\n \n if elems[1] == '1':\n llst.append(elems[2])\n else:\n rlst.append(elems[2])\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s227303943', 's879257411'] | [6252.0, 6384.0] | [2104.0, 404.0] | [613, 610] |
p02756 | u050087249 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["from collections import deque\ns = deque(input())\nnum = int(input())\nfor i in range(num):\n a = deque(input().split())\n start = int(a[0])\n if start == 2:\n ns = int(a[1])\n if ns == 1:\n s.appendleft(a[2])\n #s = a[2] + s\n else:\n \n s.append(a[2])\n else:\n s.reverse()\nfor i... | ['Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s393621678', 's667269138', 's735830614'] | [7408.0, 7408.0, 8428.0] | [2108.0, 2104.0, 517.0] | [355, 355, 296] |
p02756 | u052221988 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['s = input()\nq = int(input())\nflag = 0b0\nfor i in range(q) :\n t = input()\n if t == 1 :\n flag ^= 1\n continue\n if (int(t[2]) - flag) == 1 :\n s = t[4] + s\n else :\n s = s + t[4]\nif flag == 0 :\n print(s)\nelse :\n print(s[::-1])', 'right = input()\nflag = 1\nleft =... | ['Runtime Error', 'Accepted'] | ['s101682912', 's464075021'] | [3888.0, 4480.0] | [2104.0, 495.0] | [266, 303] |
p02756 | u054556734 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['import numpy as np\nimport scipy.sparse as sps\nimport scipy.misc as spm\nimport collections as col\nimport functools as func\nimport itertools as ite\nimport fractions as frac\nimport math as ma\nimport cmath as cma\nimport copy as cp\nimport sys\ndef sinput(): return sys.stdin.readline().strip()\ndef iinput(): retu... | ['Runtime Error', 'Accepted'] | ['s801498595', 's280726942'] | [146196.0, 28972.0] | [302.0, 501.0] | [1111, 1183] |
p02756 | u056830573 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = input()\nq = int(input())\n\nQ = []\nfor i in range(q):\n Q.append(input())\n\n\nprint(s)\nfor operation in Q:\n if (operation[0] == '1'):\n s = s[::-1]\n else:\n if (operation[2] == '1'):\n\n s = operation[4] + s\n else:\n s += operation[4]\n\n\nprint(s)\n", 's... | ['Wrong Answer', 'Accepted'] | ['s268463659', 's674604130'] | [16620.0, 40640.0] | [2104.0, 1372.0] | [292, 417] |
p02756 | u060793972 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = input()\nq = int(input())\nr = False\nfor i in range(q):\n t=list(input().split())\n if len(t) == 1:\n r = not(r)\n else:\n if t[1] == '1' and r = False\n s = t[2] + s\n elif t[1] == '2' and r = True:\n s = t[2] + s\n else:\n s = s + t[2]\nprint(s)", "s = input()\nq = int(input())\nr... | ['Runtime Error', 'Accepted'] | ['s398395677', 's858596593'] | [2940.0, 4596.0] | [18.0, 513.0] | [333, 468] |
p02756 | u062655521 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = input()\nq = int(input())\nis_r = False\nf_list = []\nb_list = []\n\nfor i in range(q):\n q_i = input().split(' ')\n t_i = q_i[0]\n if t_i == '1':\n is_r = not is_r\n else:\n f_i = q_i[1]\n if (f_i == '1' and not is_r) or (f_i == '2' and is_r):\n f_list.append(q_i[2])\n... | ['Runtime Error', 'Accepted'] | ['s773818161', 's613143531'] | [6756.0, 6144.0] | [417.0, 418.0] | [480, 480] |
p02756 | u063896676 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['# coding: utf-8\n\nS = input()\nQ = int(input())\n\n\nrev = False\nfor _ in range(Q):\n line = input()\n\n if line[0] == "1":\n rev = not rev\n\n else:\n if line[2] == "1":\n if rev:\n S = "".join(S, line[4])\n else:\n S = "".join(line[4], S)\... | ['Runtime Error', 'Accepted'] | ['s349391465', 's941940637'] | [3188.0, 24336.0] | [18.0, 391.0] | [479, 1010] |
p02756 | u064434060 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["from collections import deque\n\nd=deque()\ns=input()\nd.append(s)\nq=int(input())\nflag=1\nt = [input().split() for l in range(q)]\nfor i in range(q):\n if t[i][0]=='1':\n flag=flag*(-1)\n else:\n if t[i][1]=='1' and flag==1:\n s=t[i][2]+s\n elif t[i][1]=='1' and flag==-1:\n s=s+t[i][2]\n eli... | ['Runtime Error', 'Accepted'] | ['s883881198', 's515993319'] | [42216.0, 44660.0] | [2106.0, 466.0] | [464, 503] |
p02756 | u066855390 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['s = list(input())\nq = int(input())\nfor i in range(q):\n l = input().split()\n if len(l) == 1:\n s[0], s[-1] = s[-1], s[0]\n else:\n pos = int(l[1])\n c = l[2]\n if pos == 1:\n s.insert(1, c)\n else:\n s.append(c)\nprint("".join(s))\n', 'from collecti... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s186615374', 's693258732', 's998282712'] | [4260.0, 6900.0, 9460.0] | [2104.0, 509.0, 521.0] | [287, 495, 534] |
p02756 | u068727970 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['S = input()\nQ = int(input())\nQUE = []\nstart_index = None\nend_index = None\nfor i in range(Q):\n query = input()\n if query == "1" and start_index == None:\n start_index = i\n elif query == "1":\n end_index = i\n else:\n if start_index == None:\n QUE.append(query)\n ... | ['Wrong Answer', 'Accepted'] | ['s912217779', 's996248952'] | [16512.0, 9984.0] | [2104.0, 466.0] | [873, 513] |
p02756 | u075595666 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["import sys\ninput = sys.stdin.readline\ns = input()\nq = int(input())\nc = []\nfor i in range(q):\n que = input().split()\n c_append = c.append\n c_append(que)\n \nfor i in c:\n if i[0] == '1':\n s = s[::-1]\n else:\n if i[1] == '1':\n s = i[2] + s\n else:\n s = s + i[2]\nprint(s)", "def main... | ['Wrong Answer', 'Accepted'] | ['s466290828', 's921977436'] | [41680.0, 32088.0] | [2106.0, 246.0] | [288, 518] |
p02756 | u080364835 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = list(input())\nq = int(input())\ns0 = []\ns1 = []\nfor _ in range(q):\n ql = list(input().split())\n if ql[0] == '1':\n s0[-1:], s1[-1:] = s1[-1:], s0[-1:]\n else:\n if ql[1] == '1':\n s0 += ql[2]\n else:\n s1 += ql[2]\n\nans = s0 + s + s1\nprint(*ans, sep='')",... | ['Wrong Answer', 'Accepted'] | ['s321446082', 's880487471'] | [15980.0, 10048.0] | [625.0, 340.0] | [301, 360] |
p02756 | u086438369 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = input()\nq = int(input())\nexchange = 0\n\nfor _ in range(q):\n query = input()\n if query == '1':\n excnange += 1\n else:\n t, f, c = query.split()\n if f == '1':\n s = c + s\n else:\n s = s + c\n \nif exchange % 2 == 0:\n print(s)\nelse:\n print(s[::-1])\n", "import sys\ninput = ... | ['Runtime Error', 'Accepted'] | ['s401078039', 's047705558'] | [3740.0, 30964.0] | [2104.0, 276.0] | [275, 559] |
p02756 | u086503932 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["S = input()\nN = int(input())\nQ = [input().split() for _ in range(N)]\nstart = ''\nend = ''\n\n\ndirect = 0\nfor i in range(N):\n if Q[i][0] =='1':\n direct^=1\n else:\n if direct == int(Q[i][1])-1:\n start += Q[i][2]\n print('start',start)\n else:\n end += Q[i][2]\n print('end',end)\n... | ['Runtime Error', 'Accepted'] | ['s837000440', 's036714660'] | [170356.0, 40692.0] | [588.0, 491.0] | [424, 374] |
p02756 | u088552457 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["def main():\n w = input()\n s = collections.deque(w)\n n = int(input())\n \n reverse_count = 0\n for i in range(n):\n t = list(input_list_str())\n if len(t) == 1:\n reverse_count = 1 - reverse_count\n continue\n q, f, c = t\n if int(f) == 1:\n s.append(c)\n else:\n s.appendlef... | ['Wrong Answer', 'Accepted'] | ['s852983992', 's198218937'] | [10452.0, 10556.0] | [687.0, 700.0] | [915, 919] |
p02756 | u089925107 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["S = str(input())\nQ = int(input())\nflip = 0\nfor i in range(Q):\n j = input()\n if len(j) == 1:\n flip += 1\n continue\n else:\n if flip % 2 == 0:\n if j[2] == '1':\n S = j[4] + S\n continue\n elif j[2] == '2':\n S = S + j[4]\n continue\n elif flip % 2 == '1':\n ... | ['Wrong Answer', 'Accepted'] | ['s294284972', 's430877077'] | [9696.0, 9936.0] | [2205.0, 870.0] | [459, 528] |
p02756 | u091051505 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = input()\nq = int(input())\nback = 1\nfor i in range(q):\n query = input().split()\n if query[0] == '1':\n back *= -1\n else:\n if query[1] == '1':\n if back == 1:\n s = query[2] + s\n else:\n s = s + (query[2]\n else:\n i... | ['Runtime Error', 'Accepted'] | ['s778718050', 's881009535'] | [2940.0, 6636.0] | [17.0, 445.0] | [442, 635] |
p02756 | u092387689 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["s = input()\nq = int(input())\n\nquery = [[x for x in input().split()] for i in range(q)]\n\nT2query = []\ncnt=0\nfor i in range(q-1,-1,-1):\n if(query[i][0]=='1'):\n cnt+=1\n continue\n if(cnt%2!=0):\n if(query[i][1]=='1'):\n query[i][1]='2'\n else:\n query[i][... | ['Wrong Answer', 'Accepted'] | ['s240022374', 's372884927'] | [30096.0, 29448.0] | [2105.0, 533.0] | [501, 586] |
p02756 | u092646083 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['S = input()\nQ = int(input())\nreverse = 0\nfor i in range(Q):\n Query = list(input().split())\n if Query[0] == "1":\n reverse = (reverse + 1) % 2\n if Query[0] == "2":\n f = int(Query[1])\n c = query[2]\n if (f + reverse) % 2 == 1:\n S = c + S\n else:\n S = S + c\n\nif reverse == 0:\n pr... | ['Runtime Error', 'Accepted'] | ['s688136653', 's154258223'] | [3188.0, 8692.0] | [17.0, 638.0] | [331, 399] |
p02756 | u094999522 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['#!/usr/bin/env python3\ns = input()\nQ = int(input())\nq = [input().split() for _ in range(Q)]\nreverse = 0\nstart = ""\nend = ""\nfor i in q:\n if i[0] == "1":\n reverse ^= 1\n else:\n if int(i[1]) + reverse >> 0 ^ 0:\n end += i[2]\n else:\n start += i[2]\nprint(start... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s218059701', 's864463220', 's687358542'] | [43092.0, 43228.0, 43420.0] | [380.0, 372.0, 382.0] | [340, 346, 343] |
p02756 | u096983897 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["S = list(input())\nQ = int(input())\nis_reversed = False\nappend_first = []\nmy_first = append_first.append\nappend_end = []\nmy_end = append_end.append\n\nfor i in range(Q):\n q = list(input())\n if q[0] == '1':\n is_reversed = True if is_reversed == False else False\n else:\n if q[2] == '1' and is_reversed... | ['Wrong Answer', 'Accepted'] | ['s819092352', 's814813838'] | [7696.0, 7696.0] | [471.0, 482.0] | [622, 645] |
p02756 | u103198430 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['import math\nimport random\nimport sys\nfrom bisect import bisect_left, bisect_right\nfrom collections import Counter, defaultdict, deque\nfrom functools import lru_cache, reduce\nfrom heapq import heapify, heappop, heappush\nfrom itertools import (chain, combinations, combinations_with_replacement,\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s445950825', 's941533051', 's388730758'] | [9332.0, 9204.0, 9204.0] | [250.0, 271.0, 271.0] | [964, 968, 1014] |
p02756 | u103208639 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['import sys\ninput=sys.stdin.readline\nfrom collections import deque\ns=deque([input()])\nq=int(input())\n\nfor _ in range(q):\n\tt=input()\n\tif t[0]=="1":\n\t\ts.reverse()\n\telse:\n\t\tt,f,c=t.split()\n\t\tif f=="1":\n\t\t\ts.appendleft(c)\n\t\telse:\n\t\t\ts.append(c)\nprint(*s,sep="")\n', 'from collections import... | ['Wrong Answer', 'Accepted'] | ['s818409426', 's326654455'] | [9968.0, 12144.0] | [2104.0, 652.0] | [257, 472] |
p02756 | u103902792 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["import sys\ninput = sys.stdin.readline\nfrom collections import deque\n\ns = deque(input())\nreverse = 0\nq = int(input())\n\nfor _ in range(q):\n query = input()\n if query == '1':\n reverse = 1 - reverse\n else:\n _,f,c = query.split()\n if f == '1':\n if reverse:\n s.appendleft(c)\n el... | ['Runtime Error', 'Accepted'] | ['s743694081', 's809432372'] | [8436.0, 8692.0] | [168.0, 409.0] | [458, 427] |
p02756 | u106181248 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['import sys\ninput = sys.stdin.readline\n\ndef main():\n s = input()\n n = int(input())\n li = [input().split() for i in range(n)]\n a = 0 \n\n for x in li:\n if x[0] == "1":\n if a == 0:\n a = 1\n else:\n a = 0\n else:\n if (x... | ['Wrong Answer', 'Accepted'] | ['s733048060', 's892841063'] | [41828.0, 4340.0] | [2106.0, 435.0] | [611, 517] |
p02756 | u110199424 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["S = str(input())\nQ = int(input())\n\n#Que = [list(map(str, input().split())) for _ in range(Q)]\n\nfor i in range(Q):\n flag, F, C = map(str, input().split())\n\n if flag == '1':\n S = S[::-1]\n\n if flag == '2':\n if F == '1':\n S = C + S\n if F == '2':\n S = S + ... | ['Runtime Error', 'Accepted'] | ['s244031076', 's303321266'] | [3824.0, 13288.0] | [2103.0, 440.0] | [315, 864] |
p02756 | u111473084 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['from collections import deque\ns = deque(input())\nprint(s)\nQ = int(input())\n\nreverse = False\nfor i in range(Q):\n q = input()\n if q == "1":\n reverse = False if reverse else True\n else:\n t, f, c = q.split(" ")\n if f == "1":\n if reverse:\n s.append(c)\n... | ['Wrong Answer', 'Accepted'] | ['s049139415', 's144089865'] | [8972.0, 8436.0] | [418.0, 434.0] | [540, 531] |
p02756 | u111652094 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['S=str(input())\nS_list=list(S)\n\nQ=int(input())\n\nq=[]\nright=[]\nleft=[]\n\nrev=1\n\nfor i in range(Q):\n q.append(input().split())\n if q[i][0]=="1":\n rev=rev*(-1)\n elif q[i][0]=="2":\n if q[i][1]=="1":\n if rev==1:\n right.insert(0,q[i][2])\n else:\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s214727221', 's916860879', 's240746128'] | [41076.0, 44936.0, 45940.0] | [2106.0, 2106.0, 519.0] | [650, 621, 614] |
p02756 | u115110170 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['s = input()\nq = int(input())\njun = 1\nf = t = ""\nfor _ in range(q):\n \n tmp = input()\n if len(tmp)==1:\n jun = 1 if jun==0 else 0 \n else:\n _,f,c = tmp.split()\n if jun+int(f) ==2:\n f = c+f\n else:\n t += c\nif jun==1:\n print(f+s+t)\nelse:\n print((f+s+t)[::-1])\n \n \n', '... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s600889472', 's771779765', 's003623965'] | [3896.0, 4132.0, 4500.0] | [528.0, 2104.0, 1649.0] | [293, 282, 292] |
p02756 | u116038906 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['\nimport sys\ninput = sys.stdin.readline\nS = input()\nQ = int(input())\nFQ_dic =tuple()\nrev =0\nfor i in range(Q):\n FQ_dic =tuple(input().split())\n\n if FQ_dic[0] =="1": \n rev +=1\n else: \n if FQ_dic[1]=="1": \n if rev %2 ==0:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s344150331', 's658153789', 's463207384'] | [4148.0, 4120.0, 62236.0] | [2104.0, 2104.0, 308.0] | [683, 683, 676] |
p02756 | u119982001 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['from collections import deque\nimport sys\n\nS = input()\nQ = int(input())\nq = deque([S])\nreverse = False\n\nfor i in range(Q):\n X = sys.stdin.readline().split()\n if X[0] == "1":\n if reverse:\n reverse = False\n else:\n reverse = True\n elif X[0] == "2":\n if r... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s152344056', 's490034606', 's491602878', 's849467198'] | [134848.0, 2940.0, 134868.0, 10100.0] | [702.0, 17.0, 708.0, 412.0] | [581, 474, 571, 539] |
p02756 | u121698457 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["S = input()\nQ = int(input())\nx = 0\np = ''\nq = ''\nfor i in range(Q):\n A = list(input().split())\n if A[0] == '1':\n x += 1\n elif x%2 ==0:\n if A[1] == '1':\n p = A[2] + p\n else:\n q = q + A[2]\n else:\n if A[1] == '1':\n q = q + A[2] \n ... | ['Wrong Answer', 'Accepted'] | ['s249361891', 's125698033'] | [5004.0, 8224.0] | [1619.0, 1629.0] | [394, 408] |
p02756 | u123756661 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['import sys\ninput = sys.stdin.readline\n\ndef sol():\n s=input()\n q=int(input())\n x=0\n for i in range(q):\n l=[i for i in input().split()]\n if l[0]=="1":\n x=(x+1)%2\n elif l[1]=="1":\n if x==0: s=l[2]+s\n else: s=s+l[2]\n elif l[1]=="2":\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s529261556', 's700018236', 's248624524'] | [4044.0, 6816.0, 4608.0] | [2104.0, 2104.0, 1261.0] | [428, 455, 471] |
p02756 | u125545880 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["\n\nfrom collections import deque\n\nS = deque(input())\nQ = int(input())\n\nT = 0\nfor _ in range(Q):\n Query = list(input().split())\n if len(Query) == 1:\n T ^= 1\n elif T == 0:\n m = Query[2]\n if Query[1] == '1':\n S.append(m)\n else:\n S.appendleft(m)\n... | ['Wrong Answer', 'Accepted'] | ['s647077750', 's734708959'] | [8436.0, 5740.0] | [483.0, 471.0] | [508, 576] |
p02756 | u127499732 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['def main():\n s,q,*r = [list(k.split()) for k in open(0)]\n s=s[0]\n p = False\n for x in r:\n if len(x)==1:\n p = True\n continue\n if (p == False and x[1]==\'1\') or (p == True and x[1]==\'2\'):\n s = x[2] + s\n else:\n s = s + x[2]\n \n print("".join(s) if p==False else "".join... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s367553113', 's444766514', 's477506820'] | [32472.0, 33864.0, 35416.0] | [2105.0, 2105.0, 194.0] | [348, 386, 406] |
p02756 | u130900604 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['\nimport sys\ninput = sys.stdin.readline\n\ns=input()\nq=int(input())\n\nfor i in range(q):\n qi=list(input().split())\n if qi[0]=="1":\n s=s[::-1]\n else:\n f,c=qi[1],qi[2]\n if f=="1":\n s=c+s\n else:\n s=s+c\nprint(s)', 'from collections import deque\ns=de... | ['Wrong Answer', 'Accepted'] | ['s087136955', 's171481207'] | [3956.0, 10228.0] | [2104.0, 664.0] | [271, 479] |
p02756 | u137226361 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["def main():\n import sys\n input = sys.stdin.readline\n s = input()\n q =int(input())\n ten = 0\n r = []\n l = []\n for _ in range(q):\n ls = tuple(map(str, input().split()))\n if len(ls)==1:\n ten +=1\n else:\n if ls[1] =='1':\n if ten... | ['Wrong Answer', 'Accepted'] | ['s011844210', 's020627006'] | [12336.0, 12280.0] | [187.0, 200.0] | [678, 716] |
p02756 | u137912513 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['import sys\ns = sys.stdin.readline()\nq = int(input())\nFlag = True\nfor i in range(q):\n xxx = input()\n if len(xxx) == 1:\n if Flag == True:\n Flag = False\n else:\n Flag = True\n else:#T=2\n T,F,C=xxx.split()\n F = int(F)\n if F == 1:\n i... | ['Wrong Answer', 'Accepted'] | ['s589861387', 's418663676'] | [3896.0, 4340.0] | [2104.0, 528.0] | [567, 603] |
p02756 | u140191608 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["S = input()\nQ = int(input())\nflg = 0\nsenntou = ''\nushiro = ''\nfor i in range(Q):\n A = list(input().split())\n if int(A[0]) == 1 and flg == 0:\n flg = 1\n continue\n elif int(A[0]) == 1 and flg == 1:\n flg = 0\n continue\n if (int(A[1]) == 1 and if flg == 0) or (int(A[1]) ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s577108705', 's843935301', 's637461511'] | [2940.0, 3188.0, 4444.0] | [17.0, 18.0, 1816.0] | [503, 498, 503] |
p02756 | u155659281 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ["from collections import deque\nS = input()\nQ = int(input())\n \nalpha_map = {chr(i):i for i in range(97,123)}\nalpha_map_inv = {i:chr(i) for i in range(97,123)}\na = deque()\nfor s in S:\n a.append(s)\nprint(a)\nreversed = False\n \nfor _ in range(Q):\n query = list(map(str, input().split()))\n if query[0] == '1'... | ['Wrong Answer', 'Accepted'] | ['s362349260', 's979414648'] | [9348.0, 8692.0] | [696.0, 718.0] | [609, 600] |
p02756 | u158583803 | 2,000 | 1,048,576 | Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provided, which means the following: * If T_i = 1: reverse the string... | ['s=input()\nq= int(input())\n\nfor iq in range(1,q+1):\n\tt=input().split()\n\tif t[0]==\'1\':\n\t\ts=s[::-1]\n\telse:\n\t\tif t[1]==\'1\':\n#\t\t\ts=t[2]+s\n s=\'{}{}\'.format(t[2],s)\n#\t\t\ts=f"{t[2]}{s}"\n#\t\t\tlist1=[t[2],s]\n#\t\t\ts="".join(list1)\n#\t\t\ts="".join(t[2],s)\n\t\telse:\n#\t\t\ts=s+t[2... | ['Runtime Error', 'Accepted'] | ['s340205994', 's396284536'] | [2940.0, 4424.0] | [18.0, 1512.0] | [399, 410] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.