TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
a = input()
pirnt(a.replace('1', '9'))

a = input()
print(a.replace('1', 'x').replace('9', '1').replace('x', '9'))

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = input()
if n ==111:
    print(999)
elif n ==119:
    print(991)
elif n == 191:
    print(919)
elif n == 199:
    print(911)
elif n== 911:
    print(199)
elif n == 919:
    print(191)
elif n== 991:
    print(119)
else:
    print(111)

s = input()
for i in range(3):
    if s[i] == '1':
        s[i] = '9'
    elif s[i] == '9':
        s[i] = '1'
print(s)

n = int(input())
if n ==111:
    print(999)
elif n ==119:
    print(991)
elif n == 191:
    print(919)
elif n == 199:
    print(911)
elif n== 911:
    print(199)
elif n == 919:
    print(191)
elif n== 991:
    print(119)
else:
    print(111)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = input()
 
if n == 111:
  print(999)
elif n == 119:
  print(991)
elif n == 191:
  print(919)
elif n == 199:
  print(911)
elif n == 911:
  print(199)
elif n == 919:
  print(191)
elif n == 991:
  print(119)
else:
  print(111)

n = input()

if n = 111:
  print(999)
elif n = 119:
  print(991)
elif n = 191:
  print(919)
elif n = 199:
  print(911)
elif n = 911:
  print(199)
elif n = 919:
  print(191)
elif n = 991:
  print(199)
else:
  print(111)

n = int(input())
 
if n == 111:
    print(999)
elif n == 119:
    print(991)
elif n == 191:
    print(919)
elif n == 199:
    print(911)
elif n == 911:
    print(199)
elif n == 919:
    print(191)
elif n == 991:
    print(119)
elif n == 999:
    print(111)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

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

n = input()
n = n.replace("1", "3")
n = n.replace("9", "1")
n = n.replace("3", "9")
print(n)

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

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

print(n.replace('1','x').replace('9','1').replace('x','1'))

n = input()

print(n.replace('1','x').replace('9','1').replace('x','9'))


Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = str(input())
dix = {'1':'9','9':'1'}
for x in n:
  if x=='1' or x=='9':
    x = dix[x]
print(n)

n = str(input())
dix = {'1':'9','9':'1'}
ans = ""
for x in n:
  if x=='1' or x=='9':
    ans += dix[x]
  else:
    ans += x
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
s=input()
for i in range(3):
  if s[i]=='1':
    s[i]='9'
  else:
    s[i]='1'
print(s)

print(input().replace('1','a').replace('9','1').replace('a','9'))

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
num = input().split()
result = ""
for i in num:
    if num[i] == 1:
        result += '9'
    if num[i] == 9:
        result += '1'
print(result)



num = list(input())
result = ""
for i in range(len(num)):
    if num[i] == '1':
        result += '9'
    if num[i] == '9':
        result += '1'
print(result)



Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = input()
ans = ''
for s in range(3):
    if s == '9':
        ans += '1'
    else:
        ans += '9'
print(ans)


n = input()
ans = ''
for s in n:
    if s == '9':
        ans += '1'
    else:
        ans += '9'
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

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


ans=""

if n[0]=="1":
ans=ans+"9"
else:
ans=ans+"1" 

if n[1]=="1":
ans=ans+"9"
else:
ans=ans+"1" 


if n[2]=="1":
ans=ans+"9"
else:
ans=ans+"1"


print(ans) 

n=input()


ans=""

if n[0]=="1":
	ans=ans+"9"
else:
	ans=ans+"1" 

if n[1]=="1":
	ans=ans+"9"
else:
	ans=ans+"1" 

if n[2]=="1":
	ans=ans+"9"
else:
	ans=ans+"1"


print(ans) 

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

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

a=list(a)



for i in range(3):
    if(a[i]=='1'):
        a[i]='9'
    elif(a[i]=='9'):
        a[i]='9'
s=''.join(a)

print(s)



a=input()

a=list(a)



for i in range(3):
    if(a[i]=='1'):
        a[i]='9'
    elif(a[i]=='9'):
        a[i]='1'
s=''.join(a)

