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):
def main():
    n = input()
    ans = ''
    for i in range(3):
        if(n[i]==9):
            ans = ans + '1'
        else:
            ans = ans + '9'
    print(ans)


if __name__ == "__main__":
    main()

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


if __name__ == "__main__":
    main()

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())

a = 1110 - n
print(n)

n = int(input())

a = 1110 - n
print(a)

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):
y = int(input())
for i in range(1, 10):
  x = i + i * 10 + i * 100
  if x >= y:
    print(x)
    break

S = input()
for x in S:
  if x == '1':
    print('9', end = "")
  elif x == '9':
    print('1', end = "")
  else:
    print(x, end = "")
print()

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()
nl =[]

for i in range(3):
    if n[i] == '1':
        nl.append('9')
    else:
        nl.append('1')
print(nl)



n = list(input())
nl =[]

for i in n:
    if i == '1':
        nl.append('9')
    else:
        nl.append('1')
print(''.join(nl))

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):
input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

print(s)

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu)


input_line = str(input())
s = []

for i in range(len(input_line)):
  if input_line == '9':
    s.append('1')
  elif input_line == '1':
    s.append('9')
  else:
    s.append(input_line[i])

for x in s:
    mojiretu += x
    
print(mojiretu)


input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

print(s)

mojiretu = ''

for x in s:
    mojiretu += x

print(mojiretu)


input_line = input()
def gen(n):
  if n < 10:
    yield n
  else:
    for m in gen(n/10):
      yield m
    yield n%10

a = [str(i) for i in gen(int(input_line))]
d = []
for s in a:
  if s == '9':
    s = '1'
  elif s == '1':
    s = '9'
  d.append(s)

print(d)
  
mojiretu = ''

for x in d:
    mojiretu += x

print(mojiretu)

input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line == '9':
        s.append('1')
    elif input_line == '1':
        s.append('9')
    else:
        s.append(input_line[i])

mojiretu = ''

for x in s:
    mojiretu += x

print(mojiretu)


input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

print(s)

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu))


input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu))


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

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):
def cal(n,v):
    k=n//2
    even=range(0,2*k,2)
    odd=range(1,2*k+1,2)

    el=[]
    for i in even:
        el.append(v[i])
    ol=[]
    for i in odd:
        ol.append(v[i])

    d={}
    for i in el:
        if((i in d) is False):
            d[i]=0
        else:
            d[i]+=1

    f={}
    for i in ol:
        if((i in f) is False):
            f[i]=0
        else:
            f[i]+=1

    while(True):
        e = max(d, key=d.get)
        o = max(f, key=f.get)
        if(e==o):
            if(d[e]>f[e]):
                del f[e]
            elif(d[e]<f[e]):
                del d[e]
            else:
                return print(k)
        else:
            break

    sum=0
    for i in el:
        if(i!=e):
            sum+=1
    for i in ol:
        if(i!=o):
            sum+=1
    return print(sum)

n=int(input())
v=list(map(int,input().split()))
cal(n,v)

n=int(input())
v=list(map(int,input().split()))
 
k=n//2
even=range(0,2*k,2)
odd=range(1,2*k+1,2)
 
el=[]
for i in even:
    el.append(v[i])
ol=[]
for i in odd:
    ol.append(v[i])
 
d={}
for i in el:
    if((i in d)is False ):
        d[i]=0
    else:
        d[i]+=1
e = max(d, key=d.get)
 
d={}
for i in ol:
    if((i in d)is False ):
        d[i]=0
    else:
        d[i]+=1
o = max(d, key=d.get)
 
if(el==ol):
    print(k)
else:
    sum=0
    for i in el:
        if(i!=e):
            sum+=1
    for i in ol:
        if(i!=o):
            sum+=1
    print(sum)

N=input()
a=[]
for i in range(3):
    if(N[i]=="1"):
        a.append("9")
    elif(N[i]=="9"):
        a.append("1")
    else:
        a.append(N[i])
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):
print(int(input().replace('1', '9').replace('9','1')))

print(1110-int(input()))

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()
if s[0] == '1':
  s[0] = '9'
