Problem:


Score : 100 points

Problem Statement

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.

Constraints

111 \leq n \leq 999

n is an integer consisting of digits 1 and 9.

Input

Input is given from Standard Input in the following format:

n

Output

Print the integer obtained by replacing each occurrence of 1 with 9 and each occurrence of 9 with 1 in n.

Sample Input 1

119

Sample Output 1

991

Replace the 9 in the ones place with 1, the 1 in the tens place with 9 and the 1 in the hundreds place with 9. The answer is 991.

Sample Input 2

999

Sample Output 2

111



Sample input:
119


Sample output:
991

Submission status: Wrong Answer

Solution code:
n = input()
print(int(n.replace("1", "9").replace("9", "1")))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = str(n)
a = list(map(int,s))
for i in range(0,2):
    if a[i] == 1:
        a[i] = 9
    elif a[i] == 9:
        a[i] = 1

print(a[0]*100+a[1]*10+a[2])

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(3):
  if s[i] == "1":
    s[i] == "9"
  else:
    s[i] == "1"
print(s)

Submission status: Wrong Answer

Solution code:
S = input()
S.replace('1', 'x').replace('9', '1').replace('x', '9')
print(S)

Submission status: Wrong Answer

Solution code:
a=input()
print(a.replace('1','9').replace('9','1'))

Submission status: Wrong Answer

Solution code:
print(input().replace('1','9').replace('9','1'))

Submission status: Wrong Answer