print(s)


Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
s = list(input())
ans = ""
for i in range(3):
    if s[i] == 1:
        ans = ans + "9"
    else:
        ans = ans + "1"
print(ans)


s = list(str(input()))
ans = ""
for i in range(3):
    if s[i] == 1:
        ans = ans + "9"
    else:
        ans = ans + "1"
print(ans)


s = str(input())
for i in range(len(s)):
    if s[i] == 1:
        s[i] = 9
    else:
        s[i] = 1
print(s)

s = str(input())
ans = ""
for i in range(len(s)):
    if s[i] == 1:
        ans += 9
    else:
        ans += 1
print(ans)


s = list(str(input()))
ans = ""
for i in range(3):
    if s[i] == "1":
        ans = ans + "9"
    else:
        ans = ans + "1"
print(ans)


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n=input()
for i in range(3):
  if n[i]=='1':
    n[i]='9'
  if n[i]=='9':
    n[i]='1'
print(n)

n=list(input())
for i in range(3):
  if n[i]=='1':
    n[i]='9'
  elif n[i]=='9':
    n[i]='1'
ans=''
for i in range(3):
  ans+=n[i]
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
i = int(input())
lst = []
while i > 0:
    
    a=i%10
    
    if a==1:
        a=9
    else:
        a=1
    
    lst.append(a)
    i //= 10
lst.reverse()
print(lst)

i = int(input())
lst = []
while i > 0:
    
    a=i%10
    
    if a==1:
        a=9
    else:
        a=1
    
    lst.append(a)
    i //= 10
lst.reverse()
print(lst[0]*100+lst[1]*10+lst[2])

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
a = list(input())
for i in range(3):
  if a[i] = "1":
    a[i] = "9"
  else:
    a[i] = "1"
print("".join(a))


a = list(input())
for i in range(3):
  if a[i] = "1":
    a[i] = 9
  else:
    a[i] = 1
print("".join(a))

a = list(input())
for i in range(3):
  if a[i] == "1":
    a[i] = "9"
  else:
    a[i] = "1"
print("".join(a))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
rint(input().rstrip().replace("1","a").replace("9","1").replace("a","9"))


print(input().rstrip().translate(str.maketrans({'9':'1','1':'9'})))

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

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

for i in range(3):
    if n[i] == 1:
        ans = ans + "9"
    else:
        ans = ans + "1"

print(ans)

s = input()
ans = ""

for i in range(3):
    if s[i] == "1":
        ans = ans + "9"
    else:
        ans = ans + "1"

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

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

x = (s + 1) * 111
print(x)

n = input()
n_after = ""
for i in range(len(n)):
    s = n[i]
    
    if s == "1":
        n_after += "9"
    else:
        n_after += "1"
        
print(n_after)

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
print(input().tranprint(input().translate(str.maketrans("1", "9"))))slate(str.maketrans("1", "9")))

print(input().translate(str.maketrans("1", "9")))

print(input().translate(str.maketrans("19", "91")))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
s = input()
for i in range(len(s)):
  if s[i] == "1":
    s[i]="9"
  elif s[i]=="9":
    s[i]="1"
print(s)

s = input()
s_list=list(s)
for i in range(len(s)):
  if s[i] == "1":
    s_list[i]='9'
  elif s[i]=="9":
    s_list[i]='1'
str_changed="".join(s_list)
print(str_changed)


Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
l=list(input())
print(l.translate(str.maketrans({"1":"9", "9":"1"})))



n=input()
print(1110-int(n))


Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
inp = [[int(x) for x in input().split()] for _ in range(int(input()))]
inpsum = sum(map(lambda ij: abs(ij[0]+ij[1]) % 2, inp))
if not (inpsum == len(inp) or inpsum == 0):
    print(-1)
    exit(0)

seeds = ([] if inpsum == len(inp) else [1]) + [1 << i for i in range(0, 32)]
# print(inp)

print(' '.join(map(str, reversed(seeds))))

