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
|
---|---|---|---|---|---|---|---|---|---|---|
p03242 | u886142147 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nans = ""\n\nfor i in range(3):\n if n[i] == 1:\n ans = ans + "9"\n else:\n ans = ans + "1"\n\nprint(ans)', 's = input()\nans = ""\n\nfor i in range(3):\n if s[i] == "1":\n ans = ans + "9"\n else:\n ans = ans + "1"\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s345577792', 's069566777'] | [2940.0, 2940.0] | [17.0, 17.0] | [128, 130] |
p03242 | u887524368 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['N = int(input())\ns = int((N - 1) / 111)\n\nx = (s + 1) * 111\nprint(x)', 'n = input()\nn_after = ""\nfor i in range(len(n)):\n s = n[i]\n \n if s == "1":\n n_after += "9"\n else:\n n_after += "1"\n \nprint(n_after)'] | ['Wrong Answer', 'Accepted'] | ['s181149785', 's939964116'] | [2940.0, 2940.0] | [19.0, 17.0] | [67, 163] |
p03242 | u889914341 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print(input().tranprint(input().translate(str.maketrans("1", "9"))))slate(str.maketrans("1", "9")))', 'print(input().translate(str.maketrans("1", "9")))', 'print(input().translate(str.maketrans("19", "91")))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s414220020', 's767090390', 's770598208'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 20.0] | [99, 49, 51] |
p03242 | u893239355 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['s = input()\nfor i in range(len(s)):\n if s[i] == "1":\n s[i]="9"\n elif s[i]=="9":\n s[i]="1"\nprint(s)', 's = input()\ns_list=list(s)\nfor i in range(len(s)):\n if s[i] == "1":\n s_list[i]=\'9\'\n elif s[i]=="9":\n s_list[i]=\'1\'\nstr_changed="".join(s_list)\nprint(str_changed)\n'] | ['Runtime Error', 'Accepted'] | ['s869212141', 's252423280'] | [9088.0, 9060.0] | [24.0, 25.0] | [106, 170] |
p03242 | u894694822 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['l=list(input())\nprint(l.translate(str.maketrans({"1":"9", "9":"1"})))\n\n', 'n=input()\nprint(1110-int(n))\n'] | ['Runtime Error', 'Accepted'] | ['s740439849', 's628312041'] | [2940.0, 2940.0] | [17.0, 17.0] | [71, 29] |
p03242 | u895515293 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["inp = [[int(x) for x in input().split()] for _ in range(int(input()))]\ninpsum = sum(map(lambda ij: abs(ij[0]+ij[1]) % 2, inp))\nif not (inpsum == len(inp) or inpsum == 0):\n print(-1)\n exit(0)\n\nseeds = ([] if inpsum == len(inp) else [1]) + [1 << i for i in range(0, 32)]\n# print(inp)\n\nprint(' '.join(map(str, reversed(seeds))))\n\nfor x, y in inp:\n for k in reversed(seeds):\n res = ''\n if abs(x) > abs(y):\n if x > 0:\n res = 'R'\n x -= k\n else:\n res = 'L'\n x += k\n else:\n if y > 0:\n res = 'U'\n y -= k\n else:\n res = 'D'\n y += k\n # print((x,y))\n print(res, end='')\n print('')\n", "for s in input():\n if s == '9': print('1', end='')\n else: print('9', end='')\nprint('')\n"] | ['Runtime Error', 'Accepted'] | ['s944016550', 's087377766'] | [3064.0, 2940.0] | [17.0, 17.0] | [779, 93] |
p03242 | u896741788 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print(input().replace("9","n").replace("1","o").replace("o","1").replace("n","9"))', 'print(input().replace("9","n").replace("1","o").replace("o","9").replace("n","1"))'] | ['Wrong Answer', 'Accepted'] | ['s381033786', 's555332914'] | [2940.0, 2940.0] | [17.0, 17.0] | [82, 82] |
p03242 | u898058223 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n=input()\nn.replace("1","2")\nn.replace("9","1")\nn.replace("2","9")\nprint(n)', 'n = input()\nprint(n.replace("9","x").replace("1","9").replace("x","1"))'] | ['Wrong Answer', 'Accepted'] | ['s986731085', 's684994357'] | [2940.0, 2940.0] | [17.0, 17.0] | [75, 71] |
p03242 | u898917044 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['# abc111_c_new\n\n\nfrom collections import Counter\n\n\ndef solve(n, seq):\n odd = seq[::2] # odd numbers of the seq\n even = seq[1::2] # even numbers of the seq\n\n odd = Counter(odd).most_common() # example -> returns [(1, 5), (2, 5)]\n even = Counter(even).most_common()\n\n sol = 0\n if odd[0][0] == even[0][0]:\n if len(odd) == 1 and len(even) == 1:\n sol = int(n / 2)\n else:\n if odd[1][1] > even[1][1]:\n sol = n - odd[1][1] - even[0][1]\n else:\n sol = n - odd[0][1] - even[1][1]\n else:\n sol = n - odd[0][1] - even[0][1]\n\n return sol\n\n\nif __name__ == "__main__":\n n = int(input())\n seq = list(map(int, input("").split(" ")))\n print(solve(n, seq))\n', '# abc111_c_new\n\nfrom collections import Counter\n\n\ndef solve(n, seq):\n odd = seq[::2] # odd numbers of the seq\n even = seq[1::2] # even numbers of the seq\n\n # print(odd)\n # print(even)\n\n \n # even = Counter(even).most_common()\n odd = sorted([(k, v) for k, v in Counter(odd).items()], key=lambda x: x[1], reverse=True)\n even = sorted([(k, v) for k, v in Counter(even).items()], key=lambda x: x[1], reverse=True)\n\n # print(odd)\n # print(even)\n\n sol = 0\n if odd[0][0] == even[0][0]:\n if len(odd) == 1 and len(even) == 1: # seq [1, 1, 1, 1] (special case)\n sol = int(n // 2) # [1, 1, 1, 1] sol = N / 2\n else:\n if odd[0][1] > even[1][1]:\n \n sol = (n // 2 - odd[0][1]) + (n // 2 - even[1][1])\n else:\n \n sol = (n // 2 - odd[1][1]) + (n // 2 - even[0][1])\n else:\n \n sol = (n // 2 - odd[0][1]) + (n // 2 - even[0][1])\n\n return sol\n\n\nif __name__ == "__main__":\n n = int(input())\n seq = list(map(int, input("").split(" ")))\n print(solve(n, seq))\n', '# abc_111_a\n\ndef transform (bango):\n if bango == "1":\n return "9"\n elif bango == "9":\n return "1"\n else:\n return bango\n\ndef solve(string):\n return "".join(list(map(transform, string)))\n\nif __name__ == "__main__":\n string = input("")\n print (solve(string))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s641650818', 's675680540', 's829932429'] | [3316.0, 3316.0, 2940.0] | [21.0, 21.0, 17.0] | [796, 1294, 295] |
p03242 | u899645116 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['s = input()\nans = ""\nfor i in s:\n if(i == "9"):\n ans += "1"\n else if(i == "1"):\n ans += "9"\n else:\n ans += i\n \nprint(ans)', 's = input()\nans = ""\nfor i in s:\n if(i == \'9\'):\n ans += \'1\'\n else if(i == \'1\'):\n ans += \'9\'\n else:\n ans += i\n \nprint(ans)\n', 's = input()\nans = ""\nfor i in s:\n if(i == \'9\'):\n ans += \'1\'\n elif(i == \'1\'):\n ans += \'9\'\n else:\n ans += i\n \nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s126826452', 's481048237', 's934660013'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [136, 137, 134] |
p03242 | u903948194 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['#import itertools\nimport collections\n\ndef op(v):\n count = collections.Counter(v).most_common() \n\n \n #count = sorted([(k, len(list(g))) for k, g in v_], key = lambda x:x[1])\n return count\n\nn = int(input())\nV = [int(n) for n in input().split()]\n\nif len(set(V)) == 1:\n ans = len(V) // 2\nelse:\n vp_ = [v for i, v in enumerate(V) if i%2 == 0] \n vn_ = [v for i, v in enumerate(V) if i%2 != 0] \n\n vp = op(vp_)\n vn = op(vn_) \n\n if vp[-1][0] != vn[-1][0]:\n gp = vp[-1][1]\n gn = vn[-1][1]\n else:\n if vp[-1][1] > vn[-1][1]:\n gp = vp[-1][1]\n gn = vn[-2][1]\n else:\n gp = vp[-2][1]\n gn = vn[-1][1]\n\n #ans_p = sum([g for k, g in vp]) - gp\n #ans_n = sum([g for k, g in vn]) - gn\n\n \n ans = n - gp - gn\n\nprint(ans)\n\n', "n = input()\n#print(n)\nnew = []\nfor i in n:\n if i == '1':\n new.append('9')\n elif i =='9':\n new.append('1')\n else:\n new.append(i)\nprint(''.join(new))"] | ['Runtime Error', 'Accepted'] | ['s583216681', 's011902970'] | [3316.0, 2940.0] | [21.0, 18.0] | [873, 177] |
p03242 | u904943473 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['# C\nimport collections\nn = int(input())\nlst = list(map(int, input().split()))\nlst1 = lst[::2]\nlst2 = lst[1::2]\ndct1 = sorted(dict(collections.Counter(lst1)).items(), key=lambda x:x[1])\ndct2 = sorted(dict(collections.Counter(lst2)).items(), key=lambda x:x[1])\n\ncnt = len(dict(collections.Counter(lst)))\nif (cnt == 1):\n\tprint(int(len(lst) / 2))\nelif (len(dct1) == 1 and len(dct2) == 1):\n\tprint(0)\nelif (len(dct1) == 1 and len(dct2) > 1):\n\tif (dct1[0][0] == dct2[0][0]):\n\t\tprint(len(dct2) - dct2[1][1])\n\telse:\n\t\tprint(len(dct2) - dct2[0][1])\nelif (len(dct2) == 1 and len(dct1) > 1):\n\tif (dct1[0][0] == dct2[0][0]):\n\t\tprint(len(dct1) - dct1[1][1])\n\telse:\n\t\tprint(len(dct1) - dct1[0][1])\nelse:\n\tif (dct1[0][0] == dct2[0][0]):\n\t\tprint(len(lst) - max(dct1[0][1] + dct2[1][1], dct1[1][1] + dct2[0][1]))\n\telse:\n\t\tprint(len(lst) - dct1[0][1] - dct2[0][1])\n', 's = list(input())\nfor i in range(len(s)):\n if (s[i] == \'1\'):\n s[i] = \'9\'\n else:\n s[i] = \'1\'\nprint("".join(s))'] | ['Runtime Error', 'Accepted'] | ['s868498602', 's479407435'] | [3316.0, 2940.0] | [21.0, 17.0] | [846, 129] |
p03242 | u914330401 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["S = input()\nfor i in range(len(S)):\n if S[i] == '9':\n S[i] = '1'\n elif S[i] == '1':\n S[i] = '9'\nprint(S)", 'S = input()\nS = int(S)\nfor i in range(len(S)):\n if S[i] == 9:\n S[i] = 1\n elif S[i] == 1:\n S[i] = 9\nS = str(S)\nprint(S)', "S = input()\nc = ''\nfor i in range(len(S)):\n if S[i] == '9':\n c += '1'\n elif S[i] == '1':\n c += '9'\n else:\n c += S[i]\nprint(S)", "S = input()\nc = ''\nfor i in range(len(S)):\n if S[i] == '9':\n c += '1'\n elif S[i] == '1':\n c += '9'\n else:\n c += S[i]\nprint(c)"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s341199465', 's758815005', 's898661890', 's990859071'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0, 17.0] | [112, 126, 137, 137] |
p03242 | u924406834 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['num = input()\nx = [int(i) for i in num]\nfor i in range(len(x)):\n if x[i] == 1:\n x[i] = "9"\n else:\n x[i] = "1"\nmojiretu = \',\'.join(x)\nprint(int(mojiretu))\n', 'num = input()\nx = [int(i) for i in num]\nfor i in range(len(x)):\n if x[i] == 1:\n x[i] = "9"\n else:\n x[i] = "1"\nmojiretu = \'\'.join(x)\nprint(int(mojiretu))'] | ['Runtime Error', 'Accepted'] | ['s586545205', 's670298458'] | [3064.0, 2940.0] | [17.0, 17.0] | [174, 172] |
p03242 | u924467864 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["s = input()\n\nif '1' in s:\n s = s.replace('1', '9')\n\nif '9' in s:\n s = s.replace('9', '1')\n \nprint(s)\n", "n = input()\n\nif '1' in n:\n s = s.replace('1', '9')\n\nif '9' in n:\n s = s.replace('9', '1')\n \nprint(s)", "s = list(input())\n\nif s[0] == '1':\n s[0] = s[0].replace('1', '9')\nelif s[0] == '9':\n s[0] = s[0].replace('9', '1')\nif s[1] == '1':\n s[1] = s[1].replace('1', '9')\nelif s[1] == '9':\n s[1] = s[1].replace('9', '1')\nif s[2] == '1':\n s[2] = s[2].replace('1', '9')\nelif s[2] == '9':\n s[2] = s[2].replace('9', '1')\n\nprint(''.join(s))"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s204190458', 's688165152', 's955313474'] | [2940.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0] | [104, 103, 343] |
p03242 | u924828749 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['s = input()\nfor i in range(3):\n if s[i] == "1":\n s[i] == "9"\n else:\n s[i] == "1"\nprint(s)', 's = list(input())\nfor i in range(3):\n if s[i] == "1":\n s[i] = "9"\n else:\n s[i] = "1"\nprint("".join(s))'] | ['Wrong Answer', 'Accepted'] | ['s879754412', 's841732163'] | [8924.0, 8984.0] | [24.0, 27.0] | [97, 110] |
p03242 | u927764913 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['import collections\nn = int(input())\nv = input().split()\nv_int = [int(i) for i in v]\nv_odd = []\nv_even = []\nfor i in range(int(n/2)):\n v_even.append(v_int[i*2])\n v_odd.append(v_int[i*2+1])\nc_odd = collections.Counter(v_odd)\nc_even = collections.Counter(v_even)\nmax_odd = 0\nsecond_odd = 0\nmax_key_odd = 0\nfor key in c_odd:\n if max_odd < c_odd[key]:\n second_odd = max_odd\n max_odd = c_odd[key]\n max_key_odd = key\n elif second_odd < c_odd[key]:\n second_odd = c_odd[key]\n \nmax_even = 0\nsecond_even = 0\nmax_key_even = 0\nfor key in c_even:\n if max_even < c_even[key]:\n second_even = max_even\n max_even = c_even[key]\n max_key_even = key\n elif second_even < c_even[key]:\n second_even = c_even[key]\n \nif max_key_even != max_key_odd:\n print(int(n)- max_even - max_odd)\nelse:\n if max_even > max_odd:\n if max_even == second_even:\n print(int(n) - max_even - max_odd)\n else:\n print(int(n) - max_even - second_odd)\n elif max_even < max_odd:\n if max_odd == second_odd:\n print(int(n) - max_odd - max_even)\n else:\n print(int(n) - max_odd - second_even)\n else : \n if second_odd > second_even:\n print(int(n) - max_even - second_odd)\n else :\n print(int(n) - max_odd - second_even)', 'import collections\nn = int(input())\nv = input().split()\nv_int = [int(i) for i in v]\nv_odd = []\nv_even = []\nfor i in range(int(n/2)):\n v_even.append(v_int[i*2])\n v_odd.append(v_int[i*2+1])\nc_odd = collections.Counter(v_odd)\nc_even = collections.Counter(v_even)\nmax_odd = 0\nsecond_odd = 0\nmax_key_odd = 0\nfor key in c_odd:\n if max_odd < c_odd[key]:\n second_odd = max_odd\n max_odd = c_odd[key]\n max_key_odd = key\n elif second_odd < c_odd[key]:\n second_odd = c_odd[key]\n \nmax_even = 0\nsecond_even = 0\nmax_key_even = 0\nfor key in c_even:\n if max_even < c_even[key]:\n second_even = max_even\n max_even = c_even[key]\n max_key_even = key\n elif second_even < c_even[key]:\n second_even = c_even[key]\n \nif max_key_even != max_key_odd:\n print(int(n)- max_even - max_odd)\nelse:\n if max_even > max_odd:\n if max_even == second_even:\n print(int(n) - max_even - max_odd)\n else:\n print(int(n) - max_even - second_odd)\n elif max_even < max_odd:\n if max_odd == second_odd:\n print(int(n) - max_odd - max_even)\n else:\n print(int(n) - max_odd - second_even)\n else : \n if second_odd > second_even:\n print(int(n) - max_even - second_odd)\n else :\n print(int(n) - max_odd - second_even)', 'a = input()\nl = [int(x) for x in list(str(a))]\ns = ""\nfor i in l:\n if i == 1:\n s += "9"\n elif i == 9:\n s += "1"\nprint(int(s))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s427212092', 's528722870', 's726888290'] | [3316.0, 3316.0, 2940.0] | [22.0, 22.0, 18.0] | [1246, 1246, 133] |
p03242 | u928784113 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['# -*- coding: utf-8 -*-\nn = int(input())\nS = n.replace(1,9).replace(9,1)\nprint(S)', '# -*- coding: utf-8 -*-\nn = str(input())\nS = n.replace(1,9).replace(9,1)', '# -*- coding: utf-8 -*-\nn=int(input())\nn.replace("1","9")and("9","1")', '# -*- coding: utf-8 -*-\nn = str(input()) \nS = n.replace("1","9").replace("9","1") \nprint(S)', '# -*- coding utf-8 -*-\nn = str(input())\nS = n.replace(1,8)\nT = S.replace(9,1)\nU = T.replace(8,9)\nprint(U)', '# -*- coding: utf-8 -*-\nn = str(input())\nS = n.replace(1,9).replace(9,1)\nprint(S)', '# -*- coding: utf-8 -*-\nn = str(input())\nm.replace(1,9:9,1)', '# -*- coding utf-8 -*-\nn = str(input())\nS = n.replace("1","8")\nT = S.replace("9","1")\nU = T.replace("8","9")\nprint(U)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s095036286', 's419193966', 's422655638', 's494866415', 's721986271', 's792623049', 's937497880', 's719157167'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0, 18.0, 18.0, 18.0, 18.0, 17.0] | [81, 72, 69, 135, 105, 81, 59, 117] |
p03242 | u940279019 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print(1100 - int(input())', 'print(1100 - int(input()))', 'print(1110 - int(input()))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s485905324', 's565600921', 's584692865'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [25, 26, 26] |
p03242 | u941284420 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = str(input())\nfor i, s in enumerate(n):\n if s == "1":\n n[i] = "9"\n elif s == "9":\n n[i] = "1"\n\nprint(int(n))', 'n = str(input()).replace("1","q").replace("9","1").replace("q","9")\nprint(n)'] | ['Runtime Error', 'Accepted'] | ['s274300306', 's869141154'] | [2940.0, 2940.0] | [18.0, 17.0] | [119, 76] |
p03242 | u941884460 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["s = input()\nt = []\nfor i in range(len(s)):\n if s[i] == '1':\n t.append('9')\n elif:\n t.append('1')\nprint(''.join(t))", "s = input()\nt = []\nfor i in range(len(s)):\n if s[i] == '1':\n t.append('9')\n else:\n t.append('1')\nprint(''.join(t))\n"] | ['Runtime Error', 'Accepted'] | ['s722567714', 's196483132'] | [2940.0, 2940.0] | [17.0, 17.0] | [122, 123] |
p03242 | u947617358 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n=int(input())\nif len(set(str(n)))==1:\n print(n)\nelse:\n\n while True:\n n+=1\n if len(set(str(n)))==1:\n print(n)\n break\n \n', "n=list(input())\nfor i in range(len(n)):\n if n[i]=='9':\n n[i]='1'\n elif n[i]=='1':\n n[i]='9'\nans=''.join(n)\nprint(int(ans))"] | ['Wrong Answer', 'Accepted'] | ['s307894543', 's550019421'] | [2940.0, 2940.0] | [17.0, 17.0] | [162, 142] |
p03242 | u957722693 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['l=list(map(int,input().split()))\nfor i in range(3):\n if l[i]==1:\n l[i]=9\n else:\n l[i]=1\nprint(l)', 'l=list(input())\nfor i in range(3):\n if l[i]==\'1\':\n l[i]=\'9\'\n else:\n l[i]=\'1\'\nl="".join(l)\nprint(l)'] | ['Runtime Error', 'Accepted'] | ['s086517946', 's135427328'] | [2940.0, 2940.0] | [17.0, 17.0] | [104, 106] |
p03242 | u957872856 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print(eval(i.replace("1","9").replace("9","1")) for i in input())', 'print(input().replace("1","x").replace("9","1").replace("x","9"))'] | ['Wrong Answer', 'Accepted'] | ['s688038962', 's074963154'] | [2940.0, 2940.0] | [17.0, 18.0] | [65, 65] |
p03242 | u959231017 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['N = int(input())\nnum = []\nwhile N!=0:\n num.append(N%10)\n N -= N%10\n N /= 10\nnum.reverse()\na=num[0]\nb=num[1]\nc=num[2]\nif a==b>=c:\n print(int(100*a+11*b))\nif a==b<c or a<b:\n print(int((a+1)*111))\nif a>b:\n print(int(a*111))', 'n = int(input())\nnum = []\nwhile n != 0:\n num.append(n%10)\n n -= n%10\n n /= 10\na=num[2]\nb=num[1]\nc=num[0]\nd=0\ne=0\nf=0\nif a==9:\n d=1\nelif a==1:\n d=9\nelse:\n d=a\nif b==9:\n e=1\nelif b==1:\n e=9\nelse:\n e=b\nif c==9:\n f=1\nelif c==1:\n f=9\nelse:\n f=c\nprint(int(100*d+10*e+f))'] | ['Wrong Answer', 'Accepted'] | ['s469051559', 's738536294'] | [3064.0, 3188.0] | [17.0, 20.0] | [226, 276] |
p03242 | u959421160 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["def henkan(str):\n for s in str:\n print('1' if s = '9' else '9',end='')\n print('')\nhenkan(input())", "def henkan(str):\n for s in str:\n print('1' if s == '9' else '9',end='')\n print('')\nhenkan(input())", "def henkan(str)\n for s in str:\n print('1' if s = '9' else '9',end='')\n print('')\nhenkan(input())", 'input_int = input()\nif input_int[0] > input_int[1]:\n print(input_int[0] * 3)\nelif input_int[0] == input_int[1] and input_int[1] < input_int[2]:\n print(str(int(input_int[0]) + 1) * 3)\nelse:\n print(input_int[0] * 3)\n', "def henkan(str):\n for s in str:\n print('1' if s == '9' else '9',end='')\n print('')\nhenkan(input())"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s127477262', 's162977042', 's258074392', 's806808399', 's421061024'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [114, 115, 113, 218, 111] |
p03242 | u959651981 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nfor i in range(3):\n if n[i] == 1:\n n[i] = 9\n else:\n n[i] = 1\n \nprint(n)', 'n=int(input())\nprint(1110-n)\n'] | ['Runtime Error', 'Accepted'] | ['s244756070', 's846601419'] | [2940.0, 2940.0] | [17.0, 17.0] | [110, 29] |
p03242 | u961916328 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n=input()\nfor i in range(len(n))\nif(n[0] == 1):\n n[0] = 9\nelse:\n n[0] = 1\nif(n[1] == 1):\n n[1] = 9\nelse:\n n[1] = 1\nif(n[2] == 1):\n n[2] = 9\nelse:\n n[2] = 1\n', 'n=input()\n\nif(n[0] == 1):\n n[0] = 9\nelse:\n n[0] = 1\nif(n[1] == 1):\n n[1] = 9\nelse:\n n[1] = 1\nif(n[2] == 1):\n n[2] = 9\nelse:\n n[2] = 1', 'n = int(input())\nif n == 111:\n print(999)\nif n == 119:\n print(991)\nif n == 191:\n print(919)\nif n == 199:\n print(911)\nif n == 911:\n print(199)\nif n == 919:\n print(191)\nif n == 991:\n print(119)\nif n == 999:\n print(111)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s488679564', 's844800991', 's270252692'] | [2940.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [162, 139, 225] |
p03242 | u969848070 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["a = int(input())\nb = []\nfor i in range(3):\n if a[i] ==1:\n \tb.append('9')\n else:\n b.append('1')\nprint(''.join(b))", 'a = int(input())\nfor i in range(3):\n if a[i] ==1:\n \ta[i] ==9\n else:\n a[i] ==1\nprint(a)', "a = input()\nb = []\nfor i in range(3):\n if a[i] =='1':\n \tb.append('9')\n else:\n b.append('1')\nprint(''.join(b))"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s326824687', 's917893475', 's201628304'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [118, 92, 115] |
p03242 | u970197315 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nprint(n.replace("9","a").replace("9","1").replace("a","9"))\n', 'n = int(input())\nprint(replace("9","a").replace("1","9").replace("a","9"))\n', 'n = input()\nprint(n.replace("9","a").replace("1","9").replace("a","1"))\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s620502434', 's635899985', 's426409800'] | [3060.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0] | [72, 75, 72] |
p03242 | u972658925 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = list(int(input()))\nfor i in range(len(n)):\n if n[i]==1:\n n[i]=9\n elif n[i]==9:\n n[i]=1\nprint("".join(n))\n', 'n = list(int(input()))\nfor i in range(n):\n if n[i]==1:\n n[i]=9\n elif n[i]==9:\n n[i]=1\nprint("".join(n))', 'n = list(input())\nfor i in range(len(n)):\n if n[i]=="1":\n n[i]="9"\n elif n[i]=="9":\n n[i]="1"\nprint("".join(n))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s704406883', 's733379325', 's570894675'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [129, 123, 131] |
p03242 | u972892985 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['s = int(input())\nprint(s.replace("1", "9").replace("9", "1"))', 's = str(input())\nprint(s.replace("1", "9").replace("9", "1"))', 's = str(input())\nprint(s.replace("1", "99").replace("9", "1").replace("99", "9"))', 'n = list(input())\nans = ""\n\nfor i in n:\n if i == "1":\n ans += "9"\n else:\n ans += "1"\n \nprint(ans)'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s298604441', 's301676156', 's568460737', 's446294744'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [61, 61, 81, 108] |
p03242 | u973840923 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['from collections import Counter\n\nn = int(input())\nv = [int(i) for i in input().split()]\n\nki = v[::2]\ngu = v[1::2]\n\nki = Counter(ki)\ngu = Counter(gu)\n\nki = ki.most_common()\ngu = gu.most_common()\n\nans = 0\n\nif ki[0][0] == gu[0][0]:\n if len(ki) == 1 and len(gu) == 1:\n ans = int(n / 2)\n else:\n if ki[1][1] > gu[1][1]:\n ans = n - ki[1][1] - gu[0][1]\n else:\n ans = n - ki[0][1] - gu[1][1]\nelse:\n ans = n - ki[0][1] - gu[0][1]\n\nprint(ans)\n\n', "n = [x for x in str(input())]\nadd_stock = ''\n\nfor i in n:\n print(i)\n add = i\n if i == '1':\n add = '9'\n add_stock += add\n\nprint(add_stock)", 'from collections import Counter\n\nn = int(input())\nv = [int(i) for i in input().split()]\n\nki = v[::2]\ngu = v[1::2]\n\nki = Counter(ki)\ngu = Counter(gu)\n\nki = ki.most_common()\ngu = gu.most_common()\n\nans = 0\n\nif ki[0][0] == gu[0][0]:\n if len(ki) == 1 and len(gu) == 1:\n ans = int(n / 2)\n else:\n if ki[0][1] > gu[0][1]:\n ans = n - ki[0][1]\n else:\n ans = n - gu[0][1]\nelse:\n ans = n - ki[0][1] - gu[0][1]\n\nprint(ans)\n', "n = [x for x in str(input())]\nadd_stock = ''\n\nfor i in n:\n add = i\n if i == '1':\n add = '9'\n add_stock += add\n\nprint(add_stock)", "n = [x for x in str(input())]\nadd_stock = ''\n\nfor i in n:\n add = i\n if i == '1':\n add = '9'\n elif i == '9':\n add = '1'\n add_stock += add\n\nprint(add_stock)"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s248949793', 's579260325', 's686256042', 's697849022', 's975994340'] | [3316.0, 2940.0, 3316.0, 2940.0, 2940.0] | [21.0, 17.0, 21.0, 18.0, 17.0] | [485, 156, 462, 143, 180] |
p03242 | u987164499 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['from sys import stdin\nfrom itertools import groupby\n\nn = int(stdin.readline().rstrip())\n\nli = list(map(int,stdin.readline().rstrip().split()))\n\nli1 = []\nli2 = []\n\nfor i in range(n):\n if i % 2 == 0:\n li1.append(li[i])\n else:\n li2.append(li[i])\n\nli1.sort()\nli2.sort()\n\nlin = []\nlin2 = []\n\nfor key, value in groupby(li1):\n lin.append((key,len(list(value))))\nfor key, value in groupby(li2):\n lin2.append((key,len(list(value))))\n\nlin.sort(key=lambda x:(x[1]))\nlin2.sort(key=lambda x:(x[1]))\n\npoint = 0\n\nif lin[-1][0] == lin2[-1][0] and lin[-1][1] == lin2[-1][1]:\n if len(lin) == 1:\n print(n//2)\n else:\n if lin[-2][1] >= lin2[-2][1]:\n print(n-lin[-2][1]-lin2[-1][1])\n else:\n print(n-lin[-1][1]-lin2[-2][1])\n\nelif lin[-1][0] == lin2[-1][0]:\n if len(lin) == 1:\n print(n//2-lin2[-2][1])\n elif len(lin2) == 1:\n print(n//2-lin[-2][1])\n else:\n if lin[-2][1] >= lin2[-2][1]:\n print(n-lin[-1][1]-lin2[-2][1])\n else:\n print(n-lin[-2][1]-lin2[-1][1])\nelse:\n print(n-lin[-1][1]-lin2[-1][1])', 'from sys import stdin\n\ns = stdin.readline().rstrip()\nns = ""\nfor i in s:\n if i =="1":\n ns += "9"\n else:\n ns += "1"\n\nprint(ns)\n'] | ['Runtime Error', 'Accepted'] | ['s577523340', 's944270465'] | [3188.0, 2940.0] | [18.0, 17.0] | [1110, 146] |
p03242 | u987637902 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nprint(int(n.replace("1", "9").replace("9", "1")))\n', '# ABC111\n\nn = list(input())\nfor i in range(len(n)):\n if n[i] == "1":\n n.pop(i)\n n.insert(i, "9")\n elif n[i] == "9":\n n.pop(i)\n n.insert(i,"1")\nprint(int("".join(n)))\n'] | ['Wrong Answer', 'Accepted'] | ['s306798371', 's678155923'] | [8976.0, 9116.0] | [27.0, 25.0] | [62, 231] |
p03242 | u989385104 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['import collections\nn = int(input())\nv = list(input().split())\n \nv_odd = []\nv_even = []\n \nfor i in range(int(n)):\n if i % 2 == 1:\n \tv_odd.append(i)\n \nfor i in range(int(n)):\n if i % 2 == 0:\n \tv_even.append(i)\n \nv_odd_counter = collections.Counter(v_odd)\na = v_odd_counter.most_common()[0][1]\n \nv_even_counter = collections.Counter(v_even)\nb = v_even_counter.most_common()[0][1]\n \nprint(n - a - b)', 'n = int(input())\n\nprint(1110-n)'] | ['Runtime Error', 'Accepted'] | ['s162543343', 's595745633'] | [3316.0, 2940.0] | [21.0, 17.0] | [401, 31] |
p03242 | u993642190 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['\nN = list(input())\n\nout_str = ""\nfor i in range(len(N)) :\n\tif (N[i] == 1) :\n\t\tout_str += "9"\n\telse :\n\t\tout_str += "1"\n\nprint(out_str)', '\nN = list(input())\n\nout_str = ""\nfor i in range(len(N)) :\n\tif (N[i] == "1") :\n\t\tout_str += "9"\n\telse :\n\t\tout_str += "1"\n\nprint(out_str)'] | ['Wrong Answer', 'Accepted'] | ['s855240094', 's778052763'] | [2940.0, 2940.0] | [17.0, 17.0] | [138, 140] |
p03242 | u996914289 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["n=input()\nn=n.replace('1','2')\nn=n.replace('9','1')\nprint(n.replace('2','9')", "n=input()\nn=n.replace('1','2')\nn=n.replace('9','1')\nprint(n.replace('2','9'))"] | ['Runtime Error', 'Accepted'] | ['s827710767', 's367805287'] | [2940.0, 2940.0] | [17.0, 18.0] | [76, 77] |
p03242 | u996952235 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['for i in range(int(input()), 1000):\n if(str(i)[0] == str(i)[1] and str(i)[1] == str(i)[2]):\n print(i)\n break', 'print(input().replace("1","a").replace("9","1").replace("a","9"))'] | ['Wrong Answer', 'Accepted'] | ['s805108617', 's642214458'] | [2940.0, 2940.0] | [17.0, 18.0] | [115, 65] |
p03242 | u999482355 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['word1 = list(input())\nword2 = ""\nfor c in word1:\n if c == "9":\n word2 += "1"\n else if c == "1":\n word2 += "9"\n else:\n word2 += c\nprint(word2)\n', 'word1 = input()\nword2 = ""\nfor c in word1:\n if c == "9":\n word2 += "1"\n else if c == "1":\n word2 += "9"\n else:\n word2 += c\nprint(word2)', 'print((1+((int(input())-1))//111)*111)', 'word1 = list(input())\nword2 = ""\nfor c in word1:\n if c == "9":\n word2 += "1"\n elif c == "1":\n word2 += "9"\n else:\n word2 += c\nprint(word2)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s658792477', 's665753844', 's951508630', 's377353233'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0, 17.0] | [172, 165, 38, 168] |
p03243 | u014333473 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["N = list(input())\nN = [int(i) for i in N]\nif N.index(max(N)) == 0 or len(set(N)) == 1:\n [print(max(N), end='') for _ in range(len(N))]\nelif N.index(max(N)) == 1:\n [print(N[0]+1, end='') for _ in range(len(N))]\nelse:\n [print(N[2], end='') for _ in range(len(N))]", "N = list(input())\nN = [int(i) for i in N]\nif N.index(max(N)) == 0:\n [print(max(N), end='') for _ in range(len(N))]\nelif N.index(max(N)) == 1:\n [print(N[0]+1, end='') for _ in range(len(N))]\nelse:\n [print(N[2], end='') for _ in range(len(N))]", 'print(0--int(input())//111*111)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s515799320', 's927135261', 's717032413'] | [3064.0, 3064.0, 9076.0] | [17.0, 17.0, 29.0] | [264, 244, 31] |
p03243 | u017415492 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n=int(input())\na_list=[str(i)*3 for i in range(1,10)]\n\nfor i in range(1,9):\n if int(a_list[i])< n <=int(a_list[i+1]):\n print(a_list[i+1])\n break\n elif int(a_list[i])==n:\n print(a_list[i])\n break\n ', 'n=int(input())\na_list=[str(i)*3 for i in range(1,10)]\nflag=False\n\nfor i in range(1,10):\n if int(a_list[i])==n:\n print(a_list[i])\n flag=True\n break\nif flag==False:\n for i in range(1,9):\n if int(a_list[i])< n < int(a_list[i+1]):\n print(a_list[i+1])\n break', 'n=int(input())\na_list=[str(i)*3 for i in range(1,10)]\n\nfor i in range(1,9):\n if a_list[i]< n <= a_list[i+1]:\n print(a_list[i+1])\n break\n elif a_list[i]= n:\n print(a_list[i])\n break\n \n ', 'n=int(input())\na_list=[str(i)*3 for i in range(1,10)]\n\nfor i in range(1,9):\n if a_list[i]< n <= a_list[i+1]:\n print(a_list[i+1])\n break\n elif a_list[i]==n:\n print(a_list[i])\n break\n ', 'n=int(input())\na_list=[str(i)*3 for i in range(1,10)]\n\nfor i in range(1,9):\n if a_list[i]< n <= a_list[i+1]:\n print(a_list[i+1])\n break\n elif a_list[i]= n:\n print(a_list[i])\n \n ', 'n=int(input())\na_list=[str(i)*3 for i in range(1,10)]\nflag=False\n\nfor i in range(0,9):\n if int(a_list[i])==n:\n print(a_list[i])\n flag=True\n break\n elif n < 111:\n print("111")\n break\nif flag==False:\n for i in range(0,8):\n if int(a_list[i])< n < int(a_list[i+1]):\n print(a_list[i+1])\n break'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s082502032', 's364459202', 's377425881', 's862495511', 's891164387', 's135308469'] | [2940.0, 3064.0, 2940.0, 2940.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 23.0] | [213, 277, 204, 199, 194, 319] |
p03243 | u021548497 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\nwhile True:\n if n%10 == n//10%10 == n // 100:\n print(n)\n else:\n n += 1', 'n = int(input())\nwhile True:\n if n%10 == n//10%10 == n // 100:\n print(n)\n break\n else:\n n += 1'] | ['Time Limit Exceeded', 'Accepted'] | ['s134099294', 's464849108'] | [13232.0, 2940.0] | [2104.0, 17.0] | [107, 121] |
p03243 | u023795241 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['s = input()\nans = 0\nif int(s[0]) >= int(s[1]) and int(s[0]) >= int(s[2]):\n print(int(s[0]),int(s[1]),int(s[2]))\n\n\n ans = int(s[0]) * 100 + int(s[0]) * 10 + int(s[0]) * 1\nelse:\n ans = int(s[0]) * 100 + int(s[0]) * 10 + int(s[0]) * 1 + 111\nprint(ans)\n', 's = input()\nans = 0\nif int(s[0]) >= int(s[1]) and int(s[0]) >= int(s[2]):\n ans = int(s[0]) * 100 + int(s[0]) * 10 + int(s[0]) * 1\nelse:\n ans = int(s[0]) * 100 + int(s[0]) * 10 + int(s[0]) * 1 + 111\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s797287258', 's776603184'] | [3060.0, 3064.0] | [17.0, 17.0] | [258, 214] |
p03243 | u024245528 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N = int(input())\n\nlist_aaa = [111,222,333,444,555,666,777,888,999]\ncnt =0\n\nfor i in range(len(list_aaa)):\n if N >= list_aaa[i]:\n cnt +=1\n\nif cnt ==0:\n print(111)\nelse:\n print(list_aaa[cnt])\n', 'N = int(input())\n\nlist_aaa = [111,222,333,444,555,666,777,888,999]\ncnt =0\n\nfor i in range(len(list_aaa)):\n if N >= list_aaa[i]:\n cnt +=1\n\nif cnt ==0:\n print(111)\n exit()\nelse:\n print(list_aaa[cnt])\n', 'N = int(input())\n\nlist_aaa = [111,222,333,444,555,666,777,888,999]\ncnt =0\n\nfor i in range(len(list_aaa)):\n if N >= list_aaa[i]:\n cnt +=1\n\nif cnt ==0:\n print(111)\n exit()\nelse:\n print(list_aaa[cnt])\n', 'N = int(input())\n\nlist_aaa = [111,222,333,444,555,666,777,888,999]\ncnt =0\n\nfor i in range(len(list_aaa)):\n if N > list_aaa[i]:\n cnt +=1\n\nif cnt ==0:\n print(111)\nelse:\n print(list_aaa[cnt])\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s127101439', 's744910914', 's936152794', 's085378160'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [206, 217, 217, 205] |
p03243 | u027622859 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["def main():\n n = int(input())\n\n a = 111\n\n while (a <= n):\n a += 111\n\n print(a)\n\nif __name__=='__main__':\n main()", "def main():\n n = int(input())\n\n a = 111\n\n while (a < n):\n a += 111\n\n print(a)\n\nif __name__=='__main__':\n main()"] | ['Wrong Answer', 'Accepted'] | ['s973238833', 's070014550'] | [2940.0, 2940.0] | [17.0, 18.0] | [134, 133] |
p03243 | u036340997 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\nfor i in range(1, 1000):\n if n < 111 * i:\n print(111*i)\n break\nelse:\n print(999)', 'n = int(input())\nfor i in range(1, 1000):\n if n <= 111 * i:\n print(111*i)\n break'] | ['Wrong Answer', 'Accepted'] | ['s178700828', 's418269588'] | [2940.0, 2940.0] | [17.0, 17.0] | [105, 87] |
p03243 | u037353857 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n=input()\nif int(n[0])>int(n[1]):\n out=int(n[0])\nelif int(n[0])==int(n[1]):\n if int(n[1])>int(n[2]):\n out=int(n[0])\n else:\n out=int(n[0])+1\nelse:\n out=int(n[0])+1\nprint(str(out)*3)', 'n=input()\nif int(n[0])>int(n[1]):\n out=int(n[0])\nelse:\n out=int(n[0])+1\n\nprint(str(out)*3)', 'n=input()\nif int(n[0])>int(n[1]):\n out=int(n[0])\nelif int(n[0])==int(n[1]):\n if int(n[1])>=int(n[2]):\n out=int(n[0])\n else:\n out=int(n[0])+1\nelse:\n out=int(n[0])+1\nprint(str(out)*3)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s237008137', 's796095607', 's970499325'] | [3064.0, 2940.0, 3064.0] | [18.0, 18.0, 18.0] | [192, 92, 193] |
p03243 | u038978707 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n=int(input())\nm=n%100\na=(m*100)+(m*10)+m\nif a<n:\n print(a)\nelse:\n m+=1\n a=(m*100)+(m*10)+m\n print(a)', 'n=int(input())\nm=n//100\n#print(m)\na=(m*100)+(m*10)+m\nif a>=n:\n print(a)\nelse:\n m+=1\n a=(m*100)+(m*10)+m\n print(a)'] | ['Wrong Answer', 'Accepted'] | ['s374599458', 's665263607'] | [2940.0, 3060.0] | [18.0, 17.0] | [113, 125] |
p03243 | u039623862 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n=int(input())\nfor i in range(n,1000):\n if i%100 == i//10:\n print(i)', 'n=int(input())\nfor i in range(n,1000):\n if n%100 == n//10:\n print(n)', 'n=int(input())\nfor i in range(111,1000, 111):\n if i>= n:\n print(i)\n exit()'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s716448700', 's740506832', 's453285622'] | [2940.0, 3188.0, 2940.0] | [18.0, 19.0, 17.0] | [72, 72, 81] |
p03243 | u041075929 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["import sys, os\n\nf = lambda:list(map(int,input().split()))\nif 'local' in os.environ :\n sys.stdin = open('./input.txt', 'r')\n\ndef ok(n):\n s = str(n)\n if len(set(s)) == 1:\n return True\n return False\n\ndef solve():\n n = f()\n for i in range(n, 1000):\n if ok(i):\n print(i)\n return\n\nsolve()\n", "import sys, os\n\nf = lambda:list(map(int,input().split()))\nif 'local' in os.environ :\n sys.stdin = open('./input.txt', 'r')\n\ndef ok(n):\n s = str(n)\n if len(set(s)) == 1:\n return True\n return False\n\ndef solve():\n n = f()[0]\n for i in range(n, 1000):\n if ok(i):\n print(i)\n return\n\nsolve()\n"] | ['Runtime Error', 'Accepted'] | ['s966698187', 's488255775'] | [3056.0, 2940.0] | [17.0, 17.0] | [337, 340] |
p03243 | u047023156 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['import sys\ninput = sys.stdin.readline\n\nN = int(input())\nout = []\nfor i in range(1,10):\n out.append(i*100 + i*10 + i)\nprint(out)\nfor i in range(len(out)):\n if out[i] >= N:\n print(out[i])\n exit()', 'import sys\ninput = sys.stdin.readline\n\nN = int(input())\nout = []\nfor i in range(1,10):\n out.append(i*100 + i*10 + i)\nfor i in range(len(out)):\n if out[i] >= N:\n print(out[i])\n exit()'] | ['Wrong Answer', 'Accepted'] | ['s191793764', 's353814447'] | [3060.0, 3060.0] | [17.0, 17.0] | [213, 202] |
p03243 | u050698451 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['a,b,c = int(input().split())\nif a > b:\n print(a*111)\nelif a == b:\n if b >= c:\n print(a*111)\n else:\n print((a+1)*111)\nelse:\n print((a+1)*111)\n ', 'n = input()\na,b,c = [int(n[i]) for i in range(len(n))]\nprint(a)\nif a > b:\n print(a*111)\nelif a == b:\n if b >= c:\n print(a*111)\n else:\n print((a+1)*111)\nelse:\n print((a+1)*111)\n ', 'n = input()\na,b,c = [int(n[i]) for i in range(len(n))]\n\nif a > b:\n print(a*111)\nelif a == b:\n if b >= c:\n print(a*111)\n else:\n print((a+1)*111)\nelse:\n print((a+1)*111)\n '] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s359639284', 's726069857', 's788191963'] | [2940.0, 3060.0, 3060.0] | [20.0, 18.0, 18.0] | [153, 188, 180] |
p03243 | u061071198 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['a = int(input())\n\nfor i in range(10):\n\tif a<i*111:\n\t\tprint(i*111)\n\t\tbreak\n\n\n\n', 'a = int(input())\n\nfor i in range(10):\n\tif a<=i*111:\n\t\tprint(i*111)\n\t\tbreak\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s452629624', 's150917002'] | [2940.0, 2940.0] | [17.0, 17.0] | [77, 78] |
p03243 | u071061942 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = input()\nif int(n) < int(n[0]) * 111:\n print(int(n[0]) * 111)\nelse:\n print((int(n[0]) + 1) * 111)\n', 'n = input()\nif int(n) <= int(n[0]) * 111:\n print(int(n[0]) * 111)\nelse:\n print((int(n[0]) + 1) * 111)'] | ['Wrong Answer', 'Accepted'] | ['s161285531', 's170687777'] | [2940.0, 3064.0] | [17.0, 18.0] | [103, 103] |
p03243 | u072526305 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['print(((int(input()) + 110) / 111 + 1) * 111)', 'print((int(input()) + 110) / 111 * 111)', 'print(((int(input()) + 110) // 111) * 111)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s262031558', 's421836703', 's117798316'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [45, 39, 42] |
p03243 | u076894102 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['print("aa")', 'print("aa")', 'n = input()\nl=len(n)\ns1=str(n[0]*l)\ns2=""\nif n[0]==\'9\':\n s2="1"*(l+1)\nelse:\n s2=str(int(n[0])+1)*l\n\nif n<=s1:\n print(s1)\nelse:\n print(s2)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s311008361', 's663655888', 's962226105'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 18.0] | [11, 11, 149] |
p03243 | u077291787 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['# ABC111B\n\nnum = float(input())\ni = num / 111\nprint(round(i + 0.5) * 111)', '\ndef main():\n N = int(input())\n ans = (N + 110) // 111 * 111\n print(ans)\n\n\nif __name__ == "__main__":\n main()'] | ['Wrong Answer', 'Accepted'] | ['s802306723', 's321072730'] | [2940.0, 2940.0] | [21.0, 17.0] | [73, 161] |
p03243 | u088974156 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n=int(input()\nprint(((n-1)//111)*111+111)', 'n=int(input()\nprint((((n-1)//111)+1)*111)', 'n=int(input()\nprint(((n-1)//111)*111+111)', 'n=int(input()\nprint((n-1)//111+111))', 'n=int(input())\nprint((((n-1)//111)+1)*111)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s234346585', 's255710397', 's621394794', 's823702828', 's757420305'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [41, 41, 41, 36, 42] |
p03243 | u089142196 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N=int(input())\n\nfor i in range(N,1000):\n a=N//100\n c=N%10\n b=N-(100*a + c)\n if a==b==c:\n print(i)\n break', 'N=int(input())\n\nfor i in range(N,1000):\n a=str(i)[0]\n b=str(i)[1]\n c=str(i)[2]\n if a==b and b==c:\n print(i)\n break'] | ['Wrong Answer', 'Accepted'] | ['s972232736', 's852536588'] | [2940.0, 3060.0] | [17.0, 17.0] | [114, 124] |
p03243 | u090225501 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = input()\nx = (n - 1) // 111 + 1\nprint(x * 111)\n', 'n = int(input())\nx = (n - 1) // 111 + 1\nprint(x * 111)\n'] | ['Runtime Error', 'Accepted'] | ['s109763902', 's415199799'] | [2940.0, 2940.0] | [18.0, 17.0] | [50, 55] |
p03243 | u094191970 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['import bisect\nN = int(input())\ncandidate = [int(i*111) for i in range(1,10)]\nprint(candidate[bisect.bisect_right(candidate, N)])', 'import bisect\nN = int(input())\ncandidate = [int(i*111) for i in range(1,10)]\nprint(candidate[bisect.bisect_left(candidate, N)])'] | ['Runtime Error', 'Accepted'] | ['s061061708', 's101180051'] | [2940.0, 3060.0] | [18.0, 19.0] | [128, 127] |
p03243 | u095021077 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['print(111*(1+int(input())//111))', 'N=int(input())\na=N//111\nb=N%111\nif b>0:\n a+=1\nprint(111*a)'] | ['Wrong Answer', 'Accepted'] | ['s933392211', 's281439911'] | [2940.0, 2940.0] | [17.0, 17.0] | [32, 59] |
p03243 | u095756391 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["N = int(input())\n\nif N < 111:\n print('111')\nelif N < 222:\n print('222')\nelif N < 333:\n print('333')\nelif N < 444:\n print('444')\nelif N < 555:\n print('555')\nelif N < 666:\n print('666')\nelif N < 777:\n print('777')\nelif N < 888:\n print('888')\nelif N < 999:\n print('999')", "N = int(input())\n\nif N <= 111:\n print('111')\nelif N <= 222:\n print('222')\nelif N <= 333:\n print('333')\nelif N <= 444:\n print('444')\nelif N <= 555:\n print('555')\nelif N <= 666:\n print('666')\nelif N <= 777:\n print('777')\nelif N <= 888:\n print('888')\nelif N <= 999:\n print('999')\n"] | ['Wrong Answer', 'Accepted'] | ['s178508496', 's388686208'] | [3060.0, 2940.0] | [17.0, 18.0] | [276, 286] |
p03243 | u102960641 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\na = [111,222,333,444,555,666,777,888,999]\nfor i in a:\n if i >= n:\n print(i)\n', 'n = int(input())\na = [111,222,333,444,555,666,777,888,999]\nb = 0\nfor i in a:\n if i >= n:\n b = i\n break\nprint(b)\n'] | ['Wrong Answer', 'Accepted'] | ['s305297554', 's894350967'] | [2940.0, 2940.0] | [17.0, 17.0] | [97, 119] |
p03243 | u103902792 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\n\nwhile 1:\n lst = set(list(str(n)))\n if len(lst)==1:\n print(n)\n else:\n n+= 1\n ', 'n = int(input())\nfor i in range(1,10):\n if i*111 >= n:\n print(i*111)\n break\n '] | ['Time Limit Exceeded', 'Accepted'] | ['s767961250', 's932381499'] | [8880.0, 2940.0] | [2104.0, 17.0] | [106, 87] |
p03243 | u108990937 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["n=input()\nlength = len(n)\nx = n[0]\n\n\nif n[1] < x:\n x = x*length\n\nelif n[1] > x:\n x = str(int(x) + 1)*length\n\nelse:\n \n if n[2] < x:\n x = x *length\n \n elif n[2] > x:\n x = str(int(x)+1)*length\n\n\nif int(n) == 999:\n x = '1111'\n\nprint(x)\n \n \n", "n=input()\nlength = len(n)\nx = n[0]\n\n\nif n[1] < x:\n x = x*length\n\nelif n[1] > x:\n x = str(int(x) + 1)*length\n\nelse:\n \n if n[2] < x:\n x = x *length\n \n elif n[2] > x:\n x = str(int(x)+1)*length\n\n else:\n x = x * length\n\nif int(n) == 999:\n x = '999'\n\nprint(x)\n \n \n"] | ['Wrong Answer', 'Accepted'] | ['s192948215', 's928155845'] | [3060.0, 3060.0] | [19.0, 18.0] | [571, 603] |
p03243 | u113003638 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\nt = int(str(n)[0])\nif n < (100*t+10*t+t):\n print(100*t+10*t+t)\nelse:\n print(100*(t+1)+10*(t+1)+t+1)\n ', 'n = int(input())\nt = int(str(n)[0])\nif n-1 < (100*t+10*t+t):\n print(100*t+10*t+t)\nelse:\n print(100*(t+1)+10*(t+1)+t+1)\n '] | ['Wrong Answer', 'Accepted'] | ['s356196740', 's077339415'] | [2940.0, 2940.0] | [17.0, 18.0] | [127, 129] |
p03243 | u118019047 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = list(input())\na = int(str(n[0])+str(n[1]))\nb = int(str(n[1])+str(n[2]))\n\nif a > b:\n print(n[0]*3)\nelse:\n c =str( int(n[0]) + 1)\n print(c*3)', 'n = list(input())\na = int(str(n[0])+str(n[1]))\nb = int(str(n[1])+str(n[2]))\n\nif a >= b:\n print(n[0]*3)\nelse:\n c =str( int(n[0]) + 1)\n print(c*3)'] | ['Wrong Answer', 'Accepted'] | ['s187255748', 's575030873'] | [3060.0, 3060.0] | [18.0, 17.0] | [152, 153] |
p03243 | u122195031 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N = int(input())\nprint(lst)\nfor i in range(1000):\n if N in lst:\n print(N)\n break\n else:\n N += 1', 'N = int(input())\nlst = [i*100+i*10+i for i in range(1,10)]\nfor i in range(1000):\n if N in lst:\n print(N)\n break\n else:\n N += 1'] | ['Runtime Error', 'Accepted'] | ['s353382784', 's347737336'] | [2940.0, 2940.0] | [17.0, 17.0] | [122, 153] |
p03243 | u127499732 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['print(111 if (int(input())//111)==0 else 111*(int(input())//111+1) )', 'n=int(input())\nprint(111 if (n//111)==0 else 111*(n//111+1) )', 'n=int(input())\nprint(n if n%111==0 else 111*(n//111+1) )'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s298484688', 's974630571', 's145054867'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [68, 61, 56] |
p03243 | u135265051 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['# import math\n# import statistics\na=int(input())\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\n#e1,e2 = map(int,input().split())\n#f = list(map(int,input().split()))\n#g = [input() for _ in range(a)]\n\nz = a//9\naf= a%9\nif af==0:\n print(str(9)*(z))\n\nelse :\n print(str(af)*(z+1))\n', 'import math\n# import statistics\n# a=input()\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\ne1,e2 = map(int,input().split())\n#f = list(map(int,input().split()))\n#g = [input() for _ in range(a)]\nz = a//9\naf= a%9\nif af==0:\n print(str(9)*(z))\n \nelse :\n print(str(af)*(z+1))', '# import math\n# import statistics\na=input()\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\n#e1,e2 = map(int,input().split())\n#f = list(map(int,input().split()))\n#g = [input() for _ in range(a)]\n\nzyun= len(a)*9+int(a[0])\nzoro=0\nz = zyun//9\naf= zyun%9\nif af==0:\n if int(a)<=int(str(9)*(z-1)):\n print(int(str(9)*(z-1)))\n else:\n print(str(1)*(z))\nelse :\n if int(a)<=int(str(af)*(z)):\n print(int(str(af)*(z)))\n else:\n print(int(str(af+1)*(z)))\n\n\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s272895536', 's781093709', 's735644801'] | [9108.0, 9040.0, 9184.0] | [30.0, 23.0, 30.0] | [305, 297, 533] |
p03243 | u143492911 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['#include<bits/stdc++.h>\n\n#include<algorithm>\n#include<numeric>\n#include<string>\n\nusing namespace std;\nint main(){\n int N;\n cin>>N;\n for(int i=111;i<=999;i+=111){\n if(N<=i){\n cout<<i<<endl;\n return 0;\n }\n }\n}', '#include<bits/stdc++.h>\n\n#include<algorithm>\n#include<numeric>\n#include<string>\n\nusing namespace std;\nint main(){\n int N;\n cin>>N;\n for(int i=100;i<=999;i+111){\n if(N<=i){\n cout<<i<<endl;\n return 0;\n }\n }\n return 0;\n}\n', 'n=int(input())\nfor i in range(111,1000,111):\n if n<=i:\n print(i)\n break'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s059553596', 's564854805', 's977762389'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [289, 303, 108] |
p03243 | u146597538 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['#N = list(map(int, input()))\nN = int(input())\n\nlist = [111,222,333,444,555,666,777,888,999]\nans = 0\nfor l in list:\n if N < l:\n ans = l\n else:\n break\n\nprint(ans)', '#N = list(map(int, input()))\nN = int(input())\n\nlist = [111,222,333,444,555,666,777,888,999]\nans = 0\nfor l in list:\n if N <= l:\n ans = l\n else:\n break\n\nprint(ans)', '#N = list(map(int, input()))\nN = int(input())\n\nlist = [111,222,333,444,555,666,777,888,999, 1000000]\nans = 0\nfor l in list:\n if N > l:\n continue\n else:\n ans =l\n break\n\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s386638222', 's787993326', 's734920243'] | [2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0] | [168, 169, 189] |
p03243 | u164261323 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['a = input()\nprint((((a-1)//111)+1)*111)', 'a = int(input())\nprint((((a-1)//111)+1)*111)'] | ['Runtime Error', 'Accepted'] | ['s441846070', 's363897726'] | [2940.0, 2940.0] | [17.0, 18.0] | [39, 44] |
p03243 | u166696759 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n=int(inp())\na=n%100\nm=a*100+a*10+a\nif n<=m:\n print(m)\nelse:\n print(m+111)', 'n=int(input())\na=n%100\nm=a*100+a*10+a\nif n<=m:\n print(m)\nelse:\n print(m+111)', 'n=int(input())\na=n//100\nm=a*100+a*10+a\nif n<=m:\n print(m)\nelse:\n print(m+111)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s145957966', 's300146853', 's695855879'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [76, 78, 79] |
p03243 | u168825829 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["a = input()\nif (a[-1] == '0' and (int(a[0]) >= int(a[2])) or (int(a[0]) >= int(a[2]) and int(a[0]) >= int(a[1]))::\n ans = int(a[0] * 3)\nelse:\n ans = str(int(a[0])+1)*3\nprint(ans)\n", "a = input()\nif (a[-1] == '0' and (int(a[0]) >= int(a[2])) or (int(a[0]) >= int(a[2]) and int(a[0]) >= int(a[1])):\n ans = int(a[0] * 3)\nelse:\n ans = str(int(a[0])+1)*3\nprint(ans)\n", "a = input()\nif (a[-1] == '0' and (int(a[0]) >= int(a[1]))):\n ans = int(a[0] * 3)\nelif(int(a[0]) >= int(a[2]) and int(a[0]) >= int(a[1]) and a[-1] != '0'):\n ans = int(a[0] * 3)\nelse:\n ans = str(int(a[0])+1)*3\nprint(ans)\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s193075621', 's814507560', 's950452901'] | [2940.0, 2940.0, 3064.0] | [20.0, 18.0, 18.0] | [186, 185, 228] |
p03243 | u171115409 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['# -*- coding: utf-8 -*-\nimport numpy as np\nN = int(input())\nl = np.array([111, 222, 333, 444, 555, 666, 777, 888, 999])\nprint(l<N)\nind = sum(l < N)\nprint(l[ind])\n', '# -*- coding: utf-8 -*-\nimport numpy as np\nN = int(input())\nl = np.array([111, 222, 333, 444, 555, 666, 777, 888, 999])\nind = sum(l < N)\nprint(l[ind])\n'] | ['Wrong Answer', 'Accepted'] | ['s361796845', 's952227544'] | [12504.0, 12392.0] | [147.0, 148.0] | [162, 151] |
p03243 | u173329233 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\nfor i in range(1,10):\n t = 10-i\n if n > t*100 + t*10 + t:\n res = (t+1)*100 + (t+1)*10 + t+1\n break\n\nprint(res)\n', 'n = int(input())\nfor t in range(1,10):\n if n <= t*100 + t*10 + t:\n res = t*100 + t*10 + t\n break \n\nprint(res)\n'] | ['Runtime Error', 'Accepted'] | ['s339161086', 's307877577'] | [2940.0, 2940.0] | [17.0, 18.0] | [148, 127] |
p03243 | u174603263 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['x = ((N - (N % 111)) / 111) * 111', 'N = int(input())\nif N % 111 == 0:\n x = ((N - (N % 111)) / 111) * 111\nelse:\n x = (((N - (N % 111)) / 111) + 1) * 111\nprint(int(x))'] | ['Runtime Error', 'Accepted'] | ['s598417866', 's464723806'] | [2940.0, 2940.0] | [18.0, 17.0] | [33, 143] |
p03243 | u185806788 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N=int(input())\nX=set(str(N))\nY=len(X)\nif Y==1\n print(N)\nif Y!=1:\n Z=0\n for i in range(111,1000,111):\n if N-i<0:\n Z+=i\n break\n print(Z)', 'N=int(input())\nX=set(str(N))\nY=len(X)\nif Y==1:\n print(Y)\nif Y!=1:\n Z=0\n for i in range(111,1000,111):\n if N-i<0:\n Z+=i\n break\n print(Z)', 'N=int(input())\nX=set(str(N))\nY=len(X)\nif Y==1:\n print(N)\nif Y!=1:\n Z=0\n for i in range(111,1000,111):\n if N-i<0:\n Z+=i\n break\n print(Z)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s483422801', 's792075695', 's850434145'] | [9012.0, 9164.0, 9156.0] | [25.0, 29.0, 28.0] | [151, 152, 153] |
p03243 | u186273045 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['line = int(input())\nlina = list(map(int, [line/100, (line/10)%10, line%10]))\ncontest = [111*lina[0], 111*(lina[0]+1)]\nif(contest[0] - line > 0):\n print(contest[0])\nelse:\n print(contest[1])', 'line = int(input())\nlina = list(map(int, [line/100, (line/10)%10, line%10]))\ncontest = [111*lina[0], 111*(lina[0]+1)]\nif(contest[0] - line >= 0):\n print(contest[0])\nelse:\n print(contest[1])'] | ['Wrong Answer', 'Accepted'] | ['s597838701', 's050883481'] | [3060.0, 3188.0] | [18.0, 20.0] | [194, 195] |
p03243 | u187233527 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N = int(input())\nfor i in range(1, 10):\n if N < i * 111:\n print(i * 111)\n break', 'N = int(input())\nfor i in range(1, 10):\n if N <= i * 111:\n print(i * 111)\n break'] | ['Wrong Answer', 'Accepted'] | ['s689405774', 's140692710'] | [2940.0, 2940.0] | [17.0, 17.0] | [86, 87] |
p03243 | u190406011 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['import re\nN = int(input())\n_max = max([int(i) for i in str(N)])\nprint(_max * (len(str(N))))', 'N = int(input())\nlen_N = len(N)\nnum = int(str(N)[0]) + 1\nif int(str(num) * len_N) < N:\n print(str(num) * len_N)\nelse:\n print(str(num + 1) * (len(str(N))))', 'N = int(input())\nnum = int(str(N)[0]) + 1\nif str(N) == str(num) * (len(str(N))):\n print(N)\nelse:\n print(str(num) * (len(str(N))))', 'N = int(input())\nlen_N = len(str(N))\nnum = int(str(N)[0])\nif int(str(num) * len_N) < N:\n print(str(num + 1) * len_N)\nelse:\n print(str(num) * (len(str(N))))'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s014802796', 's558192702', 's644101442', 's742920243'] | [3188.0, 3060.0, 2940.0, 3060.0] | [19.0, 17.0, 17.0, 17.0] | [91, 156, 131, 157] |
p03243 | u194894739 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N = int(input())\nfor i in range(1, 10):\n num = int("i"*3)\n if N <= num:\n print(num)\n break\n', 'N = int(input())\nfor i in range(1, 10):\n num = i*111\n if N <= num:\n print(num)\n break\n'] | ['Runtime Error', 'Accepted'] | ['s514393292', 's420524437'] | [2940.0, 2940.0] | [17.0, 17.0] | [111, 106] |
p03243 | u217627525 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n=input()\nif n[0]>n[1] or (n[0]=n[1] and n[1]>=n[2]):\n print(int(n[0])*111\nelse:\n print(int(n[0])*111+111)', 'n=input()\nif n[0]>n[1] or (n[0]=n[1] and n[1]>=n[2]):\n print(int(n[0])*111)\nelse:\n print(int(n[0])*111+111)', 'n=input()\nif n[0]>n[1] or (n[0]==n[1] and n[1]>=n[2]):\n print(int(n[0])*111)\nelse:\n print(int(n[0])*111+111)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s795541285', 's833719641', 's246236173'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [112, 113, 114] |
p03243 | u219180252 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["a = input()\nb = list(a)\nk = int(''.join([b[0] for _ in range(len(b))]))\nif k > int(a):\n print(k)\nelse:\n if b[0] != '9':\n print(int(''.join([str(int(b[0]) + 1) for _ in range(len(b))])))\n else:\n print(int(''.join(['1' for _ in range(len(b)+1)])))", "a = input()\nb = list(a)\nk = int(''.join([b[0] for _ in range(len(b))]))\nif k >= int(a):\n print(k)\nelse:\n if b[0] != '9':\n print(int(''.join([str(int(b[0]) + 1) for _ in range(len(b))])))\n else:\n print(int(''.join(['1' for _ in range(len(b)+1)])))"] | ['Wrong Answer', 'Accepted'] | ['s021054970', 's836971890'] | [3064.0, 3064.0] | [19.0, 20.0] | [268, 269] |
p03243 | u220345792 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = input()\n\nif int(n[0]) <= int(n[1]):\n if int(n[0]) == int(n[1]) and int(n[0]) > int(n[2]):\n temp=int(n[0])\n print(temp*100+temp*10+temp)\n else:\n temp=int(n[0])+1\n print(temp*100+temp*10+temp)\nelse:\n temp=int(n[0])\n print(temp*100+temp*10+temp)', 'n = input()\n\nif int(n[0]) <= int(n[1]):\n if int(n[0]) == int(n[1]) and int(n[0]) >= int(n[2]):\n temp=int(n[0])\n print(temp*100+temp*10+temp)\n else:\n temp=int(n[0])+1\n print(temp*100+temp*10+temp)\nelse:\n temp=int(n[0])\n print(temp*100+temp*10+temp)'] | ['Wrong Answer', 'Accepted'] | ['s386586638', 's905828809'] | [3060.0, 3060.0] | [17.0, 17.0] | [286, 287] |
p03243 | u223904637 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n=int(input())\na=n%100\nif a==9:\n print(999)\nelse:\n ans=100*a+10*a+a\n if ans>=n:\n print(ans)\n else:\n print(ans+111)', 'n=int(input())\na=(n-n%100)//100\nif a==9:\n print(999)\nelse:\n ans=100*a+10*a+a\n if ans>=n:\n print(ans)\n else:\n print(ans+111)\n'] | ['Wrong Answer', 'Accepted'] | ['s886973865', 's651859985'] | [2940.0, 2940.0] | [17.0, 18.0] | [140, 150] |
p03243 | u227082700 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['print(111*(int(input())//111+1))', 'for i in range(int(input()),1000):\n if i%111==0:print(i);exit()'] | ['Wrong Answer', 'Accepted'] | ['s877790200', 's501829105'] | [2940.0, 2940.0] | [17.0, 17.0] | [32, 64] |
p03243 | u231122239 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\nfor i in range(10):\n if i * 111 > n:\n print(i * 111)\n break', 'n = int(input())\nfor i in range(10):\n if i * 111 >= n:\n print(i * 111)\n break'] | ['Wrong Answer', 'Accepted'] | ['s783944423', 's740969498'] | [2940.0, 2940.0] | [17.0, 17.0] | [93, 94] |
p03243 | u238084414 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N = int(input())\n\nif N//111 == 0:\n print(N)\nelse:\n print((N//111 + 1) * 111)', 'N = int(input())\n\nif N%111 == 0:\n print(N)\nelse:\n print((N//111 + 1) * 111)'] | ['Wrong Answer', 'Accepted'] | ['s458881037', 's486739529'] | [2940.0, 2940.0] | [18.0, 17.0] | [78, 77] |
p03243 | u242580186 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["import sys\nimport time\nimport math\ndef inpl():\n return list(map(int, input().split()))\nst = time.perf_counter()\n# ------------------------------\n\n\x08N = int(input())\nfor i in range(N, 1000):\n\tif N//100==N//10 ans N//10==N%10:\n\t\tprint(N)\n\t\tsys.exit()\n\n# ------------------------------\ned = time.perf_counter()\nprint('time:', ed-st, file=sys.stderr)\n", "import sys\nimport time\nimport math\ndef inpl():\n return list(map(int, input().split()))\nst = time.perf_counter()\n# ------------------------------\n\nN = int(input())\nfor i in range(N, 1000):\n\tif i//100==(i//10)%10:\n\t\tif i//100==i%10:\n\t\t\tprint(i)\n\t\t\tsys.exit()\n\n# ------------------------------\ned = time.perf_counter()\nprint('time:', ed-st, file=sys.stderr)\n"] | ['Runtime Error', 'Accepted'] | ['s057155087', 's273133253'] | [8908.0, 8972.0] | [24.0, 28.0] | [349, 358] |
p03243 | u243572357 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\nif n//111 = n/111:\n print(n)\nelse:\n print(((n//111)+1) * 111)', 'print(((int(input()) // 111) + 1) * 111)', 'n = int(input())\nif n//111 == n/111:\n print(n)\nelse:\n print(((n//111)+1) * 111)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s965006408', 's981356909', 's583889686'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [80, 40, 81] |
p03243 | u244836567 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['a=int(input())\nb=a%100\nc=a//100\nif b<=c*11:\n print(c*111)\nelse:\n print()c+1)*111)', 'a=int(input())\nb=a%100\nc=a//100\nif b<=c*11:\n print(c*111)\nelse:\n print((c+1)*111)'] | ['Runtime Error', 'Accepted'] | ['s110322426', 's077657658'] | [8960.0, 9068.0] | [26.0, 25.0] | [83, 83] |
p03243 | u248670337 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['print((int(input())//111+1)*111)', 'print(((int(input())-1)//111+1)*111)'] | ['Wrong Answer', 'Accepted'] | ['s951062538', 's634300672'] | [2940.0, 2940.0] | [20.0, 20.0] | [32, 36] |
p03243 | u253321779 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ["def piyo():\n n = int(input())\n hoge = n//100\n if int(str(hoge)+str(hoge))>n%100:\n a = int(str(hoge)+str(hoge)+str(hoge))\n else:\n hoge+=1\n a = int(str(hoge)+str(hoge)+str(hoge))\n print(a)\n\nif __name__ == '__main__':\n piyo()", "def piyo():\n n = int(input())\n hoge = n//100\n if int(str(hoge)+str(hoge))>=n%100:\n a = int(str(hoge)+str(hoge)+str(hoge))\n else:\n hoge+=1\n a = int(str(hoge)+str(hoge)+str(hoge))\n print(a)\n\nif __name__ == '__main__':\n piyo()"] | ['Wrong Answer', 'Accepted'] | ['s104441360', 's989237204'] | [3060.0, 3060.0] | [18.0, 18.0] | [261, 262] |
p03243 | u255555420 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N=input()\n\n\n\nif N[2]>=N[0]:\n B=int(N[0])+1\n C=str(B)\n A=str(C+C+C)\n\nelse:\n A=str(N[0]+N[0]+N[0])\n\n\n \nprint(A)', 'N=input()\n\nif N[2]==N[1]==N[0]:\n A=N\n\nelif N[2]>N[0] or N[1]>N[0]:\n B=int(N[0])+1\n C=str(B)\n A=str(C+C+C)\n\n\nelse:\n A=str(N[0]+N[0]+N[0])\n\n\n \nprint(A)'] | ['Wrong Answer', 'Accepted'] | ['s929175594', 's340869950'] | [2940.0, 3060.0] | [18.0, 17.0] | [124, 167] |
p03243 | u256464928 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['n = int(input())\nfor i in range(n,1000):\n if i[0]==i[1]==i[2]:\n return i\nprint(i)\n ', 'n = int(input())\nfor i in range(n,1000):\n I = str(i)\n if I[0]==I[1]==I[2]:\n print(i)\n break'] | ['Runtime Error', 'Accepted'] | ['s321082963', 's396575251'] | [2940.0, 2940.0] | [17.0, 18.0] | [88, 99] |
p03243 | u257018224 | 2,000 | 1,048,576 | Kurohashi has never participated in AtCoder Beginner Contest (ABC). The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to make his debut in some ABC x such that all the digits of x in base ten are the same. What is the earliest ABC where Kurohashi can make his debut? | ['N=int(input())\na=N//100\nb=(N-a*100)//10\nc=N-a*100-b*10\nif a<b:\n N=(a+1)*111\nelif a>b:\n N=a*111\nelif a=b and a>=c:\n N=a*111\nelif :\n N=(a+1)*111\nprint(N)\n ', 'N=int(input())\na=N//100\nb=(N-a*100)//10\nc=N-a*100-b*10\nif a<b:\n N=(a+1)*111\nelif a>b:\n N=a*111\nelif a==b and a>=c :\n N=a*111\nelif a==b and a<c :\n N=(a+1)*111\nprint(N)'] | ['Runtime Error', 'Accepted'] | ['s925619110', 's641720530'] | [2940.0, 2940.0] | [17.0, 17.0] | [168, 178] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.