Solution code:
a=int(input())
if (a//100)%9==0:
  b=100
else:
  b=900
if ((a-(a//100)*100)//10)%9==0:
  c=10
else:
  c=90
if (a-(a//100)*100-(a//10)*10)%9==0:
  d=1
else:
  d=9
print(b+c+d)

Submission status: Wrong Answer

Solution code:
a=input()
if a[0]=="1":
  a[0]=="9"
elif a[0]=="9":
  a[0]=="1"
if a[1]=="1":
  a[1]=="9"
elif a[1]=="9":
  a[1]=="1"
if a[2]=="1":
  a[2]=="9"
elif a[2]=="9":
  a[2]=="1"
print(a)

Submission status: Wrong Answer

Solution code:
x = input ()
x = x.replace('1', '9')
x = x.replace('9', '1')
print (x)

Submission status: Wrong Answer

Solution code:
a = input()
print(a.replace("1", "2")+a.replace("9", "1") + a.replace("2", "9"))

Submission status: Wrong Answer

Solution code:
a = input()
print(a.replace("1", "9")+a.replace("9", "1"))

Submission status: Wrong Answer

Solution code:
a = input()
print(a.replace("1", "9") + a.replace("9", "1"))

Submission status: Wrong Answer

Solution code:
s = input()
l = []
for i in range(3):
  l += s[i]
for i in range(3):
  if l[i] == '1':
    l[i] == '9'
  elif l[i] == '9':
    l[i] == '1'
print(l[0] + l[1] + l[2])

Submission status: Wrong Answer

Solution code:
n = input()
print(n.replace("1", "9").replace("9", "1"))

Submission status: Wrong Answer

Solution code:
n=input()
result=''
for i in n:
    if i=='1':
        result+='9'
    else:
        result+='1'
    print(result)

Submission status: Wrong Answer

Solution code:
a=list(input())
for i in range(3):
  if int(a[i])==1:
    a[i]='9'
  elif int(a[i])==9:
    a[i]=='1'
print(''.join(a))

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
l = ""
for i in range(3):
  if s[0] == "1":
    l += "9"
  else:
    l += "1"
    
print(l)

Submission status: Wrong Answer

Solution code:
line = list(input())
j = 0
print(line)
for i in range(3):
    if line[j] == "1":
        line[j] = "9"
    else:
        line[j] = "1"
    j +=1
print(int(line[0] + line[1] + line[2]))

Submission status: Wrong Answer

Solution code:
line = list(input())
j = 0
print(line)
for i in range(3):
    if line[j] == "1":
        line[j] = "9"
    else:
        line[j] = "1"
    j +=1
print(line[0] + line[1] + line[2])

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
S = list(input())
for N in S:
  if N == '1':
  	N = '9'
  elif N == '9':
    N = '1'
A = int(''.join(S))
print(A)

Submission status: Wrong Answer

Solution code:
x=input()
out=""
for i in x:
  if i==9:
    out+="1"
  else:
    out+="9"
print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(100,1000):
    if i >= n and i%100//10 == i%10 == i//100:
        print(i)
        break

Submission status: Wrong Answer

Solution code:
N = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=input()
ans=[]
for i in range(len(N)):
  if N[i]=="0":
    ans.append(9)
  else:
    ans.append(0)
print(*ans,sep="")

Submission status: Wrong Answer

Solution code:
n=input()
n.replace("1","2")
n.replace("9","1")
n.replace("2","9")
print(n)

Submission status: Wrong Answer

Solution code:
n = input()
for i in range(len(n)):
  if n[i] == "1":
    n[i] == "9"
  else:
    n[i] == "1"
print(n)

Submission status: Wrong Answer

Solution code:
n = input()

print('{}{}{}'.format(n[2],n[1],n[0]))

Submission status: Wrong Answer

Solution code:
n = input()

print(n[::-1])

Submission status: Wrong Answer

Solution code:
n = list(input())
i = 0
while i < 3:
    if n[i] == '1':
        n[i] == '9'
        i = i + 1
    else:
        n[i] == '1'
        i = i + 1

print(''.join(n))

Submission status: Wrong Answer

Solution code:
n = str(input())

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

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
n=list(input())

for i in range(3):
    if n[i] == 1:
        n[i] = 9
    elif n[i]==9:
        n[i] = 1
print(*n,sep="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

n = 1000 - n

print(n)

Submission status: Wrong Answer

Solution code:
n = input()
print(n.replace("19", "91"))

Submission status: Wrong Answer

Solution code:
n=list(input())
s=''
for i in n: s=s+'1' if i=='9' else '9'
print(s)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
a=n//100
b=n//10-(a*10)
c=a%10
if a==1:
    ans+=900
else:
    ans+=100
if b==1:
    ans+=90
else:
    ans+=10
if c==1:
    ans+=9
else:
    ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = list(input())

for i in n:
    if i == '9':
        print('1')
    else:
        print('9')

Submission status: Wrong Answer

Solution code:
def LI(): return list(map(str, input().split()))


N = LI()

for n in N:
    n = '1' if n == '9' else '1'
print(''.join(N))

Submission status: Wrong Answer

Solution code:
n=str(input())

for i in n:
    i = '1' if i == '9' else '1'

print(n)

Submission status: Wrong Answer

Solution code:
n = input()

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

Submission status: Wrong Answer

Solution code:
n = input()
for i in range(3):
    if n[i] == '1':
        n.replace(n[i], '9')
    elif n[i] == '9':
        n.replace(n[i], '1')
print(n)

Submission status: Wrong Answer

Solution code:
n=input()
print(n.replace('1','9').replace('9','1'))

Submission status: Wrong Answer

Solution code:
N = input()
if N[0] == 1:  N[0] == 9
elif N[0] == 9:  N[0] == 1
elif N[1] == 1:  N[1] == 9
elif N[1] == 9:  N[1] == 1
elif N[2] == 1:  N[2] == 9
elif N[2] == 9:  N[2] == 1
print(N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
print(s[::-1])

Submission status: Wrong Answer

Solution code:
num = input()
lis = ""

for i in num:
    if i == "1":
        lis+="9"
    else:
        lis+="1"

print(int(num))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
print(s.replace("9","1").replace("1","9"))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()

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

Submission status: Wrong Answer

Solution code:
n = input()
ans = ""

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

print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans=''
for i in range(3):
    if s[i]=='1':
       ans = s.replace(s[i],'9')
    else:
        ans = s.replace(s[i],'1')
print(ans)

Submission status: Wrong Answer

Solution code:
n = input()
nl =[]

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

Submission status: Wrong Answer

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


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

Submission status: Wrong Answer

Solution code:
n=input()
ans=str()
for i in n:
  if i==1:
    ans+='9'
  else:
    ans+='1'
print(ans)

Submission status: Wrong Answer

Solution code:
s=["9" if x=="1" else "9" for x in list(input())]
print("".join(s))

Submission status: Wrong Answer

Solution code:
s=["9" if x=="1" else "9" for x in input()]
print("".join(s))

Submission status: Wrong Answer

Solution code:
n=str(input())
print(n.replace("1","0").replace("9","1").replace("0","1"))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = n % 1000
b = n % 100
c = n % 10

if a == 100:
    a == 900
if a == 900:
    a == 100
    
if b == 10:
    b == 90
if b == 90:
    b == 10

if c == 1:
    c == 9
if c == 9:
    c ==1
    
print(a+ b+ c)

Submission status: Wrong Answer

Solution code:
n = input()
for i in range(3):
    if [i] == '1':
        print('9', end='')
    else:
        print('1', end='')

Submission status: Wrong Answer

Solution code:
n = input()
ans = 0
for l in n:
  if l == '1':
    ans += 9
  else:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
#python3

Submission status: Wrong Answer

Solution code:
# n=int(input())
# c=[int(input()) for i in range(n)]
s=input()
print(s.translate(str.maketrans('9', '1')))

Submission status: Wrong Answer

Solution code:
print(1100-int(input()))

Submission status: Wrong Answer

Solution code:
n=input()
if n[0]=="1":
  s="9"
elif n[0]=="9":
  s="1"
else:
  s=n[0]
if n[1]=="1":
  s+="9"
elif n[0]=="9":
  s+="1"
else:
  s+=n[1]
if n[2]=="1":
  s+="9"
elif n[2]=="9":
  s+="1"
else:
  s+=n[2]
print(s)

Submission status: Wrong Answer

Solution code:
s = input()
r = 0
if s[0] == '1':
  r += 900
else:
  r += 100
if s[1] == '1':
  r += 90
else:
  r += 10 
if s[2] == '1':
  r += 9
else:
  r += 1

Submission status: Wrong Answer

Solution code:
N = input()
f_num = int(N[0])
f = 100*f_num+10*f_num + f_num
if f >= int(N):
    print(f)
else:
    print(100*(1+f_num)+10*(1+f_num)+(1+f_num))

Submission status: Wrong Answer

Solution code:
N = input()
f_num = int(N[0])
f = 100*f_num+10*f_num + f_num
if f >= int(N):
    print(f_num)
else:
    print(100*(1+f_num)+10*(1+f_num)+(1+f_num))

Submission status: Wrong Answer

Solution code:
N = input()
f_num = int(N[0])
f = 100*f_num+10*f_num + 1 
if f >= int(N):
    print(f_num)
else:
    print(100*(1+f_num)+10*(1+f_num)+(1+f_num))

Submission status: Wrong Answer

Solution code:
n = list(input())

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

print(n,sep="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())

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

    else:
        s[i] = 1

print(s)

Submission status: Wrong Answer

Solution code:
s = list(input())

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

    else:
        s[i] == 1

print(s)

Submission status: Wrong Answer

Solution code:
n=int(input())
c=111
while True:
    if n<=c:
        print(c)
        break
    c+=111

Submission status: Wrong Answer

Solution code:
n = str( input() )
n.replace( "1", "0" ).replace( "9", "1" ).replace( "0", "9" )
print( n )

Submission status: Wrong Answer

Solution code:
n = str( input() )
n.replace( "1", "0" )
n.replace( "9", "1" )
n.replace( "0", "9" )
print( int( n ) )

Submission status: Wrong Answer

Solution code:
n = str( input() )
n.replace( "1", "0" )
n.replace( "9", "1" )
n.replace( "0", "9" )
print( n )

Submission status: Wrong Answer

Solution code:
n = str( input() )
n.replace( "1", "0" )
n.replace( "9", "1" )
n.replace( "0", "9" )

Submission status: Wrong Answer

Solution code:
n = list(str(int(input())))
ans = ""
for i in n :
	if i == 1 :
		ans += "9"
	else :
		ans += "1"
print(int(ans))

Submission status: Wrong Answer

Solution code:
N = input()
str = list(N)
for i in range(3):
  if str[i] == "9":
    str[i] = "1"
  elif str[i] == "1":
    str[i] = "9"
print(str)
str2 = "".join(str)
print(str2)

Submission status: Wrong Answer

Solution code:
N = input()
str = list(N)
for i in range(3):
  if str[i] == 9:
    str[i] = 1
  elif str[i] == 1:
    str[i] = 9
str2 = "".join(str)
print(str2)

Submission status: Wrong Answer

Solution code:
n = input()
ans = n.replace('1','x').replace('9','1').replace('x','1')
print(ans)

Submission status: Wrong Answer

Solution code:
n=input()
x=[]
if n[0]=='1':
    x.append('9')
else:
    x.append('1')
if n[1]=='1':
    x.append('9')
else:
    x.append('1')
if n[2]=='1':
    x.append('9')
else:
    x.append('1')
print(x)

Submission status: Wrong Answer

Solution code:
n=input()
x=[]
if n[0]=='1':
    x.append(9)
else:
    x.append(1)
if n[1]=='1':
    x.append(9)
else:
    x.append(1)
if n[2]=='1':
    x.append(9)
else:
    x.append(1)
print(x)

Submission status: Wrong Answer

Solution code:
n = input()
ans = ""
for val in n:
  if val == "1":
    val = "9"
  elif val =="9":
    val ="1"
  ans += val

Submission status: Wrong Answer

Solution code:
S = list(map(str, input()))

for i in range(len(S)):
	if S[i] == "9":
		S[i] = "1"
	elif S[i] == "1":
		S[i] = "9"
		
for _ in range(len(S)):
	print(S[i], end = "")

Submission status: Wrong Answer

Solution code:
print(input()[::-1])

Submission status: Wrong Answer

Solution code:
print(int(input().replace('1', '9').replace('9','1')))

Submission status: Wrong Answer

Solution code:
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()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = list(map(int, input().split()))
ans = ""
for i in N:
  if i == 1:
    ans += "9"
  else:
    ans += "1"
print(ans)

Submission status: Wrong Answer

Solution code:
n=input()
for i in n:
  a='1' if i=='9' else i
  a='9' if a=='1' else a
  print(a,end='')

Submission status: Wrong Answer

Solution code:
print(eval(i.replace("1","9").replace("9","1")) for i in input())

Submission status: Wrong Answer

Solution code:
print(input().replace('1', 'temp').replace('9', '1').replace('temp', '1'))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
a=input()
print(a.replace("1", "9", 3))

Submission status: Wrong Answer

Solution code:
a=input()
print(a.replace("1", "9"))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = list(input())
for i in range(len(n)):
    if n[i] == 1:
        n[i] = 9
    elif n[i] == 9:
        n[i] = 1
    if i == 0:
        s = str(n[i])
    else:
        s += str(n[i])
print(int(s))

Submission status: Wrong Answer

Solution code:
s = list(input())
d = {"1":"9","9":"1"}
rev_s = [d[c] for c in s]
print(rev_s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#112a
s=list(input())
for i in range(3):
    if s[i]==1:
        s[i]=9
    else:
        s[i]=1
print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = list(input())
for i in range(len(N)):
  if N[i] == "1":
    N[i] = "9"
  else:
    N[i] = "1"
print(str(N))

Submission status: Wrong Answer

Solution code:
N=input()
for x in N:
  if x=="1":
    x="9"
  elif x=="9":
    x="1"
print(N)

Submission status: Wrong Answer

Solution code:
print(''.join(['1' if '9' else '9' for i in input()]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
s.replace("1","a").replace("9","1").replace("a","1")
print(s)

Submission status: Wrong Answer

Solution code:
n = input()
n.replace('1', 'x')
n.replace('9', '1')
n.replace('x', '9')
print(int(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
a=input()
print(int(a.replace("1","9")))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(input().replace("9","1"))

Submission status: Wrong Answer

Solution code:
n=int(input())

N=[0]*3
m=[0]*3

N[0]=int(n/10)
N[1]=int(N[0]/10)
N[2]=int(N[1]/10)

m[0]=int(n%10)
m[1]=int(N[0]%10)
m[2]=int(N[1]%10)

for i in range(0,3):
    if m[i]==1:
        m[i]=9
    elif [i]==9:
        m[i]=1
print(N[0],N[1],N[2])        
print(m[0],m[1],m[2])
print(int(m[2]*100+m[1]*10+m[0]))

Submission status: Wrong Answer

Solution code:
s = input()
print(s.replace('1', '').replace('9', '1') + s.replace('9', '').replace('1', '9'))

Submission status: Wrong Answer

Solution code:
s = input()
print(s.replace('9', '1') + s.replace('1', '9'))

Submission status: Wrong Answer

Solution code:
n = input()
N = list(n)
for i in N:
  if i == "1":
    i = "9"
  else:
    i = "1"
print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = list(str(input()))

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

Submission status: Wrong Answer

Solution code:
n = list(str(input()))

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

Submission status: Wrong Answer

Solution code:
a = [i for i in input()]
for j in range(3):
  if a[j] =="1":
    a[j] = "9"
  else:
    a[j] = "1"
print(a)

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
a=input()
b1,b2,b3=0,0,0
if a[0]==9:
    b1='1'
else:
    b1='9'
if a[1]==9:
    b2='1'
else:
    b2='9'
if a[2]==9:
    b3='1'
else:
    b3='9'
print(b1+b2+b3)

Submission status: Wrong Answer

Solution code:
a = list(input())
print(a)
for i, n in enumerate(a):
    if n == "1":
        a[i] = 9
    else:
        a[i] = 1
l = a[0] *100 + a[1] * 10 + a[2]  
print(int(l))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
for i in range(2):
  if N[i] == '1':
    N[i] == '9'
  else:
    N[i] == '1'
print(N)

Submission status: Wrong Answer

Solution code:
N = input()
for i in range(2):
  if N[i] == '1':
    N[i] == '9'
  else:
    N[i] == '1'

Submission status: Wrong Answer

Solution code:
N = input()
for i in range(3):
  if N[i] == '1':
    N[i] == '9'
  else:
    N[i] == '1'

print(N)

Submission status: Wrong Answer

Solution code:
print(input().replace("1","9").replace("9","1"))

Submission status: Wrong Answer

Solution code:
s = input()
 
ss = ""
for i in s:
  if s == "1":
  	ss += "9"	
  else:
    ss += "1"
    
print(ss)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n = S()
    for i in n:
        if i == "1":
            print(9, end="")
        else:
            print(0, end="")
    print()
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n = S()
    for i in n:
        if i == 1:
            print(9, end="")
        else:
            print(0, end="")
    print()
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Wrong Answer

Solution code:
n = list(input())
for i in range(3):
    if n[i] == '1':
        n[i] = '9'
    else:
        n[i] = '1'

Submission status: Wrong Answer

Solution code:
N = input()
n = int(N[0])
if (N[0] == N[1] == N[2]) or N[0] > N[1]:
    print(100*n + 10*n + n)
else:
    n = n +1
    print(100*n + 10*n + n)

Submission status: Wrong Answer

Solution code:
N = input()
n = int(N[0])
if (N[0] == N[1] and N[0] == N[2]) or N[0] > N[1]:
    print(100*n + 10*n + n)
else:
    n = n +1
    print(100*n + 10*n + n)

Submission status: Wrong Answer

Solution code:
n=input()
n.replace('1','a')
n.replace('9','1')
n.replace('a','9')
print(n)

Submission status: Wrong Answer

Solution code:
print(input().translate(str.maketrans({"1":9,"9":1})))

Submission status: Wrong Answer

Solution code:
s = input()

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

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

Submission status: Wrong Answer

Solution code:
#################################
#配列を二つに分ける
#引数
# values: 配列
# a,b   : 配列の格納先
#戻り値
# なし
#################################
def separate(values,a,b):
    for v in values:
        a.append(v)
        a,b = b,a


##############################
#登場回数の多い数と登場回数を返す
#引数
# values: ソートされた配列
#戻り値
# 辞書型配列
##############################
def getCount(values):
    currentNum=0
    currentCount=0
    ret={'First' :{'Num':[],'Cnt':0},
         'Second':{'Num':[],'Cnt':0}}
    for v in values:
        if v==currentNum:
            currentCount+=1
        else:
            #別の数字が表れた場合
            if ret['First']['Cnt'] < currentCount:
                #最大値より大きい場合、それが新たな最大値になる
                ret['Second']=ret['First'].copy()
                ret['First']={'Num':[currentNum],'Cnt':currentCount}
            elif ret['First']['Cnt'] == currentCount:
                #最大値タイ
                ret['First']['Num'].append(currentNum)
            elif ret['Second']['Cnt'] < currentCount:
                #2番目より大きい場合、それが新たな2番目になる。
                ret['Second']={'Num':[currentNum],'Cnt':currentCount}
            elif ret['Second']['Cnt'] == currentCount:
                #2位タイ
                ret['Second']['Num'].append(currentNum)

            currentNum=v
            currentCount=1

    #配列の最後まで来た場合
    if ret['First']['Cnt'] < currentCount:
        ret['Second']=ret['First'].copy()
        ret['First']={'Num':[currentNum],'Cnt':currentCount}
    elif ret['First']['Cnt'] == currentCount:
        ret['First']['Num'].append(currentNum)
    elif ret['Second']['Cnt'] < currentCount:
        ret['Second']={'Num':[currentNum],'Cnt':currentCount}
    elif ret['Second']['Cnt'] == currentCount:
        ret['Second']['Num'].append(currentNum)

    return ret


#############################
# メイン
#############################
vars = input ()
a=[]
b=[]
varArray=vars.split(" ")
separate(varArray,a,b)
a.sort()
b.sort()
a_result=getCount(a)
b_result=getCount(b)
if (len(a_result['First']['Num'])>1 or
    len(b_result['First']['Num'])>1):
    #最頻値が複数ある場合は素直に計算可
    xa=len(a)-a_result['First']['Cnt']
    xb=len(b)-b_result['First']['Cnt']
    x=xa+xb
else:
    #abどちらも最頻値が1種類の場合
    if a_result['First']['Num'][0]!=b_result['First']['Num'][0]:
        #abの最頻値が異なる場合は素直に計算可
        xa=len(a)-a_result['First']['Cnt']
        xb=len(b)-b_result['First']['Cnt']
        x=xa+xb
    else:
        #abの最頻値が同じ値の場合、どちらかは2番目の値を採用する必要あり
        xaa=len(a)-a_result['First']['Cnt']
        xab=len(b)-b_result['Second']['Cnt']
        xa=xaa+xab
        xba=len(a)-a_result['Second']['Cnt']
        xbb=len(b)-b_result['First']['Cnt']
        xb=xba+xbb
        x=xa if xa<xb else xb

print(x)

Submission status: Wrong Answer

Solution code:
n = list(input())

print(n)

for num in range(len(n)):
    if n[num] == "1":
        n[num] = "9"
    elif n[num] == "9":
        n[num] = "1"

result = "".join(n)

print(result)

Submission status: Wrong Answer

Solution code:
print(input().replace("1","").replace("9","1").replace("","9"))

Submission status: Wrong Answer

Solution code:
n=input()
print(n.replace("1","").replace("9","1").replace("","9"))

Submission status: Wrong Answer

Solution code:
n=str(input())
print(n.replace("1","9").replace("9","1"))