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
p02763
u348805958
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['#!python3\n\nimport sys\n\niim = lambda: map(int, input().rstrip().split())\n\ndef popcnt2(n):\n a = (\n 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,\n 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8,\n )\n ans = 0\n while n:\n ans += a[n&0xff]\n n >>= 8\n return ans\n\ndef resolve():\n N = int(input())\n S = list(input())\n Q = int(input())\n\n c0 = ord(\'a\')\n smap = [1<<(i-c0) for i in range(c0, ord(\'z\')+1)]\n\n T = [0]*N + [smap[ord(S[i])-c0] for i in range(N)]\n\n for i in range(N-1, 0, -1):\n i2 = i << 1\n T[i] = T[i2] | T[i2|1]\n\n ans = []\n #print(T)\n for cmd, i, j in (line.split() for line in sys.stdin.read().split("\\n")):\n i = int(i) - 1\n if cmd == "1":\n if S[i] == j:\n continue\n\n S[i] = j\n i0 = N + i\n T[i0] = smap[ord(j)-c0]\n while i0 > 1:\n i0 = i0 >> 1\n T[i0] = T[i0+i0] | T[i0-~i0]\n elif cmd == "2":\n i += N\n j = int(j) + N\n\n d1 = 0\n while i < j:\n if i & 1:\n d1 |= T[i]\n i += 1\n if j & 1:\n j -= 1\n d1 |= T[j]\n\n i >>= 1; j >>=1\n\n ans.append(popcnt2(d1))\n\n print(*ans, sep="\\n")\n\nif __name__ == "__main__":\n resolve()\n', '#!python3\n\nimport sys\n\ninput = sys.stdin.readline\n\ndef resolve():\n N = int(input())\n S = list(input())\n Q = int(input())\n\n c0 = ord(\'a\')\n smap = [1<<(i-c0) for i in range(c0, ord(\'z\')+1)]\n\n T = [0]*N + [smap[ord(S[i])-c0] for i in range(N)]\n\n for i in range(N-1, 0, -1):\n i2 = i << 1\n T[i] = T[i2] | T[i2|1]\n\n ans = []\n #print(T)\n for cmd, i, j in zip(*[iter(sys.stdin.read().split())]*3):\n i = int(i) - 1\n if cmd == "1":\n if S[i] == j:\n continue\n\n S[i] = j\n i0 = N + i\n T[i0] = smap[ord(j)-c0]\n while i0 > 1:\n i0 = i0 >> 1\n T[i0] = T[i0+i0] | T[i0-~i0]\n elif cmd == "2":\n i += N\n j = int(j) + N\n\n d1 = 0\n while i < j:\n if i & 1:\n d1 |= T[i]\n i += 1\n if j & 1:\n j -= 1\n d1 |= T[j]\n\n i >>= 1; j >>=1\n\n ans.append(bin(d1).count(\'1\'))\n\n print(*ans, sep="\\n")\n\nif __name__ == "__main__":\n resolve()\n']
['Runtime Error', 'Accepted']
['s644438244', 's350427609']
[32572.0, 33280.0]
[364.0, 350.0]
[2182, 1142]
p02763
u368796742
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['import bisect\n\nn = int(input())\ns = list(input())\nq = int(input())\nl = [[] for i in range(26)]\nfor i in range(n):\n l[ord(s[i])-ord("a")].append(i)\nprint(l)\n\nfor i in range(q):\n x,y,z = input().split()\n if int(x) == 1:\n if s[int(y)-1] == z:\n continue\n index = bisect.bisect_left(l[ord(s[int(y)-1])-ord("a")],int(y)-1)\n l[ord(s[int(y)-1])-ord("a")].pop(index)\n index = bisect.bisect_left(l[ord(z)-ord("a")],int(y)-1)\n l[ord(z)-ord("a")].insert(index,int(y)-1)\n if int(x) == 2:\n count = 0\n for j in l:\n index = bisect.bisect_left(j,int(y)-1)\n if index < len(j) and j[index] < int(z):\n count += 1\n print(count)\n\n\n\n', 'from bisect import bisect_left as bl\n\nn = int(input())\ns = list(input())\nq = int(input())\nl = [[] for i in range(26)]\nfor i in range(n):\n l[ord(s[i])-ord("a")].append(i)\nfor i in range(q):\n x,y,z = input().split()\n if x == "1":\n y = int(y)-1\n if s[y] == z:\n continue\n b = ord(s[y])-ord("a")\n a = ord(z)-ord("a")\n l[b].pop(bl(l[b],y))\n l[a].insert(bl(l[a],y),y)\n s[y] = z\n if x == "2":\n count = 0\n for j in l:\n index = bl(j,int(y)-1)\n if index < len(j) and j[index] < int(z):\n count += 1\n print(count)']
['Runtime Error', 'Accepted']
['s915728423', 's390731075']
[40440.0, 28872.0]
[1384.0, 1216.0]
[726, 630]
p02763
u413165887
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['n = int(input())\ns = input()\n\nx = [[0 for _i in range(n)] for _j in range(26)]\nfor i in range(n):\n x[ord(s[i])-97][i] = 1\nq = int(input())\nr = []\nfor _i in range(q):\n y = list(input().split())\n i = int(y[1])-1\n if y[0] == "1":\n x[ord(s[i])-97][i] = 0\n x[ord(y[2])-97][i] = 1\n else:\n c = 0\n for j in range(26):\n if 1 in x[j][i:int(y[2])]:\n c += 1\n r.append(c)\nprint(*r)', "n = int(input())\ns = list(input())\ns = [ord(i)-97 for i in s]\n\ndic = {}\nfor i in range(26):\n dic[i] = []\n\nfor i in range(n):\n dic[s[i]].append(i)\n\nfor i in range(26):\n dic[i].append(float('inf'))\n\nfrom bisect import bisect_left\nq = int(input())\nfor i in range(q):\n x, y, z = input().split()\n if x == '1':\n y, z = int(y) - 1, ord(z) - 97\n p = bisect_left(dic[s[y]], y)\n dic[s[y]].pop(p)\n dic[z].insert(bisect_left(dic[z], y), y)\n s[y] = z\n else:\n res = 0\n y, z = int(y) - 1, int(z) - 1\n for i in range(26):\n p = dic[i][bisect_left(dic[i], y)]\n if p <= z:\n res += 1\n print(res)"]
['Wrong Answer', 'Accepted']
['s172239028', 's472826574']
[112268.0, 35432.0]
[2110.0, 1975.0]
[444, 693]
p02763
u541318412
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
["n=int(input())+1\nw = input()\ndata=[0]*n*2\ndef update(i,x):\n i+=n\n data[i]=x\n i//=2\n while i:\n data[i]=data[i*2]|data[i*2+1]\n i//=2\ndef query(l,r):\n l+=n\n r+=n\n s=0\n while l<r:\n if l&1 == 1:\n s|=data[l]\n l+=1\n if r&1 == 1:\n r-=1\n s|=data[r]\n l//=2\n r//=2\n return bin(s).count('1')\ndef word_num(a):\n return 1<<(ord(a)-97)\n\nfor i in range(n-1):\n data[i+n] = word_num(w[i]) \nfor i in range(n-1,0,-1):\n data[i]=data[i*2]|data[i*2 + 1]\nprint(list(map(lambda x:bin(x),data))) \n\nans=[]\nq=int(input())\nfor i in range(q):\n a,s,t=input().split()\n if a=='1':\n s=int(s)\n update(int(s)-1,word_num(t))\n if a=='2':\n s=int(s)\n t=int(t)\n ans.append(query(int(s)-1,int(t)))\nfor i in range(len(ans)):\n print(ans[i])\n", "n=int(input())+1\nw = input()\ndata=[0]*n*2\ndef update(i,x):\n i+=n\n data[i]=x\n i//=2\n while i:\n data[i]=data[i*2]|data[i*2+1]\n i//=2\ndef query(l,r):\n l+=n\n r+=n\n s=0\n while l<r:\n if l&1 == 1:\n s|=data[l]\n l+=1\n if r&1 == 1:\n r-=1\n s|=data[r]\n l//=2\n r//=2\n return bin(s).count('1')\ndef word_num(a):\n return 1<<(ord(a)-97)\n\nfor i in range(n-1):\n data[i+n] = word_num(w[i]) \nfor i in range(n-1,0,-1):\n data[i]=data[i*2]|data[i*2 + 1]\n\nans=[]\nq=int(input())\nfor i in range(q):\n a,s,t=input().split()\n if a=='1':\n s=int(s)\n update(int(s)-1,word_num(t))\n if a=='2':\n s=int(s)\n t=int(t)\n ans.append(query(int(s)-1,int(t)))\nfor i in range(len(ans)):\n print(ans[i])"]
['Wrong Answer', 'Accepted']
['s249975758', 's973597475']
[202524.0, 43860.0]
[1034.0, 628.0]
[845, 799]
p02763
u543954314
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
["import sys\n\nstdin = sys.stdin\n\nns = lambda: stdin.readline().rstrip()\nni = lambda: int(stdin.readline().rstrip())\nnm = lambda: map(int, stdin.readline().split())\nnl = lambda: list(map(int, stdin.readline().split()))\n\nclass SegTree:\n def __init__(self, N):\n self.N = N\n self._N = 1<<((N-1).bit_length())\n self.node = [0]*2*self._N\n\n def build(self,lis):\n for i in range(self.N):\n self.node[i+self._N-1] = lis[i]\n for i in range(self._N-2,-1,-1):\n self.node[i] = self.node[i*2+1] | self.node[i*2+2]\n return\n\n def update(self,i,x):\n i += self._N-1\n self.node[i] = x\n while i:\n i >>= 1\n self.node[i] = self.node[i*2+1] | self.node[i*2+2]\n\n def query(self,p,q,idx=0,a=0,b=None):\n if b is None:\n b = self._N\n if q <= p or b <= p or q <= a:\n return 0\n elif p <= a and b <= q:\n return self.node[idx]\n else:\n res1 = self.query(p,q,idx*2+1,a,(a+b)//2)\n res2 = self.query(p,q,idx*2+2,(a+b)//2,b)\n return res1 | res2\n\nn = ni()\noa = ord('a')\ns = list(map(lambda x: 1<<(ord(x)-oa), list(input())))\nq = ni()\nS = SegTree(n)\nS.build(s)\nfor _ in range(q):\n x,y,z = input().split()\n if x == '1':\n y = int(y)\n S.update(y-1, 1<<(ord(z)-oa))\n else:\n y = int(y)\n z = int(z)\n v = S.query(y-1,z)\n print(str(v).count('1'))\n", "import sys\n\nstdin = sys.stdin\n\nns = lambda: stdin.readline().rstrip()\nni = lambda: int(stdin.readline().rstrip())\nnm = lambda: map(int, stdin.readline().split())\nnl = lambda: list(map(int, stdin.readline().split()))\n\nclass SegTree:\n def __init__(self, N):\n self.N = N\n self._N = 1<<((N-1).bit_length())\n self.node = [0]*2*self._N\n\n def build(self,lis):\n for i in range(self.N):\n self.node[i+self._N-1] = lis[i]\n for i in range(self._N-2,-1,-1):\n self.node[i] = self.node[i*2+1] | self.node[i*2+2]\n return\n\n def update(self,i,x):\n i += self._N-1\n self.node[i] = x\n while i:\n i = (i-1)>>1\n self.node[i] = self.node[i*2+1] | self.node[i*2+2]\n\n def query(self,p,q,idx=0,a=0,b=None):\n if b is None:\n b = self._N\n if q <= p or b <= p or q <= a:\n return 0\n elif p <= a and b <= q:\n return self.node[idx]\n else:\n res1 = self.query(p,q,idx*2+1,a,(a+b)//2)\n res2 = self.query(p,q,idx*2+2,(a+b)//2,b)\n return res1 | res2\n\nn = ni()\noa = ord('a')\nconv = lambda x: 1<<(ord(x)-oa) \ns = list(map(conv, list(input())))\nq = ni()\nS = SegTree(n)\nS.build(s)\nfor _ in range(q):\n x,y,z = input().split()\n if x == '1':\n y = int(y)\n S.update(y-1, conv(z))\n else:\n y = int(y)\n z = int(z)\n \n v = S.query(y-1,z)\n # print(v, bin(v))\n print(str(bin(v)).count('1'))\n"]
['Wrong Answer', 'Accepted']
['s204749606', 's065928594']
[47668.0, 47636.0]
[1226.0, 1222.0]
[1461, 1543]
p02763
u557282438
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['N = int(input())\nS = input()\nQ = int(input())\nQuery = [input() for _ in range(Q)]\ndic = {chr(i+ord("a")):[] for i in range(26)}\nfor i, s in enumerate(S):\n dic[s].append(i)\nfor q in Query:\n t,a,b = q.split()\n if(t == "1"):\n a_index = int(a)-1\n if(S[a_index]==b):\n continue\n tmp_index = bisect_left(dic[S[a_index]],a_index)\n dic[s[a]].pop(tmp_index)\n insort.left(dic[b],a)\n s[a] = b\n elif(t == "2"):\n a_index = int(a)-1\n b_index = int(b)-1\n cnt = 0\n for li in dic.values():\n if(li and a_index <= li[-1] and li[bisect_left(li,a_index)] <= b_index):\n cnt += 1\n print(cnt)', 'from bisect import insort_left, bisect_left\nN = int(input())\nS = list(input())\nQ = int(input())\nQuery = [input() for _ in range(Q)]\ndic = {chr(i+ord("a")):[] for i in range(26)}\nfor i, s in enumerate(S):\n dic[s].append(i)\nfor q in Query:\n t,a,b = q.split()\n a = int(a)-1\n if(t == "1"):\n if(S[a]==b):\n continue\n tmp_index = bisect_left(dic[S[a]],a)\n dic[S[a]].pop(tmp_index)\n insort_left(dic[b],a)\n S[a] = b\n elif(t == "2"):\n b = int(b)-1\n cnt = 0\n for li in dic.values():\n if li and a<=li[-1] and li[bisect_left(li, a)] <= b:\n cnt += 1\n print(cnt)']
['Runtime Error', 'Accepted']
['s530535390', 's797913686']
[26632.0, 30600.0]
[172.0, 884.0]
[697, 662]
p02763
u559196406
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['import bisect\n\nn = int(input())\ns = input()\nq = int(input())\n\nalpha_map = {i:[] for i in alpha}\nfor i,c in enumerate(s):\n bisect.insort(alpha_map[c],i+1)\n \nfor _ in range(q):\n x,y,z = map(str,input().split())\n if int(x) == 1:\n y = int(y)\n bef = s[y-1]\n if bef == z:\n continue\n alpha_map[bef].pop(bisect.bisect_left(alpha_map[bef],y))\n bisect.insort(alpha_map[z],y)\n s = s[:y-1]+z+s[y:]\n else:\n count = 0\n for i,j in alpha_map.items():\n idx = bisect.bisect_left(j,int(y))\n if idx < len(j) and j[idx] <= int(z):\n count += 1\n print(count)', 'import bisect\n\nn = int(input())\ns = list(input())\nq = int(input())\n\nalpha_map = {chr(i):[] for i in range(97,123)}\nfor i,c in enumerate(s):\n bisect.insort(alpha_map[c],i+1)\n \nfor _ in range(q):\n x,y,z = map(str,input().split())\n if int(x) == 1:\n y = int(y)\n bef = s[y-1]\n if bef == z:\n continue\n alpha_map[bef].pop(bisect.bisect_left(alpha_map[bef],y))\n bisect.insort(alpha_map[z],y)\n s[y-1] = z\n else:\n count = 0\n for i,j in alpha_map.items():\n idx = bisect.bisect_left(j,int(y))\n if idx < len(j) and j[idx] <= int(z):\n count += 1\n print(count)']
['Runtime Error', 'Accepted']
['s026810727', 's860178254']
[4084.0, 29960.0]
[19.0, 1342.0]
[665, 675]
p02763
u572142121
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
["from bisect import bisect_left,bisect_right\nimport string \n\ndic = {c:[] for c in string.ascii_lowercase}\n\nn = int(input())\ns = list(input())\nq = int(input())\n\nfor i,c in enumerate(s,start=1):\n dic[c].append(i)\nprint(dic)\n\nfor i in range(q):\n p,l,r = map(str,input().split())\n if p =='1':\n j = int(l)\n if r == s[j-1]:\n continue\n c = s[j-1] \n dic[c].pop(bisect_left(dic[c],j))\n dic[r].insert(bisect_left(dic[r],j),j)\n s[j-1] = r\n else:\n ans = 0\n l = int(l)\n r = int(r)\n for c in string.ascii_lowercase:\n pl = bisect_left(dic[c],l)\n if pl < len(dic[c]):\n if dic[c][pl] <= r:\n ans += 1\n print(ans)\n", "from bisect import bisect_left\nimport string \n\ndic={c:[] for c in string.ascii_lowercase}\nN=int(input())\nS=list(input())\nQ=int(input())\nfor i in range(len(S)):\n dic[S[i]].append(i+1)\n\nfor i in range(Q):\n a,b,c=map(str,input().split())\n if a=='1':\n if S[int(b)-1]==c:\n continue\n b=int(b)\n f=S[b-1]\n d=bisect_left(dic[f],b)\n e=bisect_left(dic[c],b)\n dic[f].pop(d)\n dic[c].insert(e,b)\n S[b-1]=c\n else:\n ans=0\n b,c=int(b),int(c)\n for j in string.ascii_lowercase:\n d=bisect_left(dic[j],b)\n if d<len(dic[j]):\n if dic[j][d]<=c:\n ans+=1\n print(ans)\n"]
['Wrong Answer', 'Accepted']
['s855267108', 's410883081']
[41092.0, 31112.0]
[1136.0, 1121.0]
[665, 612]
p02763
u595289165
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['n = int(input())\ns = list(input())\nq = int(input())\nquery = []\na = []\nfor _ in range(q):\n method, i, c = input().split()\n if method == "1":\n a.append([i, c])\n else:\n a.append([i, c])\n query.append(a)\n a = []\nstring = []\nnow = s\nfor qq in query:\n if len(qq) == 1:\n string.append(now)\n continue\n for i, c in qq[:-1]:\n i = int(i)\n now[i-1] = c\n string.append(now)\n\nfor qq, ss in zip(query, string):\n l, r = map(int, qq[-1])\n print(len(set(ss[l:r+1])))\n\n\n\n\n', 'class SegmentTree:\n\n def __init__(self, ls, ide, seg_func):\n n = len(ls)\n self.num = 2 ** (n - 1).bit_length()\n self.seg_func = seg_func\n self.ide = ide\n self.tree = [self.ide] * (2 * self.num - 1)\n for i, l in enumerate(ls):\n self.tree[i + self.num - 1] = l\n\n for i in range(self.num - 2, -1, -1): \n self.tree[i] = seg_func(self.tree[2 * i + 1], self.tree[2 * i + 2])\n\n def update(self, i, x):\n i += self.num - 1\n self.tree[i] = x\n while i:\n i = (i-1)//2\n self.tree[i] = self.seg_func(self.tree[2 * i + 1], self.tree[2 * i + 2])\n\n def query(self, l, r):\n if r < l:\n return ValueError(\'invalid index\')\n\n l += self.num - 1\n r += self.num - 2\n res = self.ide\n while r - l > 1: \n if l & 1 == 0:\n res = self.seg_func(res, self.tree[l])\n if r & 1 == 1:\n res = self.seg_func(res, self.tree[r])\n r -= 1\n l = l // 2 \n r = (r - 1) // 2 \n if l == r:\n res = self.seg_func(res, self.tree[l])\n else:\n res = self.seg_func(res, self.tree[l])\n res = self.seg_func(res, self.tree[r])\n return res\n\n\ndef f(a, b):\n return a | b\n\n\nn = int(input())\ns = [1 << (ord(r) - ord("a")) for r in input()]\nq = int(input())\nst = SegmentTree(s, 0, f)\n\nfor _ in range(q):\n m, i, c = input().split()\n\n if int(m) - 1:\n x = st.query(int(i)-1, int(c))\n print(bin(x).count("1"))\n else:\n st.update(int(i)-1, 1 << (ord(c) - ord("a")))\n']
['Wrong Answer', 'Accepted']
['s595599232', 's279124834']
[21072.0, 48032.0]
[2104.0, 826.0]
[533, 1789]
p02763
u628583308
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['#!/usr/bin/env python3\nimport bisect\n\n# Generated by 1.1.6 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 N = int(input())\n S = list(input())\n Q = int(input())\n\n L = [[] for x in range(26)] \n\n for idx, s in enumerate(S):\n L[ord(s)-ord("a")].append(idx)\n\n for _ in range(Q):\n row = input().split()\n if row[0] == \'1\':\n y, z = int(row[1])-1, row[2]\n idx_target = ord(S[y]) - ord("a")\n idx_del = bisect.bisect_left(L[idx_target], y)\n if idx_del < len(L[idx_target]):\n L[idx_target].pop(idx_del)\n bisect.insort(L[ord(z) - ord("a")], y)\n S[y] = z\n\n elif row[0] == \'2\':\n y, z = int(row[1]) - 1, int(row[2]) - 1\n answer = 0\n for idx_alphabet in range(ord("a"), ord("z")+1):\n left = bisect.bisect_left(L[idx_alphabet], y)\n if left < len(L[idx_alphabet]) and y <= L[idx_alphabet][left] <= z:\n answer += 1\n print(answer)\n\n # Failed to predict input format\n pass\n\nif __name__ == \'__main__\':\n main()\n', '#!/usr/bin/env python3\nimport bisect\n\n# Generated by 1.1.6 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 N = int(input())\n S = list(input())\n Q = int(input())\n\n L = [[] for x in range(26)] \n\n for idx, s in enumerate(S):\n L[ord(s)-ord("a")].append(idx)\n\n for _ in range(Q):\n row = input().split()\n if row[0] == \'1\':\n y, z = int(row[1])-1, row[2]\n if S[y] != z:\n idx_target = ord(S[y]) - ord("a")\n idx_del = bisect.bisect_left(L[idx_target], y)\n if idx_del < len(L[idx_target]):\n L[idx_target].pop(idx_del)\n bisect.insort(L[ord(z) - ord("a")], y)\n S[y] = z\n\n elif row[0] == \'2\':\n y, z = int(row[1]) - 1, int(row[2]) - 1\n answer = 0\n for idx_alphabet in range(26):\n left = bisect.bisect_left(L[idx_alphabet], y)\n if left < len(L[idx_alphabet]) and y <= L[idx_alphabet][left] <= z:\n answer += 1\n print(answer)\n\n # Failed to predict input format\n pass\n\nif __name__ == \'__main__\':\n main()\n']
['Runtime Error', 'Accepted']
['s206482665', 's934281538']
[28424.0, 30216.0]
[475.0, 1027.0]
[1329, 1361]
p02763
u638456847
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['import sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\n\nclass SegmentTree:\n def __init__(self, A):\n self.n = 2**(len(A)-1).bit_length()\n self.identity = set()\n self.seg = [self.identity] * (2 * self.n)\n \n for i, a in enumerate(A):\n self.seg[self.n-1+i] = set(a)\n for i in range(self.n-2,-1,-1):\n self.seg[i] = self.seg[2*i+1] | self.seg[2*i+2]\n\n \n def update(self, k, a):\n k += self.n - 1\n self.seg[k] = set(a)\n while k:\n k = (k - 1) // 2\n self.seg[k] = self.seg[k*2+1] | self.seg[k*2+2]\n\n \n def query(self, a, b):\n if b == a:\n \treturn 1\n a += self.n - 1\n b += self.n - 2\n res = self.identity\n while b - a > 1:\n if a & 1 == 0:\n res = res | self.seg[a]\n if b & 1 == 1:\n res = res | self.seg[b]\n b -= 1\n a = a // 2\n b = (b - 1) // 2\n if a == b:\n res = res | self.seg[a]\n else:\n res = res | self.seg[a] | self.seg[b]\n \n return len(res)\n\n\ndef main():\n N = int(readline())\n s = readline().strip()\n seg = SegmentTree(list(s))\n print(seg.seg)\n\n Q = int(readline())\n for _ in range(Q):\n q, a, b = map(str, readline().split())\n if q == "1":\n seg.update(int(a)-1, b)\n else:\n print(seg.query(int(a)-1, int(b)))\n\n\nif __name__ == "__main__":\n main()\n', 'import sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\n\ndef string_to_number(a):\n return 1 << (ord(a) - 97)\n\nclass SegmentTree:\n def __init__(self, A):\n self.n = 2**(len(A)-1).bit_length()\n self.identity = 0\n self.seg = [self.identity] * (2 * self.n)\n \n for i, a in enumerate(A):\n self.seg[self.n-1+i] = string_to_number(a)\n for i in range(self.n-2,-1,-1):\n self.seg[i] = self.seg[2*i+1] | self.seg[2*i+2]\n\n \n def update(self, k, a):\n k += self.n - 1\n self.seg[k] = string_to_number(a)\n while k:\n k = (k - 1) // 2\n self.seg[k] = self.seg[k*2+1] | self.seg[k*2+2]\n\n \n def query(self, a, b):\n if b == a:\n \treturn 1\n a += self.n - 1\n b += self.n - 2\n res = self.identity\n while b - a > 1:\n if not a & 1:\n res |= self.seg[a]\n if b & 1:\n res |= self.seg[b]\n b -= 2\n a >>= 1\n b -= 1\n b >>= 1\n if a == b:\n res |= self.seg[a]\n else:\n res |= (self.seg[a] | self.seg[b])\n \n return bin(res).count("1")\n\n\ndef main():\n N = int(readline())\n s = readline().strip()\n seg = SegmentTree(list(s))\n print(seg.seg)\n\n Q = int(readline())\n q = map(str, read().split())\n for t, a, b in zip(*[iter(q)]*3):\n if t == "1":\n seg.update(int(a)-1, b)\n else:\n print(seg.query(int(a)-1, int(b)))\n\n\nif __name__ == "__main__":\n main()\n', 'import sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\n\ndef string_to_number(a):\n return 1 << (ord(a) - 97)\n\nclass SegmentTree:\n \n def __init__(self, n, initial=0):\n self.offset = 2**(n-1).bit_length()\n self.initial = initial\n self.seg = [self.initial] * (2 * self.offset)\n\n\n def build(self, A):\n \n for i, a in enumerate(A, start=self.offset):\n self.seg[i] = string_to_number(a)\n for i in range(self.offset-1,0,-1):\n self.seg[i] = self.seg[i<<1] | self.seg[(i<<1)+1]\n\n \n def update(self, k, a):\n k += self.offset\n self.seg[k] = string_to_number(a)\n while k:\n k >>= 1\n self.seg[k] = self.seg[k<<1] | self.seg[(k<<1)+1]\n\n \n def query(self, a, b):\n a += self.offset\n b += self.offset\n res = self.initial\n while a < b:\n if a & 1:\n res |= self.seg[a]\n a += 1\n if b & 1:\n res |= self.seg[b-1]\n a >>= 1\n b >>= 1\n \n return bin(res).count("1")\n\n\ndef main():\n N,s,Q,*q = read().split()\n seg = SegmentTree(int(N))\n seg.build(s)\n \n\n for t, a, b in zip(*[iter(q)]*3):\n if t == "1":\n seg.update(int(a)-1, b)\n else:\n print(seg.query(int(a)-1, int(b)))\n\n\nif __name__ == "__main__":\n main()\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s642392690', 's933544616', 's742006213']
[341828.0, 73404.0, 46628.0]
[2128.0, 684.0, 540.0]
[1561, 1634, 1548]
p02763
u652583512
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
["\nclass SegmentTree:\n def __init__(self, base_array,n , default_value = 0, segfunc = lambda a, b: a + b): \n self._num = 2 ** (n - 1).bit_length()\n self._seg = [default_value] * 2 * self._num\n self._segfunc = segfunc\n self._ide_ele = default_value\n for i in range(n):\n self._seg[i + self._num - 1] = base_array[i]\n for i in range(self._num - 2, -1, -1):\n self._seg[i] = segfunc(self._seg[2 * i + 1], self._seg[2 * i + 2])\n\n\n def update(self, k, x):\n k += self._num - 1\n self._seg[k] = x\n while k:\n k = (k - 1) // 2\n self._seg[k] = self._segfunc(self._seg[k * 2 + 1], self._seg[k * 2 + 2])\n\n\n def query(self, p, q):\n if q <= p:\n return self._ide_ele\n p += self._num - 1\n q += self._num - 2\n res = self._ide_ele\n while q - p > 1:\n if p & 1 == 0:\n res = self._segfunc(res, self._seg[p])\n if q & 1 == 1:\n res = self._segfunc(res, self._seg[q])\n q -= 1\n p = p // 2\n q = (q - 1) // 2\n if p == q:\n res = self._segfunc(res, self._seg[p])\n else:\n res = self._segfunc(self._segfunc(res, self._seg[p]), self._seg[q])\n return res\n\ndef main():\n N = int(input())\n S = [c for c in input()]\n M = int(input())\n\n A = [0 for i in range(N)]\n\n for i, c in enumerate(S):\n A[i] = 1 << ord(c) - ord('a')\n\n print(A)\n\n st = SegmentTree(A, N, 0, lambda a, b: a | b)\n\n for i in range(M):\n p, a, b = input().split()\n a = int(a) - 1\n b = int(b) - 1 if p == '2' else b\n if p == '1':\n st.update(a, 1 << ord(b) - ord('a'))\n\n if p == '2':\n s = st.query(a, b + 1)\n print(bin(s).count('1'))\n\n\nif __name__ == '__main__':\n main()", "\nclass SegmentTree:\n def __init__(self, base_array,n , default_value = 0, segfunc = lambda a, b: a + b): \n self._num = 2 ** (n - 1).bit_length()\n self._seg = [default_value] * 2 * self._num\n self._segfunc = segfunc\n self._ide_ele = default_value\n for i in range(n):\n self._seg[i + self._num - 1] = base_array[i]\n for i in range(self._num - 2, -1, -1):\n self._seg[i] = segfunc(self._seg[2 * i + 1], self._seg[2 * i + 2])\n\n\n def update(self, k, x):\n k += self._num - 1\n self._seg[k] = x\n while k:\n k = (k - 1) // 2\n self._seg[k] = self._segfunc(self._seg[k * 2 + 1], self._seg[k * 2 + 2])\n\n\n def query(self, p, q):\n if q <= p:\n return self._ide_ele\n p += self._num - 1\n q += self._num - 2\n res = self._ide_ele\n while q - p > 1:\n if p & 1 == 0:\n res = self._segfunc(res, self._seg[p])\n if q & 1 == 1:\n res = self._segfunc(res, self._seg[q])\n q -= 1\n p = p // 2\n q = (q - 1) // 2\n if p == q:\n res = self._segfunc(res, self._seg[p])\n else:\n res = self._segfunc(self._segfunc(res, self._seg[p]), self._seg[q])\n return res\n\ndef main():\n N = int(input())\n S = [c for c in input()]\n M = int(input())\n\n A = [0 for i in range(N)]\n\n for i, c in enumerate(S):\n A[i] = 1 << ord(c) - ord('a')\n\n st = SegmentTree(A, N, 0, lambda a, b: a | b)\n\n for i in range(M):\n p, a, b = input().split()\n a = int(a) - 1\n b = int(b) - 1 if p == '2' else b\n if p == '1':\n st.update(a, 1 << ord(b) - ord('a'))\n\n if p == '2':\n s = st.query(a, b + 1)\n print(bin(s).count('1'))\n\n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Accepted']
['s526803518', 's386999701']
[56160.0, 51992.0]
[919.0, 873.0]
[1929, 1915]
p02763
u686230543
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['class SegmentTree:\n """Segmant Tree for query process.\n\n Args:\n a (List[int]): array.\n identity (int): identity element with f.\n """\n def __init__(self, a, identity=0):\n self.a = a\n self.n = len(a)\n self.identity = identity\n self.depth = (self.n - 1).bit_length()\n self.segment = (1 << self.depth) - 1\n self.tree = [identity] * (self.segment * 2 + 1)\n self.tree[self.segment : self.n + self.segment] = a\n for i in range(self.segment - 1, -1, -1):\n self.tree[i] = self.f(self.tree[2*i+1], self.tree[2*i+2])\n\n def update(self, i: int, x: int):\n i += self.segment\n self.tree[i] = x\n while i:\n i = (i - 1) // 2\n self.tree[i] = self.f(self.tree[2*i+1], self.tree[2*i+2])\n\n def query(self, l: int, r: int) -> int:\n """Query at [l, r]\n\n Args:\n l (int): left\n r (int): right\n\n Returns:\n int: result\n """\n if l > r:\n return self.identity\n l += self.segment\n r += self.segment\n res = self.identity\n while l <= r:\n if not l & 1:\n res = self.f(self.tree[l], res)\n if r & 1:\n res = self.f(res, self.tree[r])\n l = l // 2\n r = (r - 2) // 2\n return res\n\n def f(self, x: int, y: int) -> int:\n return x | y\n\nn = int(input())\ns = input()\nq = int(input())\na = ord(\'a\')\nsegment_tree = [SegmentTree([0] * n) for _ in range(26)]\nfor i in range(n):\n segment_tree[ord(s[i]) - a].update(i, 1)\nfor _ in range(q):\n query = input().split()\n if query[0] == \'1\':\n i = int(query[1])\n c = query[2]\n num_c = ord(c) - a\n for alph in range(26):\n segment_tree[alph].update(i, int(alph == num_c))\n else:\n l = int(query[1])\n r = int(query[2])\n kind = 0\n for alph in range(26):\n kind += segment_tree[alph].query(l, r)\n print(kind)', 'from typing import List\n\n\nclass SegmentTree:\n def __init__(self, a: List[bool], identity: bool = False):\n self.a = a\n self.n = len(a)\n self.identity = identity\n self.depth = (self.n - 1).bit_length\n self.segment = 1 << self.depth - 1\n self.tree = [identity] * (self.segment * 2 + 1)\n self.tree[self.segment : self.n + self.segment] = a\n for i in range(self.segment - 1, -1, -1):\n self.tree[i] = self.f(self.tree[2*i+1], self.tree[2*i+2])\n\n def update(self, i: int, x: bool):\n i += self.segment\n self.tree[i] = x\n while i:\n i = (i - 1) // 2\n self.tree[i] = self.f(self.tree[2*i+1], self.tree[2*i+2])\n\n def query(self, l: int, r: int) -> int:\n """Query at [l, r]\n\n Args:\n l (int): left\n r (int): right\n\n Returns:\n int: result\n """\n if l > r:\n return self.identity\n l += self.segment\n r += self.segment\n res = self.identity\n while l <= r:\n if not l & 1:\n res = self.f(self.tree[l], res)\n if r & 1:\n res = self.f(res, self.tree[r])\n l = l // 2\n r = (r - 2) // 2\n return res\n\n def f(self, x: bool, y: bool) -> bool:\n return x or y\n \n\nn = int(input())\ns = input()\nq = int(input())\na = ord(\'a\')\nalph = [[c == chr(a + i) for c in s] for i in range(26)]\nst_list = [SegmentTree(alph[i]) for i in range(26)]\n\nfor _ in range(q):\n query = input()\n if query[0] == \'1\':\n _, i, c = map(int, query.split())\n j = ord(c) - a\n for k, st in enumerate(st_list):\n st.update(i, j == k)\n else:\n _, l, r = map(int, query.split())\n ans = [st.query(l, r) for st in st_list]\n print(sum(ans))', 'class SegmentTree:\n """Segmant Tree for query process.\n\n Args:\n a (List[int]): array.\n identity (int): identity element with f.\n """\n def __init__(self, a, identity=0):\n self.a = a\n self.n = len(a)\n self.identity = identity\n self.depth = (self.n - 1).bit_length()\n self.segment = (1 << self.depth) - 1\n self.tree = [identity] * (self.segment * 2 + 1)\n self.tree[self.segment : self.n + self.segment] = a\n for i in range(self.segment - 1, -1, -1):\n self.tree[i] = self.f(self.tree[2*i+1], self.tree[2*i+2])\n\n def update(self, i: int, x: int):\n i += self.segment\n self.tree[i] = x\n while i:\n i = (i - 1) // 2\n self.tree[i] = self.f(self.tree[2*i+1], self.tree[2*i+2])\n\n def query(self, l: int, r: int) -> int:\n """Query at [l, r]\n\n Args:\n l (int): left\n r (int): right\n\n Returns:\n int: result\n """\n if l > r:\n return self.identity\n l += self.segment\n r += self.segment\n res = self.identity\n while l <= r:\n if not l & 1:\n res = self.f(self.tree[l], res)\n if r & 1:\n res = self.f(res, self.tree[r])\n l = l // 2\n r = (r - 2) // 2\n return res\n\n def f(self, x: int, y: int) -> int:\n return x | y\n\nn = int(input())\ns = input()\nq = int(input())\na = ord(\'a\')\nsegment_tree = SegmentTree([1 << (ord(c) - a) for c in s])\nfor _ in range(q):\n query = input().split()\n if query[0] == \'1\':\n i = int(query[1]) - 1\n c = query[2]\n segment_tree.update(i, 1 << (ord(c) - a))\n else:\n l = int(query[1]) - 1\n r = int(query[2]) - 1\n bit = segment_tree.query(l, r)\n print(format(bit, \'b\').count(\'1\'))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s255519368', 's851316845', 's550992481']
[128708.0, 3192.0, 48184.0]
[2106.0, 18.0, 738.0]
[1779, 1810, 1645]
p02763
u726285999
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
["import bisect \nfrom collections import defaultdict\n\nN = int(input())\nS = [*input()]\nQ = int(input())\nd = defaultdict(list)\n\n\nfor i, c in enumerate(S):\n d[c] += [i]\n\n\nprint(d)\n\nfor _ in range(Q):\n q, y, z = input().split()\n\n if q == '1':\n i = int(y) - 1 \n\n if S[i] == z: continue \n\n \n b = bisect.bisect(d[S[i]], i) \n d[S[i]].pop(b - 1) \n\n \n S[i] = z\n bisect.insort(d[z], i) \n\n else:\n left = int(y) - 1\n right = int(z) - 1\n\n print(sum(bisect.bisect(v, right) - bisect.bisect_left(v, left - 1) > 0 for v in d.values()))\n", "import bisect \nfrom collections import defaultdict\n\nN = int(input())\nS = [*input()]\nQ = int(input())\nd = defaultdict(list)\n\n\nfor i, c in enumerate(S):\n d[c] += [i]\n\n\n# print(d)\n\nfor _ in range(Q):\n q, y, z = input().split()\n\n if q == '1':\n i = int(y) - 1 \n\n if S[i] == z: continue \n\n \n b = bisect.bisect(d[S[i]], i) \n d[S[i]].pop(b - 1) \n\n \n S[i] = z\n bisect.insort(d[z], i) \n\n else:\n left = int(y) - 1\n right = int(z) - 1\n\n count = 0\n for v in d.values():\n count += 1 if bisect.bisect(v, right) - bisect.bisect_left(v, left) > 0 else 0\n\n print(count)"]
['Wrong Answer', 'Accepted']
['s466772808', 's485947905']
[43480.0, 35220.0]
[879.0, 914.0]
[909, 968]
p02763
u736729525
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['def order(c):\n return 1 << (ord(c) - 97)\n\ndef count(n):\n return bin(n).count("1")\n\ndef merge(x, y):\n return x | y\n\ndef main():\n N = int(input())\n S = [x for x in input()]\n Q = int(input())\n L = 1\n while L < N:\n L *= 2\n L*=2 \n Seg = [0]*(L*2)\n\n def update(k, x):\n k += L \n Seg[k] = x\n while k > 0:\n k = (k - 1) // 2\n Seg[k] = Seg[2*k+1]|Seg[2*k+2]\n Seg[0] = Seg[1]|Seg[2]\n\n def find(a, b, k, l, r):\n if r <= a or b <= l:\n return 0\n if a <= l and r <= b:\n \n return Seg[k]\n vl = find(a, b, 2*k+1, l, (l+r)//2)\n vr = find(a, b, 2*k+2, (l+r)//2, r)\n \n return merge(vl, vr)\n\n # read S, and update tree\n for i in range(N):\n update(i, order(S[i]))\n #print("Seg", *[count(x) for x in Seg])\n #print("Seg=", [count(x) for x in Seg])\n return\n for _ in range(Q):\n q, i, c = input().split()\n if q == \'1\':\n i = int(i)-1\n if S[i] == c:\n continue\n S[i] = c\n update(i, order(S[i]))\n #print("Seg=", [count(x) for x in Seg])\n else:\n l, r = int(i), int(c)\n #print((l,r))\n print(count(find(l, r+1, 0, 0, L)))\nmain()\n', 'import numpy as np\n\ndef popcount(n):\n return bin(n).count("1")\nd = {c:(1 << (ord(c)-ord(\'a\'))) for c in \'abcdefghijklmnopqrstuvwxyz\'}\n\nclass SegmentTree:\n def __init__(self, A):\n N = len(A)\n n = (N-1).bit_length()\n self.N = 1 << n\n self.Seg = [0 for i in range(2*self.N)]\n for i in range(N):\n self.Seg[self.N+i-1] = d[A[i]]\n for i in range(0, self.N-1)[::-1]:\n self.Seg[i] = self.merge(self.Seg[i*2+1], self.Seg[i*2+2])\n\n def merge(self, x, y):\n return x | y\n\n def update(self, k, x):\n i = self.N+k-1\n self.Seg[i] = d[x]\n while i > 0:\n i = (i-1)//2\n self.Seg[i] = self.merge(self.Seg[i*2+1], self.Seg[i*2+2])\n\n def query(self, a, b):\n return self.query_(a, b, 0, 0, self.N)\n\n def query_(self, a, b, k, l, r):\n if r <= a or b <= l:\n return 0\n if a <= l and r <= b:\n return self.Seg[k]\n vl = self.query_(a, b, 2*k+1, l, (l+r)//2)\n vr = self.query_(a, b, 2*k+2, (l+r)//2, r)\n return self.merge(vl, vr)\n\nimport sys\nsys.setrecursionlimit(10**7)\ndef input():\n return sys.stdin.readline()[:-1]\n\ndef main():\n N = int(input())\n S = input()\n Q = int(input())\n Seg = SegmentTree(S)\n\n for _ in range(Q):\n q, i, c = input().split()\n if q == \'1\':\n i = int(i)-1\n Seg.update(i, c)\n else:\n l, r = int(i), int(c)\n print(popcount(Seg.query(l-1, r)))\nmain()\n']
['Wrong Answer', 'Accepted']
['s895072814', 's949213082']
[44216.0, 38556.0]
[2109.0, 1196.0]
[1416, 1517]
p02763
u814986259
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['import collections\nimport sys\ninput = sys.stdin.readline\nN = int(input())\nS = list(input())\nQ = int(input())\nalpha = "abcdefghijklmnopqrstuvwxyz"\nd = dict()\n\nfor x in alpha:\n d[x] = ord(x) - 97\n\n\nclass segment_tree:\n n = 0\n segtree = []\n\n def __init__(self, A):\n N = len(A)\n self.n = (N-1).bit_length()\n self.n = 2 ** self.n\n self.segtree = [0 for i in range(2*self.n)]\n for i in range(N):\n self.segtree[self.n+i] = 1 << d[A[i]]\n for i in range(self.n - 1, -1, -1):\n if i == self.n-1:\n self.segtree[i] |= self.segtree[i*2 + 1]\n else:\n self.segtree[i] = self.segtree[i*2 + 1] | self.segtree[i*2 + 2]\n\n def update(self, i, x):\n id = self.n+i\n while(id >= 0):\n if id >= self.n:\n self.segtree[id] = 1 << d[x]\n \n else:\n self.segtree[id] = self.segtree[id *\n 2 + 1] | self.segtree[id*2 + 2]\n \n id = (id - 1) // 2\n\n def query(self, a, b, k, l, r):\n if r <= a or l >= b:\n return(0)\n if a <= l and r <= b:\n return(self.segtree[k])\n else:\n vl = self.query(a, b, k*2+1, l, (l+r)//2)\n vr = self.query(a, b, k*2+2, (l+r)//2, r)\n return(vl | vr)\n\n\ndef popcount(x):\n \n x = x - ((x >> 1) & 0x5555555555555555)\n\n \n x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)\n\n x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f \n x = x + (x >> 8) \n x = x + (x >> 16) \n x = x + (x >> 32) \n return x & 0x0000007f\n\n\nST = segment_tree(S[:-1])\nprint(ord("b") - 97)\n\n\nfor _ in range(Q):\n t, a, b = input().split()\n\n if t == "1":\n a = int(a)\n ST.update(a-1, b)\n elif t == "2":\n a = int(a)\n b = int(b)\n ret = ST.query(a-1, b, 0, 0, N)\n print(popcount(ret))\n', 'import collections\nimport sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**5)\nN = int(input())\nS = list(input())\nQ = int(input())\nalpha = "abcdefghijklmnopqrstuvwxyz"\nd = dict()\n\nfor x in alpha:\n d[x] = ord(x) - 97\n\n\nclass segment_tree:\n n = 0\n segtree = []\n\n def __init__(self, A):\n N = len(A)\n self.n = (N-1).bit_length()\n self.n = 1 << self.n\n self.segtree = [0 for i in range(2*self.n)]\n for i in range(N):\n self.segtree[self.n+i-1] = 1 << d[A[i]]\n for i in range(self.n - 2, -1, -1):\n self.segtree[i] = self.segtree[i*2 + 1] | self.segtree[i*2 + 2]\n\n def update(self, i, x):\n id = self.n+i - 1\n self.segtree[id] = 1 << d[x]\n while(id > 0):\n id = (id - 1) // 2\n self.segtree[id] = self.segtree[id *\n 2 + 1] | self.segtree[id*2 + 2]\n\n def query(self, a, b, k, l, r):\n if r <= a or l >= b:\n return(0)\n if a <= l and r <= b:\n return(self.segtree[k])\n else:\n vl = self.query(a, b, k*2+1, l, (l+r)//2)\n vr = self.query(a, b, k*2+2, (l+r)//2, r)\n return(vl | vr)\n\n\ndef popcount(x):\n \n x = x - ((x >> 1) & 0x5555555555555555)\n\n \n x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)\n\n x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f \n x = x + (x >> 8) \n x = x + (x >> 16) \n x = x + (x >> 32) \n return x & 0x0000007f\n\n\nST = segment_tree(S[:-1])\nN = (N-1).bit_length()\nN = 1 << N\n\nfor _ in range(Q):\n t, a, b = input().split()\n\n if t == "1":\n a = int(a)\n ST.update(a-1, b)\n elif t == "2":\n a = int(a)\n b = int(b)\n ret = ST.query(a-1, b, 0, 0, N)\n print(popcount(ret))\n\n \n']
['Wrong Answer', 'Accepted']
['s590800985', 's508678775']
[51624.0, 51616.0]
[1051.0, 966.0]
[2251, 2042]
p02763
u875541136
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['import bisect\n\nN = int(input())\nS = list(str(input()))\n\ndef ordN(x):\n return ord(x) - ord(\'a\')\n\nli = [[] for _ in range(26)]\nfor i,s in enumerate(S):\n li[ordN(s)].append(i)\n\nfor i in range(int(input())):\n Q1, Q2, Q3 = input().split()\n if Q1 == "1":\n Q2 = int(Q2) - 1\n if S[Q2] != Q3:\n I = bisect.bisect(li[ordN(S[Q2])])\n li[ordN(S[Q2])].pop(I)\n bisect.insort(li[ordN(Q3)], Q2)\n S[Q2] = Q3\n else:\n Q2, Q3 = int(Q2)-1, int(Q3)-1\n count = 0\n for j in range(26):\n I = bisect.bisect_left(li[j], Q2)\n if I < len(li[j]) and li[j][I] <= Q3:\n count += 1\n print(count)', 'import bisect\n\nN = int(input())\nS = list(str(input()))\n\ndef ordN(x):\n return ord(x) - ord(\'a\')\n\nli = [[] for _ in range(26)]\nfor i,s in enumerate(S):\n li[ordN(s)].append(i)\n\nfor i in range(int(input())):\n Q1, Q2, Q3 = input().split()\n if Q1 == "1":\n Q2 = int(Q2) - 1\n if S[Q2] != Q3:\n I = bisect.bisect_left(li[ordN(S[Q2])], Q2)\n li[ordN(S[Q2])].pop(I)\n bisect.insort(li[ordN(Q3)], Q2)\n S[Q2] = Q3\n else:\n Q2, Q3 = int(Q2)-1, int(Q3)-1\n count = 0\n for j in range(26):\n I = bisect.bisect_left(li[j], Q2)\n if I < len(li[j]) and li[j][I] <= Q3:\n count += 1\n print(count)']
['Runtime Error', 'Accepted']
['s187756588', 's839001441']
[28808.0, 30344.0]
[1155.0, 1160.0]
[618, 627]
p02763
u884692162
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['class SegmentTree:\n \n \n \n def __init__(self, size, f=lambda x,y : x+y, default=0):\n self.size = 2**(size-1).bit_length() \n self.default = default\n self.dat = [default]*(self.size*2) \n self.f = f\n\n \n def update(self, i, x):\n i += self.size\n self.dat[i] = x\n while i > 0:\n i >>= 1\n self.dat[i] = self.f(self.dat[i*2], self.dat[i*2+1])\n\n \n def query(self, l, r):\n l += self.size\n r += self.size\n lres, rres = self.default, self.default\n while l < r:\n if l & 1:\n lres = self.f(lres, self.dat[l])\n l += 1\n\n if r & 1:\n r -= 1\n rres = self.f(self.dat[r], rres) \n l >>= 1\n r >>= 1\n res = self.f(lres, rres)\n return res\n\ndef f(x, y):\n return x | y\n\ndef a2n(a):\n return ord(a)-ord("a")\n\ndef createInp(a):\n return 1 << a2n(a)\n\ndef main():\n N = int(input())\n S = input()\n Q = int(input())\n ST = SegmentTree(N, f=f, default=0)\n\n for i, s in enumerate(S):\n ST.update(i+1, createInp(s))\n\n for _ in range(Q):\n t, l, r = input().split()\n if int(t) == 1:\n ST.update(int(l), createInp(s))\n else:\n print(len(ST.query(int(l), int(r)+1)))\n\nif __name__ == \'__main__\':\n main()\n', "class SegmentTree:\n \n \n \n def __init__(self, size, f=lambda x,y : x+y, default=0):\n self.size = 2**(size-1).bit_length() \n self.default = default\n self.dat = [default]*(self.size*2) \n self.f = f\n\n \n def update(self, i, x):\n i += self.size\n self.dat[i] = x\n while i > 0:\n i >>= 1\n self.dat[i] = self.f(self.dat[i*2], self.dat[i*2+1])\n\n \n def query(self, l, r):\n l += self.size\n r += self.size\n lres, rres = self.default, self.default\n while l < r:\n if l & 1:\n lres = self.f(lres, self.dat[l])\n l += 1\n\n if r & 1:\n r -= 1\n rres = self.f(self.dat[r], rres) \n l >>= 1\n r >>= 1\n res = self.f(lres, rres)\n return res\n\ndef f(x, y):\n return x | y\n\nimport pysnooper\n\n#@pysnooper.snoop()\ndef main():\n N = int(input())\n S = input()\n Q = int(input())\n ST = SegmentTree(N, f=f, default=set([]))\n\n for i, s in enumerate(S):\n ST.update(i+1, set([s]))\n\n for _ in range(Q):\n t, l, r = input().split()\n if int(t) == 1:\n ST.update(int(l), set([r]))\n else:\n print(len(ST.query(int(l), int(r)+1)))\n\nif __name__ == '__main__':\n main()\n", 'class SegmentTree():\n \n\n def __init__(self, n, func, init=float(\'inf\')):\n \n self.n = 2**(n-1).bit_length()\n self.init = init\n self.data = [init]*(2*self.n)\n self.func = func\n\n def set(self, k, v):\n \n self.data[k+self.n-1] = v\n\n def build(self):\n \n for k in reversed(range(self.n-1)):\n self.data[k] = self.func(self.data[k*2+1], self.data[k*2+2])\n\n def update(self, k, a):\n \n k += self.n-1\n self.data[k] = a\n\n while k > 0:\n k = (k-1)//2\n self.data[k] = self.func(self.data[k*2+1], self.data[k*2+2])\n\n def query(self, l, r):\n \n L = l+self.n\n R = r+self.n\n ret = self.init\n while L < R:\n if R & 1:\n R -= 1\n ret = self.func(ret, self.data[R-1])\n if L & 1:\n ret = self.func(ret, self.data[L-1])\n L += 1\n L >>= 1\n R >>= 1\n return ret\n\nN = int(input())\nS = input()\nQ = int(input())\nSeg = SegmentTree(N, lambda x, y: x | y, 0)\n\ndef a2n(a):\n return ord(a) - ord(\'a\')\n\ndef createBit(a):\n return 1 << a2n(a)\n\nfor i, s in enumerate(S):\n Seg.set(i, createBit(s))\nSeg.build()\n\nfor _ in range(Q):\n t, l, r = input().split()\n if int(t) == 1:\n Seg.update(int(l)-1, createBit(r))\n else:\n print(bin(Seg.query(int(l)-1, int(r))).count(\'1\'))\n\n# N = int(input())\n# S = input()\n# Q = int(input())\n# queries = [list(input().split()) for _ in range(Q)]\n\n\n# def a2n(a):\n# return ord(a)-ord("a")\n\n\n\n# return 1 << a2n(a)\n\n\n\n# for i, s in enumerate(S):\n\n\n\n\n\n\n# else:\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s787739640', 's796535532', 's934415823']
[25472.0, 3064.0, 43440.0]
[2104.0, 18.0, 1005.0]
[1683, 1637, 2497]
p02763
u906501980
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['def main():\n n = int(input())\n S = input()\n q = int(input())\n for _ in range(q):\n t, i, c = input().split()\n if t == \'1\':\n S[int(i)-1] = c\n else:\n print(len(set(S[int(i)-1:int(c)])))\n \nif __name__ == "__main__":\n main() ', 'from bisect import bisect_left, bisect, insort\ndef main():\n n = int(input())\n s = list(input())\n q = int(input())\n _is = {chr(i):[] for i in range(ord("a"), ord("a")+27)}\n for i, si in enumerate(s):\n _is[si].append(i)\n for _ in range(q):\n t, i, c = input().split()\n i = int(i)-1\n if t == "1":\n if s[i] != c:\n index = bisect_left(_is[s[i]], i)\n del _is[s[i]][index]\n insort(_is[c], i)\n s[i] = c\n else:\n c = int(c) - 1\n cnt = 0\n for _isi in _is.values():\n if _isi:\n is_in = bisect(_isi, c)-bisect_left(_isi, i)\n if is_in:\n cnt += 1\n print(cnt)\n\n\nif __name__ == "__main__":\n main()\n']
['Runtime Error', 'Accepted']
['s187257394', 's737812404']
[3976.0, 28424.0]
[2104.0, 1060.0]
[287, 826]
p02763
u964299793
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['7\nabcdbbd\n6\n2 3 6\n1 5 z\n2 1 1\n1 4 a\n1 7 d\n2 1 7\n', "import sys\ninput=sys.stdin.readline\nn=int(input())\n#print(n,end=' n')\ndata=[0]*(2*n)\ndef upd(i,x):\n i+=n\n data[i]=x\n while i>1:\n data[i>>1]=data[i]|data[i^1]\n i>>=1\ndef qry(l,r):\n l+=n\n r+=n\n res=0\n while l<r:\n if l&1:\n res|=data[l]\n l+=1\n if r&1:\n r-=1\n res|=data[r]\n l>>=1\n r>>=1\n return bin(res).count('1')\n\nfor i,c in enumerate(input()[:-1],n):\n data[i]=1<<(ord(c)-ord('a'))\nfor i in range(n-1,0,-1):\n data[i]=data[i<<1]|data[i<<1|1]\nans=[]\nfor _ in range(int(input())):\n q,a,b=input().split()\n if int(q)==1:\n upd(int(a)-1,1<<(ord(b)-ord('a')))\n else:\n ans.append(qry(int(a)-1,int(b)))\nprint('\\n'.join(map(str,ans)))\n\n\n\n"]
['Runtime Error', 'Accepted']
['s782469283', 's762929256']
[2940.0, 43536.0]
[17.0, 586.0]
[48, 681]
p02763
u970133396
2,000
1,048,576
You are given a string S of length N consisting of lowercase English letters. Process Q queries of the following two types: * Type 1: change the i_q-th character of S to c_q. (Do nothing if the i_q-th character is already c_q.) * Type 2: answer the number of different characters occurring in the substring of S between the l_q-th and r_q-th characters (inclusive).
['import bisect\nn = int(input().strip())\nS = input().strip()\nL=[[] for _ in range(26)]\nfor i,s in enumerate(S):\n L[ord(s)-ord("a")].append(i)\n\nq = int(input().strip())\nfor _ in range(q):\n query=input().strip().split()\n if query[0]=="1":\n i=int(query[1])\n i-=1\n c=query[2]\n if S[i]!=c:\n delInd=bisect.bisect_left(L[ord(S[i])-ord("a")],i)\n del L[ord(S[i])-ord("a")][delInd]\n bisect.insort(L[ord(c)-ord("a")], i)\n S[i]=c\n else:\n l,r=map(int,[query[1],query[2]])\n l-=1; r-=1\n ans=0\n for j in range(26):\n ind=bisect.bisect_left(L[j],l)\n if ind<len(L[j]) and L[j][ind]<=r:\n ans+=1\n print(ans)', 'import bisect\nn = int(input().strip())\nS = list(input().strip())\nL=[[] for _ in range(26)]\nfor i,s in enumerate(S):\n L[ord(s)-ord("a")].append(i)\n\nq = int(input().strip())\nfor _ in range(q):\n query=input().strip().split()\n if query[0]=="1":\n i=int(query[1])\n i-=1\n c=query[2]\n if S[i]!=c:\n delInd=bisect.bisect_left(L[ord(S[i])-ord("a")],i)\n del L[ord(S[i])-ord("a")][delInd]\n bisect.insort(L[ord(c)-ord("a")], i)\n S[i]=c\n else:\n l,r=map(int,[query[1],query[2]])\n l-=1; r-=1\n ans=0\n for j in range(26):\n ind=bisect.bisect_left(L[j],l)\n if ind<len(L[j]) and L[j][ind]<=r:\n ans+=1\n print(ans)']
['Runtime Error', 'Accepted']
['s733719875', 's319568412']
[25096.0, 28808.0]
[1318.0, 1135.0]
[740, 746]
p02765
u004482945
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = map(int, input().split())\nif n <= 10:\n ans = r - 100*(10-n)\nelse:\n ans = r\nprint(ans)', 'n, r = map(int, input().split())\nans = r - 100*(10-n)\nprint(ans)', 'n, r = map(int, input().split())\nif n <= 10:\n ans = r + 100*(10-n)\nelse:\n ans = r\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s171547100', 's457457180', 's913641497']
[9136.0, 8888.0, 9140.0]
[27.0, 27.0, 25.0]
[94, 64, 94]
p02765
u004823354
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r = map(int,input().split())\nif n <= 10:\n print(r-100*(10-n))\nelse:\n print(r)', 'n,r = map(int,input().split())\nif 0 <= n <= 10:\n print(r-100*(10-n))\nelse:\n print(r)', 'n,r = map(int,input().split())\nif 0 <= n <= 10:\n print(r+100*(10-n))\nelse:\n print(r)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s013217632', 's769040921', 's789570245']
[9056.0, 9184.0, 8864.0]
[29.0, 29.0, 29.0]
[81, 86, 86]
p02765
u010870870
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
["import sys\nimport os\nf = open('input.txt', 'r')\nsys.stdin = f\n\ns = list(map(int, input().split()))\nans = 0\n\nif s[0]<=10:\n ans = s[1]+100*(10-s[0])\nelse:\n ans = s[1]\n\nprint(ans)\n", 's = list(map(int, input().split()))\nans = 0\n\nif s[0]<=10:\n ans = s[1]+100*(10-s[0])\nelse:\n ans = s[1]\n\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s730480358', 's920046506']
[3060.0, 3064.0]
[17.0, 17.0]
[183, 120]
p02765
u015593272
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N, R = map(int, input().split())\n\nif (N >= 10):\n ans = R\nelse:\n ans = R + 1000 - 100 * N', 'N, R = map(int, input().split())\n\nif (N >= 10):\n ans = R\nelse:\n ans = R + 1000 - 100 * N\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s248870292', 's562706309']
[2940.0, 2940.0]
[17.0, 17.0]
[94, 106]
p02765
u016901717
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r = map(int,input().split())\nif 10<=n :\n print(r)\nelif 1<= n <10:\n print(r+100*(100-n))\n', 'n,r = map(int,input().split())\nif 10<=n :\n print(r)\nelif 1<= n <10:\n print(r+100*(10-n))\n']
['Wrong Answer', 'Accepted']
['s331865753', 's566638806']
[2940.0, 2940.0]
[17.0, 17.0]
[92, 91]
p02765
u017050982
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['import math\n\nN,K = map(int,input().rstrip().split(" "))\nif N > 0:\n print(math.ceil(math.log(N+1,K)))\nelse:\n print(1)', 'N = int(input())\nX = list(map(int,input().rstrip().split(" ")))\nans = 0\nansb = 0\nfor i in range(100):\n ansb = 0\n for i2 in range(N):\n ansb += (X[i2] - i)**2\n if i == 0 or ans > ansb:\n ans = ansb\nprint(ans)\n', 'N,R = map(int,input().rstrip().split(" "))\nif N >= 10:\n print(R)\nelse:\n print(R - (10-N)*100)', 'N,R = map(int,input().rstrip().split(" "))\nif N >= 10:\n print(R)\nelse:\n print(R + (10-N)*100)\n']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s513899513', 's875854685', 's903792324', 's853077679']
[2940.0, 2940.0, 2940.0, 2940.0]
[19.0, 17.0, 17.0, 17.0]
[118, 215, 95, 96]
p02765
u018258333
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
["n = int(input())\nx = input().split(' ')\n\np = 0\nans = []\nwhile p <= int(x[n-1]):\n e = 0\n for i in range(n):\n e += (int(x[i])-p)**2\n ans.append(e)\n p+=1\nprint(min(ans))", 'n,r = map(int,input().split())\n\nif n >= 10:\n print(r)\nelse:\n print(r+ 100*(10 - n))']
['Runtime Error', 'Accepted']
['s400044105', 's651413051']
[3060.0, 9084.0]
[18.0, 27.0]
[173, 85]
p02765
u018679195
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N = int(input())\nR = int(input())\nif 0 <= R <= 4111:\n if 10 <= N <= 100:\n print(R)\n else:\n K = 100 * (10 - N)\n M = R + K\n print(M)', "def E(N,R):\n if int(N)==N and int(R)==R:\n if 1<= N <= 100 and 0<= R <= 4111:\n if N > 10:\n print(R)\n else:\n K = 100 * (10 - N)\n print(R+K)\n else:\n print('please input right numbers')\n else:\n print('please input an integer')", "N = int(input('N:'))\nR = int(input('R:'))\nwhile int(N) == N and int(R) == R:\n if 1 <= N <= 100 and 0 <= R <= 4111:\n if N > 10:\n print(R)\n else:\n K = 100 * (10 - N)\n print(R + K)\n break", "class E():\n def ee(N,R):\n if int(N)==N and int(R)==R:\n if 1<= N <= 100 and 0<= R <= 4111:\n if N > 10:\n print(R)\n else:\n K = 100 * (10 - N)\n print(R+K)\n else:\n print('please input right numbers')\n else:\n print('please input an integer')", 'NR= input().split()\nN= int (NR[0])\nR= int (NR[1])\nif (N >= 10):\n print(R)\nelse:\n print (R+100*(10-N))']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s000069779', 's323497824', 's399928715', 's940789701', 's277164131']
[9168.0, 8972.0, 9164.0, 8968.0, 2940.0]
[24.0, 30.0, 21.0, 27.0, 17.0]
[164, 327, 237, 387, 107]
p02765
u019291053
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['import numpy as np\n\nn,r = map(int,input().split())\nprint(n,r)\n\nif n < 10:\n print(r + 1000 - 100*n)\nelse:\n print(r)', 'import numpy as np\n\nn,r = map(int,input().split())\nprint(n,r)\n\nif n < 10:\n print(r + 1000 - 100*n)\nelse:\n print(r)', 'import numpy as np\n\nn,r = map(int,input().split())\n\nif n < 10:\n print(r + 1000 - 100*n)\nelse:\n print(r)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s339606251', 's715777592', 's453193674']
[13472.0, 12424.0, 19120.0]
[188.0, 152.0, 263.0]
[120, 120, 109]
p02765
u021521597
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['# -*- coding: utf-8 -*-\nN,R = map(int, input().split())\nif N <= 10:\n\tR = R - 100 * (10 - N )\n \nprint(R)', '# -*- coding: utf-8 -*-\nN,R = map(int, input().split())\nif N < 10:\n R = R - 100×(10−N)\n\nprint(R)', '# -*- coding: utf-8 -*-\nN,R = map(int, input().split())\nif N < 10:\n\tR = R - 100 * (10 - N )\n \nprint(R)', '# -*- coding: utf-8 -*-\nN,R = map(int, input().split())\nif N < 10:\n\tR = R + 100 * (10 - N )\n \nprint(R)']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s063716164', 's169352616', 's807761368', 's859155748']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[107, 100, 106, 106]
p02765
u021548497
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = map(int, input().split())\nif n >= 10:\n print(r)\nelse:\n print(r-(10-n)*100)', 'n, r = map(int, input().split())\nprint(r+max(0, 10-n)*100)']
['Wrong Answer', 'Accepted']
['s682363655', 's768174079']
[2940.0, 2940.0]
[16.0, 18.0]
[83, 58]
p02765
u024422110
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = map(int, input().split())\n\nif N < 10:\n A = 100*(10-N)\n \n print(R-A)\nelse:\n print(R)', 'N,R = map(int, input().split())\n\nif N < 10:\n A = 100*(10-N)\n print(R+A)\nelse:\n print(R)']
['Wrong Answer', 'Accepted']
['s766842923', 's849389625']
[2940.0, 2940.0]
[17.0, 17.0]
[93, 90]
p02765
u028014940
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N, R = map(int, input().split())\n\nif N >= 10:\n print(str(R))\n \n else:\n print(str(R + 100 * (10 - N)))', 'N, R = map(int, input().split())\n \nif N >= 10:\n print(str(R))\n \nelse:\n print(str(R + 100 * (10 - N)))']
['Runtime Error', 'Accepted']
['s035931999', 's700596634']
[2940.0, 2940.0]
[17.0, 17.0]
[104, 104]
p02765
u029935728
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R=input().split()\nN=int(N)\nR=int(R)\nif N>=10:\n\tprint(R)\nelse :\n\tprinAt((100*(10-N))+R)', 'N,R=input().split()\nN=int(N)\nR=int(R)\nif N>=10:\n\tprint(R)\nelse :\n\tprint(100*(10-N))', 'N,R=input().split()\nN=int(N)\nR=int(R)\nif N>=10:\n\tprint(R)\nelse :\n\tprint((100*(10-N))+R)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s382794222', 's607953214', 's035244728']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[88, 83, 87]
p02765
u030278108
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = map(int, input().split())\n\nif n < 10:\n a = 100 * (10 - n)\n b = r - a\n if b >=0:\n print(b)\n else:\n print(0)\nelse:\n print(r)', 'n, r = map(int, input().split())\n\nif n < 10:\n a = 100 * (10 - n)\n print(r - a)\nelse:\n print(r)', 'n, k =map(int, input().split())\n\ndef base10to(n, k):\n if (int(n/k)):\n return base10to(int(n/k), k) + str(n%k)\n return str(n%k)\n\na = base10to(n, k)\nprint(len(a))\n', 'n, r = map(int, input().split())\n\nif n < 10:\n print(100 * (10 - n))\nelif n >= 10:\n print(r)', 'n, r = map(int, input().split())\n\nif n < 10:\n print(100 * (10 - n))\nelse:\n print(r)', 'n, r = map(int, input().split())\n\nif n < 10:\n a = 100 * (10 - n)\n b = r - a\n if b >=0:\n print(b)\n else:\n print(0)\nelse:\n print(r)', 'n, r = map(int, input().split())\n\nif n < 10:\n a = 100 * (10 - n)\n b = r + a\n if b >=0:\n print(b)\n else:\n print(0)\nelse:\n print(r)']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s083839909', 's430865788', 's498944294', 's526171291', 's540923286', 's675470774', 's379595869']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[158, 103, 174, 97, 89, 158, 158]
p02765
u030726788
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r = map(int,input().split())\n\nif(n >= 10):\n print(r)\nelse:\n print(r-100*(10-n))', 'n,r = map(int,input().split())\n\nif(n >= 10):\n print(r)\nelse:\n print(r+100*(10-n))\n']
['Wrong Answer', 'Accepted']
['s709562695', 's400080493']
[2940.0, 2940.0]
[17.0, 17.0]
[87, 88]
p02765
u031722966
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['def main():\n N,R = map(int,input().split())\n if N > 11:\n a = 100 * (10 - N)\n print(a + R)\n else:\n print(R)\nmain()', 'def main():\n N,R = map(int,input().split())\n if N < 11:\n a = 100 * (10 - N)\n print(a + R)\n else:\n print(R)\nmain()']
['Wrong Answer', 'Accepted']
['s460905116', 's444237766']
[2940.0, 2940.0]
[18.0, 17.0]
[143, 143]
p02765
u032222383
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r=int(input().split())\nif n <10:\n print(r-100*(10-2))\nelse:\n print(r)', 'n,r=map(int,input().split())\nif n<10:\n print(r+(10-n)*100)\nelse:\n print(r)']
['Runtime Error', 'Accepted']
['s201876530', 's151675831']
[2940.0, 2940.0]
[18.0, 18.0]
[73, 80]
p02765
u033168327
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N = int(input())\nR = int(input())\nif N < 10:\n print(R+100*(10-N))\nelse:\n print(R)\n', 'N = int(input())\nR = int(input())\nif N < 10:\n print(1000-100*N)\nelse:\n print(R)', 'N,R= map(int,input().split())\nif N < 10:\n print(R+100*(10-N))\nelse:\n print(R)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s099032277', 's406002979', 's461186507']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[88, 85, 83]
p02765
u035445296
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r = map(int,input().split())\nif n>10:\n print(r)\nelse:\n print(100*(10-n))', 'n,r = int(input())\nif n>10:\n print(r)\nelse:\n print(r-(100*(10-n)))', 'n,r = map(int,input().split())\nif n>10:\n print(r)\nelse:\n print(r+100*(10-n))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s560651967', 's660848248', 's391704523']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 18.0]
[76, 68, 78]
p02765
u038216098
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R=map(int,input().split())\nnaibu=0\nif(N>=10):\n naibu=R\nelse:\n naibu=R+100*(10-R)\nprint(naibu)', 'N,R=map(int,input().split())\nnaibu=0\nif(N>=10):\n naibu=R\nelse:\n naibu=R+100*(10-N)\nprint(naibu)']
['Wrong Answer', 'Accepted']
['s077034644', 's347042289']
[8988.0, 9164.0]
[28.0, 26.0]
[97, 97]
p02765
u038819082
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R=int(input().split())\nc=0\nif N>=10:\n c=R\nelse:\n c=R+100*(10-c)\nprint(c)', 'N,R=map(int,input().split())\nc=0\nif N>=10:\n c=R\nelse:\n c=R+100*(10-c)\nprint(c)', 'N,R=map(int,input().split())\nc=0\nif N>=10:\n c=R\nelse:\n c=R+100*(10-N)\nprint(c)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s309783142', 's710890207', 's845076077']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[76, 80, 80]
p02765
u039189422
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,K = map(int,input().split())\nN += 1\nans = 1\nfor i in range(1000000): \n\tif K**(ans) < N:\n\t\tans += 1\n\telse:\n\t\tprint(ans)\n\t\tbreak', 'N,R = map(int,input().split())\n\nif N < 10:\n\tprint(R + 100*(10-N))\nelse:\n\tprint(R)']
['Wrong Answer', 'Accepted']
['s111338909', 's473043664']
[2940.0, 2940.0]
[434.0, 17.0]
[128, 81]
p02765
u047197186
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = [int(elem) for elem in input().split()]\n\nif n < 10:\n print(r - 100 *(10-n))\nelse:\n print(r)', 'n, r = [int(elem) for elem in input().split()]\n \nif n < 10:\n print(r + 100 *(10-n))\nelse:\n print(r)']
['Wrong Answer', 'Accepted']
['s990218033', 's384319736']
[2940.0, 2940.0]
[17.0, 17.0]
[100, 101]
p02765
u047816928
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N, R = map(int, input().split())\nprint(R+100*(10-min(10,K)))', 'N, R = map(int, input().split())\nprint(R+100*(10-min(10,N)))']
['Runtime Error', 'Accepted']
['s926598039', 's938210898']
[2940.0, 2940.0]
[18.0, 17.0]
[60, 60]
p02765
u048956777
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, k = map(int, input().split())\n\ni = 0\nwhile n > 0:\n n = n - k**i\n if n < 0:\n break\n i += 1\n\nprint(i)', 'n, r = map(int, input().split())\n\nif n < 10:\n r = r+(100*(10-n))\n\nprint(r)']
['Wrong Answer', 'Accepted']
['s251995679', 's380412049']
[2940.0, 2940.0]
[2104.0, 17.0]
[118, 77]
p02765
u049574854
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R=(int(i)for i in input().split())\n\nif N >= 10:\n print(R)\nelse:\n print(100*(10-N))', 'N,R=(int(i)for i in input().split())\n\nif N >= 10:\n print(R)\nelse:\n print(R-100*(10-N))', 'N,R=(int(i)for i in input().split())\n\nif N >= 10:\n print(R)\nelse:\n print(R+100*(10-N))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s670459080', 's679140265', 's499186652']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[90, 92, 92]
p02765
u051496905
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N , R = map(int,input().split())\nif N >= 10:\n print(R)\nelse:\n print(N + 100*(10 - R))', 'N , R = map(int,input().split())\nif N >= 10:\n print(R)\nelse:\n print(R + 100*(10 - N))']
['Wrong Answer', 'Accepted']
['s501915949', 's582427838']
[2940.0, 2940.0]
[17.0, 17.0]
[92, 92]
p02765
u052331051
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
["import os\nimport sys\nimport numpy \n\nif _name_=='__main__':\n _input = input()\n _input = _input.split()\n N = _input[0]\n R = _input[1]\n if N<10:\n R -= 100 * (10-N)\n print(R)", '_input = input()\nnumber = _input.split()\nN = number[0]\nR = number[1]\nif N<10:\n R += 100 * (10-N)\nprint(R)\n ', '_input = input()\nnumber = _input.split()\nN = int(number[0])\nR = int(number[1])\nif N<10:\n R += 100 * (10-N)\nprint(R)\n \n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s111178877', 's938228948', 's822817100']
[21796.0, 2940.0, 2940.0]
[317.0, 17.0, 17.0]
[179, 119, 130]
p02765
u054931633
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,k = map(int,input().split())\nfor i in range(1,30):\n if n >= k**(i-1) and n < k**i:\n print(i)', 'n,k = map(int,input().split())\nfor i in range(30):\n if n >= k**(i-1) and n < k**i:\n print(i)', 'n,r = map(int,input().split())\nif n>=10:\n print(r)\nelse:\n print(r+100*(10-n))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s171427527', 's370155069', 's440523337']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[104, 102, 83]
p02765
u057993957
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = [int(i) for i in input().split()]\nprint(r if n > 10 else r * (10 - n))', 'n, r = [int(i) for i in input().split()]\nprint(r if n >= 10 else r * (10 - n))', 'n, r = [int(i) for i in input().split()]\nprint(r if n >= 10 else r + 100 * (10 - n))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s697412475', 's941200683', 's255737923']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[77, 78, 84]
p02765
u060012100
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = map(int,input().split())\nans = 100*(10-N)+R\nif N>=10:\n print(R)\n else:\n print(ans)', 'N,R = map(int, input().split())\nans = 100*(10-N)+R\nif N>=10:\n print(R)\nelse:\n print(ans)']
['Runtime Error', 'Accepted']
['s053981130', 's493053135']
[2940.0, 2940.0]
[17.0, 17.0]
[90, 90]
p02765
u063346608
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = map(int,input().split())\n\nif N >= 10:\n answer = R\nelse:\n answer = R - 100 * (10 - N )\n\nprint(answer)\n', 'N,R = map(int,input().split())\n\nif N >= 10:\n answer = R\nelse:\n answer = R + 100 * (10 - N )\n\nprint(answer)']
['Wrong Answer', 'Accepted']
['s173142232', 's134835188']
[2940.0, 2940.0]
[17.0, 18.0]
[109, 108]
p02765
u065994196
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['inp=list(map(int,input().strip().split()))[:2]\nn,r=inp[0],inp[1]\nif(n < 9):\n print(100*(10-r))\nelse:\n print(r)', 'inp=list(map(int,input().strip().split()))[:2]\nn,r=inp[0],inp[1]\nif(n <= 9):\n print(100*(10-n)+r)\nelse:\n print(r)\n']
['Wrong Answer', 'Accepted']
['s936064390', 's175022065']
[3064.0, 2940.0]
[17.0, 19.0]
[112, 116]
p02765
u066551652
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N, R = map(int, input().split())\nans = 0\n\nif N >= 10:\n ans = R\nelse:\n ans = R + 100*(10 - K)\n\nprint(ans)\n ', 'K, R = map(int, input().split())\nans = 0\n \nif K >= 10:\n ans = R\nelse:\n ans = R + 100*(10 - K)\n \nprint(ans)']
['Runtime Error', 'Accepted']
['s903646437', 's218524715']
[2940.0, 2940.0]
[17.0, 18.0]
[109, 108]
p02765
u067986264
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N, R = map(int, input().split())\nif N < 10:\n print(100*(10-N) + R)\nprint(R)', 'N, R = map(int, input().split())\nif N <= 10:\n print(100*(10-N) + R)\nprint(R)', 'N, R = map(int, input().split())\nif N < 10:\n print(N + R)\nprint(R)', 'n, r = map(int, input().split())\nif n < 10:\n print(r + 800)\nprint(r)\n', 'N, R = map(int, input().split())\nprint(R + 100*(10 - min(10, N)))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s139452922', 's288699833', 's599909695', 's965253129', 's041200856']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0, 17.0, 17.0]
[78, 79, 69, 72, 65]
p02765
u068666298
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N = int(input())\na = [input() for i in range(N)]\nP=round(sum(A)/N)\nB=0\nfor i in range(N):\n\tB=B+(A[i]-P)**2\nprint(B)', 'N = int(input())\nA = list(map(int, input().split())) \nP=round(sum(A)/N)\nB=0\nfor i in range(N):\n\tB=B+(A[i]-P)**2\nprint(B)', 'from math import factorial\nN, a, b = map(int, input().split())\nm=0\nfor i in range(N):\n if i==a, or i==b\n k=0\n m=m+k\n if not i== a-1 or i==b-1:\n k= factorial(N) // ((factorial(N - (i+1)) * factorial(i+1)))\n m=m+k\n print(m)\n', 'from math import factorial\nN, a, b = map(int, input().split())\nm=0\nfor i in range(N):\n if not i== a-1 or i==b-1:\n k=factorial(N) // (factorial(N - (i+1)) * factorial(i+1))\n m=m+k\n print(m)\n', 'N = int(input())\na = [input() for i in range(N)]\nP=round(sum(A)/N)\nB=0\nfor i in range(N):\n B=B+(A[i]-P)**2\nprint(B)\n', 'N,R=map(int, input().split()) \nif N>=10:\n print(R)\nif 0<=N<=10:\n print(R-100*(10-N))', 'n = int(stdin.readline().rstrip())\ndata = int[stdin.readline().rstrip().split() for _ in range(n)]\nP=round(sum(A)/N)\nB=0\nfor i in range(N):\n B=B+(A[i]-P)**2\nprint(B)\n', 'N = int(input())\nA = list(map(int, input().split()))\nP=round(sum(A)/N)\nB=0\nfor i in range(N):\n B=B+(A[i]-P)**2\nprint(B)\n', 'N = int(stdin.readline().rstrip())\nA = int[stdin.readline().rstrip().split() for _ in range(n)]\nP=round(sum(A)/N)\nB=0\nfor i in range(N):\n B=B+(A[i]-P)**2\nprint(B)\n\n', 'N = input()\nfor i in range(N):\n\tA = [int(i) for i in input().split()]\nP=round(sum(A)/N)\nB=0\nfor i in range(N):\n\tB=B+(A[i]-P)**2\nprint(B)\n', 'N,K=map(int, input().split()) \nfor i in range(9000):\n if K**i<=N<K**(i+1):\n print(i+1)', 'N,R=map(int, input().split()) \nif N>=10:\n print(R)\nif 0<=N<10:\n print(R-100*(10-N))', 'N = int(input())\nA = [input() for i in range(N)]\nP=round(sum(A)/N)\nB=0\nfor i in range(N):\n B=B+(A[i]-P)**2\nprint(B)\n', 'N,R=map(int, input().split()) \nif N>=10:\n print(R)\nif 0<=N<10:\n print(R+100*(10-N))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s095444549', 's234683336', 's282222097', 's360776801', 's396852132', 's401167258', 's483720203', 's548606550', 's654550825', 's697271805', 's697926727', 's926117296', 's949615169', 's078083584']
[2940.0, 2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0, 3064.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 16.0, 17.0, 2104.0, 17.0, 17.0, 17.0]
[115, 120, 259, 209, 117, 90, 167, 121, 167, 137, 96, 89, 117, 89]
p02765
u068862866
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = map(int,input().split())\n\nif N<10:\n print(100*(10-K))\nelse:\n print(R)', 'N,R = map(int,input().split())\n \nif N<10:\n print(R+100*(10-N))\nelse:\n print(R)']
['Runtime Error', 'Accepted']
['s361036902', 's777348537']
[8972.0, 9072.0]
[27.0, 26.0]
[77, 80]
p02765
u069273180
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['from sys import stdin\nn,k=list(map(int,input().split()))\nc=0\nwhile n > 0:\n c += 1\n n//=k\nprint(c)\n', 'from sys import stdin\nn,k=map(int,input().split())\nc=0\nwhile n > 0:\n c += 1\n n//=k\nprint(c)\n', 'from sys import stdin\n\nn = int(input())\nr = int(input())\n\nif n < 11:\n a = r + 100 * (10-n)\nelse:\n a = r\n\nprint(n)\n', 'from sys import stdin\nn,k=list(map(int,input().split()))\nc=1\nwhile True:\n n//=k\n if n == 0\n break\n else:\n c+=1\n\nprint(c)\n', 'from sys import stdin\n\nn = int(input())\nr = int(input())\n\nif n < 11:\n a = r - 100 * (10-n)\nelse:\n a = r\n\nprint(n)\n', 'from sys import stdin\n\nn = int(input())\nr = int(input())\n\nif n < 11:\n a = r + 100 * (10-n)\nelse:\n a = r\n\nprint(a)\n', 'from sys import stdin\n\nn,k = map(int,input().split())\n\nnum = n\nsum_k = k\n\nwhile sum_k <= n:\n sum_k= sum_k * k\n\nprint(len(str(sum_k)))\n', 'from sys import stdin\n\nn = input()\nr = input()\n\nif n < 10:\n print(r + 100 * (10-n))\nelse:\n print(r)\n', 'from sys import stdin\n\nn = int(input())\nr = int(input())\n\nif n < 10:\n print(r + 100 * (10-n))\nelse:\n print(r)\n', 'from sys import stdin\n\nn,r=map(int,input().split())\n\nif n < 10:\n print(r + 100 * (10-n))\nelse:\n print(r)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s252534239', 's340193057', 's388775609', 's501217574', 's512079004', 's519052980', 's657807305', 's700301523', 's710557512', 's359517670']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 18.0, 17.0, 18.0, 2104.0, 17.0, 17.0, 17.0]
[104, 98, 120, 144, 120, 120, 137, 106, 116, 111]
p02765
u071916806
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r=input().split()\nn=int(n)\nr=int(r)\nif n>=10:\n print(r)\nelse:\n print(r-100*(10-n))', 'N,R=input().split()\nn=int(N)\nr=int(R)\nif n>=10:\n print(r)\nelse:\n print(r+100*(10-n))']
['Wrong Answer', 'Accepted']
['s056026104', 's409555824']
[2940.0, 2940.0]
[17.0, 17.0]
[86, 86]
p02765
u075109824
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = input().split(" ")\nif n<10:\n print((100*(10-n))+r)\nelse:\n print(r)', 'n, r = input().split(" ")\nn=int(n)\nr=int(r)\nif n<10:\n print((100*(10-n))+r)\nelse:\n print(r)']
['Runtime Error', 'Accepted']
['s125194952', 's605583310']
[2940.0, 2940.0]
[18.0, 17.0]
[79, 97]
p02765
u077816564
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = (int(x) for x in input().split())\nif N>=10:\n print(R)\nelse:\n print(R-100*(10-N))', 'N,R = (int(x) for x in input().split())\nif N >= 10:\n print(R)\nelse:\n print(R+100*(10-N))']
['Wrong Answer', 'Accepted']
['s728846321', 's803839547']
[9160.0, 9028.0]
[30.0, 28.0]
[88, 90]
p02765
u078316894
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
["N, R = list(map(int, input().split(' ')))\nif N >= 10:\n print(R)\nelse:\n print(R + (100 - (10 - N)))", "N, R = list(map(int, input().split(' ')))\nif N >= 10:\n print(R)\nelse:\n print(R + (100 - (10 - K)))", "N, R = list(map(int, input().split(' ')))\nif N >= 10:\n print(R)\nelse:\n print(R + (100 * (10 - N)))"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s538436662', 's829824642', 's395818632']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[104, 104, 104]
p02765
u079022116
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['def framod(n, mod, a=1):\n for i in range(1,n+1):\n a=a * i % mod\n return a\n\ndef power(n, r, mod):\n if r == 0: return 1\n if r%2 == 0:\n return power(n*n % mod, r//2, mod) % mod\n if r%2 == 1:\n return n * power(n, r-1, mod) % mod\n\ndef comb(n, k, mod):\n a=framod(n, mod)\n b=framod(k, mod)\n c=framod(n-k, mod)\n return (a * power(b, mod-2, mod) * power(c, mod-2, mod)) % mod\nn,a,b=map(int,input().split())\nmodd = 10**9+7\nprint(2**n-comb(n,a,modd)-comb(n,b,modd)-1)', 'n,k = map(int,input().split())\nif n >= 10:\n print(k)\nelse:\n print(100*(10-n)+k)']
['Runtime Error', 'Accepted']
['s941435627', 's471070148']
[3064.0, 2940.0]
[17.0, 17.0]
[504, 85]
p02765
u079182025
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = map(int, input().split())\nprint(n, r) \n\nans = 0\nif n >= 10:\n ans = r\nelse:\n ans = r + (100 * (10 - n))\n\nprint(ans)', 'n, r = map(int, input().split())\n\nans = 0\nif n >= 10:\n ans = r\nelse:\n ans = r + (100 * (10 - n))\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s159043642', 's733851340']
[2940.0, 2940.0]
[17.0, 17.0]
[123, 110]
p02765
u080880358
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,a,b=map(int,input().split());k=10**9+7;c=(1<<n)%k-1;X=Y=1\nfor i in range(b):X=X*(n-i)%k;Y=Y*(i+1)%k;c-=X*pow(Y,k-2,k)if i+1in(a,b)else 0\nprint(c%k)', 'n,*a=map(int,open(0).read().split());k=10**9+7\nc=(1<<n)%k-1\nfor l in a:\n\tX=Y=j=Z=1;d=k-2\n\tfor i in range(l):X=X*(n-i)%k\n\twhile j<=l:Y=Y*j%k;j+=1\n\twhile d>0:Z=Z*Y%k if d&1==1 else Z;Y=Y*Y%k;d>>=1\n\tc-=X*Z%k\nprint(c%k)', 'N,*X=map(int,open(0).read().split());print(sum(map(lambda x:(round(sum(X)/N)-x)**2,X)))', 'n,r=map(int,input().split());print(r+max(0,1000-100*n))']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s432985142', 's662956140', 's882607585', 's136899522']
[3060.0, 3064.0, 2940.0, 2940.0]
[17.0, 19.0, 18.0, 17.0]
[149, 215, 87, 55]
p02765
u082861480
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r = map(int,input().split())\nprint(r if n >= 10 else r - 100*(10-n))', 'n,r = map(int,input().split())\nprint(r if n >= 10 else r + 100*(10-n))']
['Wrong Answer', 'Accepted']
['s547218921', 's721739348']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 70]
p02765
u083494782
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r=map(int,input(),split())\nif n >= 10:\n ans = r\nelse:\n ans = r + 1000 - 100 * n', 'n,r=map(int,input().split())\nif n >= 10:\n ans = r\nelse:\n ans = r + 1000 - 100 * n', 'n,r=map(int,input().split())\nif n >= 10:\n ans = r\nelse:\n ans = r + 1000 - 100 * n\nprint(ans)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s693527862', 's723267197', 's967712018']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[87, 87, 98]
p02765
u085334230
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['def main():\n B = list(map(int, input().split()))\n # # [1,2,3]\n N = B[0]\n R = B[1]\n\n if N < 10:\n print(R)\n A = 100 * (10 - N)\n \n print(R + A)\n \nmain()', 'def main():\n B = list(map(int, input().split()))\n # # [1,2,3]\n N = B[0]\n R = B[1]\n\n if N < 10:\n print(R)\n else:\n A = 100 * (10 - N)\n\n print(R + A)\n\nmain()', 'def main():\n B = list(map(int, input().split()))\n # # [1,2,3]\n N = B[0]\n R = B[1]\n\n if N < 10:\n A = 100 * (10 - N)\n \n print(R + A)\n else:\n print(R)\n \n \nmain()']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s029351619', 's376735049', 's365658833']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[183, 189, 205]
p02765
u086503932
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N, R = map(int, input().split())\nif N >= 10:\n print(R)\nelse:\n print(R+100*(10-K))', 'N, R = map(int, input().split())\nif N >= 10:\n print(R)\nelse:\n print(R+100*(10-N))']
['Runtime Error', 'Accepted']
['s002847152', 's183358272']
[8940.0, 8948.0]
[24.0, 26.0]
[87, 87]
p02765
u087099834
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = map(lambda x: int(x), input().split())\nif n < 10:\n print(100*(10-n)+r)\n return\nprint(r)', 'n, r = map(lambda x: int(x), input().split())\nif n < 10:\n print(100*(10-n)+r)\nelse:\n print(r)\n']
['Runtime Error', 'Accepted']
['s692433950', 's161416482']
[2940.0, 2940.0]
[18.0, 17.0]
[96, 96]
p02765
u087373960
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = [int(i) for i in input().split()]\n\nif N < 10:\n print(R + (100 * (N- 2)))\nelse:\n print(R)', 'N,R = [int(i) for i in input().split()]\n\nif N < 10:\n print(R + (100 * (10- N)))\nelse:\n print(R)']
['Wrong Answer', 'Accepted']
['s697968048', 's603495245']
[2940.0, 2940.0]
[17.0, 17.0]
[100, 101]
p02765
u088751997
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['a,b=map(int,input().split())\nprint(b+100*max(10-a,0)', 'a,b=map(int,input().split())\nprint(b+100*max(10-a,0))\n']
['Runtime Error', 'Accepted']
['s078303875', 's583703756']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 54]
p02765
u088989565
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N, R = list(map(int, input().split()))\n\nif(N>=10):\n print(R)\nelse:\n print(R - 100*(10-N))\n', 'N, R = list(map(int, input().split()))\n \nif(N>=10):\n print(R)\nelse:\n print(R + 100*(10-N))']
['Wrong Answer', 'Accepted']
['s821744969', 's913112113']
[2940.0, 2940.0]
[17.0, 17.0]
[92, 92]
p02765
u089032511
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['m,n = map(int,input().split())\nif m>=10:\n print(n)\nelse:\n print(n+(100-m))', 'm,n = map(int,input().split())\nif m>9:\n print(n)\nelse:\n print(n+(100-m))', 'm,n = map(int,input().split())\nif m>=10:\n print(n)\nelse:\n print(n-(100-m))', 'm,n = map(int,input().split())\nif m>=10:\n print(n)\nelse:\n print(n+(100-m))', 'm,n = map(int,input().split())\nif m>=10:\n print(n)\nelse:\n print(n+(100*(10-m)))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s180607967', 's411964545', 's745494453', 's930951058', 's566373318']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[80, 78, 80, 80, 85]
p02765
u089786098
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['def a(N,R):\n if N >= 10:\n print(R)\n else:\n print(R+(100*(10-K)))\n return\n\n \na(N,R)', 'N, R = map(int, input().split())\ndef a(N,R):\n if N >= 10:\n print(R)\n else:\n print(R+(100*(10-N)))\n return\n \na()', 'N, R = map(int, input().split())\ndef a(N,R):\n if N >= 10:\n print(R)\n else:\n print(R+(100*(10-N)))\n return\n \na(N,R)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s606925322', 's775134114', 's966712117']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[119, 148, 152]
p02765
u091412190
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = map(int,input().split())\nif N >= 10:\n print(R)\nelse:\n print(R-100*(10-N))', 'N,R = map(int,input().split())\nif N >= 10:\n print(R)\nelse:\n print(100*(10-N))', 'N,R = map(int,input().split())\nif N >= 10:\n print(R)\nelse:\n print(100*(10-K))', 'N,R = map(int,input().split())\nif N >= 10:\n print(R)\nelse:\n print(R+100*(10-N))\n']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s184838509', 's228999440', 's911167334', 's914442832']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[81, 79, 79, 82]
p02765
u093545584
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n = int(input())\nr = int(input())\n\nif n >= 10:\n print(int(r))\nelse:\n a = 100*(10-n)\n print(int(r+a))', "inputStr = input()\ninputList = inputStr.split(' ')\nn = int(inputList[0])\nr = int(inputList[1])\n\nif n >= 10:\n print(int(r))\nelse:\n a = 100*(10-n)\n print(int(r+a))"]
['Runtime Error', 'Accepted']
['s745019023', 's201180454']
[2940.0, 2940.0]
[18.0, 17.0]
[109, 170]
p02765
u096025032
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,M = map(int, input().split())\n\nif N < 10:\n print(M - 100*(10 -N))\nelse:\n print(M)', 'N,M = map(int, input().split())\n\nif N <= 9:\n print(M + 100*(10 -N))\nelse:\n print(M)\n']
['Wrong Answer', 'Accepted']
['s338792446', 's062300023']
[9076.0, 9132.0]
[26.0, 23.0]
[85, 86]
p02765
u098679988
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['l = list(map(int, input().split()))\n \nif l[0] > 10:\n print(l[1])\nelse:\n print(100*(10-l[])))', 'l = list(map(int, input().split()))\n \nif l[0] > 10:\n print(l[1])\nelse:\n print(100*(10-l[1]))', 'n = list(map(int, input().split()))\n \nif n[0] > 10:\n print(n[1])\nelse:\n print(n[1] + 100*(10-n[0]))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s725109962', 's834527382', 's060096653']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[94, 94, 101]
p02765
u103915901
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r=map(input().split())\nif n<10:\n r=r+100*(10-n)\nprint(r)', 'n,r=map(int,input().split())\nif n<10:\n r=r+100*(10-n)\nprint(r)']
['Runtime Error', 'Accepted']
['s790244188', 's413273147']
[3188.0, 2940.0]
[18.0, 17.0]
[59, 63]
p02765
u104005543
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = map(int, input().split())\nif n >=10:\n\tprint(r)\nelse:\n\tprint(r-1000+100n)', 'n, r = map(int, input().split())\nif n >=10:\n\tprint(r)\nelse:\n\tprint(r+1000-100*n)']
['Runtime Error', 'Accepted']
['s508454427', 's546057208']
[2940.0, 2940.0]
[17.0, 17.0]
[80, 81]
p02765
u106181248
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = map(int,input().split())\n\nif r<10:\n print(r + 100*(10-n))\nelse:\n print(r)', 'n, r = map(int,input().split())\n\nif r<10:\n print(100*(10-n))\nelse:\n print(r)', 'n, r = map(int,input().split())\n\nif n<10:\n print(r + 100*(10-n))\nelse:\n print(r)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s703985553', 's805109091', 's823302573']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[82, 78, 83]
p02765
u106311097
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
["#!python3.4\n# -*- coding: utf-8 -*-\n# abc156/abc156_a\nimport sys\n\ns2nn = lambda s: [int(c) for c in s.split(' ')]\nss2nn = lambda ss: [int(s) for s in list(ss)]\nss2nnn = lambda ss: [s2nn(s) for s in list(ss)]\ni2s = lambda: sys.stdin.readline().rstrip()\ni2n = lambda: int(i2s())\ni2nn = lambda: s2nn(i2s())\nii2ss = lambda n: [i2s() for _ in range(n)]\nii2nn = lambda n: ss2nn(ii2ss(n))\nii2nnn = lambda n: ss2nnn(ii2ss(n))\n\ndef main():\n N, R = i2nn()\n if N < 10:\n print(R - 100 * (10 - N))\n else:\n print(R)\n return\n\nmain()\n", "#!python3.4\n# -*- coding: utf-8 -*-\n# abc156/abc156_a\nimport sys\n\ns2nn = lambda s: [int(c) for c in s.split(' ')]\nss2nn = lambda ss: [int(s) for s in list(ss)]\nss2nnn = lambda ss: [s2nn(s) for s in list(ss)]\ni2s = lambda: sys.stdin.readline().rstrip()\ni2n = lambda: int(i2s())\ni2nn = lambda: s2nn(i2s())\nii2ss = lambda n: [i2s() for _ in range(n)]\nii2nn = lambda n: ss2nn(ii2ss(n))\nii2nnn = lambda n: ss2nnn(ii2ss(n))\n\ndef main():\n N, R = i2nn()\n if N < 10:\n r = R - 100 * (10 - N)\n print(r if r > 0 else 0)\n else:\n print(R)\n return\n\nmain()\n", "#!python3.4\n# -*- coding: utf-8 -*-\n# abc156/abc156_a\nimport sys\n\ns2nn = lambda s: [int(c) for c in s.split(' ')]\nss2nn = lambda ss: [int(s) for s in list(ss)]\nss2nnn = lambda ss: [s2nn(s) for s in list(ss)]\ni2s = lambda: sys.stdin.readline().rstrip()\ni2n = lambda: int(i2s())\ni2nn = lambda: s2nn(i2s())\nii2ss = lambda n: [i2s() for _ in range(n)]\nii2nn = lambda n: ss2nn(ii2ss(n))\nii2nnn = lambda n: ss2nnn(ii2ss(n))\n\ndef main():\n N, R = i2nn()\n if N < 10:\n print(R + 100 * (10 - N))\n else:\n print(R)\n return\n\nmain()\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s059291222', 's197487005', 's764215137']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0]
[544, 574, 544]
p02765
u108072608
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['a = [int(i) for i in a.split()]\n\nN = a[0]\nR = a[1]\n\n\n#R = X - 100 * (10 - N)\nif N >= 10:\n print(R)\nelse:\n print(R + 100 * (10 - N))', 'i = input()\nprint(i)', 'a = [int(i) for i in input().split()]\n\nN = a[0]\nR = a[1]\n\n\n#R = X - 100 * (10 - N)\nif N >= 10:\n print(R)\nelse:\n print(R + 100 * (10 - N))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s312431777', 's908122622', 's153161670']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[210, 20, 216]
p02765
u108904320
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
["import sys\n\ndef main(lines):\n n, r = lines[0].split()\n if n >= 10:\n print(r)\n else:\n print(r + 100*(10-n))\n return\n \nif __name__ == '__main__':\n lines = []\n for l in sys.stdin:\n lines.append(l.rstrip('\\r\\n'))\n main(lines)\n", "import sys\n\ndef main(lines):\n\tn, r = lines[0].split()\n if n >= 10:\n print(r)\n else:\n print(n + 100*(10-n))\n return\n \nif __name__ == '__main__':\n lines = []\n for l in sys.stdin:\n lines.append(l.rstrip('\\r\\n'))\n main(lines)\n", "import sys\n\ndef main(lines):\n\tn, r = lines[0].split()\n if n >= 10:\n print(r)\n else:\n print(r + 100*(10-n))\n return\n \nif __name__ == '__main__':\n lines = []\n for l in sys.stdin:\n lines.append(l.rstrip('\\r\\n'))\n main(lines)\n", "import sys\n\ndef main(lines):\n n, r = map(int,lines[0].split())\n\n if n >= 10:\n print(r)\n else:\n print(r + 100*(10-n))\n return\n \nif __name__ == '__main__':\n lines = []\n for l in sys.stdin:\n lines.append(l.rstrip('\\r\\n'))\n main(lines)\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s259267447', 's468857277', 's704874863', 's593000637']
[2940.0, 3064.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[261, 260, 260, 261]
p02765
u111473084
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N, R = map(int, input().split(" "))\n\nif N < 10:\n\tprint(R - N*100)\nelse:\n \tprint(R)', 'N, R = map(int, input().split(" "))\n\nif N < 10:\n print(R + N*100)\nelse:\n print(R)', 'N, R = map(int, input().split(" "))\n\nif N < 10:\n print(R + (10-N)*100)\nelse:\n print(R)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s466265926', 's473248846', 's178963796']
[2940.0, 3060.0, 2940.0]
[17.0, 20.0, 17.0]
[83, 87, 93]
p02765
u112114596
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['a,b=map(int, input().split())\nprint a>10?b:b+800', 'a,b=map(int, input().split())\nx = b if a>10 else b+((10-a)*100)\nprint(x)']
['Runtime Error', 'Accepted']
['s582407897', 's115765821']
[2940.0, 2940.0]
[17.0, 18.0]
[48, 72]
p02765
u113083337
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['s = input().split()\n\nK = int(s[0])\nN = int(s[1])\n\nif K >= 10:\n print(N)\nelse:\n print(N - 100*(10-K))', 'input_line = int(input())\nfor i in range(input_line):\n s = input().rstrip().split(\' \')\n print("hello = "+s[0]+" , world = "+s[1])', 's = input().split()\n\nK = int(s[0])\nN = int(s[1])\n\nif K >= 10:\n print(N)\nelse:\n print(N + 100*(10-K))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s225410789', 's580665493', 's086658925']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[102, 131, 102]
p02765
u113255362
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['a,b=map(int,input().split())\nc=0\nif a >=10:\n print(b)\nelse:\n c = 100 * (10-a)\n print(c)', 'a,b=map(int,input().split())\nc=0\nres = 0\nif a >=10:\n print(b)\nelse:\n c = 100 * (10-a)\n res = b-c\n print(res)', 'a,b=map(int,input().split())\nc=0\nres = 0\nif a >=10:\n print(b)\nelse:\n c = 100 * (10-a)\n res = b+c\n print(res)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s088750909', 's811287616', 's045296013']
[9116.0, 9028.0, 9164.0]
[27.0, 27.0, 25.0]
[90, 112, 112]
p02765
u115110170
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,k = map(int,input().split())\nP = 10**9+7\n\nans = 1\nnCl = 1\nn1Cl = 1\nfor l in range(1,min(k+1,n)):\n nCl = nCl*(n+1-l)*pow(l,P-2,P)%P\n n1Cl = n1Cl*(n-l)*pow(l,P-2,P)%P\n ans = (ans+nCl*n1Cl)%P\n\nprint(ans)\n', '\nn,r = map(int,input().split())\n\nif n >=10:\n print(r)\nelse:\n print(r+100×(10−n))', 'n,r = map(int,input().split())\n\nif n >=10:\n print(r)\nelse:\n print(r+100*(10−n))', 'n,r = map(int,input().split())\n\nif n >=10:\n print(r)\nelse:\n print(r+100*(10-n))\n\n']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s539276599', 's625553736', 's775930117', 's776351915']
[3060.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 17.0]
[212, 85, 83, 83]
p02765
u115877451
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['a,b=map(int,input().split())\nc=0\nif a>b:\nwhile a//b>=b: \n a=a//b\n c+=1\nprint(c+2)\nelse:\n print(len(a))\n', 'a,b=map(int,input().split())\nif a<10:\n print(b-(100*(10-a)))\nelse:\n print(b)\n', 'a,b=map(int,input().split())\nif a<10:\n print(b+(100*(10-a)))\nelse:\n print(b)\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s331771662', 's355345086', 's954025861']
[3060.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[109, 79, 79]
p02765
u118760114
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = map(int, input().split())\nif N >= 10:\n k = R\n print(k)\nelse:\n k = 100*(10-N)+R\n orint(k)', 'N,R = map(int, input().split())\nif N >= 10:\n k = R\n print(k)\nelse:\n k = 100*(10-N)+R\n print(k)\n']
['Runtime Error', 'Accepted']
['s574844977', 's700564209']
[2940.0, 2940.0]
[17.0, 17.0]
[106, 107]
p02765
u119148115
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['N,R = map(int,input().split())\nif N > 9:\n print(R)\nelse:\n print(R + 100*(N-1))', 'N,R = map(int,input().split())\nif N > 9:\n print(R)\nelse:\n print(R + 100*(10-N))\n']
['Wrong Answer', 'Accepted']
['s210265108', 's864600783']
[2940.0, 2940.0]
[17.0, 17.0]
[80, 82]
p02765
u120564432
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n,r=map(int,input().split())\nif n>=10:\n print(r)\nelse:\n print(r-100*(10-n))\n', 'n,r=map(int,input().split())\nif n>=10:\n print(r)\nelse:\n print(r-100*(10-n))', 'n,r=map(int,input().split())\nif n>=10:\n print(r)\nelse:\n print(r+100*(10-n))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s213803968', 's612359725', 's756221269']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[78, 77, 78]
p02765
u121698457
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['print((lambda x:(int(x[1])+(100*(10 - (10 if x[0]>=10 else x[0])))))(input().split()))', 'print((lambda x:(int(x[1])+(100*(10 - 10 if x[0]>=10 else x[0]))))(input().split()))', 'print((lambda x:int(x[1])+(100*(10 - 10 if x[0]>=10 else x[0])))(input().split()))', 'print(lambda x:int(x[1])+(100*(10 - 10 if x[0]>=10 else x[0])),input().split())', 'print((lambda x:(int(x[1])+(100*(10 - (10 if int(x[0])>=10 else int(x[0]))))))(input().split()))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s202337241', 's732453822', 's938136213', 's994162978', 's548905428']
[3060.0, 2940.0, 3188.0, 2940.0, 2940.0]
[18.0, 17.0, 18.0, 17.0, 18.0]
[86, 84, 82, 79, 96]
p02765
u123745130
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['a,b=map(int,input().split())\nprint(b if a>=10 else b+100*(10-b))', 'a,b=map(int,input().split())\nprint(b if a>=10 else b+100*(10-a))']
['Wrong Answer', 'Accepted']
['s214834991', 's333952754']
[2940.0, 2940.0]
[17.0, 18.0]
[64, 64]
p02765
u125269142
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['n, r = map(int, input().split())\n\nif n >= 10:\n print(r)\nelse:\n print(r - 100 * (10-n))', 'n, r = map(int, input().split())\n\nif n >= 10:\n print(r)\nelse:\n print(r + (100 * (10 - n)))']
['Wrong Answer', 'Accepted']
['s278561160', 's571718138']
[9160.0, 9160.0]
[31.0, 29.0]
[88, 96]
p02765
u128319931
2,000
1,048,576
Takahashi is a member of a programming competition site, _ButCoder_. Each member of ButCoder is assigned two values: **Inner Rating** and **Displayed Rating**. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests. Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.
['int(num),int(val) = input().split(" ")\n\nif num < 10:\n\tprint val + 100*(10-num)\nelse:\n\tprint val\n', 'def main():\n\tnum,val = input().split(" ")\n\tnum = int(num)\n\tval = int(val)\n\n\tif num < 10:\n\t\tprint(val + 100*(10-num))\n\telse:\n\t\tprint(val)\n\nif __name__ == "__main__":\n main()']
['Runtime Error', 'Accepted']
['s768738439', 's748457155']
[2940.0, 2940.0]
[17.0, 17.0]
[96, 175]