else:
  s[0] = '1'
if s[1] == '1':
  s[1] = '9'
else:
  s[1] = '1'
if s[2] == '1':
  s[2] = '9'
else:
  s[2] = '1'
print(s)

s = input()
s = list(s)
if s[0] == '1':
  s[0] = '9'
else:
  s[0] = '1'
if s[1] == '1':
  s[1] = '9'
else:
  s[1] = '1'
if s[2] == '1':
  s[2] = '9'
else:
  s[2] = '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):
print(input().replace('1','9'))

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):
s = list(input())
for i in range(s):
  if s[i] == "1":
    s[i] = "9"
  elif s[i] == "9":
    s[i] = "1"


print("".join(s))

s = list(input())
for i in range(len(s)):
  if s[i] == "1":
    s[i] = "9"
  elif s[i] == "9":
    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):
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=input()
v=input().split()

nlis=list(n)
nint=int(n)
part_num=int((nint/2))
ev_num=[]
for i in range(part_num):
    ev = 2*i
    ev_num.extend(v[ev])
count_ev=[]
for i in range(part_num):
    count=0
    count_ev.append(ev_num.count(ev_num[i]))
    
ans_ev=min(count_ev)

od_num=[]
for i in range(part_num):
    od = (2*i) + 1
    od_num.extend(v[od])
count_od=[]
for i in range(part_num):
    count=0
    count_od.append(od_num.count(od_num[i]))
ans_od=min(count_od)

if v.count(v[0]) == len(v):
    ans=part_num
else:
    ans=ans_ev+ans_od
print(ans)  

n=input()
n=list(n)
if n[0]=='1':
    n[0]='9'
elif n[0]=='9':
    n[0]='1'
if n[1]=='1':
    n[1]='9'
elif n[1]=='9':
    n[1]='1'
if n[2]=='1':
    n[2]='9'
elif n[2]=='9':
    n[2]='1'
ans=int("".join(n))
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):
S=input()
for i in range(len(S)):
  if S[i]=="1":
    S[i]="9"
  else:
    S[i]="1"
print(S)

S=input()
A=""
for i in range(len(S)):
  if S[i]=="1":
    A+="9"
  else:
    A+="1"
print(int(S))

S=input()
A=""
for i in range(len(S)):
  if S[i]=="1":
    A+="9"
  else:
    A+="1"
print(int(A))

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=list(input())
for i in n:
  if n[i] == '1':
    n[i] = '9'
  elif n[i] == '9':
    n[i] = '1'

