TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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?

Submission attempts (in order):
n = int(input())
ans = n//111 if n%111 == 0 else n//111 + 1
print(ans)


n = int(input())
ans = n//111*111 if n%111 == 0 else n//111*111 + 111
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
print(((n//111)+1)*111)

n = int(input())
print((((n-1)//111)+1)*111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
import sys
import numpy as np
input = sys.stdin.readline
N = int(input())
ans = [111,222,333,444,555,666,777,888,999]
for i in ans:
    if i >= N:
        print(ans)
        sys.exit()

import sys
import numpy as np
input = sys.stdin.readline
N = int(input())
ans = [111,222,333,444,555,666,777,888,999]
for i in ans:
    if ans >= N:
        print(ans)
        sys.exit()

import sys
import numpy as np
input = sys.stdin.readline
N = int(input())
ans = [111,222,333,444,555,666,777,888,999]
for i in ans:
    if i >= N:
        print(i)
        sys.exit()

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):

N=int(input() )

while(N<1000):
    N+=1
    if(N%111==0):
        print (N)
        break


N=int(input() )

while(N<1000):
    if(N%111==0):
        print (N)
        break
    N+=1

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = input()

for s in "123456789":
	if int(N) < int(s * 3):
		print(s * 3)
		break


N = input()

for s in "123456789":
	if int(N) <= int(s * 3):
		print(s * 3)
		break


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a=input()
if int(a) <= int(a[0])*111:
  print(int(a[0])*111)
else:
  print((int(a[0])+1)*111


a=input()
if int(a) < int(a[0])*111:
  print(int(a[0])*111)
else:
  print((int(a[0])+1)*111)


a=input()
if int(a) < int(a[0])*111:
  print(int(a[0])*111)
else:
  print((int(a[0])+1)*111

a=input()
if int(a) <= int(a[0])*111:
  print(int(a[0])*111)
else:
  print((int(a[0])+1)*111)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
import sys

def main():
  input = sys.stdin.readline
  N = str(input())
  L = len(N)
  f = N[0]
  a = f * L
  b = str(int(f) + 1) * L
  
  if int(a) >= int(N):
    print(int(a))
  else:
    print(int(b))


if __name__ == '__main__':
  main()

import sys

def main():
  input = sys.stdin.readline
  N = str(input())
  L = len(N)
  f = N[0]
  a = f * L
  b = str(int(f) + 1) * L
  
  if int(a) >= int(N):
    print(int(a))
  else:
    print(int(b))


if __name__ == '__main__':
  main()

import sys

def main():
  input = sys.stdin.readline
  N = str(input())
  L = len(N)
  f = N[0]
  a = f * L
  b = str(int(f) + 1) * L
  
  if int(a) >= int(N):
    print(int(a))
  else:
    print(int(b))


if __name__ == '__main__':
  main()

import sys

def main():
  input = sys.stdin.readline
  N = str(input().strip())
  L = len(N)
  f = N[0]
  a = f * L
  b = str(int(f) + 1) * L
  
  if int(a) >= int(N):
    print(int(a))
  else:
    print(int(b))


if __name__ == '__main__':
  main()

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
print(N+111-(N%111))

N=int(input())
print(N+111-(N%111) if N % 111 != 0 else N)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
a = 111
for i in range(9):
  if a*i < n <= a*(i+1)
  print(a*(i+1))

n = int(input())
a = 111
for i in range(9):
  if a*i < n <= a*(i+1):
    print(a*(i+1))


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
import sys
N = int(input())
for i in range(0,112):
  n = list(str(N+i))
  print(n)
  if n[0] == n[1] == n[2]:
    print(N+i)
    sys.exit()

N = int(input())
for i in range(0,112):
  N = N+i
  n = str(N)
  if n[0] == n[1] == n[2]:
    print(N)

N = int(input())
for i in range(0,112):
  N = N+i
  n = list(str(N))
  if n[0] == n[1] == n[2]:
    print(N)


import sys
N = int(input())
for i in range(0,112):
  n = list(str(N+i))
  if n[0] == n[1] == n[2]:
    print(N+i)
    sys.exit()

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
A = [str(i) * 3 for i in range(10)[1:]]
for j in range(10)[1:]:
  if N >= A[j]:
    print(A[j])
    break

N = int(input())
A = [str(i) * 3 for i in range(1, 10)]
for j in range(9):
  if N <= int(A[j]):
    print(A[j])
    break

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
li = list(111,222,333,444,555,666,777,888,999)

for i in range(9):
    if n <= li[i]:
        print(li[i])
        break


n = int(input())
li =[111,222,333,444,555,666,777,888,999]

for i in range(9):
    if n <= li[i]:
        print(li[i])
        break


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())

for p in prospects:
    if p < n:
        continue
    if p >= n:
        print(p)
        break

n = int(input())
prospects = [111*i for i in range(1, 10)]

for p in prospects:
    if p < n:
        continue
    if p >= n:
        print(p)
        break

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = str(input())
memo = int( n[0] + n[0] + n[0] )
if int(n) < memo:
	print(memo)
else:
	print(memo + 111)

n = str(input())
memo = int( n[0] + n[0] + n[0] )
if int(n) <= memo:
	print(memo)
else:
	print(memo + 111)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
m==111
for i in range(1,10):
    if 111*i>=n:
        m=min(m,111*i)
print(m)
    

n=int(input())
m=999
for i in range(1,10):
    if 111*i>=n:
        m=min(m,111*i)
print(m)
    


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = input()
for ans in range(111, 999, 111):
    if n <= ans:
        break
print(ans)

n = input()
for ans in range(111, 1000, 111):
    if n <= ans:
        break
print(ans)


n = input()
for ans in range(111, 1000, 111):
    if int(n) <= ans:
        break
print(ans)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())

for a in range(10):
    if a*111<=N:
        pass
    elif a*111>=N:
        print(a*111)
        break

N=int(input())

for a in range(10):
    if a*111<N:
        pass
    elif a*111>=N:
        print(a*111)
        break

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
a = -(-n//111)
if a = 10:
    print(1111)
else:
    print(a*111)

n = int(input())
a = -(-n//111)
if a == 10:
    print(1111)
else:
    print(a*111)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = input()
num = input(n)
ans = 0
for digit in range(1,10):
    if int(num/digit) == 111:
        ans = num
        break
    elif int(num/digit) < 111:
        ans = digit*100+digit*10+digit
        break
print(ans)

n = input()
num = int(n)
ans = 0
for digit in range(1,10):
    if num/digit == float(111):
        ans = num
        break
    elif num/digit < float(111):
        ans = digit*100+digit*10+digit
        break
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
a=list(str(input()))
e=int(''.join(a))


b=int(a[1])-int(a[1]*111)
c=a[0]
c=int(c)
b = e-c*111
if b =<0:
  print(c*111)
else:
  c+=1
  print(c*111)

a=list(str(input()))
e=int(''.join(a))


b=int(a[1])-int(a[1]*111)
c=a[0]
c=int(c)
b = e-c*111
if b <0:
  print(c*111)
else:
  c+=1
  print(c*111)

a=list(str(input()))
e=int(''.join(a))


b=int(a[1])-int(a[1]*111)
c=a[0]
c=int(c)
b = e-c*111
if b <=0:
  print(c*111)
else:
  c+=1
  print(c*111)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
import math
def main():
  n=int(input())
  a=int(n/100)
  if a*100+a*10+a>n:
    print(a*100+a*10+a)
  else:
    print((a+1)*100+(a+1)*10+a+1)
main()

import math
def main():
  n=int(input())
  a=int(n/100)
  if a*100+a*10+a>=n:
    print(a*100+a*10+a)
  else:
    print((a+1)*100+(a+1)*10+a+1)
main()

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
i = int(N/111)
if N % 111 != 0:
  i = i + 1
else:
  i = 1
print(i)

N = int(input())
i = int(N/111)
if N % 111 != 0:
  i = i + 1
else:
  i = i
print(i*111)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n =input()
lst = []
ans = []
for i in range(3):
    num = int(n[i]*3)
    lst.append(num)
for i in range(3):
    if lst[i] > int(n):
        ans.append(lst[i])
print(min(ans))

n =int(input())
i = int(n/111)
if n % 111 != 0:
    i += 1
print(i * 111)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
k = 0
if int(n/111) == n/111:
  k = n/111
else:
  k = int(n/111) + 1
print(111*k)

n = int(input())
k = 0
if int(n/111) == n/111:
  k = n/111
else k = int(n/111) + 1
print(111*k)

n = int(input())
k = 0
if int(n/111) == n/111:
  k = int(n/111)
else:
  k = int(n/111) + 1
print(111*k)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = input()

for i in range(1, 10):
    if n <= i*111:
        print(i*111)
        exit()


n = input()
zorome = [i*100 + i*10 + i for i in range(1, 10)]

for i in zorome:
    if n <= i:
        print(i)
        exit()


n = int(input())

for i in range(1, 10):
    if n <= i*111:
        print(i*111)
        exit()


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
print(((N//111) + 1) * 111)

N=int(input())
if N % 111 == 0:
  print(N)
else:
  print(((N//111) + 1) * 111)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
x=-(-N//111)
print(100x+10x+x)

N=int(input())
x=-(-N//111)

print(100*x+10*x+x)

N=int(input())
x=-(-N//111)
print(100*x + 10*x + x)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N = input()
x = N[0] * 3
if int(N) < int(x):
    print(x)
else:
    print(str(int(N[0]) + 1) * 3)


N = input()
x = N[0] * 3
if int(N) <= int(x):
    print(x)
else:
    print(str(int(N[0]) + 1) * 3)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = 999

for i in range(1,10):
    if n <= 111*i:
        break
print(111*i)

n = int(input())

for i in range(1,9):
    if n <= 111*i:
        print(111*i)

n = int(input())

for i in range(1,10):
    if n <= 111*i:
        break
print(111*i)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
if N <=111:
    print("111")
elif N <=222:
    print("222")
elif N <=333:
    print("333")
elif N <= 444:
    print("444")
elif N <=555:
    print("555")
elif N <=666
    print("666")
elif N <=777:
    print("777")
elif N <=888:
    print("888")
else:
    print("999")

N = int(input())
if N <=111:
    print("111")
elif N <=222:
    print("222")
elif N <=333:
    print("333")
elif N <= 444:
    print("444")
elif N <=555:
    print("555")
elif N <=666:
    print("666")
elif N <=777:
    print("777")
elif N <=888:
    print("888")
else:
    print("999")

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())+100
o = int((n-(n%100))/100*111)
if n < o:
	print(o)
else:
	print(o+111)

n = int(input())
o = int((n-(n%100))/100)
if n<=o*111:
    print(o*111)
else:
    print(o*111+111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
apple = []

number = [111, 222, 333, 444, 555, 666, 777, 888, 999]
for i in number:
    if i - n > 0:
        apple.append(i)
    else:
        pass

print(min(apple))

n = int(input())
apple = []

number = [111, 222, 333, 444, 555, 666, 777, 888, 999]
for i in number:
    if i - n >= 0:
        apple.append(i)

print(min(apple))

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
print(((int(input())-1)//111)*111)

print(((int(input())-1)//111)*111 + 111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
print(n + (111 - n % 111))

n = int(input())
#n, t = map(int,input().split())
#ls = list(map(int,input().split()))



if n% 111 == 0:
  print(n)
  quit()
print(n + 111 - n % 111 )

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
cs = [1111, 999, 888, 777, 666, 555, 444, 333, 222, 111]
f = False
for i, c in enumerate(cs):
    if c <= n:
        print(cs[i-1])
        f = True
        break
if not f:
    print(cs[len(cs)-1])

n = int(input())
cs = [1111, 999, 888, 777, 666, 555, 444, 333, 222, 111]
f = False
for i, c in enumerate(cs):
    if (c+1) <= n:
        print(cs[i-1])
        f = True
        break
if not f:
    print(cs[len(cs)-1])

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = input()
l = len(N)
if(int(N[0]*l) > int(N)):
    print(N[0]*l)
else:
    print(str(int(N[0])+1)*l)

N = input()
l = len(N)
if(int(N[0]*l) >= int(N)):
    print(N[0]*l)
else:
    print(str(int(N[0])+1)*l)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
li = [111,222,333,444,555,666,777,888,999]
nn = []
for i in range(len(li)):
  if li[i] - n >= 0:
    nn.append(li[i]-n)
  else:
    nn.append(1000)
  
print(li[index(min(nn))])

n=int(input())
a=n//100
m=a*100+a*10+a
if n<=m:
  print(m)
else:
  print(m+111)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = n; i <= 999; i++) {
    string str = to_string(i);
    set<char> st;
    for (int i = 0; i < str.size(); i++) {
      st.insert(str[i]);
    }
    if (st.size() == 1) {
      cout << i << endl;
      break;
    }
  }
  return 0;
}

n = int(input())
for i in range(n, 1000):
    if len(set(str(i))) == 1:
        print(i)
        exit()


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
for i in range(1,n+1):
  low = i * 100 + i *10 + (i+1)
  high = (i+1) * 100 + (i+1) *10 + (i+1)
  if low < n and n <= high:
    print(high)
  else:
    print(low)
    

n = int(input())
for i in range(0,11):
  low = i * 100 + i *10 + i
  high = (i+1) * 100 + (i+1) *10 + (i+1)
  if low < n and n <= high:
    print(high)
    break

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
import sys
import numpy as np
a=[int(x)for x in list(sys.argv[1])]+[-1]
print(str(a[0]+0if(np.trim_zeros(np.diff(a))[0]<0)else 1)*3)


import sys
import numpy as np
a=[int(x)for x in list(sys.argv[1][0:3])]+[-1]
print(str(a[0]+0if(np.trim_zeros(np.diff(a))[0]<0)else 1)*3)


import sys
import numpy as np
a=[int(x)for x in list(sys.stdin.readline().rstrip())]+[0]
print(str(a[0]+(1if(np.trim_zeros(np.diff(a))[0]>0)else 0))*(len(a)-1))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
x = N-1 // 111

print((x+1)*111)

N = int(input())
x = (N-1) // 111

print((x+1)*111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
for i in range(9):
    if(N>L[i] and N<=L[i+1]):
        print(L[i+1])
        break
    elif(N==L[i]):
        print(L[i])
        break
    elif(N<111):
        print(111)
        break
    else:
        continue


N=int(input())
L=[111,222,333,444,555,666,777,888,999]

for i in range(9):
    if(N>=L[i] and N<=L[i+1]):
        print(L[i+1])
    else:
        continue


N=int(input())
L=[111,222,333,444,555,666,777,888,999]

for i in range(9):
    if(N>L[i] and N<=L[i+1]):
        print(L[i+1])
        break
    elif(N==L[i]):
        print(L[i])
        break
    elif(N<111):
        print(111)
        break
    else:
        continue


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N=input()
Y=[111,222,333,444,555,666,777,888,999]
for i in range(9):
  if N<=Y[i]:
    print(Y[i])
    break

N=int(input())
Y=[111,222,333,444,555,666,777,888,999]
for i in range(9):
  if N<=Y[i]:
    print(Y[i])
    break

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = input()

x = False

while x = False:
  for i in range(1,len(n)):
    if n[i-1] == n[i]:
      x =True
    else:
      x = False
  if x = True:
    print(n)
    break
  else:
    n = int(n) + 1

n=int(input())
for i in range(10):
  if 111*i<n<=111*(i+1):
    print(111*(i+1))


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = input()
l = [111, 222, 333, 444, 555, 666, 777, 888, 999]
for i in l:
    if n<=i:
        print(i)
        break

n = int(input())
l = [111, 222, 333, 444, 555, 666, 777, 888, 999]
for i in l:
    if n<=i:
        print(i)
        break

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
 n = int(input())
q = int(n / 111)
if n % 111 == 0:
  i = q
else:
  i = q + 1
print(i * 111)

n = int(input())
q = int(n / 111)
if n % 111 == 0:
  i = q
else:
  i = q + 1
print(i * 111)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
dig_3 = N % 100
if N > dig_3 * 111:
    print((dig_3 + 1) * 111)
else:
    print(dig_3 * 111)


N = int(input())
dig_3 = N // 100
if N > dig_3 * 111:
    print((dig_3 + 1) * 111)
else:
    print(dig_3 * 111)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
A=int(N/111)+1
print(A*111)

N=int(input())
if(N%111):
  A=int(N/111)+1
  print(A*111)
else:
  print(N)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):

n=int(input())
for x in range(n, 1000):
    if set(list(x)) == 1:
        print(x)
        break
        


n=int(input())
for x in range(n, 1000):
    if len(set(list(str(x)))) == 1:
        print(x)
        break


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
print((int(input() - 1) // 111 + 1) * 111)

print(((int(input()) - 1) // 111 + 1) * 111)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())

if 100<=n<=111:
            print(111)
a=0
for a in range(8):
            if 1+111*a<=n<=111*(a+1):
                        print(111*(a+1))


n=int(input())

for i in range(10):
            if i*100+i*10+i<n<=i*100+i*10+i+111:
                        print(i*100+i*10+i+111)
                        


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
p = int(n/100)
q = int((n-p*100)/10)
r = n-p*100-q*10

if p>q>r:
    print(p*111)
else:
    print((p+1)*111)

n = int(input())
for i in range(1,11):
    if i*111>=n:
        print(i*111)
        break


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())

S = ((N//111)+1)*111

print(S)


N = int(input())

S = (((N-1)//111)+1)*111

print(S)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
c=n%10
b=int(((n-c)%100)/10)
a=int(((n-b-c)%1000)/100)
x=a*100+a*10+a
if b < a:pass
elif b==a and c<b:pass
else:x+=111
print(x)

n=int(input())
c=n%10
b=int(((n-c)%100)/10)
a=int(((n-b-c)%1000)/100)
x=a*100+a*10+a
if b < a:pass
elif b==a and c<b:pass
elif a==b and b==c:pass
else:x+=111
print(x)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())

a = n // 100
if n < int(str(a) * 3):
    print(str(a) * 3)
else:
    print(str(a + 1) * 3)


n = int(input())

a = n // 100
if n <= int(str(a) * 3):
    print(str(a) * 3)
else:
    print(str(a + 1) * 3)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
num = n // 111
print(111 * (num + 1))

import math
print(math.ceil(int(input())/111)*111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())

print(n + 111 - n % 111)

n = int(input())

if n % 111 == 0:
    print(n)
else:    
    print(n + 111 - n % 111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N= int(input())
A = [111, 222, 333, 444, 555, 666, 777, 888, 999]

for i in A:
    if N > i:
        continue
    elif N < i:
        print(i)
        break
    

n=int(input())
for i in range(n,1000):
    if str(i)[0] == str(i)[1] == str(i)[2]:
        print(i)
        exit()

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
num = str(input())
a = []
x=[]
for i in str(num):
    a.append(i)
if a[1] < a[0] and a[2] < a[0]:
    x.append(a[0])
    x.append(a[0])
    x.append(a[0])
    print(''.join(str(i) for i in x))
else:
    z = int (a[0]) +1
    x.append(z)
    x.append(z)
    x.append(z)
    print(''.join(str(i) for i in x))


n=int(input())
i=n//111
if n%111!=0:
    i+=1
print(i*111)



Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
for i in range(9):
    if 111*i <= n and n <= 111*(i+1):
        ans = 111*(i+1)
print(ans)

n = int(input())
ans = 111
for i in range(9):
    if 111*i < n and n <= 111*(i+1):
        ans = 111*(i+1)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
ans=n//111*(n+1)
print(ans if ans>n else ans-111 )

n=int(input())
ans=n//111*111
print(ans if ans==n else ans+111 )

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
i=0
for i in range(8):
    if 111*i<N and N<111*(i+1):
        print(111*(i+1))
        break

N=int(input())
i=0
for i in range(9):
    if 111*i<N and N<=111*(i+1):
        print(111*(i+1))
        break

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
A = N//100

print((A*111) if N < A*111 else (A+1)*111)

N = int(input())
A = N//100

print((A*111) if N <= A*111 else (A+1)*111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A = input()
AAA = int(A[0]*3)
if AAA > int(A):
  print(AAA)
else:
  print(AAA + 111)
  

A = input()
AAA = int(A[0]*3)
if AAA >= int(A):
  print(AAA)
else:
  print(AAA + 111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())
zoro=[111,222,333,444,555,666,777,888,999]
for i in range(len(zoro)):
  if N<zoro[i]:
    print(zoro[i])
    break

N=int(input())
zoro=[111,222,333,444,555,666,777,888,999]
for i in range(len(zoro)):
  if N<=zoro[i]:
    print(zoro[i])
    break

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
number = int(input())

str_number_list = list(str(number))

int_number_list = []

for i in str_number_list:
	int_number_list.append(int(i))

hundred = int_number_list[0]
ten = int_number_list[1]
one = int_number_list[2]

if number == one * 111:
	print(number + 111)
elif hundred <= ten:
	print('{0}{0}{0}'.format(*str_number_list[1]))
elif hundred > ten:
	print('{0}{0}{0}'.format(*str_number_list[0]))
else:
	print('{0}{0}{0}'.format(*str_number_list[2]))


number = int(input())

str_number_list = list(str(number))

int_number_list = []

for i in str_number_list:
	int_number_list.append(int(i))

hundred = int_number_list[0]
ten = int_number_list[1]
one = int_number_list[2]

if number == one * 111:
	print(number + 111)
elif hundred <= ten:
	print('{0}{0}{0}'.format(*str_number_list[1]))
else:
	print('{0}{0}{0}'.format(*str_number_list[0]))


num = int(input())
numlist = [111, 222, 333, 444, 555, 666, 777, 888, 999]
for number in numlist:
    if number >= num:
        print(number)
        break

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
print((N // 111) + 1 if N % 111 != 0 else N // 111)


N = int(input())
print(((N // 111) + 1) * 111 if N % 111 != 0 else (N // 111) * 111)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
num_list = [111*i for i in range(1,10)]
nums = [num_list[i]-N for i in range(len(num_list)) if num_list[i]-N > 0]
n = min(nums)
print(N+n) 

N = int(input())
print(((N-1)//111+1)*111)




Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = list(input())
a = int(''.join(n))
b = []
b.append(int(n[0]) * 111)
b.append(int(n[1]) * 111)
b.append(int(n[2]) * 111)
b = sorted(b)
if a % 111 == 0:
    print(a)
for i in range(3):
    if b[i] >= a:
        print(b[i])
        exit()

import math
n = int(input())
print(math.ceil(n/111)*111)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N =0 int(input())
for i in range(1, 10):
    if((i-1)*111<x and x<=i*111):
        print(i*111)

N =0 int(input())
for i in range(1, 10):
    if((i-1)*111<x and x<=i*111)
    print(i*111)

N = int(input())
for i in range(1, 10):
    if((i-1)*111<N and N<=i*111):
        print(i*111)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
a=int(input())
x=a+1000
w=[0,0,0]
w[0]=x%10
x=x//10
w[1]=x%10
x=x//10
w[2]=x%10
print(w)
flag=0
for i in range(2):
    if w[i]==w[i+1]:
        pass
    else:
        flag+=1

if flag==0:
    print(a)
else:
    w=sorted(w)

    e=1
    a=0
    for i in range(3):
       a+=w[2]*e
       e*=10
    print(a)










def notOk(x):
    s = x % 10
    x //= 10
    while x > 0:
        if(s != x % 10):
            return 1
        x //= 10
    return 0

n = int(input())
while(notOk(n)):
    n += 1
print(n)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
n_list = []

while n != 0:
    n_list.append(n%10)
    n //= 10
n_list.reverse()

if n_list[0] < n_list[1]:
    ans = n_list[1]
elif max(n_list) > n_list[0]:
    ans = n_list[0]
else:
    ans = max(n_list)

for _ in range(len(n_list)):
    print(ans,end='')

n = int(input())
n_list = []

while n != 0:
    n_list.append(n%10)
    n //= 10

ans = max(n_list)

for _ in range(len(n_list)):
    print(ans,end='')

n = int(input())
n_list = []

while n != 0:
    n_list.append(n%10)
    n //= 10
    n_list.reverse()

if max(n_list)-n_list[0] > 0:
    ans = n_list[0]
else:
    ans = max(n_list)

for _ in range(len(n_list)):
    print(ans,end='')

n = int(input())

compare = 111
while n > compare:
    compare += 111

print(compare)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input())

ans=0
while(True):
   ans+=111
  if(ans>=N):
    print(ans)
    break
  

N=int(input())
 
ans=0

while(True):
  ans+=111
  if(ans>=N):
    print(ans)
    break

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
n = input()
if int(n) < int(n[0]*3): print(n[0]*3)
else: print(str(int(n[0])+1)*3)


n = input()
if int(n) <= int(n[0]*3): print(n[0]*3)
else: print(str(int(n[0])+1)*3)


Verdicts: Wrong Answer

Accepted