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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03037 | u957722693 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\ncards=[i for i in range(1,n+1)]\nfor i in range(m):\n a,b=map(int,input().split())\n l=[i for i in range(a,b+1)]\n cards=list(set(l)&set(cards))\n print(cards)\nprint(len(cards))', 'n,m=map(int,input().split())\ncards=[i for i in range(1,n+1)]\nfor i in range(m):\n a,b=map(int,input... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s500035728', 's661293894', 's197345694'] | [91664.0, 30532.0, 10984.0] | [2105.0, 2105.0, 140.0] | [205, 185, 278] |
p03037 | u960653324 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | [' N, M= (int(i) for i in input().split())\n\n ans = set(range(1,N+1))\n\n for i in range(M):\n L_tmp, R_tmp = map(int, input().split())\n ans = ans & set(range(L_tmp,R_tmp+1))\n\n print(len(ans))\n', 'N, M= (int(i) for i in input().split())\n\nL_max = 1\nR_min = N\n\nfor i in range(M):\n L, R = map(int, inp... | ['Runtime Error', 'Accepted'] | ['s620425489', 's326989634'] | [2940.0, 11884.0] | [18.0, 320.0] | [195, 218] |
p03037 | u963903527 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\nmi,ma=0,0\nfor _ in range(m-1):\n mi=list(map(int,input().split()))[0]\nma=list(map(int,input().split()))[0]\nprint(ma-mi if ma-mi>0 else 0)', 'n,m=map(int,input().split())\nmis,mas=[],[]\nfor _ in range(m):\n tmp=list(map(int,input().split()))\n mis.append(tmp[0])\n mas.append(tmp[1... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s431916491', 's496201470', 's883047334'] | [3060.0, 11216.0, 11064.0] | [304.0, 346.0, 362.0] | [166, 189, 191] |
p03037 | u964494353 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['import numpy as np\nN, M = map(int, input().split())\nX = np.ones((N), dtype=np.int)\nfor i in range(M):\n L, R = map(int, input().split())\n if L > 1 : X[:L]=0\n if R < 100000 : X[R+1:]=0\nprint(np.sum(X, dtype=np.int))', 'import numpy as np\nN, M = map(int, input().split())\nLL, RR = map(int, input().split... | ['Wrong Answer', 'Accepted'] | ['s506051889', 's097940606'] | [21404.0, 20648.0] | [2109.0, 459.0] | [222, 206] |
p03037 | u967062796 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m = [int(x) for x in input().split()]\nl = [0] * m\nr = [0] * m\nfor i in range(m):\n l[i], m[i] = map(int, input().split())\n\nL = max(l)\nR = min(r)\n\nif L <= R:\n print(R - L + 1)\nelse:\n print(0)', 'n, m = map(int, input().split())\n\nl_max = 0\nr_min = 10**6\nfor i in range(m):\n l, r = map(int,... | ['Runtime Error', 'Accepted'] | ['s949335004', 's243267512'] | [4596.0, 3060.0] | [19.0, 325.0] | [201, 237] |
p03037 | u970899068 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m=map(int, input().split())\ngrid = []\nfor i in range(m):\n array = list(map(int, input().strip().split()))\n grid.append(array)\n\n\nmaxa=0\nmaxb=0\nfor i in range (1,m):\n if maxa<gird[i][0]:\n maxa=gird[i][0]\n if grid[i][1]<grid[i][0]:\n maxb=grid[i][1]\n\nv=maxb-maxa+1\nif v>0:\n ... | ['Runtime Error', 'Accepted'] | ['s745850229', 's625887270'] | [27348.0, 30152.0] | [357.0, 565.0] | [329, 204] |
p03037 | u981040490 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ["# -*- coding: utf-8 -*-\ndef main():\n N,M= map(int,input().split())\n List=[list(map(int,input().split())) for i in range(M)]\n print(List)#[[1, 3], [2, 4]]\n ListN = list()\n List3 = list()\n for k in range(1,N+1):\n ListN.append(k)\n for i in range(M):\n List2 = list()\n x... | ['Wrong Answer', 'Time Limit Exceeded', 'Accepted'] | ['s344207174', 's688686320', 's817162221'] | [35856.0, 141720.0, 11408.0] | [2106.0, 2110.0, 340.0] | [610, 579, 335] |
p03037 | u982591663 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['#ABC-127-C\nN, M = map(int, input().split())\nL_list = []\nR_list = []\nfor _ in range(M):\n Li, Ri = map(int, input().split())\n L_list.append(Li)\n R_list.append(Ri)\n\nmax_L = max(L_list)\nmin_R = min(R_list)\n\nif max_L < min_R:\n print(0)\nelse:\n print(min_R-max_L+1)\n', 'N, M = map(int, input()... | ['Wrong Answer', 'Accepted'] | ['s084466370', 's553260565'] | [11028.0, 6900.0] | [320.0, 347.0] | [275, 339] |
p03037 | u991619971 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['#import numpy as np\n#from itertools import combinations as comb\n#from itertools import combinations_with_replacement as comb_with\n\n#A = int(input())\nN,M= map(int,input().split())\n#A = list(map(int,input().split()))\n#B = list(map(int,input().split()))\n#S= str(input())\nleft=1\nright=N\nfor m in range(M):\n ... | ['Runtime Error', 'Accepted'] | ['s787015282', 's368924622'] | [3060.0, 3188.0] | [302.0, 306.0] | [520, 524] |
p03037 | u993435350 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M = map(int,input().split())\nL = []\nfor _ in range(M):\n k = list(map(int,input().split()))\n L.append(k)\n\nsup = []\ninf = []\n \nfor i in range(len(L)):\n sup.append(L[i][1])\n inf.append(L[i][0])\n \nsup = min(sup)\ninf = max(inf)\n\nif sup - inf >= 0:\n print(0)\nelse:\n print(sup - inf + 1)', 'N,M =... | ['Wrong Answer', 'Accepted'] | ['s029678633', 's547240223'] | [29076.0, 29076.0] | [381.0, 378.0] | [290, 289] |
p03037 | u996434204 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int,input().split())\nmn = 1\nmx = n\n\nfor i in range(m):\n l,r = map(int,input().split())\n if l > mn:\n mn = l\n if r < mx:\n mx = r\n \nif mx > mn:\n print(0)\nelse:\n print(mn - mx + 1)\n', 'n,m = map(int,input().split())\nleft = 1\nright = n\n\nfor i in range(m):\n ... | ['Wrong Answer', 'Accepted'] | ['s811312742', 's161157390'] | [3060.0, 3060.0] | [282.0, 284.0] | [223, 240] |
p03037 | u997113115 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\nL = []\nR = []\nfor i in range(M):\n S = input().split()\n L.append(int(S[0]))\n R.append(int(S[1]))\nif min(R) <= max(L):\n print(min(R)-max(L)+1)\nelse:\n print(0)', 'N, M = map(int, input().split())\nL = []\nR = []\nfor i in range(M):\n S = input().split()\n L... | ['Wrong Answer', 'Accepted'] | ['s312053670', 's386962556'] | [11008.0, 11008.0] | [256.0, 270.0] | [204, 204] |
p03037 | u997641430 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m = map(int, input().split())\nl0, r0 = 1, n\nfor j in range(m):\n l1, r1 = map(int, inp)\n l0 = max(l0, l1)\n r0 = min(r0, r1)\nprint(max(0, r0-l0+1))\n', 'n, m = map(int, input().split())\nl0, r0 = 1, n\nfor j in range(m):\n l1, r1 = map(int, input().split())\n l0 = max(l0, l1)\n r0 = min(r0, r... | ['Runtime Error', 'Accepted'] | ['s236820337', 's180956423'] | [3060.0, 3188.0] | [17.0, 327.0] | [158, 170] |
p03037 | u998169143 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['import numpy as np\nN, M = [int(i) for i in input().split()]\nL = [0]*M\nR = [0]*M\nfor i in range(M):\n L[i], R[i] = [int(i) for i in input().split()]\n\nRmin = np.min(R)\nLmax = np.max(L)\nif Rmin >= Lmax:\n num = np.min(R) - np.max(L) + 1\nelse\n num = 0\nprint(num)', 'import numpy as np\nN, M = [int(i) f... | ['Runtime Error', 'Accepted'] | ['s996192035', 's942206564'] | [2940.0, 20724.0] | [17.0, 459.0] | [265, 266] |
p03037 | u999482355 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\nLmax = 0\nRmin = N\nfor i in range(M):\n L, R = map(int, input().split())\n Lmax = max(Lmax, L)\n Rmin = min(Rmin, R)\nprint(Rmin-Lmax)', 'N, M = map(int, input().split())\nLmax = 0\nRmin = N\nfor i in range(M):\n L, R = map(int, input().split())\n Lmax = max(Lmax, L)\n Rmin = ... | ['Wrong Answer', 'Accepted'] | ['s847134620', 's328797029'] | [3060.0, 3060.0] | [329.0, 329.0] | [165, 176] |
p03040 | u016128476 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ["Q = int(input())\nqueries = []\nfor _ in range(Q):\n queries.append(input())\n\nfrom bisect import insort_left\n\nary, bry, c = [], [], 0\nfor query in queries:\n if query[0] == '2':\n absum = sum(abs(a - ary[c//2]) for a in ary)\n print(' '.join(map(str, (ary[c//2], absum + sum(bry)))))\n else... | ['Wrong Answer', 'Accepted'] | ['s679089491', 's485118121'] | [24588.0, 28628.0] | [2105.0, 736.0] | [421, 1449] |
p03040 | u060938295 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['# -*- coding: utf-8 -*-\n"""\nCreated on Sat May 25 21:57:15 2019\n\n@author: Yamazaki Kenichi\n"""\nimport bisect\n\nQ = int(input())\nQ2 = [input() for i in range(Q)]\n\nans = []\nA = []\nB = 0\nC = 0\ncounta = 0\nd, prea, b = map(int,Q2[0].split()) \nfor q in Q2:\n if q[0] == \'1\':\n# input\n d, ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s060079639', 's436052657', 's864365946'] | [27300.0, 35668.0, 35820.0] | [2105.0, 814.0, 765.0] | [784, 1115, 986] |
p03040 | u102461423 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['\n\n\nimport sys\ninput = sys.stdin.readline\nimport heapq\n\nQ = int(input())\n\n\nL = [] \nR = []\nL_size = 0\nR_size = 0\nmin_value = 0\nmin_x = 0\n\nINF = 10**18\nL_max = -INF\nR_min = INF\n\ndef f1(a,b):\n global min_value,L_max,R_min,min_x,L_size,R_size\n min_value += b\n if a < L_max:\n heapq.heappush(L,... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s276970337', 's423517826', 's639057164', 's678703164', 's892664818', 's179424057'] | [11160.0, 11084.0, 11152.0, 11120.0, 11084.0, 28080.0] | [2104.0, 994.0, 2104.0, 2104.0, 957.0, 596.0] | [1893, 1003, 1788, 1827, 1000, 938] |
p03040 | u159335277 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ["import heapq\n\nq = int(input())\n\nminheap = [] # right\nmaxheap = [] # left\nheapq.heapify(minheap)\nheapq.heapify(maxheap)\n\ns = 0\nm = 0\n\nfor _ in range(0, q):\n token = input().split()\n if len(token) > 1:\n a = int(token[1])\n b = int(token[2])\n print(a, b)\n s += b\n ... | ['Wrong Answer', 'Accepted'] | ['s149916023', 's595731490'] | [23748.0, 19012.0] | [1980.0, 1461.0] | [665, 645] |
p03040 | u197300773 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['import bisect\n\nQ=int(input())\n\nb=0\na=[]\nmin=0\ntmp=0\nfor i in range(Q):\n que=list(map(int,input().split()))\n if que[0]==1:\n b+=que[2]\n a.insert( bisect.bisect_left(a,que[1]), que[1] )\n p= bisect.bisect_left(a,tmp)\n q= bisect.bisect_right(a,tmp)\n\n\n if p>len(a)-... | ['Wrong Answer', 'Accepted'] | ['s637576391', 's246512907'] | [7504.0, 11188.0] | [2104.0, 1528.0] | [564, 780] |
p03040 | u227082700 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['\n\nq=int(input())\nqq,aa,bb=map(int,input().split())\nx=aa\na,b=0,bb\nfor i in range(1,q):\n s=input()\n if s=="2":\n print(x,a+b)\n continue\n qq,aa,bb=map(int,s.split())\n a+=abs(x-aa);b+=bb', '\n\nimport statistics\nq=int(input())\nqq,aa,bb=map(int,input().split())\nx=[aa]\na,b=0,bb\nn=aa\nfor i in rang... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s643759665', 's743486621', 's712453546'] | [5620.0, 5900.0, 56768.0] | [1093.0, 2104.0, 996.0] | [369, 453, 649] |
p03040 | u309977459 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ["#!/usr/bin/env python3\nimport heapq\n\n\n# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n Q = int(input())\n sum_b = 0\n sum_al = 0\n sum_ar = 0\n hl = []\n hr = []\n ... | ['Runtime Error', 'Accepted'] | ['s423943769', 's303285449'] | [134516.0, 11092.0] | [1349.0, 1390.0] | [1837, 1840] |
p03040 | u315485238 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['Q = int(input())\nQueries = [list(map(int, input().split())) for _ in range(Q)]\n\nimport heapq as hp\nL = [-(-(10**9+1))] \nR = [10**9+1] \nhp.heapify(L)\nhp.heapify(R)\nodd = False\nsum_b = 0\nsum_l = 0\nsum_r = 0\n\nflag = 1\n\nfor q in Queries:\n if len(q)==1 and q[0]==2:\n if flag ==0:\n print(*(-L[0], ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s314829857', 's943097556', 's367196127'] | [56768.0, 3064.0, 56692.0] | [1253.0, 19.0, 1230.0] | [919, 893, 841] |
p03040 | u316386814 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['import sys\nsys.setrecursionlimit(10**7)\nINF = 10 ** 18\nMOD = 10 ** 9 + 7\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\ndef LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]\ndef LF(): return [float(x) for x in sys.stdin.readline().split()]\ndef LS(): return sys.stdin.readline().s... | ['Wrong Answer', 'Accepted'] | ['s400483106', 's188539759'] | [41796.0, 47420.0] | [2105.0, 608.0] | [822, 1520] |
p03040 | u319818856 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['def absolute_minima(Q: int, queries: list)->list:\n L, R = [], []\n sL, sR = 0, 0\n M = None\n B = 0\n N = 0\n\n res = []\n\n for query in queries:\n if query[0] == 1:\n _, a, b = query\n N += 1\n B += b\n\n if M == None:\n M = a\n... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s503035020', 's656818913', 's104927870'] | [37628.0, 3064.0, 11128.0] | [2106.0, 18.0, 1692.0] | [1200, 1062, 1444] |
p03040 | u327466606 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ["\nimport heapq as hq\n\nQ = int(input())\n\n\n\nlow = []\nhigh = []\n\n_,mid,val = map(int,input().split())\n\nfor _ in range(Q-1):\n s = input()\n if s[0] == '1':\n _,a,b = map(int,s.split())\n if mid is None:\n if a < -low[0]:\n mid = -hq.heapreplace(low, -a)\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s616915936', 's887085155', 's560235538'] | [11156.0, 11108.0, 11044.0] | [1291.0, 1258.0, 1270.0] | [671, 670, 671] |
p03040 | u353797797 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['import heapq\n\nq=int(input())\na=[]\nheapq.heapify(a)\nsum_b=0\nfor _ in range(q):\n qi=list(map(int,input().split()))\n if qi[0]==1:\n heapq.heappush(a,qi[1])\n sum_b+=qi[2]\n else:\n m=a[len(a)//2]\n print(m,sum_b+sum(abs(x-m) for x in a))\n', 'from heapq import *\nimport sys\n... | ['Wrong Answer', 'Accepted'] | ['s064901526', 's050665515'] | [11104.0, 19068.0] | [2104.0, 1429.0] | [267, 1190] |
p03040 | u367130284 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['n=int(input())\ny=[]\nx=0\nfor i in range(n):\n I=input()\n if I[0]==str(1):\n a,b,c=map(int,I.split())\n x=(x+b)/2\n y.append(c)\n else:\n x=int(x)\n if len(y)>1:\n print(int(x),sum(abs(i-x) for i in y[:-1])-c)\n else:\n print(b,y[0])\n ... | ['Wrong Answer', 'Accepted'] | ['s929060972', 's275776795'] | [12576.0, 11148.0] | [2104.0, 1418.0] | [303, 886] |
p03040 | u456353530 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['import heapq\n\nQ = int(input())\nq = [list(map(int, input().split())) for _ in range(Q)]\n\n\nql = []\nqr = []\n\npush = heapq.heappush\npop = heapq.heappop\n\npush(qr, 10000000000)\npush(ql, -10000000000)\na = 0\nm = q[0][1]\nb = q[0][2]\nl = q[0][1]\nr = q[0][1]\nfor i in q[1:]:\n if i[0] == 1:\n b += i[2]\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s587556047', 's864834044', 's813540898'] | [58344.0, 58280.0, 56724.0] | [1072.0, 1069.0, 1125.0] | [689, 684, 968] |
p03040 | u532827876 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['#!/usr/bin/python\n# -*- coding: utf-8 -*-\nimport sys\nimport math\nimport collections\n\nclass Node(object):\n def __init__(self, value):\n self.value = value\n self.left = None\n self.right: Node = None\n self.parent: Node = None\n self.isright = False\n\n def add_node(self... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s174269063', 's270762253', 's949093562', 's139707041'] | [2940.0, 2940.0, 52076.0, 69664.0] | [17.0, 17.0, 498.0, 901.0] | [2982, 2936, 3161, 1045] |
p03040 | u657913472 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ["from heapq import*\nL,R=[]*2\nB=t=0\nQ,*E=open(0)\nfor e in E:\n\tif' 'in e:_,a,b=map(int,e.split());t=1-t;a*=2*t-1;c=heappushpop([L,R][t],a);heappush([R,L][t],-c);B+=b+a-c-c\n\telse:print(-L[0],B-L[0]*t)", "from heapq import*\nL,R=[],[]\nB=t=0\nQ,*E=open(0)\nfor e in E:\n\tif' 'in e:_,a,b=map(int,e.split());t^=1;a*=... | ['Runtime Error', 'Accepted'] | ['s563849462', 's836628975'] | [3064.0, 28652.0] | [17.0, 522.0] | [196, 196] |
p03040 | u677267454 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['# -*- coding: utf-8 -*-\nfrom heapq import heappush, heappop\n\nqn = int(input())\n\nlow = []\nhigh = []\nans = 0\nnum = 0\n\nfor i in range(qn):\n q = [int(i) for i in input().split()]\n if q[0] == 1:\n ans += q[2]\n a = q[1]\n \n heappush(low, -a)\n heappush(high, a)\n ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s347983566', 's599020726', 's610424106', 's653358133', 's700382036', 's320680463'] | [19048.0, 26688.0, 3188.0, 19032.0, 19048.0, 19048.0] | [1704.0, 1558.0, 18.0, 1636.0, 1662.0, 1553.0] | [673, 663, 729, 662, 602, 644] |
p03040 | u824237520 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['from heapq import heappop, heappush, heappushpop\n\nn = int(input())\nq = [tuple(int(x) for x in input().split()) for _ in range(n)]\n\nL = []\nR = []\na = 1\nb = q[0][2]\n\nheappush(L, -q[0][1])\n\nfor i in range(1, n):\n temp = q[i]\n if temp[0] == 1:\n a += 1\n if a % 2 == 0:\n p = h... | ['Wrong Answer', 'Accepted'] | ['s930868618', 's294794079'] | [39620.0, 39732.0] | [939.0, 1002.0] | [553, 688] |
p03040 | u871980676 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['import numpy as np\nimport heapq\nQ = int(input())\nQlist = [list(map(int,input().split())) for i in range(Q)]\n#print(Qlist)\ncoef_list = []\nintercept = [0]\nleft_list = []\ncent_list = []\nright_list = []\nleft_sum = [0]\nright_sum = [0]\n\nmedian = [0]\ncount = [0,0]\n\ndef update_func(query):\n source = query... | ['Runtime Error', 'Accepted'] | ['s269143301', 's099907678'] | [60704.0, 66052.0] | [856.0, 1846.0] | [2079, 1809] |
p03040 | u969190727 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['import bisect\nimport sys\ninput = sys.stdin.readline\nq=int(input())\nA=[]\nb=0\ndef f(A,b,n):\n res=0\n if n%2==0:\n return sum(A[n+1:])-sum(A[:n])+b\n else:\n return sum(A[n:])-sum(A[:n])+b\nfor _ in range(q):\n L=[int(i) for i in input().split()]\n if L[0]==1:\n n=bisect.bisect_left(A,L[1])\n A.i... | ['Wrong Answer', 'Accepted'] | ['s914643754', 's709037608'] | [6060.0, 11140.0] | [2104.0, 1661.0] | [380, 925] |
p03040 | u970348538 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['import numpy as np\n\nnum_q = int(input())\nx = 0\nf = 0\na = []\nc = False\nb = 0\n\nfor b in range(num_q):\n q = input()\n if q[0] == \'2\':\n print(x, f)\n else:\n _, n, m = map(int, q.split(" "))\n a.append(n)\n a.sort()\n x_tmp = a[b//2]\n if c:\n f += m + np.abs(x - n)\n else:\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s809082950', 's943564370', 's605382003'] | [14772.0, 14520.0, 11092.0] | [2108.0, 2108.0, 1283.0] | [360, 347, 767] |
p03040 | u979823197 | 2,000 | 1,048,576 | There is a function f(x), which is initially a constant function f(x) = 0. We will ask you to process Q queries in order. There are two kinds of queries, update queries and evaluation queries, as follows: * An update query `1 a b`: Given two integers a and b, let g(x) = f(x) + |x - a| + b and replace f(x) with g(x)... | ['Q=int(input())\nq,a,b,fx,x=[],[],0,0,0\nfor i in range(Q):\n q.append(list(map(int,input().split())))\n if q[i][0]==2:\n fx+=b\n print(x,fx)\n else:\n a.append(q[i][1])\n b+=q[i][2]\n n=len(a)\n na=a[-1]\n if n%2==0:\n r=a[n//2-1]\n a.sort()\n if na<r:\n x=a[n//2-1]\n ... | ['Wrong Answer', 'Accepted'] | ['s020775220', 's727995632'] | [10732.0, 19328.0] | [2104.0, 1691.0] | [612, 461] |
p03041 | u003501233 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k=map(int,input().split())\ns=input()\ns[k-1]=s[k-1].lower()\nprint(s)\n', 'n,k=map(int,input().split())\ns=list(input())\ns[k-1]=s[k-1].lower()\nprint(s)\n', 'n,k=map(int,input().split())\ns=input()\ns[k-1]=s[k-1].lower()\nprint("".join(s))\n', 'n,k=map(int,input().split())\ns=list(input())\ns[k-1]=s[k-1].lower()\... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s217505024', 's573297879', 's903442360', 's387925382'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [70, 76, 79, 85] |
p03041 | u007299532 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n, k = map(int, input().split())\nS = str(input())\nprint(S[k-1].lower())', 'n, k = map(int, input().split())\nS = str(input())\nprint(S[:k-1] + S[k-1].lower() + S[k:])'] | ['Wrong Answer', 'Accepted'] | ['s335770281', 's332399854'] | [2940.0, 2940.0] | [17.0, 17.0] | [71, 89] |
p03041 | u010069411 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N, K =map(int, input().split())\nS = input()\nS=list(S)\nS[K] = S[K].lower()\nprint("".join(S))\n', 'N, K =map(int, input().split())\nS = input()\nS=list(S)\nS[K-1] = S[K-1].lower()\nprint("".join(S))\n'] | ['Runtime Error', 'Accepted'] | ['s814269409', 's260268711'] | [2940.0, 2940.0] | [17.0, 17.0] | [92, 96] |
p03041 | u020798319 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N,K=map(int,input().split())\nS = input()\n \nS = list(s)\nS[K - 1] = s[K - 1].lower()\nS = "".join(S)\nprint(S)\n', 'S = int(input())\na = S % 100\nb = (S- (S % 100))/100\nif b <= 12 and a<=12 and a!=0 and b!= 0:\n print("AMBIGUOUS")\nelif b <= 12 and a!=0 :\n print("MMYY")\nelif a<=12 and a!=0 :\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s350474548', 's996792055', 's673656304'] | [9016.0, 9056.0, 9120.0] | [19.0, 25.0, 25.0] | [107, 235, 104] |
p03041 | u023229441 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['a,b=map(int,input().split())\ns=input()\nprint(s.replace(s[b-1],lower(s[b-1])))', 'a,s=map(int,input().split())\nk=input()\nlk=list(k)\nl=lk[s-1]\nlk[s-1]=l.lower()\nprint(str(lk))', 'a,s=map(int,input().split())\nk=input()\nlk=list(k)\nl=lk[s-1]\nlk[s-1]=l.lower()\nprint("".join(lk))\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s657615997', 's701946154', 's001197730'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [77, 92, 97] |
p03041 | u024609780 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['word_S = input().split(" ")[-1]\nS = list(word_S)\nchange_K = int(input())\nword1 = ""\nfor i in range(change_K - 1):\n word1 = word1 + S[i]\nword2 = S[change_K - 1]\nword3 = ""\ncount = 0\nwhile True:\n try:\n word3 = word3 + S[change_K + count]\n count += 1\n except IndexError:\n break... | ['Runtime Error', 'Accepted'] | ['s341287507', 's280418651'] | [9036.0, 9156.0] | [23.0, 30.0] | [355, 365] |
p03041 | u027002244 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k=input().split()\ns=[]\ns=list(input())\nk=int(k)\n\ns[k-1]=s[k-1].lower()\nprint(s)\nans="".join(s)\nprint(ans)', 'n,k=input().split()\ns=[]\ns=list(input())\nk=int(k)\n\ns[k-1]=s[k-1].lower()\n\nans="".join(s)\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s950353788', 's997574453'] | [3060.0, 3060.0] | [17.0, 17.0] | [107, 99] |
p03041 | u027675217 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['s=input()\ns1=int(s[0]+s[1])\ns2=int(s[2]+s[3])\nif 1 <= s1 <= 12 and 1 <= s2 <= 12:\n print("AMBIGUOUS")\nelif 1 <= s1 <= 12:\n print("MMYY")\nelif 1 <= s2 <= 12:\n print("YYMM")\nelse:\n print("NA")', 'N,K = map(int, input().split())\nS = input()\nS_list =list(S)\nl ={"A":"a","B":"b","C":"c"}\nans=S_lis... | ['Runtime Error', 'Accepted'] | ['s900714164', 's603093056'] | [3060.0, 2940.0] | [18.0, 17.0] | [202, 147] |
p03041 | u028217518 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n, k = map(int, read().split())\ns = read()\nk -= 1\ns= s[:k] + str.lower(s[k]) + s[k+1:]\nprint(s)', 'read = input\nn, k = map(int, read().split())\ns = read()\nk -= 1\ns= s[:k] + str.lower(s[k]) + s[k+1:]\nprint(s)'] | ['Runtime Error', 'Accepted'] | ['s069345476', 's276696139'] | [2940.0, 2940.0] | [17.0, 17.0] | [95, 108] |
p03041 | u028413707 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['\n\n\nn, k = map(int, input().split())\ns = input()\n\n# dic = {"A":"a", "B":"b", "C":"c"}\n\n\n# s[k-1]\n\n\n\nprint(s[:k-1] + s[k-i].lower() + s[k:])\n\n\n', ' n, k = map(int, input().split())\n s = input()\n\n \n print(s[:k-1] + s[k-1].lower() + s[k:])\n', '\n\n\nn, k = map(int, input().split())\ns = i... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s011433950', 's088447373', 's173443691', 's204985369', 's212985513', 's214478850', 's223460166', 's336456349', 's504259264', 's511415545', 's530641243', 's617955474', 's650524982', 's842525877', 's711837299'] | [3060.0, 2940.0, 3060.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 3316.0, 2940.0, 3060.0, 2940.0] | [22.0, 17.0, 17.0, 17.0, 20.0, 17.0, 17.0, 17.0, 18.0, 19.0, 17.0, 22.0, 18.0, 17.0, 17.0] | [473, 155, 473, 516, 372, 433, 518, 473, 473, 517, 517, 431, 519, 374, 473] |
p03041 | u031132940 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int, input().split())\ns = list(input())\n\ns[k] = s[k-1].lower()\n\nprint("".join(s))', 'n,k = map(int, input().split())\ns = list(input())\n\ns[k-1] = s[k-1].lower()\n\nprint("".join(s))'] | ['Runtime Error', 'Accepted'] | ['s979629474', 's380920677'] | [2940.0, 2940.0] | [17.0, 17.0] | [91, 93] |
p03041 | u031441134 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ["#YYMM or MMYY or AMBIGUOUS or NA\n\ninputLine = input()\n\nfirstPart = int(inputLine[0:2])\nsecondPart = int(inputLine[2:4])\n\n\nnaFlag = False\nfirstPartYear = False\nfirstPartAmb = False\nsecondPartYear = False\nsecondPartAmb = False\n\n\nif firstPart < 0:\n naFlag = True\n\nelif firstPart == 0:\n firstPartY... | ['Wrong Answer', 'Accepted'] | ['s732214752', 's040696164'] | [3064.0, 3060.0] | [17.0, 17.0] | [905, 301] |
p03041 | u033602950 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['import sys\n\nstdin = sys.stdin\n\nni = lambda: int(ns()) #int\nna = lambda: list(map(int, stdin.readline().split())) #int,list\nns = lambda: stdin.readline().rstrip() # str\n\nn,k = na()\ns=ns()\nprint(s.replace(s[k+1],s[k+1].lower()))', 'import sys\n\nstdin = sys.stdin\n\nni = lambda: int(ns()) #int\nna = lambda: ... | ['Runtime Error', 'Accepted'] | ['s234964454', 's070068682'] | [3060.0, 3060.0] | [17.0, 17.0] | [227, 223] |
p03041 | u039189422 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['s=input()\na=int(s[:2])\nb=int(s[2:])\nif 1<=a<=12 and 1<=b<=12:\n\tprint("AMBIGUOUS")\nelif 1<=a<=12 and (12<b or b==0):\n\tprint("MMYY")\nelif (12<a or a==0) and 1<=b<=12:\n\tprint("YYMM")\nelse:\n\tprint("NA")', 'n,k=map(int,input().split())\ns=input()\nprint(s[:k-1]+s[k-1].lower()+s[k:])'] | ['Wrong Answer', 'Accepted'] | ['s560538760', 's586572453'] | [3064.0, 2940.0] | [18.0, 17.0] | [198, 74] |
p03041 | u039623862 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ["n, k = map(int, input().split())\ns = input()\nupper = {\n 'A': 'a',\n 'B': 'b',\n 'C': 'c',\n}\nprint(s[:k] + upper[s[k]] + s[k+1:])", "n, k = map(int, input().split())\ns = input()\nupper = {\n 'A': 'a',\n 'B': 'b',\n 'C': 'c',\n}\nprint(s[:k-1] + upper[s[k-1]] + s[k:])"] | ['Runtime Error', 'Accepted'] | ['s066683854', 's414798746'] | [3060.0, 3060.0] | [17.0, 17.0] | [135, 137] |
p03041 | u042385277 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ["N, K=map(int, input().split())\nS= input()\nT=''\nfor i in range (K):\n if i ==K-1:\n T += S[i].lower()\n else:\n T += S[i]\nprint(T)", 'N, K = map(int, input().split())\nS = input()\nS[K - 1] = S[k - 1].lower()\nprint(S)', "N, K=map(int, input().split())\nS= input()\nT=''\nfor i in range (N):\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s042067617', 's851322396', 's686477101'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [145, 81, 145] |
p03041 | u044964932 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['\ndef main():\n N, K = map(int, [int(x) for x in input().split()])\n S = input()\n\n ans = ""\n for i, n in enumerate(S):\n if i == K-1:\n n = n.lower()\n ans += n\n\n return ans\n\n\nif __name__ == "__main__":\n main()\n', '\ndef main():\n N, K = map(int, [int(x) for x i... | ['Wrong Answer', 'Accepted'] | ['s621507460', 's110939197'] | [2940.0, 2940.0] | [18.0, 17.0] | [248, 262] |
p03041 | u045408189 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k=map(int,input().split())\ns=input()\nprint(s[k-1].lower())', 'n,k=map(int,input().split())\ns=input()\nprint(s[:(k-1)]+s[k-1].lower()+s[k:])\n'] | ['Wrong Answer', 'Accepted'] | ['s207195161', 's642780868'] | [2940.0, 2940.0] | [17.0, 17.0] | [60, 77] |
p03041 | u045953894 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int,input().split())\ns = input()\n\ns.replace(s[k-1],s[k-1].lower())\nprint(s)', 'n,k = map(int,input().split())\ns = input()\n\ns.replace(s[k-1],s[k-1].lower())', 'n,k = map(int,input().split())\ns = input()\n\ns0 = s[k-1].lower()\n\nprint(s[:k-1]+s0+s[k:])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s153834893', 's807146692', 's225326744'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [85, 76, 88] |
p03041 | u047023156 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ["n = input()\n\nn1 = int(n[:2])\nn2 = int(n[2:])\n\ndef date(n1, n2):\n if n1 >= 13 and n2 == 0:\n return 'NA'\n if n1 <= 12 and n2 == 0:\n return 'MMYY'\n if n1 >= 13 and n2 >= 13:\n return 'NA'\n if n1 >= 13 and n2 <= 12:\n return 'YYMM'\n if n1 <= 12 and n2 >= 13:\n ... | ['Wrong Answer', 'Accepted'] | ['s710970457', 's148616777'] | [3064.0, 2940.0] | [17.0, 18.0] | [396, 98] |
p03041 | u054274920 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['A,B=map(int,input().split())\nC=input()\nprint(C[:B]+C[B].lower()+C[B+1:])', 'A,B=map(int,input().split())\nC=input()\nprint(C[:B-1]+C[B-1].lower()+C[B:])'] | ['Runtime Error', 'Accepted'] | ['s298900917', 's949574402'] | [2940.0, 3060.0] | [17.0, 18.0] | [72, 74] |
p03041 | u059210959 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | [' # encoding:utf-8\n import copy\n import random\n import bisect \n import fractions \n import math\n \n mod = 10**9+7\n \n N,K = map(int,input().split())\n S = str(input())\n \n replace = S[K-1]\n replace = replace.lower()\n \n print(S[:K-1]+replace+S[K:])', '# enco... | ['Runtime Error', 'Accepted'] | ['s338322940', 's872342237'] | [2940.0, 7876.0] | [17.0, 75.0] | [390, 323] |
p03041 | u063346608 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N,K = map(int,input().split())\nS = input()\nSL = list(S)\n\nSL[K] = SL[K].lower()\nanswer = "".join(SL)\nprint(answer)', 'N,K = map(int,input().split())\nS = input()\nSL = list(S)\n\nSL[K] = SL[K].lower()\nanswer = "".join(SL)\nprint(answer)', 'N,K = map(int,input().split())\nS = input()\nSL = list(S)\n \nSL[K - ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s632832515', 's951072422', 's689415157'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0] | [114, 114, 123] |
p03041 | u065446124 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k=map(int,input().split())\ns=input()\nk+=1\ns=s[:k]+s[k].lower()+s[k+1:]\nprint(s)', 'n,k=map(int,input().split())\ns=input()\nk-=1\ns=s[:k]+s[k].lower()+s[k+1:]\nprint(s)'] | ['Runtime Error', 'Accepted'] | ['s033900649', 's086090929'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 81] |
p03041 | u066455063 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['S = input()\n\nif S[0:2] == "00" or S[2:4] == "00":\n print("NA")\n \nelif S[2:4] > "12" and S[0:2] > "12":\n print("NA")\n \nelif S[0:2] > "12" and S[2:4] <= "12":\n print("YYMM")\n \nelif S[2:4] > "12":\n print("MMYY")\n \nelif S[0:2] < "12":\n print("AMBIGUOUS")\n \nelif S[0:2] == "1... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s044646627', 's142315299', 's771423214'] | [3064.0, 3064.0, 2940.0] | [17.0, 17.0, 17.0] | [356, 420, 103] |
p03041 | u068142202 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n , k = map(int, input().split())\ns = list(input())\nfor i in range(n):\n if (i - 1) == k:\n \ts[i] = s[i].lower()\nprint("".join(s))', 'n , k = map(int, input().split())\ns = list(input())\nfor i in range(n):\n if i == k:\n \ts[i] = s[i].lower\nprint("".join(s))', 'n , k = map(int, input().split())\ns = list(in... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s189615802', 's713328705', 's417044578'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [130, 122, 130] |
p03041 | u068862866 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N,K = map(int,input().split())\nS = input()\n\nS[K-1]=S[k-1].lower()\nprint(S)', 'N,K = map(int,input().split())\nS = list(input())\n \nS[K-1]=S[K-1].lower()\nprint("".join(S))'] | ['Runtime Error', 'Accepted'] | ['s764159467', 's355452947'] | [9064.0, 9160.0] | [22.0, 24.0] | [74, 90] |
p03041 | u072606168 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int, input().split())\nw = {"A":"a", "B":"b", "C":"c"}\ns = input().split()\nprint([i if i != k-1 else w[s[i]] for i in len(s)])', 'n,k = map(int, input().split())\nw = {"A":"a", "B":"b", "C":"c"}\ns = list(input())\nprint(\'\'.join([w[s[i]] if i == k-1 else s[i] for i in range(n)]))'] | ['Runtime Error', 'Accepted'] | ['s742833345', 's150020484'] | [2940.0, 3060.0] | [17.0, 17.0] | [135, 147] |
p03041 | u072717685 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N, K = map(int,input().split())\nS = input()\n\nr = S[:K]\nr = r + S[K].lower()\nr = r + S[K+1:]\n\nprint(r)', 'N, K = map(int,input().split())\nS = input()\nK = K - 1\nr = S[:K]\nr = r + S[K].lower()\nr = r + S[K+1:]\n \nprint(r)'] | ['Runtime Error', 'Accepted'] | ['s123109318', 's852841297'] | [2940.0, 2940.0] | [17.0, 17.0] | [101, 111] |
p03041 | u073549161 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['import math\nn,k = map(int, input().split())\nres = float(0)\nfor i in range(1, n+1):\n res += float(1/n) * pow(1/2, math.ceil(math.log2(k) - math.log2(i)))\nprint(res)\n', 'n,k = map(int, input().split())\ns = input()\nss = s[k-1]\nss.lower()\nprint(s[0:k-1] + ss.lower() + s[k:])'] | ['Wrong Answer', 'Accepted'] | ['s831038495', 's037898096'] | [2940.0, 2940.0] | [18.0, 17.0] | [167, 103] |
p03041 | u073711480 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['# -*- coding:utf-8 -*-\n\nn, k = map(int,input().split())\ns = list(input())\n\nfor i in range(n):\n if i == k:\n print(s[i].lower(), end="")\n else:\n print(s[i], end="")\nprint("")', '#!/bin/usr/python3\n# -*- coding: utf-8 -*-\n\nN, K = map(int, input().split())\nS = list(input())\n\nS[K] = S[K... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s201320816', 's916806083', 's731972799'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [192, 147, 151] |
p03041 | u074338678 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n, k = map(int, input().split())\ns = input()\n\nprint(s.replace(s[k-1], s[k-1].upper()))\n', 'n, k = map(int, input().split())\ns = input()\n\nprint(s.replace(s[k], s[k].lower()))\n', 'n, k = map(int, input().split())\ns = input()\n\ns[k-1] = s[k-1].lower()\n\nprint("".join(s))', 'n, k = map(int, input().split())\ns... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s221090769', 's394095252', 's394636268', 's958382167', 's655578334'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0, 17.0] | [87, 83, 88, 87, 93] |
p03041 | u076996519 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int, input().split())\ns = input()\ns[k-1].lower()\nprint(s)', "n,k = map(int, input().split())\ns = list(input())\ns[k-1] = s[k-1].lower()\nprint(''.join(s))"] | ['Wrong Answer', 'Accepted'] | ['s539688967', 's815243736'] | [2940.0, 2940.0] | [17.0, 17.0] | [67, 91] |
p03041 | u080701769 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['S = input()\nX = int(S[0:2])\nY = int(S[2:4])\n\nif X > 12 and Y > 12:\n print("NA")\nelif X == 0 or Y == 0:\n if X == 0:\n if Y > 12:\n print("NA")\n else:\n print("YYMM")\n else:\n if X > 12:\n print("NA")\n else:\n print("MMYY")\nelif... | ['Wrong Answer', 'Accepted'] | ['s855790662', 's745404844'] | [3060.0, 2940.0] | [17.0, 20.0] | [398, 159] |
p03041 | u081029414 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['\n\nimport os\nimport sys\n\nN, K = map(lambda x: int(x), input().split(" "))\nS = input()\n\nS = S[0:K] + S[K].lower() + S[K+1:len(S)]\n\nprint(S)\n\n\n', '\n\nimport os\nimport sys\n\nN, K = map(lambda x: int(x), input().split(" "))\nS = input()\n\nS = S[0:K] + S[K].lower() + S[K+1:len(S)]\n\nprint(S)\n\n\n', '\n\n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s502881221', 's525188322', 's474673752'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [158, 158, 160] |
p03041 | u082861480 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int. input().split())\ns = input()\n\nchange = s[k-1].lower()\nprint(s[:k] + change + s[k+1:])\n', "n,k = map(int,input().split())\ns = list(input())\ns[k-1] = s[k-1].lower()\nprint(''.join(s))"] | ['Runtime Error', 'Accepted'] | ['s644824613', 's042528803'] | [2940.0, 2940.0] | [17.0, 17.0] | [101, 90] |
p03041 | u084331669 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N, K = map(int, input().split())\nS = input()\nS[K-1] += 32\nprint(S)', 'N, K = list(map(int, input().split()))\nS = input()\nprint(S[:K-1]+S[K-1].lower()+S[K:])'] | ['Runtime Error', 'Accepted'] | ['s988163727', 's970536875'] | [2940.0, 2940.0] | [17.0, 17.0] | [66, 86] |
p03041 | u087356957 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['def main():\n S = input()\n first = int(S[0:2])\n last = int(S[2:4])\n\n if(first>12 and last<=12):\n print("YYMM")\n elif(last>12 and first<=12):\n print("MMYY")\n elif(last<=12 and first<=12):\n print("AMBIGUOUS")\n else:\n print("NA")\n \n return\nmain()\n', '... | ['Wrong Answer', 'Accepted'] | ['s543689768', 's429207570'] | [2940.0, 2940.0] | [17.0, 17.0] | [298, 222] |
p03041 | u088020258 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N,K=map(int,input().split())\nS=input()\nnew_S= S.lower(K)\nprint(new_S)', 'N,K = list(map(int,input().split()))\nS = input()\nprint(S[:K-1]+S[K-1].lower()+S[K:])\n'] | ['Runtime Error', 'Accepted'] | ['s582005401', 's265784723'] | [2940.0, 2940.0] | [17.0, 17.0] | [69, 85] |
p03041 | u089644470 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N,K = map(int,input().split())\nS = list(map(int,input().split()))\n\ns = S(K)\ns_large = s.upper()\n\nS = [s_large if s=S(K) else 0 for s in S]', "N,K = map(int,input().split())\nS = list(input())\n\n#print(N,K,S)\n\ns = S[K-1]\n#print(s)\ns_large = s.lower()\n#print(s_large)\n\nS[K-1] = s_large\nprint(''.join(S))"] | ['Runtime Error', 'Accepted'] | ['s035074160', 's058415241'] | [2940.0, 2940.0] | [17.0, 17.0] | [138, 157] |
p03041 | u089711240 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N, K = map(int, input().split())\nS = str(input())\n\nif S[N-1]=="A":\n after="a"\nelif S[N-1]=="B":\n after="b"\nelse:\n after="c"\nstr_changed = S[:K-1] + after + S[K:]\nprint(str_changed)', 'N, K = map(int, input().split())\nS = str(input())\n\nif S[K-1]=="A":\n after="a"\nelif S[K-1]=="B":\n after=... | ['Wrong Answer', 'Accepted'] | ['s120376981', 's308338814'] | [3060.0, 3060.0] | [17.0, 17.0] | [189, 189] |
p03041 | u092646083 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N, K = map(int, input().split())\nS = input()\ns = S[K - 1]\nS = list(S)\nS[K - 1] = str.lower(s)\nS = str(S)\n\nprint(S)', 'N, K = map(int, input().split())\nS = input()\ns = S[K - 1]\nS = list(S)\nS[K - 1] = str.lower(s)\nS = "".join(S)\n \nprint(S)'] | ['Wrong Answer', 'Accepted'] | ['s733290830', 's153843782'] | [2940.0, 2940.0] | [17.0, 17.0] | [114, 119] |
p03041 | u092906792 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['x = input()\n\na, b = x.split()\na = list(a)\nb = int(b)\n\na[b] = a[b].lower()\n\nprint("".join(a))\n\n', 'x = input()\ns = input()\n\nn, k = x.split()\nk = int(k)\ns = list(s)\n\ns[k-1] = s[k-1].lower()\n\nprint("".join(s))'] | ['Runtime Error', 'Accepted'] | ['s999053907', 's252301657'] | [2940.0, 3060.0] | [17.0, 18.0] | [94, 108] |
p03041 | u093562214 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ["n, m = input().split()\nN = int(n)\nK = int(m)\n\nS = input()\n\nstring = list(S)\n\nstring[K+1] = string[K+1].lower()\n\nprint(''.join(string))\n", "n, m = input().split()\nN = int(n)\nK = int(m)\n\nS = input()\n\nstring = list(S)\n\nstring[K-1] = string[K-1].lower()\n\nprint(''.join(string))\n"] | ['Runtime Error', 'Accepted'] | ['s765887283', 's385381315'] | [2940.0, 2940.0] | [18.0, 17.0] | [135, 135] |
p03041 | u094191970 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k=map(int,input().split())\ns=input()\nprint(s[:k]+s[k].lower()+s[k+1:])', 'n,k=map(int,input().split())\ns=input()\nprint(s[:k-1]+s[k-1].lower()+s[k:])'] | ['Runtime Error', 'Accepted'] | ['s257149959', 's032410807'] | [2940.0, 2940.0] | [18.0, 17.0] | [72, 74] |
p03041 | u096294926 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['a, b = list(map(int,input().split()))\nS = list(str(input()))\nS[a+1] = str.lower(S[a+1])\nS = "".join(map(str,S))\nprint(S)', 'a, b = list(map(int,input().split()))\nS = list(str(input()))\nS[a-1] = str.lower(S[a-1])\nS = "".join(map(str,S))\nprint(S)', 'a, b = list(map(int,input().split()))\nS = list(str(input()))\... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s454243582', 's804735530', 's505864391'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [120, 120, 120] |
p03041 | u100800700 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N,K=map(int,input().split())\nS=list(input())\nS=S[0:K-1].append(S[K-1].lower)+S[K-1:]', 'N,K=map(int,input().split())\nS=input()\nprint(S[0:K-1]+S[K-1].lower()+S[K:])'] | ['Runtime Error', 'Accepted'] | ['s399444898', 's650334025'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 75] |
p03041 | u101151851 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n, k = map(int, input().split())\ns = list(input())\ns[k] = s[k].lower()\nprint("".join(s))\n', 'n, k = map(int, input().split())\ns = list(input())\ns[k-1] = s[k-1].lower()\nprint("".join(s))\n'] | ['Runtime Error', 'Accepted'] | ['s371209646', 's177106820'] | [3060.0, 2940.0] | [19.0, 17.0] | [89, 93] |
p03041 | u102275718 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int, input().split())\ns = input()\n\ns_temp = s.swapcase()\n\nans = s[:k]+s_temp[k]+s[k+1:]\n\nprint(ans)', '\nn,k = map(int, input().split())\ns = input()\n\ns_temp = s.swapcase()\n\nans = s[:k-1]+s_temp[k-1]+s[k:]\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s056458521', 's604962702'] | [2940.0, 2940.0] | [17.0, 17.0] | [109, 112] |
p03041 | u103305058 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int,input().split())\ns = input()\ns[k-1] = s[k-1].lower()\nprint(s)', 'n,k = map(int,input().split())\ns = input()\ns[k-1] = s[k-1].lower()\nprint(s)', 'n,k = map(int,input().split())\ns input()\ns[k-1] = s[k-1].lower()\nprint(s)', 'n,k = map(int,input().split())\ns = input()\nprint(s[:k -1] + s[k -1].lowe... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s227431136', 's342184357', 's417033568', 's909865632', 's780031207'] | [2940.0, 2940.0, 2940.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [75, 75, 73, 84, 84] |
p03041 | u103902792 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int,input().split())\ns = input()\nprint(s[:k] +chr(ord(s[k])+32)+ s[k+1:])', 'n,k = map(int,input().split())\ns = input()\nprint(s[:k-1] +chr(ord(s[k-1])+32)+ s[k:])'] | ['Runtime Error', 'Accepted'] | ['s442419491', 's294227696'] | [3064.0, 2940.0] | [19.0, 17.0] | [84, 86] |
p03041 | u104442591 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n, k = map(int, input().split())\ns = input()\nprint([s[i].lower() if i == k else s[i] for i in range(n)]', 'n, k = map(int, input().split())\ns = input()\nprint("".join([s[i].lower() if i == k else s[i] for i in range(n)]))', 'n, k = map(int, input().split())\ns = input()\nprint("".join([s[i].lower() if i == k-1 els... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s355525578', 's608042010', 's884221439'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [103, 113, 115] |
p03041 | u106103668 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ["s = list(input())\na = int(s[0]+s[1])\nb = int(s[2]+s[3])\nif 0<a<13 and 0<b<13:\n print('AMBIGUOUS')\nelif 0<a<13:\n print('MMYY')\nelif 0<b<13:\n print('YYMM')\nelse:\n print('NA')\n", 'n,k = map(int,input().split())\ns = list(input())\ns[k-1] = s[k-1].lower()\nprint("".join(s))'] | ['Runtime Error', 'Accepted'] | ['s182789133', 's521699409'] | [2940.0, 2940.0] | [17.0, 17.0] | [185, 90] |
p03041 | u106181248 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n, k = map(int,input().split())\ns = input()\n\ns[k-1] = s[k-1].lower()\n\nprint(s)', 'n, k = map(int,input().split())\ns = input()\nprint(s[:k-1] + s.lower()[k-1] + s[k:n])\n'] | ['Runtime Error', 'Accepted'] | ['s361492196', 's825444043'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 85] |
p03041 | u106778233 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k=map(int,input().split())\ns=input()\ns[k-1]=s[k-1].lower\nprint(s)', 'n,k=map(int,input().split())\ns=input()\ns[k-1]=s[k-1].lower()\nprint(s)\n', 'n,k= map(int,input().split())\ns=input()\nprint(s[:k-1] + s.lower()[k-1] + s[k:n])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s391438602', 's419971845', 's700984184'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [67, 70, 81] |
p03041 | u113971909 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N,b=map(int,input().split())\nS=input()\nS[b-1]=S[b-1].lower()\nprint(S)', 'N,b=map(int,input().split())\nS=input()\nS=S[:b-1]+S[b-1].lower()+S[b:]\nprint(S)'] | ['Runtime Error', 'Accepted'] | ['s119289408', 's277346054'] | [3064.0, 2940.0] | [17.0, 17.0] | [69, 78] |
p03041 | u114920558 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ["N, K = map(int, input().split())\nS = input()\nif(S[K-1] == 'A'):\n S[K-1] = 'a'\nelif(S[K-1] == 'B'):\n S[K-1] = 'b'\nelse:\n S[K-1] = 'c'\nprint(S)", "N, K = map(int, input().split())\nS = input()\nif(S[K-1] == 'A'):\n S = S[:(K-1)] + 'a' + S[K:]\nelif(S[K-1] == 'B'):\n S = S[:(K-1)] + 'b' + S[K:]\nelse:\n S ... | ['Runtime Error', 'Accepted'] | ['s358689632', 's566987832'] | [2940.0, 2940.0] | [17.0, 17.0] | [144, 189] |
p03041 | u115110170 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int,input().split())\n\n\nABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"\nabc = "abcdefghijklmnopqrstuvwxyz"\n\ns = input()\n\nans = ""\n\nfor ss in s:\n ans += abc[ABC.find(ss)]\n \nprint(ans)', 'n,k = map(int,input().split())\n\n\nABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"\nabc = "abcdefghijklmnopqrstuvwxyz"\n\ns = list(in... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s466084124', 's988652171', 's908537367'] | [3060.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0] | [180, 167, 176] |
p03041 | u116233709 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k=map(int,input().split())\ns=list(map(str,input().split()))\n\ns[k-1]=s[k-1].lower()\n\nprint(s)\n\n', 'n,k=map(int,input().split())\ns=list(input())\n\ns[k-1]=s[k-1].lower()\n\nprint(s)\n\n', 'n,k=map(int,input().split())\ns=input()\nprint(s[:k-1]+s[k-1].lower()+s[k:])'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s553021242', 's913035695', 's594173081'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [96, 79, 74] |
p03041 | u117348081 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n,k = map(int, input().split())\ns = str(input())\nif s[k-1]=="A":\n s[k-1]="a"\nelif s[k-1]=="B":\n s[k-1]="b"\nelse:\n s[k-1]="c"\nprint(s)', 'n,k = map(int, input().split())\ns = list(input())\nif s[k-1]=="A":\n s[k-1]="a"\nelif s[k-1]=="B":\n s[k-1]="b"\nelse:\n s[k-1]="c"\nprint("".join(s))'] | ['Runtime Error', 'Accepted'] | ['s793426354', 's222634632'] | [2940.0, 3060.0] | [19.0, 17.0] | [142, 152] |
p03041 | u118037378 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['n, k = input().split(" ")\ns=input()\nk = int(k)-1\n\nsk = s[k].lower()\nprint(sk)\ns = s[:k]+sk+s[k+1:]\nprint(s)\n', 'n, k = input().split(" ")\ns=input()\nk = int(k)-1\n\nsk = s[k].lower()\ns = s[:k]+sk+s[k+1:]\nprint(s)\n'] | ['Wrong Answer', 'Accepted'] | ['s291437167', 's691352618'] | [2940.0, 2940.0] | [17.0, 17.0] | [108, 98] |
p03041 | u118346028 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ['N, K = list(map(int, input().split()))\nS = input()\n\nS_L = list(S)\nS_L[K-1] = S_L[K-1].lower()\nprint(S_L)\nprint("".join(S_L))\n', 'N, K = list(map(int, input().split()))\nS = input()\n\nS_L = list(S)\nS_L[K-1] = S_L[K-1].lower\nprint("".join(S_L))\n', 'N, K = list(map(int, input().split()))\nS = input()\n\nS_L =... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s021373182', 's544611066', 's199385722'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [125, 112, 114] |
p03041 | u118518526 | 2,000 | 1,048,576 | You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it. | ["ls = input().split()\ns = list(input())\n\nn = int(ls[0])\nk = int(ls[1])\n\nif s[k] == 'A':\n s[k] == 'a'\nelif s[k] == 'B':\n s[k] == 'b'\nelif s[k] == 'C':\n s[k] == 'c'\n \nprint(''.join(s))", "ls = input().split()\ns = list(input())\n \nn = int(ls[0])\nk = int(ls[1]) - 1\n \nif s[k] == 'A':\n s[k] == 'a'\ne... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s074493446', 's257994817', 's722870672'] | [3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [185, 191, 188] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.