print(int(''.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(int(''.join(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(map(int,input().split()))
for i in range(3):
  if n[i] == 1:
    n[i] = 9
  else:
    n[i] = 1
print("".join(n))

n=list(input())
for i in range(3):
  if n[i] == "1":
    n[i] = "9"
  else:
    n[i] = "1"
print("".join(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 = input()

corrected = ""
for l in inp:
  if l == "1":
    corrected += "9"
  elif l == 9:
    corrected += "1"
  else:
    print("error")

print(int(corrected))

inp = input()

corrected = ""
for l in inp:
  if l == "1":
    corrected += "9"
  elif l == "9":
    corrected += "1"
  else:
    print("error")

print(int(corrected))

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):
import collections

N = int(input())
l = list(map(int, input().split()))

a = []
b = []
a_f = 0
b_f = 0
a_s = 0
b_s = 0
for i in range(N):
    if i%2 == 0:
        a.append(l[i])
    else:
        b.append(l[i])
        
c_a = collections.Counter(a)
c_b = collections.Counter(b)

a_f = c_a.most_common()[0]
b_f = c_b.most_common()[0]

if a_f[0] != b_f[0]:
    print(N - a_f[1] - b_f[1])

elif len(set(a)) == 1 and len(set(b)) == 1:
    print(int(N/2))
elif len(set(a)) == 1:
    print(int(N/2 - c_b.most_common()[1][1]))
elif len(set(b)) == 1:
    print(int(N/2 - c_a.most_common()[1][1]))
elif a_f[1] == b_f[1]:
    second_a = c_a.most_common()[1][1]
    second_b = c_b.most_common()[1][1]
    if second_a >= second_b:
        print(int(N - b_f[1] - second_a)
    else:
        print(int(N - a_f[1] - second_b)
elif a_f[1] > b_f[1]:
    print(int(N - a_f[1] - c_b.most_common()[1][1]))
else:
    print(int(N - b_f[1] - c_a.most_common()[1][1]))

N = input()
res = ''
for i in range(len(N)):
    if N[i] == '1':
        res += '9'
    if N[i] == '9':
        res += '1'
        
print(res)

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):
input = str(input())
input.replace('9', '_').replace('1', '9').replace('_', '1')
print(input)

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


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())

for n in N:
    n = str(eval(10 - n))
    
print(int(n))

N = str(input())

ans = ""
for n in N:
    formura = "10-{}".format(n)
    ans += str(eval(formura))

print(int(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):
#Bad_Beast
n=int(input())
if n==111:
    print(111)
if n>111 and n<=222:
    print(222)
elif n>222 and n<=333:
    print(333)
elif n>333 and n<=444:
    print(444)
elif n>444 and n<=555:
    print(555)
elif n>555 and n<=666:
    print(666)
elif n>666 and n<=777:
    print(777)
elif n>777 and n<=888:
    print(888)
elif n>888 and n<=999:
    print(999)
#print(res)    
        
    

#Bad_Beast
n=list(input())
for i in range(len(n)):
    if n[i]=="1":
        n[i]="9"
    elif n[i]=="9":
        n[i]="1"
res=""
for i in range(len(n)):
    res+=n[i]
print(res)    
        
    

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()
s = []
for i in range(len(n)):
    if n[i] == '1':
        s.append('9')
    elif n[i] == '9':
        s.append('1')
print(s)

n = input()
s = []
ans = 0
for i in range(len(n)):
    if n[i] == '1':
        ans += 9*(10**(2-i))
    elif n[i] == '9':
        ans += 1*(10**(2-i))
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()
print(''.join(map(lambda c: '9' if c == '1' else '1' if c == '9' else c, n))

print(input().replace('1','t').replace('9', '1').replace('t', '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):
s=input()
print(s.translate({'1':'9', '9':'1'}))


s=input()
print(s.replace('1', '9').replace('9', '1'))


s=input()
print(s.replace('1', '9'))


s=input()
print(s.translate(s.maketrans({'1':'9', '9':'1'})))


Verdicts: Wrong Answer

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):
input().translate(str.maketrans({'1': '9', '9': '1'}))

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

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

Verdicts: 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):
x = [int(i) for i in input()]

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

x = [int(i) for i in input()]

for i in range(len(x)):
  if x[i] == 1:
    x[i] = 9
  elif x[i]==9:
    x[i] = 1
    
print(x)

x = [int(i) for i in input()]

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

Verdicts: 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):
print(1110-int(input))

print(1110-int(input()))

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()
n=n.replace("1","X")
n=n.replace("9","1")
n=n.replace("X","9")
n=int(n)
print(n)

n=input()
n=n.replace("1","X")
n=n.replace("9","1")
n=n.replace("X","9")
n=int(n)
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):
m=input()
def s(x):
  if x=='1':
    return '9'
  else:
    return '1'
print(s(m[0])+s(m[1])+s(m[2])

m=input()
def s(x):
  if x=='1':
  	return '9'
  else:
    return '1'
print(s(m[0])+s(m[1])+s(m[2])

m=input()
def s(x):
  if x=='1'
  	return '9'
  else:
    return '1'
print(s(m[0])+s(m[1])+s(m[2])

m=input()
def s(x):
  if x=='1':
    return '9'
  else:
    return '1'
print(s(m[0])+s(m[1])+s(m[2]))

Verdicts: 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(int(input()).replace(1,9).replace(9,1))


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


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


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

a=int(input())
b=str(a).replace('1','9').replace('9','1')
print(int(b))


a=int(input())
b=str(a)
print(b.replace('1','9').replace('9','1'))


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


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


a=int(input())
for i in a:
  if i ==1:
    i=9
  elif i ==9:
    i=1
  print(int(a))

a = list(input())
b = ''
for i in a:
  if i == '1':
    b += '9'
  else:
    b += '1'
print(str(b))

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

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()
 dict = {"1" : "9", "9" : "1"}
 ans = ""
for i in range(len(n)) :
    ans += dict[n[i]]
print(ans)

n = input()
dict = {"1" : "9", "9" : "1"}
ans = ""
for i in range(len(n)) :
    ans += dict[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):
s = input()
print(s.replace("9","1").replace("1","9"))

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


s = input()
print(s.replace("9","c").replace("1","9").replace("c","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 = input()
if n = 999:
   print("111")
elif n = 991:
    print("119")
elif n = 911:
    print("199")
elif n = 919:
    print("191")
elif n = 199:
    print("911")
elif n = 191:
    print("919")
elif n = 199:
    print("911")
eise:
    print("999")

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

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

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

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):
n=input()
print(n.replace("1","x").replace("9","1").replace("x","1"))

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):
import collections
 
n = int(input())
v = [int(i) for i in input().split()]
 
v1 = [v[i] for i in range(0,n,2)]
v2 = [v[i] for i in range(1,n,2)]
 
count1 = collections.Counter(v1).most_common(2)
count2 = collections.Counter(v2).most_common(2)

if max(count1.values()) != max(count2.values()):
    res = len(v1) - max(count1.values()) + len(v2) - max(count2.values())
    print(res)
else:
    if len(count1) == 1:
        print(len(v1))
    else:
        res1 = len(v1) - count1[0][1] + len(v2) - count2[1][1]
        res2 = len(v1) - count1[1][1] + len(v2) - count2[0][1]
        print(min(res1,res2))


N = list(input())

r = []

for i in N:
    if i == '1':
        r.append('9')
    else:
        r.append('1')

print(''.join(r))

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,v in enumerate(n):
  if v == '9':
    n[i] = '1'
  elif v == '1':
    n[i] = '9'
    
print(n)

n = input()

ans = ''
for i, v in enumerate(n):
    if v == '9':
        ans += '1'
    elif v == '1':
        ans += '9'
    else:
        ans += v

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):
n = input()

print(n.replace("1","9").repace("9","1"))
      


n = input()

print(n.translate(str.maketrans({"1":"9"}))


n = input()

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


n = input()

print(n.replace("1","9").repace("9","1")
      


n = input()

print(n.translate(str.maketrans({"1":"9","9":"1"})))
      

Verdicts: Runtime Error

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):
S = input()
for i in range(3):
  if S[i]=="9":
    S[i]="1"
  elif S[i]=="1":
    S[i] ="9"
print(S)

S = list(input())
for i in range(3):
  if S[i]=="9":
    S[i]="1"
  elif S[i]=="1":
    S[i] ="9"
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):
print(1100-int(input())

print(1110-int(input()))

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())

n = 1000 - n

print(n)


n = int(input())
print(1110 - 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()
for i in range(3):
  n[i] = 10-n[i]
print(n)

n=int(input())
for i in range(3):
  n[i] = 10-n[i]
print(n)

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

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


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):
print(((int(input())-1)//111+1)*111)


print(''.join(list(map(lambda x:['1','9'][x=='1'],list(input())))))

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 = n.replace('1','x').replace('9','1').replace('x','1')
print(ans)

s = input()
ans = s.replace('9','temp').replace('1','9').replace('temp','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):
# coding: utf-8
# Your code here!

import collections

n = int(input())
v_l = list(map(int, input().split()))

if len(set(v_l)) == 1:
    print(n // 2)
    exit()

v_l_odd = []
v_l_even = []

for i in range(n):
    if i % 2 == 0:
        v_l_odd.append(v_l[i])
    else:
        v_l_even.append(v_l[i])

max_odd = collections.Counter(v_l_odd)
mon = max_odd.most_common(1)[0][0]
max_even = collections.Counter(v_l_even)
men = max_even.most_common(1)[0][0]

if mon == men:
    if max(max_odd.most_common(2)[1][1], max_even.most_common(2)[1][1]) == max_odd.most_common(2)[1][1]:
        mon = max_odd.most_common(2)[1][1]
    else:
        men = max_even.most_common(2)[1][1]

v_l_odd_l = []
v_l_even_l = []

for i in range(n):
    if i % 2 == 0:
        if v_l[i] != mon:
            v_l_odd_l.append(v_l[i])
    else:
        if v_l[i] != men:
            v_l_even_l.append(v_l[i])

print(len(v_l_odd_l) + len(v_l_even_l))




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

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(n.replace('1','9').replace('9','1'))

n = input()
print(n.translate(str.maketrans({'1': '9', '9': '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()
d={"9":"1","1":"9"}
"".join(d[x] for x in n)

n=input()
d=["9":"1","1":"9"]
"".join(d[x] for x in n)

n=input()
d={"9":"1","1":"9"}
"".join(d[x] for in n)

n=input()
d={"9":"1","1":"9"}
print("".join(d[x] for x in n))

Verdicts: 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):
print(input().translate(str.maketrans({'1':'9','9':'1'}))

print(input().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):
from collections import Counter


def main():
    n = int(input())
    v_n = input().split(' ')
    
    guusuu = Counter(v_n[::2])
    kisuu = Counter(v_n[1::2])

    guusuu = guusuu.most_common()
    kisuu = kisuu.most_common()


    if guusuu[0][0]==kisuu[0][0]:
        if len(guusuu)==1 and len(kisuu)==1:
            print(guusuu)
        else:
            print(min(n - guusuu[0][1] - kisuu[1][1], n- guusuu[1][1] - kisuu[0][1]))
    else:
        print(n - guusuu[0][1] - kisuu[0][1])
        
main()

n = list(input())

result = ""

for a in n:
  if a == '1':
    result += '9'
  else:
    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):
arr=[1,9]
A,B,C=map(int,input())
if A in arr and  B in arr  and  C in arr :
    A=10-A
    B=10-B
    C=10-C
    print(A,B,C)


arr=[]
arr19=['1','9']
n=int(input())
if(n>=111 and n<=999):
    arr=list(str(n))
output=""
for i in range(3):
    if arr[i] in arr19 :
        output+=str(10-int(arr[i]))
print(output)         


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 = list(input())

for i,s in enumerate(n):
  if s==1:
    n[i]=9
  elif s==9:
  	n[i]=1

print(n,sep="")

n = list(input())

for i,s in enumerate(n):
  if s=="1":
    n[i]="9"
  elif s=="9":
  	n[i]="1"

print(*n,sep="")



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 = list(map(int,input()))
n_length=len(n)


for i in range(n_length):
    if n[i]==1:
        n[i]=9
    elif n[i]==9:
        n[i]=1
    else:
        pass

print(str(n))
    


import sys
N=int(input())
N_str = []
for i in range(N,999):
    N+=1
    N_new = N
    while N>0:
        N_str.append(N%10)
        N//=10
    N_str.reverse()
    
    N = N_new
          
    if N_str[0]==N_str[1] and N_str[1]==N_str[2]:
        print(N)
        break

sys.exit()

n = list(map(str,input()))
n_length=len(n)


for i in range(n_length):
    if n[i]=='1':
        n[i]='9'
    elif n[i]=='9':
        n[i]='1'
    else:
        pass
n_new=''.join(n)
print(str(n_new))
    

Verdicts: 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):
n = input()
n = n.replace("1","a")
n = n.replace("9","1")
n = n.replace("a,"9")
print(n)

n = input()
n = n.replace("1","a")
n = n.replace("9","1")
n = n.replace("a","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):
""" AtCoder """

import sys
input = sys.stdin.readline

n = input()

ans = []

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


""" AtCoder """

import sys
input = sys.stdin.readline

n = input()

ans = []

for i in range(3):
    if n[i] == '1':
        ans.append('9')
    else:
        ans.append('1')
print(''.join(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):
from functools import reduce

N = int(input())
N_list = [int(x) for x in list(str(N))]

N_ = []
for i in N_list:
    print("i", i)
    if i == 1:
        i = 9
    elif i == 9:
        i = 1
    N_.append(i)

new_N = int(reduce(lambda x,y: x+y, [str(x) for x in N_]))

print(new_N)

from functools import reduce

N = int(input())
N_list = [int(x) for x in list(str(N))]

N_ = []
for i in N_list:
    if i == 1:
        i = 9
    elif i == 9:
        i = 1
    N_.append(i)

new_N = int(reduce(lambda x,y: x+y, [str(x) for x in N_]))

print(new_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):
a = [i for i in input()]
for j in range(3):
  if a[j] =="1":
    a[j] = "9"
  else:
    a[j] = "1"
print(a)

a = [i for i in input()]
for j in range(3):
  if a[j] =="1":
    a[j] = "9"
  else:
    a[j] = "1"
print(a[0]+a[1]+a[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):
ans=[]
n=int(input())
a=n//100
b=(n-a*100)//10
c=n-a*100-b-10
ans.append(a)
ans.append(b)
ans.append(c)
for i in ans:
    if i==1:
        print(9,end="")
    else:
        print(1,end="")


print(1110-int(input()))


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())

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(s)


s = list(str(input()))

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

    else:
        s[i] = '1'

print (''.join(s))

Verdicts: 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):
A=input()
for i in range(3):
  if A[i]=='1':
    A[i]='9'
  else if A[i]=='9':
    A[i]='1'
print(A)

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

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

n = input()
for c in n:
    if (c == '1'):
        print('9', end='')
    elif (c == '9'):
        print('1', end='')
    else:
        print(c, end='')
print()

Verdicts: 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):
n=str(input())

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


n=str(input())

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

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())
i = int(n / 111)
if n % 111 != 0:
    i += 1
print(i * 111)

number = list(input())
answer = []
for i in number:
  if i == 1:
    answer.append(9)
  elif i == 9:
    answer.append(1)
  else:
    answer.append(i)
print(''.join(answer))

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

Verdicts: 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):
n = int(input())

ans = ''
for w in str(s):
    if w == '1':
        ans += '9'
    elif w == '9':
        ans += '1'
    else:
        ans += str(w)
        
print(int(ans))

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

s = input()
 
ans = ''
for w in str(s):
    if w == '1':
        ans += '9'
    elif w == '9':
        ans += '1'
        
print(int(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):
inp = int(input())
ret = 0
for i in range(1, 10):
    ret = i*111
    if ret >= inp:
        break
print(ret)

n=input()
s=""
for i in n:
    if i=='1':
        s+='9' 
    elif i=='9':
        s+='1'
    else:
        s+=i 
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):
kazu = list(input())
for k in range(len(kazu)):
  if kazu[k] == "1":
    kazu[k] == "9"
  elif kazu[k] == "9":
    kazu[k] == "1"
print("".join(kazu))

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

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):
i=list(input())
for j in i:
  if j=="9":
    j=1
  else:
    j=9
print("".join(i))

print(1110-int(input()))

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()
for i in range(len(n)):
    if n[i]=="1":
        n[i]="9"
    else:
        n[i]="1"
print(n)


n=input()
ans=""
for i in range(len(n)):
    if n[i]=="1":
        ans+="9"
    else:
        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):
n = int(input())
a = list(str(n))
m = int(a[0])*100 + int(a[0])*10 + int(a[0]) 
o = (int(a[0])+1)*100 + (int(a[0])+1)*10 + (int(a[0])+1)
if m < n: 
 print(o)
else:
 print(m)




n = int(input())
print( 1110 - 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):
.replace('1','9')


n = input()
print(n.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):
from collections import Counter
a,b,n = 0,0,int(input())
n1 = n//2 + n%2
n2 = n//2
z = list(map(int,input().split()))
a,b = Counter(z[0::2]).most_common(2),Counter(z[1::2]).most_common(2)

if a[0] == b[0]:
	print(n2)
elif len(a) == 1 and len(b) == 1:
    print(int(n/2))
else:
	print(n1 - a[0][1]+n2 - b[0][1])

n = int(input())
p = 1110

print(p-n)

Verdicts: Runtime Error

Accepted