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
p03243
u662430503
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\ndef main():\n n=int(input())\n a=int(n/100)\n if a*100+a*10+a>n:\n print(a*100+a*10+a)\n else:\n print((a+1)*100+(a+1)*10+a+1)\nmain()', 'import math\ndef main():\n n=int(input())\n a=int(n/100)\n if a*100+a*10+a>=n:\n print(a*100+a*10+a)\n else:\n print((a+1)*100+(a+1)*10+a+1)\nmain(...
['Wrong Answer', 'Accepted']
['s755077416', 's356846024']
[9108.0, 9108.0]
[30.0, 26.0]
[149, 150]
p03243
u666844906
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())\ni = int(N/111)\nif N % 111 != 0:\n i = i + 1\nelse:\n i = 1\nprint(i)', 'N = int(input())\ni = int(N/111)\nif N % 111 != 0:\n i = i + 1\nelse:\n i = i\nprint(i*111)\n']
['Wrong Answer', 'Accepted']
['s328990750', 's470093460']
[3064.0, 2940.0]
[17.0, 17.0]
[83, 88]
p03243
u672475305
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()\nlst = []\nans = []\nfor i in range(3):\n num = int(n[i]*3)\n lst.append(num)\nfor i in range(3):\n if lst[i] > int(n):\n ans.append(lst[i])\nprint(min(ans))', 'n =int(input())\ni = int(n/111)\nif n % 111 != 0:\n i += 1\nprint(i * 111)']
['Runtime Error', 'Accepted']
['s522006803', 's031309806']
[3060.0, 2940.0]
[17.0, 17.0]
[175, 73]
p03243
u673338219
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())\nk = 0\nif int(n/111) == n/111:\n k = n/111\nelse:\n k = int(n/111) + 1\nprint(111*k)', 'n = int(input())\nk = 0\nif int(n/111) == n/111:\n k = n/111\nelse k = int(n/111) + 1\nprint(111*k)', 'n = int(input())\nk = 0\nif int(n/111) == n/111:\n k = int(n/111)\nelse:\n k = int(n/111) + 1\nprint(111...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s023019248', 's358033190', 's332629923']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[98, 95, 103]
p03243
u677312543
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\nfor i in range(1, 10):\n if n <= i*111:\n print(i*111)\n exit()\n', 'n = input()\nzorome = [i*100 + i*10 + i for i in range(1, 10)]\n\nfor i in zorome:\n if n <= i:\n print(i)\n exit()\n', 'n = int(input())\n\nfor i in range(1, 10):\n if n <= i*111:\n print(i...
['Runtime Error', 'Runtime Error', 'Accepted']
['s675237748', 's750179367', 's298386249']
[2940.0, 3060.0, 2940.0]
[18.0, 20.0, 19.0]
[91, 127, 96]
p03243
u685662874
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//111) + 1) * 111)', 'N=int(input())\nif N % 111 == 0:\n print(N)\nelse:\n print(((N//111) + 1) * 111)\n']
['Wrong Answer', 'Accepted']
['s344858314', 's900683347']
[2940.0, 2940.0]
[17.0, 18.0]
[42, 79]
p03243
u686036872
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=-(-N//111)\nprint(100x+10x+x)', 'N=int(input())\nx=-(-N//111)', 'print(100*x+10*x+x)', 'N=int(input())\nx=-(-N//111)\nprint(100*x + 10*x + x)']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s408717289', 's435093576', 's725364451', 's513482244']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 19.0]
[45, 27, 19, 51]
p03243
u690781906
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[0] * 3\nif int(N) < int(x):\n print(x)\nelse:\n print(str(int(N[0]) + 1) * 3)\n', 'N = input()\nx = N[0] * 3\nif int(N) <= int(x):\n print(x)\nelse:\n print(str(int(N[0]) + 1) * 3)']
['Wrong Answer', 'Accepted']
['s769355820', 's396886188']
[2940.0, 2940.0]
[18.0, 17.0]
[98, 98]
p03243
u691018832
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 = 999\n\nfor i in range(1,10):\n if n <= 111*i:\n break\nprint(111*i)', 'n = int(input())\n\nfor i in range(1,9):\n if n <= 111*i:\n print(111*i)', 'n = int(input())\n\nfor i in range(1,10):\n if n <= 111*i:\n break\nprint(111*i)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s721217023', 's740072216', 's725596865']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[76, 78, 85]
p03243
u693933222
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 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")\nelse:\n print("999")', 'N = int(inp...
['Runtime Error', 'Accepted']
['s056135000', 's137872833']
[2940.0, 3060.0]
[17.0, 17.0]
[285, 286]
p03243
u698416089
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())+100\no = int((n-(n%100))/100*111)\nif n < o:\n\tprint(o)\nelse:\n\tprint(o+111)', 'n = int(input())\no = int((n-(n%100))/100)\nif n<=o*111:\n print(o*111)\nelse:\n print(o*111+111)']
['Wrong Answer', 'Accepted']
['s277373263', 's963249879']
[2940.0, 2940.0]
[18.0, 17.0]
[89, 98]
p03243
u701077471
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())\napple = []\n\nnumber = [111, 222, 333, 444, 555, 666, 777, 888, 999]\nfor i in number:\n if i - n > 0:\n apple.append(i)\n else:\n pass\n\nprint(min(apple))', 'n = int(input())\napple = []\n\nnumber = [111, 222, 333, 444, 555, 666, 777, 888, 999]\nfor i in number:\n if i - n >...
['Runtime Error', 'Accepted']
['s208534664', 's917394041']
[2940.0, 2940.0]
[17.0, 17.0]
[184, 162]
p03243
u703890795
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())-1)//111)*111)', 'print(((int(input())-1)//111)*111 + 111)']
['Wrong Answer', 'Accepted']
['s286604243', 's345078090']
[2940.0, 2940.0]
[17.0, 17.0]
[34, 40]
p03243
u706828591
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 + (111 - n % 111))', 'n = int(input())\n#n, t = map(int,input().split())\n#ls = list(map(int,input().split()))\n\n\n\nif n% 111 == 0:\n print(n)\n quit()\nprint(n + 111 - n % 111 )']
['Wrong Answer', 'Accepted']
['s721322269', 's114679196']
[2940.0, 2940.0]
[17.0, 17.0]
[43, 245]
p03243
u706929073
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())\ncs = [1111, 999, 888, 777, 666, 555, 444, 333, 222, 111]\nf = False\nfor i, c in enumerate(cs):\n if c <= n:\n print(cs[i-1])\n f = True\n break\nif not f:\n print(cs[len(cs)-1])', 'n = int(input())\ncs = [1111, 999, 888, 777, 666, 555, 444, 333, 222, 111]\nf = False\nfor ...
['Wrong Answer', 'Accepted']
['s193998218', 's483710903']
[3060.0, 3060.0]
[17.0, 19.0]
[214, 218]
p03243
u731028462
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()\nl = len(N)\nif(int(N[0]*l) > int(N)):\n print(N[0]*l)\nelse:\n print(str(int(N[0])+1)*l)', 'N = input()\nl = len(N)\nif(int(N[0]*l) >= int(N)):\n print(N[0]*l)\nelse:\n print(str(int(N[0])+1)*l)']
['Wrong Answer', 'Accepted']
['s383191261', 's512355426']
[2940.0, 2940.0]
[20.0, 17.0]
[102, 103]
p03243
u732870425
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())\nli = [111,222,333,444,555,666,777,888,999]\nnn = []\nfor i in range(len(li)):\n if li[i] - n >= 0:\n nn.append(li[i]-n)\n else:\n nn.append(1000)\n \nprint(li[index(min(nn))])', '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', 'Accepted']
['s839035660', 's484033940']
[2940.0, 2940.0]
[17.0, 17.0]
[193, 79]
p03243
u737758066
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>\nusing namespace std;\nint main() {\n int n;\n cin >> n;\n for (int i = n; i <= 999; i++) {\n string str = to_string(i);\n set<char> st;\n for (int i = 0; i < str.size(); i++) {\n st.insert(str[i]);\n }\n if (st.size() == 1) {\n cout << i << endl;\n break;\n ...
['Runtime Error', 'Accepted']
['s455821909', 's337281288']
[2940.0, 2940.0]
[17.0, 17.0]
[325, 104]
p03243
u740767776
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,n+1):\n low = i * 100 + i *10 + (i+1)\n high = (i+1) * 100 + (i+1) *10 + (i+1)\n if low < n and n <= high:\n print(high)\n else:\n print(low)\n ', 'n = int(input())\nfor i in range(0,11):\n low = i * 100 + i *10 + i\n high = (i+1) * 100 + (i+1) *10 + (i+1)\n if low <...
['Wrong Answer', 'Accepted']
['s204118593', 's837450589']
[3188.0, 2940.0]
[18.0, 17.0]
[184, 161]
p03243
u747837595
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 numpy as np\na=[int(x)for x in list(sys.argv[1])]+[-1]\nprint(str(a[0]+0if(np.trim_zeros(np.diff(a))[0]<0)else 1)*3)\n', 'import sys\nimport numpy as np\na=[int(x)for x in list(sys.argv[1][0:3])]+[-1]\nprint(str(a[0]+0if(np.trim_zeros(np.diff(a))[0]<0)else 1)*3)\n', 'import sys\nimport numpy as np\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s264465721', 's917994749', 's690553476']
[20528.0, 19636.0, 12472.0]
[281.0, 503.0, 156.0]
[133, 138, 161]
p03243
u748241164
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 = N-1 // 111\n\nprint((x+1)*111)', 'N = int(input())\nx = (N-1) // 111\n\nprint((x+1)*111)']
['Wrong Answer', 'Accepted']
['s083293706', 's246998585']
[2940.0, 2940.0]
[17.0, 17.0]
[49, 51]
p03243
u748377775
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?
['for i in range(9):\n if(N>L[i] and N<=L[i+1]):\n print(L[i+1])\n break\n elif(N==L[i]):\n print(L[i])\n break\n elif(N<111):\n print(111)\n break\n else:\n continue\n', 'N=int(input())\nL=[111,222,333,444,555,666,777,888,999]\n\nfor i in range(9):\n if(N...
['Runtime Error', 'Runtime Error', 'Accepted']
['s151690161', 's686598333', 's298994910']
[2940.0, 2940.0, 3060.0]
[18.0, 21.0, 17.0]
[215, 155, 271]
p03243
u748540356
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()\nY=[111,222,333,444,555,666,777,888,999]\nfor i in range(9):\n if N<=Y[i]:\n print(Y[i])\n break', 'N=int(input())\nY=[111,222,333,444,555,666,777,888,999]\nfor i in range(9):\n if N<=Y[i]:\n print(Y[i])\n break']
['Runtime Error', 'Accepted']
['s090896849', 's065243318']
[2940.0, 2940.0]
[18.0, 17.0]
[108, 113]
p03243
u757030836
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\nx = False\n\nwhile x = False:\n for i in range(1,len(n)):\n if n[i-1] == n[i]:\n x =True\n else:\n x = False\n if x = True:\n print(n)\n break\n else:\n n = int(n) + 1', 'n=int(input())\nfor i in range(10):\n if 111*i<n<=111*(i+1):\n print(111*(i+1))\n']
['Runtime Error', 'Accepted']
['s895162445', 's379103313']
[2940.0, 2940.0]
[18.0, 17.0]
[196, 81]
p03243
u764956288
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']
['s629472721', 's681495507']
[2940.0, 2940.0]
[18.0, 17.0]
[32, 36]
p03243
u771167374
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()\nl = [111, 222, 333, 444, 555, 666, 777, 888, 999]\nfor i in l:\n if n<=i:\n print(i)\n break', 'n = int(input())\nl = [111, 222, 333, 444, 555, 666, 777, 888, 999]\nfor i in l:\n if n<=i:\n print(i)\n break']
['Runtime Error', 'Accepted']
['s424809724', 's487735230']
[2940.0, 2940.0]
[18.0, 17.0]
[117, 122]
p03243
u772180307
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())\nq = int(n / 111)\nif n % 111 == 0:\n i = q\nelse:\n i = q + 1\nprint(i * 111)', 'n = int(input())\nq = int(n / 111)\nif n % 111 == 0:\n i = q\nelse:\n i = q + 1\nprint(i * 111)']
['Runtime Error', 'Accepted']
['s703062350', 's538201410']
[2940.0, 2940.0]
[17.0, 17.0]
[92, 91]
p03243
u774160580
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())\ndig_3 = N % 100\nif N > dig_3 * 111:\n print((dig_3 + 1) * 111)\nelse:\n print(dig_3 * 111)\n', 'N = int(input())\ndig_3 = N // 100\nif N > dig_3 * 111:\n print((dig_3 + 1) * 111)\nelse:\n print(dig_3 * 111)\n']
['Wrong Answer', 'Accepted']
['s549437779', 's001549238']
[2940.0, 2940.0]
[17.0, 18.0]
[111, 112]
p03243
u777028980
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=int(N/111)+1\nprint(A*111)', 'N=int(input())\nif(N%111):\n A=int(N/111)+1\n print(A*111)\nelse:\n print(N)']
['Wrong Answer', 'Accepted']
['s957687101', 's339948260']
[2940.0, 2940.0]
[18.0, 18.0]
[42, 74]
p03243
u778700306
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?
['\nn=int(input())\nfor x in range(n, 1000):\n if set(list(x)) == 1:\n print(x)\n break\n ', '\nn=int(input())\nfor x in range(n, 1000):\n if len(set(list(str(x)))) == 1:\n print(x)\n break\n']
['Runtime Error', 'Accepted']
['s378962342', 's614611446']
[2940.0, 2940.0]
[17.0, 17.0]
[106, 108]
p03243
u780475861
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() - 1) // 111 + 1) * 111)', 'print(((int(input()) - 1) // 111 + 1) * 111)']
['Runtime Error', 'Accepted']
['s545099467', 's056412990']
[2940.0, 2940.0]
[17.0, 17.0]
[42, 44]
p03243
u785066634
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 100<=n<=111:\n print(111)\na=0\nfor a in range(8):\n if 1+111*a<=n<=111*(a+1):\n print(111*(a+1))\n', 'n=int(input())\n\nfor i in range(10):\n if i*100+i*10+i<n<=i*100+i*10+i+111:\n print(i*100+i*10+i+111)\n ...
['Wrong Answer', 'Accepted']
['s149542767', 's962836881']
[2940.0, 2940.0]
[19.0, 17.0]
[157, 158]
p03243
u790812284
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())\np = int(n/100)\nq = int((n-p*100)/10)\nr = n-p*100-q*10\n\nif p>q>r:\n print(p*111)\nelse:\n print((p+1)*111)', 'n = int(input())\nfor i in range(1,11):\n if i*111>=n:\n print(i*111)\n break\n']
['Wrong Answer', 'Accepted']
['s208534511', 's661424532']
[3060.0, 2940.0]
[19.0, 17.0]
[123, 91]
p03243
u790877102
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\nS = ((N//111)+1)*111\n\nprint(S)\n', 'N = int(input())\n\nS = (((N-1)//111)+1)*111\n\nprint(S)\n']
['Wrong Answer', 'Accepted']
['s154554158', 's089162517']
[2940.0, 2940.0]
[17.0, 17.0]
[49, 53]
p03243
u791664126
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())\nc=n%10\nb=int(((n-c)%100)/10)\na=int(((n-b-c)%1000)/100)\nx=a*100+a*10+a\nif b < a:pass\nelif b==a and c<b:pass\nelse:x+=111\nprint(x)', 'n=int(input())\nc=n%10\nb=int(((n-c)%100)/10)\na=int(((n-b-c)%1000)/100)\nx=a*100+a*10+a\nif b < a:pass\nelif b==a and c<b:pass\nelif a==b and b==c:pass\nelse:x+=11...
['Wrong Answer', 'Accepted']
['s410506286', 's902611325']
[2940.0, 3060.0]
[17.0, 17.0]
[142, 166]
p03243
u792217717
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\na = n // 100\nif n < int(str(a) * 3):\n print(str(a) * 3)\nelse:\n print(str(a + 1) * 3)\n', 'n = int(input())\n\na = n // 100\nif n <= int(str(a) * 3):\n print(str(a) * 3)\nelse:\n print(str(a + 1) * 3)\n']
['Wrong Answer', 'Accepted']
['s911086393', 's221036208']
[2940.0, 2940.0]
[17.0, 17.0]
[109, 110]
p03243
u804085889
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())\nnum = n // 111\nprint(111 * (num + 1))', 'import math\nprint(math.ceil(int(input())/111)*111)']
['Wrong Answer', 'Accepted']
['s537405392', 's441197729']
[2940.0, 2940.0]
[17.0, 18.0]
[54, 50]
p03243
u806855121
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\nprint(n + 111 - n % 111)', 'n = int(input())\n\nif n % 111 == 0:\n print(n)\nelse: \n print(n + 111 - n % 111)']
['Wrong Answer', 'Accepted']
['s024951510', 's095784217']
[2940.0, 2940.0]
[18.0, 17.0]
[42, 86]
p03243
u812576525
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]\n\nfor i in A:\n if N > i:\n continue\n elif N < i:\n print(i)\n break\n ', 'n=int(input())\nfor i in range(n,1000):\n if str(i)[0] == str(i)[1] == str(i)[2]:\n print(i)\n exit()']
['Wrong Answer', 'Accepted']
['s227738347', 's232661114']
[2940.0, 2940.0]
[17.0, 17.0]
[161, 114]
p03243
u816631826
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?
["num = str(input())\na = []\nx=[]\nfor i in str(num):\n a.append(i)\nif a[1] < a[0] and a[2] < a[0]:\n x.append(a[0])\n x.append(a[0])\n x.append(a[0])\n print(''.join(str(i) for i in x))\nelse:\n z = int (a[0]) +1\n x.append(z)\n x.append(z)\n x.append(z)\n print(''.join(str(i) for i in ...
['Wrong Answer', 'Accepted']
['s005734113', 's084930223']
[3064.0, 2940.0]
[20.0, 18.0]
[307, 60]
p03243
u818283165
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(9):\n if 111*i <= n and n <= 111*(i+1):\n ans = 111*(i+1)\nprint(ans)', 'n = int(input())\nans = 111\nfor i in range(9):\n if 111*i < n and n <= 111*(i+1):\n ans = 111*(i+1)\nprint(ans)']
['Wrong Answer', 'Accepted']
['s719727141', 's843321742']
[2940.0, 2940.0]
[17.0, 17.0]
[108, 117]
p03243
u819710930
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())\nans=n//111*(n+1)\nprint(ans if ans>n else ans-111 )', 'n=int(input())\nans=n//111*111\nprint(ans if ans==n else ans+111 )']
['Wrong Answer', 'Accepted']
['s570576197', 's954867013']
[2940.0, 2940.0]
[17.0, 18.0]
[65, 64]
p03243
u821271186
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())\ni=0\nfor i in range(8):\n if 111*i<N and N<111*(i+1):\n print(111*(i+1))\n break', 'N=int(input())\ni=0\nfor i in range(9):\n if 111*i<N and N<=111*(i+1):\n print(111*(i+1))\n break']
['Wrong Answer', 'Accepted']
['s465740797', 's492633160']
[2940.0, 2940.0]
[17.0, 17.0]
[108, 109]
p03243
u822044226
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\n\nprint((A*111) if N < A*111 else (A+1)*111)', 'N = int(input())\nA = N//100\n\nprint((A*111) if N <= A*111 else (A+1)*111)']
['Wrong Answer', 'Accepted']
['s920989229', 's729796584']
[2940.0, 2940.0]
[17.0, 17.0]
[71, 72]
p03243
u827141374
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()\nAAA = int(A[0]*3)\nif AAA > int(A):\n print(AAA)\nelse:\n print(AAA + 111)\n ', 'A = input()\nAAA = int(A[0]*3)\nif AAA >= int(A):\n print(AAA)\nelse:\n print(AAA + 111)']
['Wrong Answer', 'Accepted']
['s615242357', 's058361094']
[2940.0, 3060.0]
[17.0, 19.0]
[87, 85]
p03243
u840988663
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())\nzoro=[111,222,333,444,555,666,777,888,999]\nfor i in range(len(zoro)):\n if N<zoro[i]:\n print(zoro[i])\n break', 'N=int(input())\nzoro=[111,222,333,444,555,666,777,888,999]\nfor i in range(len(zoro)):\n if N<=zoro[i]:\n print(zoro[i])\n break']
['Wrong Answer', 'Accepted']
['s347279587', 's137761381']
[2940.0, 2940.0]
[17.0, 17.0]
[129, 130]
p03243
u842054747
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?
["number = int(input())\n\nstr_number_list = list(str(number))\n\nint_number_list = []\n\nfor i in str_number_list:\n\tint_number_list.append(int(i))\n\nhundred = int_number_list[0]\nten = int_number_list[1]\none = int_number_list[2]\n\nif number == one * 111:\n\tprint(number + 111)\nelif hundred <= ten:\n\tprint('{0}{...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s232522310', 's577172498', 's152543963']
[3064.0, 3060.0, 2940.0]
[17.0, 18.0, 17.0]
[457, 389, 155]
p03243
u850390157
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 // 111) + 1 if N % 111 != 0 else N // 111)\n', 'N = int(input())\nprint(((N // 111) + 1) * 111 if N % 111 != 0 else (N // 111) * 111)\n']
['Wrong Answer', 'Accepted']
['s828593293', 's955851631']
[2940.0, 2940.0]
[17.0, 17.0]
[69, 85]
p03243
u853185302
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())\nnum_list = [111*i for i in range(1,10)]\nnums = [num_list[i]-N for i in range(len(num_list)) if num_list[i]-N > 0]\nn = min(nums)\nprint(N+n) ', 'N = int(input())\nprint(((N-1)//111+1)*111)\n\n\n']
['Runtime Error', 'Accepted']
['s139333825', 's218963865']
[3060.0, 2940.0]
[19.0, 17.0]
[156, 45]
p03243
u854992222
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(''.join(n))\nb = []\nb.append(int(n[0]) * 111)\nb.append(int(n[1]) * 111)\nb.append(int(n[2]) * 111)\nb = sorted(b)\nif a % 111 == 0:\n print(a)\nfor i in range(3):\n if b[i] >= a:\n print(b[i])\n exit()", 'import math\nn = int(input())\nprint(math.ceil(n/111)*111)']
['Wrong Answer', 'Accepted']
['s307249552', 's345711473']
[3064.0, 2940.0]
[17.0, 19.0]
[238, 56]
p03243
u855985627
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 =0 int(input())\nfor i in range(1, 10):\n if((i-1)*111<x and x<=i*111):\n print(i*111)', 'N =0 int(input())\nfor i in range(1, 10):\n if((i-1)*111<x and x<=i*111)\n print(i*111)', 'N = int(input())\nfor i in range(1, 10):\n if((i-1)*111<N and N<=i*111):\n print(i*111)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s486278223', 's718051772', 's644209381']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[95, 90, 94]
p03243
u863370423
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())\nx=a+1000\nw=[0,0,0]\nw[0]=x%10\nx=x//10\nw[1]=x%10\nx=x//10\nw[2]=x%10\nprint(w)\nflag=0\nfor i in range(2):\n if w[i]==w[i+1]:\n pass\n else:\n flag+=1\n\nif flag==0:\n print(a)\nelse:\n w=sorted(w)\n\n e=1\n a=0\n for i in range(3):\n a+=w[2]*e\n e*=10\...
['Wrong Answer', 'Accepted']
['s979423880', 's643090829']
[3064.0, 2940.0]
[17.0, 18.0]
[314, 190]
p03243
u863841238
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())\nn_list = []\n\nwhile n != 0:\n n_list.append(n%10)\n n //= 10\nn_list.reverse()\n\nif n_list[0] < n_list[1]:\n ans = n_list[1]\nelif max(n_list) > n_list[0]:\n ans = n_list[0]\nelse:\n ans = max(n_list)\n\nfor _ in range(len(n_list)):\n print(ans,end='')", "n = int(input())\nn_list...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s175442733', 's439011260', 's632619875', 's396638730']
[3064.0, 3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[274, 151, 232, 85]
p03243
u864010555
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\nans=0\nwhile(True):\n ans+=111\n if(ans>=N):\n print(ans)\n break\n ', 'N=int(input())\n \nans=0\n\nwhile(True):\n ans+=111\n if(ans>=N):\n print(ans)\n break']
['Runtime Error', 'Accepted']
['s807108230', 's407167498']
[2940.0, 2940.0]
[17.0, 18.0]
[88, 86]
p03243
u866769581
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]*3): print(n[0]*3)\nelse: print(str(int(n[0])+1)*3)\n', 'n = input()\nif int(n) <= int(n[0]*3): print(n[0]*3)\nelse: print(str(int(n[0])+1)*3)\n']
['Wrong Answer', 'Accepted']
['s116432940', 's079399774']
[2940.0, 2940.0]
[17.0, 17.0]
[83, 84]
p03243
u872887731
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 = int(a /100)\nif a > (100b + 10b +b -1):\n print(100(b+1) + 10(b+1) +b +1)\nelse:\n print(100b + 10b + b)', 'a = int(input())\nb = int(a /100)\nif a > (100*b + 10*b +b -1):\n print(100*(b+1) + 10*(b+1) +b +1)\nelse:\n print(100*b + 10*b + b)', 'a = int(input())\nb = int(a /100)\nif a...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s162249563', 's313102575', 's113582377']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[128, 133, 131]
p03243
u875855656
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(1111 if n==999 else 111*(n//111) if n<111*(n//111) else 111*(n//111+1))', 'n=int(input())\nprint(111*(n//111) if n<=111*(n//111) else 111*(n//111+1))']
['Wrong Answer', 'Accepted']
['s046373766', 's579849092']
[2940.0, 2940.0]
[17.0, 17.0]
[92, 73]
p03243
u883203948
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?
['data = input()\n\nsc = 0\nans = []\nif (data[0] == data[1]) & (data[0] == data[2]):\n data = int(data)\n print(*data)\nelif int(data[0]) > int(data[1]):\n sc = int(data[0])\n ans = 100 * sc + 10 * sc + sc\n print(ans)\nelse:\n sc = int(data[0]) + 1\n ans = 100* sc + 10 * sc + sc\n print(ans)\n...
['Runtime Error', 'Accepted']
['s529627307', 's331463440']
[3060.0, 3064.0]
[17.0, 18.0]
[315, 576]
p03243
u883792993
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+N//100*10+N//100\nb = (N//100+1)*100+(N//100+1)*10+(N//100+1)\nprint(a*(N<=a)+b*(N>a))', 'N=int(input())\na = N//100*100+N//100*10+N//100\nb = (N//100+1)*100+(N//100+1)*10+(N//100+1)\nprint(a*(N<=a)+b*(N>a))']
['Wrong Answer', 'Accepted']
['s930625594', 's673515115']
[2940.0, 2940.0]
[18.0, 17.0]
[110, 114]
p03243
u887207211
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 N += 1\nelse:\n print(((N // 111) + 1) * 111)\n', 'N = int(input())\nif N%111 == 0:\n print(N)\nelse:\n print(111*(N//111+1))']
['Wrong Answer', 'Accepted']
['s035272262', 's293477039']
[2940.0, 2940.0]
[18.0, 17.0]
[81, 72]
p03243
u887524368
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())\ns = int(N / 111)\n\nx = (s + 1) * 111\nprint(x)', 'N = int(input())\ns = int((N - 1) / 111)\n\nx = (s + 1) * 111\nprint(x)']
['Wrong Answer', 'Accepted']
['s604849995', 's394058073']
[3060.0, 2940.0]
[21.0, 17.0]
[61, 67]
p03243
u898967808
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 = n//100\nt*=111\nif t>n:\n print(t)\nelse:\n print(t+111)', 'n = int(input())\nt = n//100\nt*=111\nif t>=n:\n print(t)\nelse:\n print(t+111)']
['Wrong Answer', 'Accepted']
['s987739692', 's058170759']
[2940.0, 2940.0]
[17.0, 17.0]
[74, 75]
p03243
u911153222
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?
['from math import ceil\n\n\nn = int(input())\nprint(111 * ceil(n // 111)\n ', 'n = int(input())\nm = n // 100\n\nif m == 1:\n print(222)\nelif m == 2:\n print(333)\nelif m == 3:\n print(444)\nelif m == 4:\n print(555)\nelif m == 5:\n print(666)\nelif m == 6:\n print(777)\nelif m == 7:\n print(888)\nelif m ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s082909682', 's092637952', 's543885701', 's918938679', 's902513201']
[2940.0, 3060.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[74, 258, 68, 73, 62]
p03243
u911438260
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 == 0:\n print(N)\nfor i in range(10):\n if N // 111 == i:\n print(111 * (i + 1) )', 'N = int(input())\nif N % 111 == 0:\n print(N)\nfor i in range(10):\n if N // 111 = i:\n print(111 * (i + 1) )', 'N = int(input())\nif N % 111 == 0:\n print(N)\nfor i in range(10):\n if N % 111...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s235186794', 's556163757', 's803078449']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[110, 109, 127]
p03243
u919633157
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=[int(str(i)*3)-n for i in range(1,10)]\nprint(a)\nans=[j for j in a if j>=0]\nprint(n+min(ans))', 'n=int(input())\na=[int(str(i)*3)-n for i in range(1,10)]\nans=[j for j in a if j>=0]\nprint(n+min(ans))']
['Wrong Answer', 'Accepted']
['s838336902', 's564525021']
[3060.0, 3060.0]
[17.0, 17.0]
[109, 100]
p03243
u923712635
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 = int(N/111)\nprint(111*(a+1))\n', 'N = int(input())\na = int((N-1)/111)\nprint(111*(a+1))']
['Wrong Answer', 'Accepted']
['s844740522', 's175070760']
[2940.0, 2940.0]
[17.0, 17.0]
[49, 52]
p03243
u931462344
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 n%10 > a:\n for _ in range(3):\n print(a,end="")\nelif n%10 == a:\n for _ in range(3):\n print(a,end="")\nelse:\n for _ in range(3):\n print(a+1,end="")', 'n = int(input())\na = n // 100\nif n%10 > a:\n for _ in range(3):\n print(a+1,end="")...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s125730943', 's995111075', 's406107807']
[3060.0, 3060.0, 2940.0]
[17.0, 17.0, 18.0]
[208, 208, 116]
p03243
u940279019
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())\nans = 0\nfor i in range(9):\n j = i+1\n a = 100*j + 10*j + j\n if n < a:\n ans = a\n break\n if n > a:\n k = j+1\n b = 100*k + 10*k + k\n if n < b:\n ans = b\n break\nprint(ans)', 'n = int(input())\nans = 0\nfor i in range(9):\n j = i+1\n a = 100*j + 10*j + j\n if n <...
['Wrong Answer', 'Accepted']
['s862348565', 's995910867']
[3060.0, 3060.0]
[17.0, 17.0]
[210, 211]
p03243
u947617358
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 n+=1\n if len(set(str(n)))==1:\n print(n)\n break\n \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']
['Wrong Answer', 'Accepted']
['s062936631', 's142541874']
[2940.0, 2940.0]
[17.0, 17.0]
[100, 162]
p03243
u953379577
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\nt = 0\n \nwhile t*111 < n < (t+1)*111:\n t += 1\n \nprint(t*111)', 'n = int(input())\n\nt = 0\n \nwhile t*111 <= n and n >= (t+1)*111:\n t += 1\n \nprint((t+1)*111)', 'n = int(input())\n\nt = 0\n \nwhile t*111 < n and n > (t+1)*111:\n t += 1\n \nprint((t+1)*111)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s229110956', 's262005737', 's085491212']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[86, 99, 97]
p03243
u958612488
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 count in range(10):\n if 100*count+10*count+count>n-1:\n input(100*count+10*count+count)\n break\n else:\n pass', 'n=int(input())\nfor count in range(10):\n if 100*count+10*count+count>n-1:\n print(100*count+10*count+count)\n break\n else:\n pa...
['Runtime Error', 'Accepted']
['s412256492', 's357522208']
[3060.0, 2940.0]
[20.0, 18.0]
[152, 152]
p03243
u961683878
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(111,999,111):\n if i< n < i+111:\n ans = i + 111\n break\nprint(int(ans))\n', 'n = int(input())\nfor i in range(111,999,111):\n if i<= n <= i+111:\n ans = i + 111\n break\n else:\n ans = 1111\nprint(int(ans))', 'n = int(input())\nfor i in rang...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s012082879', 's252823151', 's922376753', 's962842186']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 19.0, 18.0, 17.0]
[119, 147, 146, 108]
p03243
u961916328
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 n % 111 == 0:\n n += 1\nprint(n)', 'n = int(input())\nwhile n % 111 != 0:\n n += 1\nprint(n)']
['Wrong Answer', 'Accepted']
['s589708449', 's751928755']
[2940.0, 2940.0]
[17.0, 17.0]
[54, 54]
p03243
u969848070
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()\nfor i in range(int(n), 1000):\n if i.count(n[0]) == 3:\n print(i)\n exit()', 'n = input()\nfor i in range(int(n), 1000):\n if str(i).count(str(i)[0]) == 3:\n print(i)\n exit()']
['Runtime Error', 'Accepted']
['s802371671', 's277322261']
[9164.0, 9072.0]
[23.0, 29.0]
[90, 100]
p03243
u973013625
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 n % 111 != 0:\n x = n+1\n n += 1\nprint(x)', 'n = int(input())\nif n % 111 == 0:\n x = n\nwhile n % 111 != 0:\n x = n+1\n n += 1\n\nprint(x)']
['Runtime Error', 'Accepted']
['s890651330', 's462797423']
[2940.0, 2940.0]
[17.0, 19.0]
[68, 96]
p03243
u982594421
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 // 111 + 1) * 111)\n', 'n = int(input())\nif n % 111 == 0:\n print(n)\nelse:\n print((n // 111 + 1) * 111)\n']
['Wrong Answer', 'Accepted']
['s207600662', 's398268832']
[2940.0, 2940.0]
[17.0, 17.0]
[45, 81]
p03243
u996914289
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()\nif int(s[0])>int(s[1]) & int(s[0])>int(s[2]):\n print(int(s[0])*111)\nelse:\n print((int(s[0])+1)*111)\n', 'x=input()\nif int(x[0])>int(x[1]):\n if int(x[0])>int(x[2]):\n print(int(x[0])*111)\n else:\n print((int(x[0])+1)*111)\nelse:\n print((int(x[0])+1)*111)', 's = input()\nif int(s[0])>...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s420498822', 's843813035', 's715646373']
[2940.0, 3060.0, 2940.0]
[18.0, 17.0, 17.0]
[118, 154, 122]
p03243
u996952235
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?
['for i in range(int(input()), 100):\n if(str(i)[0] == str(i)[1] and str(i)[1] == str(i)[2]):\n print(i)\n break', 'n = int(input())\n\nfor i in range(n,1000):\n if i % 111 == 0:\n print(i)', 'n = int(input())\n \nfor i in range(n,1000):\n if i % 111 == 0:\n print(i)\n break']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s294519458', 's466017612', 's724592144']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[114, 70, 79]
p03243
u999482355
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((1+(int(input()-1)//111))*111)', 'print((1+((int(input())-1))//111)*111)']
['Runtime Error', 'Accepted']
['s786412618', 's566937930']
[2940.0, 2940.0]
[19.0, 19.0]
[36, 38]
p03244
u002459665
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['import collections\n\nn = int(input())\nvalues = [int(i) for i in input().split()]\n\nodd = [] \neven = [] # gusu\n\nfor n, i in enumerate(values):\n if (n + 1) % 2 == 0:\n even.append(i)\n else:\n odd.append(i)\n\nodd_counts = collections.Counter(odd)\neven_counts = collections.Counter(even)\n\...
['Wrong Answer', 'Accepted']
['s360030122', 's273181067']
[20576.0, 23776.0]
[116.0, 118.0]
[460, 1256]
p03244
u011062360
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['import itertools\n\nn = int(input())\nlist_A = list(map(int, input().split()))\nL, R = [], []\nA, B = [[-1, 0], [-1, 0]]\n\nfor i in range(n):\n if i % 2 == 0:\n L.append(list_A[i])\n else:\n R.append(list_A[i])\n\nL = itertools.groupby(L)\nfor key, group in L:\n A.append([key, len(list(group))...
['Runtime Error', 'Accepted']
['s857548324', 's625201582']
[20860.0, 25980.0]
[97.0, 100.0]
[596, 512]
p03244
u017415492
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['n=int(input())\nv=list(map(int,input().split()))\nans1=[0]*(10**5+1)\nans2=[0]*(10**5+1)\nfor i in v[0::2]:\n ans1[i]+=1\nfor i in v[1::2]:\n ans2[i]+=1\nm1=max(ans1)\nm2=max(ans2)\nflag=False\nfor i in range(10**5+1):\n if ans1[i]==m1 and ans2[i]==m2:\n flag=True\n ans1.sort()\n ans2.sort()\n m12=ans1...
['Runtime Error', 'Runtime Error', 'Accepted']
['s617040487', 's896765506', 's224488832']
[14404.0, 14008.0, 17380.0]
[75.0, 77.0, 78.0]
[471, 444, 450]
p03244
u025501820
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['from collections import Counter\nn = int(input())\nv = list(map(int, input().split()))\nif len(set(v)) == 1:\n print(n // 2)\n exit()\nkisu = v[::2]\ngusu = v[1::2]\nkisu_color = list(Counter(kisu).items())[:2]\ngusu_color = list(Counter(gusu).items())[:2]\nprint(kisu_color)\nprint(gusu_color)\nif kisu_color[0]...
['Wrong Answer', 'Accepted']
['s893642022', 's155815365']
[17548.0, 17500.0]
[83.0, 89.0]
[493, 457]
p03244
u026075806
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
["_ = input()\nseq = list(map(int,input().split()))\n \nseq1 = seq[::2]\nseq2 = seq[1::2]\n \nif len(set(seq)) == 1:\n print(min(len(seq1),len(seq2)))\n exit()\n \ndef count_dictonary(seq):\n ret_dict={}\n for item in seq:\n if item not in ret_dict:\n ret_dict[item] = 1\n else:\n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s468456785', 's732694359', 's799356510']
[3188.0, 18780.0, 16228.0]
[18.0, 62.0, 74.0]
[738, 431, 1765]
p03244
u026788530
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['n = int(input())\n\nv = [int(i) for i in input().split()]\n\nv1 = {}\n\nv2 = {}\n\nfor i in range(n//2):\n if v[2 *i +1] in v1.keys():\n v1[v[2 * i +1]] += 1\n else:\n v1[v[2 * i + 1]] = 1\n\n if v[2 * i] in v2.keys():\n v2[v[2 * i]] += 1\n else:\n v2[v[2 * i]] = 1\n\n\nv1 = s...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s057008005', 's544067425', 's680518407', 's970236657', 's715222579']
[3064.0, 20568.0, 19284.0, 19284.0, 20120.0]
[17.0, 144.0, 141.0, 124.0, 108.0]
[590, 597, 589, 599, 583]
p03244
u033606236
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['import collections\n\nn = int(input())\nodd = []\neven = []\nfor i, j in enumerate(map(int, input().split())):\n if i % 2 == 0:\n even += [j]\n else:\n odd += [j]\nodd = sorted(collections.Counter(odd).items(), reverse=True, key=lambda x: x[1])\neven = sorted(collections.Counter(even).items(), rev...
['Runtime Error', 'Runtime Error', 'Accepted']
['s088552295', 's869788586', 's880605744']
[3064.0, 20060.0, 20316.0]
[17.0, 130.0, 117.0]
[1122, 832, 973]
p03244
u038676814
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['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 = ki.most_common()\n\nif ki[0][0] == gu[0][0] :\n if(len(ki) == len(gu)) :\n print(n/2)\n else :\n if(ki[1][1] ...
['Runtime Error', 'Accepted']
['s158895652', 's645763660']
[18784.0, 18776.0]
[77.0, 88.0]
[446, 460]
p03244
u039623862
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['import heapq\nimport collections\nn = int(input())\nv = list(map(int, input().split()))\n\ncnts = [collections.Counter(v[::2]), collections.Counter(v[1::2])]\n\nhs = [[], []]\nfor i in range(2):\n for k, c in cnts[i].items():\n heapq.heappush(hs[i], (-c, k))\nh0 = heapq.heappop(hs[0])\nh1 = heapq.heappop(hs...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s365923797', 's760702465', 's354105298']
[20788.0, 20608.0, 20792.0]
[116.0, 110.0, 111.0]
[630, 583, 628]
p03244
u046592970
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['n = int(input())\nv = list(map(int,input().split()))\n\ne = Counter(v[::2])\no = Counter(v[1::2])\n\ne = sorted([(k,v) for k, v in e.items()],key = lambda z:z[1],reverse = True) + [(0,0)]\no = sorted([(k,v) for k, v in o.items()],key = lambda z:z[1],reverse = True) + [(0,0)]\n\nif e[0][0] != o[0][0]:\n print(n - e...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s043590764', 's407641149', 's672569422', 's452595693']
[14268.0, 23616.0, 14884.0, 21560.0]
[42.0, 134.0, 44.0, 108.0]
[388, 443, 418, 431]
p03244
u047197186
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['from collections import Counter\n\nn = int(input())\nvs = input().split()\neven = []\nodd = []\nif not even == odd:\n for i, v in enumerate(vs):\n \tif i % 2 == 0:\n \teven.append(int(v))\n else:\n \todd.append(int(v))\n counter_even = Counter(even)\n counter_odd = Counter(odd)\n\n res = len(even) - cou...
['Runtime Error', 'Runtime Error', 'Accepted']
['s486391546', 's901621215', 's403260036']
[2940.0, 2940.0, 26092.0]
[17.0, 17.0, 157.0]
[410, 410, 742]
p03244
u047816928
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['n = int(input())\nv = list(map(int, input().split()))\nw = [0]*(10**5+1)\nfor x in v: w[x]+=1\nprint(n-sum(sorted(w)[:2]))', 'N = int(input())\nV = list(map(int, input().split()))\n\nd1 = {0:0}\nd2 = {0:0}\nfor i, v in enumerate(V):\n d = d2 if i&1 else d1\n if v not in d: d[v]=0\n d[v]+=1\n \n\nd1 = sort...
['Wrong Answer', 'Accepted']
['s847747355', 's666137726']
[14396.0, 18072.0]
[59.0, 119.0]
[118, 389]
p03244
u050698451
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['from collections import Counter\nn = int(input())\nv = list(map(int, input().split()))\n\na = []\nb = []\nfor i in range(n//2):\n a.append(v[2*i])\n b.append(v[2*i+1])\n\ndef change(list):\n counter = Counter(list)\n m_ap1, m_ap2 = counter.most_common()[0][0], counter.most_common()[1][0]\n l = len(list...
['Runtime Error', 'Accepted']
['s192453545', 's988299706']
[15972.0, 17492.0]
[98.0, 152.0]
[665, 901]
p03244
u057109575
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['from collections import Counter\n\nn, *v = map(int, open(0).read().split())\nif v[::2] == v[1::2]:\n print(n // 2)\n else:\n print(n - Counter(v[::2]).most_common()[0][1] - Counter(v[1::2]).most_common()[0][1])\n', 'from collections import Counter\n\nn, *v = map(int, open(0).read().split())\nc1 = Cou...
['Runtime Error', 'Accepted']
['s016524442', 's221448828']
[2940.0, 20520.0]
[18.0, 85.0]
[222, 310]
p03244
u058750581
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['from collections import Counter\n\nn = int(input())\nv = list(map(int, input().strip().split(" ")))\nodd = []\neven = []\nfor i in range(len(v)):\n if(i % 2 == 0):\n even.append(v[i])\n else:\n odd.append(v[i])\n\n\nc_even = Counter(even).most_common(2)\nc_odd = Counter(odd).most_common(2)\n\nprin...
['Runtime Error', 'Runtime Error', 'Accepted']
['s249589456', 's442571417', 's763977394']
[16100.0, 15972.0, 15972.0]
[95.0, 74.0, 74.0]
[569, 445, 430]
p03244
u059210959
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['#encoding utf-8\ndef main(n,v):\n # n = int(input())\n \n even_v = []\n odd_v = []\n\n for i in range(n):\n if i%2 == 0:\n odd_v.append(v[i])\n else:\n even_v.append(v[i])\n\n odd_dic = {}\n even_dic = {}\n for i in range(len(odd_v)):\n if odd_v[i] in...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s048576501', 's169166580', 's351340092', 's355240402', 's460188490', 's514994000', 's824850899', 's932374620', 's007409970']
[23708.0, 20472.0, 23704.0, 3192.0, 23776.0, 19920.0, 14268.0, 14276.0, 15580.0]
[184.0, 148.0, 188.0, 18.0, 172.0, 144.0, 45.0, 46.0, 81.0]
[2891, 1963, 2867, 2628, 3113, 1567, 451, 460, 446]
p03244
u062459048
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['n = int(input())\nV = list(map(int,input().split()))\n\nv1 = []\nv2 = []\nfor i in range(0,n,2):\n v1.append(i)\nfor i in range(1,n,2):\n v2.append(i)\n \nv1s = set(v1)\nv2s = set(v2)\n \nv1c = []\nv2c = []\nfor i in list(v1s):\n v1c.append(v1.count(i))\nfor i in list(v2s):\n v2c.append(v2.count(i))\n\nv1c.sort...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s519630039', 's797178371', 's076502697']
[17888.0, 20620.0, 21084.0]
[2104.0, 71.0, 101.0]
[369, 538, 420]
p03244
u063052907
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['from collections import Counter\n\n\nn = int(input())\nlst_v = list(map(int, input().split()))\n\n\nif len(set(lst_v)) == 1:\n ans = n // 2\nelse:\n lst_odd = lst_v[::2]\n lst_even = lst_v[1::2]\n cnt_odd = sorted(Counter(lst_odd).items(), key=lambda x: -x[1])\n cnt_even = sorted(Counter(lst_even).item...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s472964884', 's619509703', 's730254298']
[21084.0, 17372.0, 21212.0]
[100.0, 97.0, 87.0]
[729, 506, 419]
p03244
u066017048
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['import collections\n\nn = int(input())\nvs = [int(i) for i in input().split()]\nevens = []\nodds = []\nfor i,num in enumerate(vs):\n if i % 2 == 0:\n evens.append(num)\n elif i % 2 == 1:\n odds.append(num)\n\ndef plana():\n if (len(set(vs)) == 2) and (len(set(evens)) == 1) and (len(set(odds)) =...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s317221108', 's417996004', 's447913352']
[14788.0, 14916.0, 20572.0]
[75.0, 74.0, 160.0]
[731, 744, 1741]
p03244
u067267880
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['n=int(input())\nvlis=[int(i) for i in input().split()]\n\n\n# a[:6:2] #[0, 2, 4]\n\n# a[7::2] #[7, 9]\nodd=vlis[0::2]\neven=vlis[1::2]\n\n\n\nimport collections\nodd_max=collections.Counter(odd).most_common(2)\neven_max=collections.Counter(even).most_common(2)\nprint(odd_max)\nprint(even_max)\n\n\nif odd_max[0][0]==e...
['Wrong Answer', 'Accepted']
['s040616817', 's120579320']
[15844.0, 15964.0]
[80.0, 86.0]
[1247, 1208]
p03244
u070561949
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing...
['n = input()\nv = list(map(int,input().split()))\n\ne = v[::2]\no = v[1::2]\n\nev = {}\nov = {}\nfor t in e :\n if t in ev :\n ev[t] = ev[t] + 1\n else :\n ev[t] = 1\n\nfor t in o :\n if t in ov:\n ov[t] = ov[t] + 1\n else :\n ov[t] = 1\n\nprint(ev)\nprint(ov)\n\nsorted(ev.items...
['Runtime Error', 'Accepted']
['s740710401', 's480274807']
[19452.0, 18784.0]
[106.0, 90.0]
[688, 943]