for x, y in inp:
    for k in reversed(seeds):
        res = ''
        if abs(x) > abs(y):
            if x > 0:
                res = 'R'
                x -= k
            else:
                res = 'L'
                x += k
        else:
            if y > 0:
                res = 'U'
                y -= k
            else:
                res = 'D'
                y += k
        # print((x,y))
        print(res, end='')
    print('')


for s in input():
    if s == '9': print('1', end='')
    else: print('9', end='')
print('')


Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
print(input().replace("9","n").replace("1","o").replace("o","1").replace("n","9"))

print(input().replace("9","n").replace("1","o").replace("o","9").replace("n","1"))

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n=input()
n.replace("1","2")
n.replace("9","1")
n.replace("2","9")
print(n)

n = input()
print(n.replace("9","x").replace("1","9").replace("x","1"))

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
# abc111_c_new


from collections import Counter


def solve(n, seq):
    odd = seq[::2]                      # odd numbers of the seq
    even = seq[1::2]                    # even numbers of the seq

    odd = Counter(odd).most_common()    # example -> returns [(1, 5), (2, 5)]
    even = Counter(even).most_common()

    sol = 0
    if odd[0][0] == even[0][0]:
        if len(odd) == 1 and len(even) == 1:
            sol = int(n / 2)
        else:
            if odd[1][1] > even[1][1]:
                sol = n - odd[1][1] - even[0][1]
            else:
                sol = n - odd[0][1] - even[1][1]
    else:
        sol = n - odd[0][1] - even[0][1]

    return sol


if __name__ == "__main__":
    n = int(input())
    seq = list(map(int, input("").split(" ")))
    print(solve(n, seq))


# abc111_c_new

from collections import Counter


def solve(n, seq):
    odd = seq[::2]  # odd numbers of the seq
    even = seq[1::2]  # even numbers of the seq

    # print(odd)
    # print(even)

    
    # even = Counter(even).most_common()
    odd = sorted([(k, v) for k, v in Counter(odd).items()], key=lambda x: x[1], reverse=True)
    even = sorted([(k, v) for k, v in Counter(even).items()], key=lambda x: x[1], reverse=True)

    # print(odd)
    # print(even)

    sol = 0
    if odd[0][0] == even[0][0]:
        if len(odd) == 1 and len(even) == 1:  # seq [1, 1, 1, 1]  (special case)
            sol = int(n // 2)  # [1, 1, 1, 1] sol = N / 2
        else:
            if odd[0][1] > even[1][1]:
                
                sol = (n // 2 - odd[0][1]) + (n // 2 - even[1][1])
            else:
                
                sol = (n // 2 - odd[1][1]) + (n // 2 - even[0][1])
    else:
        
        sol = (n // 2 - odd[0][1]) + (n // 2 - even[0][1])

    return sol


if __name__ == "__main__":
    n = int(input())
    seq = list(map(int, input("").split(" ")))
    print(solve(n, seq))


# abc_111_a

def transform (bango):
    if bango == "1":
        return "9"
    elif bango == "9":
        return "1"
    else:
        return bango

def solve(string):
    return "".join(list(map(transform, string)))

if __name__ == "__main__":
    string = input("")
    print (solve(string))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
s = input()
ans = ""
for i in s:
  if(i == "9"):
    ans += "1"
  else if(i == "1"):
    ans += "9"
  else:
    ans += i
    
print(ans)

s = input()
ans = ""
for i in s:
  if(i == '9'):
    ans += '1'
  else if(i == '1'):
    ans += '9'
  else:
    ans += i
    
print(ans)


s = input()
ans = ""
for i in s:
  if(i == '9'):
    ans += '1'
  elif(i == '1'):
    ans += '9'
  else:
    ans += i
    
print(ans)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
#import itertools
import collections

def op(v):
    count = collections.Counter(v).most_common() 

    
    #count = sorted([(k, len(list(g))) for k, g in v_], key = lambda x:x[1])
    return count

n = int(input())
V = [int(n) for n in input().split()]

if len(set(V)) == 1:
    ans = len(V) // 2
else:
    vp_ = [v for i, v in enumerate(V) if i%2 == 0] 
    vn_ = [v for i, v in enumerate(V) if i%2 != 0] 

    vp = op(vp_)
    vn = op(vn_)    

    if vp[-1][0] != vn[-1][0]:
        gp = vp[-1][1]
        gn = vn[-1][1]
    else:
        if vp[-1][1] > vn[-1][1]:
            gp = vp[-1][1]
            gn = vn[-2][1]
        else:
            gp = vp[-2][1]
            gn = vn[-1][1]

    #ans_p = sum([g for k, g in vp]) - gp
    #ans_n = sum([g for k, g in vn]) - gn

    
    ans = n - gp - gn

print(ans)



n = input()
#print(n)
new = []
for i in n:
    if i == '1':
        new.append('9')
    elif i =='9':
        new.append('1')
    else:
        new.append(i)
print(''.join(new))

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
# C
import collections
n = int(input())
lst = list(map(int, input().split()))
lst1 = lst[::2]
lst2 = lst[1::2]
dct1 = sorted(dict(collections.Counter(lst1)).items(), key=lambda x:x[1])
dct2 = sorted(dict(collections.Counter(lst2)).items(), key=lambda x:x[1])

cnt = len(dict(collections.Counter(lst)))
if (cnt == 1):
	print(int(len(lst) / 2))
elif (len(dct1) == 1 and len(dct2) == 1):
	print(0)
elif (len(dct1) == 1 and len(dct2) > 1):
	if (dct1[0][0] == dct2[0][0]):
		print(len(dct2) - dct2[1][1])
	else:
		print(len(dct2) - dct2[0][1])
elif (len(dct2) == 1 and len(dct1) > 1):
	if (dct1[0][0] == dct2[0][0]):
		print(len(dct1) - dct1[1][1])
	else:
		print(len(dct1) - dct1[0][1])
else:
	if (dct1[0][0] == dct2[0][0]):
		print(len(lst) - max(dct1[0][1] + dct2[1][1], dct1[1][1] + dct2[0][1]))
	else:
		print(len(lst) - dct1[0][1] - dct2[0][1])


s = list(input())
for i in range(len(s)):
    if (s[i] == '1'):
        s[i] = '9'
    else:
        s[i] = '1'
print("".join(s))

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
S = input()
for i in range(len(S)):
  if S[i] == '9':
    S[i] = '1'
  elif S[i] == '1':
    S[i] = '9'
print(S)

S = input()
S = int(S)
for i in range(len(S)):
  if S[i] == 9:
    S[i] = 1
  elif S[i] == 1:
    S[i] = 9
S = str(S)
print(S)

S = input()
c = ''
for i in range(len(S)):
  if S[i] == '9':
    c += '1'
  elif S[i] == '1':
    c += '9'
  else:
    c += S[i]
print(S)

S = input()
c = ''
for i in range(len(S)):
  if S[i] == '9':
    c += '1'
  elif S[i] == '1':
    c += '9'
  else:
    c += S[i]
print(c)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
num = input()
x = [int(i) for i in num]
for i in range(len(x)):
    if x[i] == 1:
        x[i] = "9"
    else:
        x[i] = "1"
mojiretu = ','.join(x)
print(int(mojiretu))


num = input()
x = [int(i) for i in num]
for i in range(len(x)):
    if x[i] == 1:
        x[i] = "9"
    else:
        x[i] = "1"
mojiretu = ''.join(x)
print(int(mojiretu))

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

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

if '1' in s:
  s = s.replace('1', '9')

if '9' in s:
  s = s.replace('9', '1')
  
print(s)


n = input()

if '1' in n:
  s = s.replace('1', '9')

if '9' in n:
  s = s.replace('9', '1')
  
print(s)

s = list(input())

if s[0] == '1':
    s[0] = s[0].replace('1', '9')
elif s[0] == '9':
    s[0] = s[0].replace('9', '1')
if s[1] == '1':
    s[1] = s[1].replace('1', '9')
elif s[1] == '9':
    s[1] = s[1].replace('9', '1')
if s[2] == '1':
    s[2] = s[2].replace('1', '9')
elif s[2] == '9':
    s[2] = s[2].replace('9', '1')

print(''.join(s))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
s = input()
for i in range(3):
  if s[i] == "1":
    s[i] == "9"
  else:
    s[i] == "1"
print(s)

s = list(input())
for i in range(3):
  if s[i] == "1":
    s[i] = "9"
  else:
    s[i] = "1"
print("".join(s))

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
import collections
n = int(input())
v = input().split()
v_int = [int(i) for i in v]
v_odd = []
v_even = []
for i in range(int(n/2)):
  v_even.append(v_int[i*2])
  v_odd.append(v_int[i*2+1])
c_odd = collections.Counter(v_odd)
c_even = collections.Counter(v_even)
max_odd = 0
second_odd = 0
max_key_odd = 0
for key in c_odd:
  if max_odd < c_odd[key]:
    second_odd = max_odd
    max_odd = c_odd[key]
    max_key_odd = key
  elif second_odd < c_odd[key]:
    second_odd = c_odd[key]
    
max_even = 0
second_even = 0
max_key_even = 0
for key in c_even:
  if max_even < c_even[key]:
    second_even = max_even
    max_even = c_even[key]
    max_key_even = key
  elif second_even < c_even[key]:
    second_even = c_even[key]
    
if max_key_even != max_key_odd:
  print(int(n)- max_even - max_odd)
else:
  if max_even > max_odd:
    if max_even == second_even:
      print(int(n) - max_even - max_odd)
    else:
      print(int(n) - max_even - second_odd)
  elif max_even < max_odd:
    if max_odd == second_odd:
      print(int(n) - max_odd - max_even)
    else:
      print(int(n) - max_odd - second_even)
  else : 
    if second_odd > second_even:
      print(int(n) - max_even - second_odd)
    else :
      print(int(n) - max_odd - second_even)

import collections
n = int(input())
v = input().split()
v_int = [int(i) for i in v]
v_odd = []
v_even = []
for i in range(int(n/2)):
  v_even.append(v_int[i*2])
  v_odd.append(v_int[i*2+1])
c_odd = collections.Counter(v_odd)
c_even = collections.Counter(v_even)
max_odd = 0
second_odd = 0
max_key_odd = 0
for key in c_odd:
  if max_odd < c_odd[key]:
    second_odd = max_odd
    max_odd = c_odd[key]
    max_key_odd = key
  elif second_odd < c_odd[key]:
    second_odd = c_odd[key]
    
max_even = 0
second_even = 0
max_key_even = 0
for key in c_even:
  if max_even < c_even[key]:
    second_even = max_even
    max_even = c_even[key]
    max_key_even = key
  elif second_even < c_even[key]:
    second_even = c_even[key]
    
if max_key_even != max_key_odd:
  print(int(n)- max_even - max_odd)
else:
  if max_even > max_odd:
    if max_even == second_even:
      print(int(n) - max_even - max_odd)
    else:
      print(int(n) - max_even - second_odd)
  elif max_even < max_odd:
    if max_odd == second_odd:
      print(int(n) - max_odd - max_even)
    else:
      print(int(n) - max_odd - second_even)
  else : 
    if second_odd > second_even:
      print(int(n) - max_even - second_odd)
    else :
      print(int(n) - max_odd - second_even)

a = input()
l = [int(x) for x in list(str(a))]
s = ""
for i in l:
  if i == 1:
    s += "9"
  elif i == 9:
    s += "1"
print(int(s))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
# -*- coding: utf-8 -*-
n = int(input())
S = n.replace(1,9).replace(9,1)
print(S)

# -*- coding: utf-8 -*-
n = str(input())
S = n.replace(1,9).replace(9,1)

# -*- coding: utf-8 -*-
n=int(input())
n.replace("1","9")and("9","1")

# -*- coding: utf-8 -*-
n = str(input()) 
S = n.replace("1","9").replace("9","1") 
print(S)

# -*- coding utf-8 -*-
n = str(input())
S = n.replace(1,8)
T = S.replace(9,1)
U = T.replace(8,9)
print(U)

# -*- coding: utf-8 -*-
n = str(input())
S = n.replace(1,9).replace(9,1)
print(S)

# -*- coding: utf-8 -*-
n = str(input())
m.replace(1,9:9,1)

# -*- coding utf-8 -*-
n = str(input())
S = n.replace("1","8")
T = S.replace("9","1")
U = T.replace("8","9")
print(U)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
print(1100 - int(input())

print(1100 - int(input()))

print(1110 - int(input()))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = str(input())
for i, s in enumerate(n):
  if s == "1":
    n[i] = "9"
  elif s == "9":
    n[i] = "1"

print(int(n))

n = str(input()).replace("1","q").replace("9","1").replace("q","9")
print(n)

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
s = input()
t = []
for i in range(len(s)):
  if s[i] == '1':
    t.append('9')
  elif:
    t.append('1')
print(''.join(t))

s = input()
t = []
for i in range(len(s)):
  if s[i] == '1':
    t.append('9')
  else:
    t.append('1')
print(''.join(t))


Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n=int(input())
if len(set(str(n)))==1:
    print(n)
else:

    while True:
        n+=1
        if len(set(str(n)))==1:
            print(n)
            break
  


n=list(input())
for i in range(len(n)):
    if n[i]=='9':
        n[i]='1'
    elif n[i]=='1':
        n[i]='9'
ans=''.join(n)
print(int(ans))

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
l=list(map(int,input().split()))
for i in range(3):
  if l[i]==1:
    l[i]=9
  else:
    l[i]=1
print(l)

l=list(input())
for i in range(3):
  if l[i]=='1':
    l[i]='9'
  else:
    l[i]='1'
l="".join(l)
print(l)

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
print(eval(i.replace("1","9").replace("9","1")) for i in input())

print(input().replace("1","x").replace("9","1").replace("x","9"))

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
N = int(input())
num = []
while N!=0:
  num.append(N%10)
  N -= N%10
  N /= 10
num.reverse()
a=num[0]
b=num[1]
c=num[2]
if a==b>=c:
  print(int(100*a+11*b))
if a==b<c or a<b:
  print(int((a+1)*111))
if a>b:
  print(int(a*111))

n = int(input())
num = []
while n != 0:
  num.append(n%10)
  n -= n%10
  n /= 10
a=num[2]
b=num[1]
c=num[0]
d=0
e=0
f=0
if a==9:
  d=1
elif a==1:
  d=9
else:
  d=a
if b==9:
  e=1
elif b==1:
  e=9
else:
  e=b
if c==9:
  f=1
elif c==1:
  f=9
else:
  f=c
print(int(100*d+10*e+f))

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
def henkan(str):
    for s in str:
        print('1' if s = '9' else '9',end='')
        print('')
henkan(input())

def henkan(str):
    for s in str:
        print('1' if s == '9' else '9',end='')
        print('')
henkan(input())

def henkan(str)
    for s in str:
        print('1' if s = '9' else '9',end='')
        print('')
henkan(input())

input_int = input()
if input_int[0] > input_int[1]:
  print(input_int[0] * 3)
elif input_int[0] == input_int[1] and  input_int[1] < input_int[2]:
  print(str(int(input_int[0]) + 1) * 3)
else:
  print(input_int[0] * 3)


def henkan(str):
    for s in str:
        print('1' if s == '9' else '9',end='')
    print('')
henkan(input())

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = input()
for i in range(3):
    if n[i] == 1:
        n[i] = 9
    else:
        n[i] = 1
        
print(n)

n=int(input())
print(1110-n)


Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n=input()
for i in range(len(n))
if(n[0] == 1):
  n[0] = 9
else:
  n[0] = 1
if(n[1] == 1):
  n[1] = 9
else:
  n[1] = 1
if(n[2] == 1):
  n[2] = 9
else:
  n[2] = 1


n=input()

if(n[0] == 1):
  n[0] = 9
else:
  n[0] = 1
if(n[1] == 1):
  n[1] = 9
else:
  n[1] = 1
if(n[2] == 1):
  n[2] = 9
else:
  n[2] = 1

n = int(input())
if n == 111:
  print(999)
if n == 119:
  print(991)
if n == 191:
  print(919)
if n == 199:
  print(911)
if n == 911:
  print(199)
if n == 919:
  print(191)
if n == 991:
  print(119)
if n == 999:
  print(111)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
a = int(input())
b = []
for i in range(3):
  if a[i] ==1:
  	b.append('9')
  else:
    b.append('1')
print(''.join(b))

a = int(input())
for i in range(3):
  if a[i] ==1:
  	a[i] ==9
  else:
    a[i] ==1
print(a)

a = input()
b = []
for i in range(3):
  if a[i] =='1':
  	b.append('9')
  else:
    b.append('1')
print(''.join(b))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = input()
print(n.replace("9","a").replace("9","1").replace("a","9"))


n = int(input())
print(replace("9","a").replace("1","9").replace("a","9"))


n = input()
print(n.replace("9","a").replace("1","9").replace("a","1"))


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = list(int(input()))
for i in range(len(n)):
    if n[i]==1:
        n[i]=9
    elif n[i]==9:
        n[i]=1
print("".join(n))


n = list(int(input()))
for i in range(n):
    if n[i]==1:
        n[i]=9
    elif n[i]==9:
        n[i]=1
print("".join(n))

n = list(input())
for i in range(len(n)):
    if n[i]=="1":
        n[i]="9"
    elif n[i]=="9":
        n[i]="1"
print("".join(n))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
s = int(input())
print(s.replace("1", "9").replace("9", "1"))

s = str(input())
print(s.replace("1", "9").replace("9", "1"))

s = str(input())
print(s.replace("1", "99").replace("9", "1").replace("99", "9"))

n = list(input())
ans = ""

for i in n:
  if i == "1":
    ans += "9"
  else:
    ans += "1"
    
print(ans)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
from collections import Counter

n = int(input())
v = [int(i) for i in input().split()]

ki = v[::2]
gu = v[1::2]

ki = Counter(ki)
gu = Counter(gu)

ki = ki.most_common()
gu = gu.most_common()

ans = 0

if ki[0][0] == gu[0][0]:
    if len(ki) == 1 and len(gu) == 1:
        ans = int(n / 2)
    else:
        if ki[1][1] > gu[1][1]:
            ans = n - ki[1][1] - gu[0][1]
        else:
            ans = n - ki[0][1] - gu[1][1]
else:
    ans = n - ki[0][1] - gu[0][1]

print(ans)



n = [x for x in str(input())]
add_stock = ''

for i in n:
    print(i)
    add = i
    if i == '1':
        add = '9'
    add_stock += add

print(add_stock)

from collections import Counter

n = int(input())
v = [int(i) for i in input().split()]

ki = v[::2]
gu = v[1::2]

ki = Counter(ki)
gu = Counter(gu)

ki = ki.most_common()
gu = gu.most_common()

ans = 0

if ki[0][0] == gu[0][0]:
    if len(ki) == 1 and len(gu) == 1:
        ans = int(n / 2)
    else:
        if ki[0][1] > gu[0][1]:
            ans = n - ki[0][1]
        else:
            ans = n - gu[0][1]
else:
    ans = n - ki[0][1] - gu[0][1]

print(ans)


n = [x for x in str(input())]
add_stock = ''

for i in n:
    add = i
    if i == '1':
        add = '9'
    add_stock += add

print(add_stock)

n = [x for x in str(input())]
add_stock = ''

for i in n:
    add = i
    if i == '1':
        add = '9'
    elif i == '9':
        add = '1'
    add_stock += add

print(add_stock)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
from sys import stdin
from itertools import groupby

n = int(stdin.readline().rstrip())

li = list(map(int,stdin.readline().rstrip().split()))

li1 = []
li2 = []

for i in range(n):
    if i % 2 == 0:
        li1.append(li[i])
    else:
        li2.append(li[i])

li1.sort()
li2.sort()

lin = []
lin2 = []

for key, value in groupby(li1):
    lin.append((key,len(list(value))))
for key, value in groupby(li2):
    lin2.append((key,len(list(value))))

lin.sort(key=lambda x:(x[1]))
lin2.sort(key=lambda x:(x[1]))

point = 0

if lin[-1][0] == lin2[-1][0] and lin[-1][1] == lin2[-1][1]:
    if len(lin) == 1:
        print(n//2)
    else:
        if lin[-2][1] >= lin2[-2][1]:
            print(n-lin[-2][1]-lin2[-1][1])
        else:
            print(n-lin[-1][1]-lin2[-2][1])

elif lin[-1][0] == lin2[-1][0]:
    if len(lin) == 1:
        print(n//2-lin2[-2][1])
    elif len(lin2) == 1:
        print(n//2-lin[-2][1])
    else:
        if lin[-2][1] >= lin2[-2][1]:
            print(n-lin[-1][1]-lin2[-2][1])
        else:
            print(n-lin[-2][1]-lin2[-1][1])
else:
    print(n-lin[-1][1]-lin2[-1][1])

from sys import stdin

s = stdin.readline().rstrip()
ns = ""
for i in s:
    if i =="1":
        ns += "9"
    else:
        ns += "1"

print(ns)


Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n = input()
print(int(n.replace("1", "9").replace("9", "1")))


# ABC111

n = list(input())
for i in range(len(n)):
    if n[i] == "1":
        n.pop(i)
        n.insert(i, "9")
    elif n[i] == "9":
        n.pop(i)
        n.insert(i,"1")
print(int("".join(n)))


Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
import collections
n = int(input())
v = list(input().split())
 
v_odd = []
v_even = []
 
for i in range(int(n)):
  if i % 2 == 1:
  	v_odd.append(i)
  
for i in range(int(n)):
  if i % 2 == 0:
  	v_even.append(i)
  
v_odd_counter = collections.Counter(v_odd)
a = v_odd_counter.most_common()[0][1]
 
v_even_counter = collections.Counter(v_even)
b = v_even_counter.most_common()[0][1]
 
print(n - a - b)

n = int(input())

print(1110-n)

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):

N = list(input())

out_str = ""
for i in range(len(N)) :
	if (N[i] == 1) :
		out_str += "9"
	else :
		out_str += "1"

print(out_str)


N = list(input())

out_str = ""
for i in range(len(N)) :
	if (N[i] == "1") :
		out_str += "9"
	else :
		out_str += "1"

print(out_str)

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
n=input()
n=n.replace('1','2')
n=n.replace('9','1')
print(n.replace('2','9')

n=input()
n=n.replace('1','2')
n=n.replace('9','1')
print(n.replace('2','9'))

Verdicts: Runtime Error

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
for i in range(int(input()), 1000):
  if(str(i)[0] == str(i)[1] and str(i)[1] == str(i)[2]):
    print(i)
    break

print(input().replace("1","a").replace("9","1").replace("a","9"))

Verdicts: Wrong Answer

Accepted
Problem: Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around.  You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n.

Submission attempts (in order):
word1 = list(input())
word2 = ""
for c in word1:
    if c == "9":
        word2 += "1"
    else if c == "1":
        word2 += "9"
    else:
        word2 += c
print(word2)


word1 = input()
word2 = ""
for c in word1:
    if c == "9":
        word2 += "1"
    else if c == "1":
        word2 += "9"
    else:
        word2 += c
print(word2)

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

word1 = list(input())
word2 = ""
for c in word1:
    if c == "9":
        word2 += "1"
    elif c == "1":
        word2 += "9"
    else:
        word2 += c
print(word2)

Verdicts: Runtime Error

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):
N = list(input())
N = [int(i) for i in N]
if N.index(max(N)) == 0 or len(set(N)) == 1:
  [print(max(N), end='') for _ in range(len(N))]
elif N.index(max(N)) == 1:
  [print(N[0]+1, end='') for _ in range(len(N))]
else:
  [print(N[2], end='') for _ in range(len(N))]

N = list(input())
N = [int(i) for i in N]
if N.index(max(N)) == 0:
  [print(max(N), end='') for _ in range(len(N))]
elif N.index(max(N)) == 1:
  [print(N[0]+1, end='') for _ in range(len(N))]
else:
  [print(N[2], end='') for _ in range(len(N))]

print(0--int(input())//111*111)

Verdicts: Wrong Answer

Wrong Answer

Accepted