problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03242
u140480594
2,000
1,048,576
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.
['n = list(str(int(input())))\nans = ""\nfor i in n :\n\tif i == 1 :\n\t\tans += "9"\n\telse :\n\t\tans += "1"\nprint(int(ans))', 'n = list(str(int(input())))\nans = ""\nfor i in n :\n\tif i == "1" :\n\t\tans += "9"\n\telse :\n\t\tans += "1"\nprint(int(ans))']
['Wrong Answer', 'Accepted']
['s752239750', 's156563096']
[2940.0, 2940.0]
[17.0, 17.0]
[112, 114]
p03242
u143318682
2,000
1,048,576
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.
["# -*- coding: utf-8 -*-\nn = input()\nn = n.replace('9', '1')\nprint(n.replace('1', '9'))", "# -*- coding: utf-8 -*-\ns = input()\nprint(s.translate(str.maketrans({'1': '9', '9': '1'})))"]
['Wrong Answer', 'Accepted']
['s236427226', 's807078763']
[2940.0, 3188.0]
[18.0, 18.0]
[86, 91]
p03242
u144980750
2,000
1,048,576
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.
['n=input()\nfor i in range(len(n)):\n if n[i]=="9":\n n[i]="1"\n else:\n n[i]="9"\nprint(n)', 'n=input()\nc=""\nfor i in range(len(n)):\n if n[i]=="9":\n c+="1"\n else:\n c+="9"\nprint(c)']
['Runtime Error', 'Accepted']
['s206114826', 's141067227']
[2940.0, 2940.0]
[18.0, 18.0]
[92, 93]
p03242
u146803137
2,000
1,048,576
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.
["n = input()\nfor i in range(3):\n if n[i] == '9':\n n[i] = '1'\n else:\n n[i] = '9'\nprint(int(n))\n", "n = input()\nans = ''\nfor i in range(3):\n if n[i] == '9':\n ans += '1'\n else:\n ans += '9'\nprint(int(ans))\n"]
['Runtime Error', 'Accepted']
['s998699785', 's042187332']
[9096.0, 9044.0]
[22.0, 28.0]
[113, 125]
p03242
u151042563
2,000
1,048,576
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.
['n = int(input())\ni = int(n / 111)\nif n % 111 != 0:\n i += 1\nprint(i * 111)', "N = input()\nn = list(N)\ncon = []\nfor i in range(len(n)):\n if n[i] == '1':\n con += '9'\n elif n[i] == '9':\n con += '1'\n else:\n con += n[i]\nresult = ''.join(con)\nprint(result)"]
['Wrong Answer', 'Accepted']
['s513335801', 's405990536']
[2940.0, 3060.0]
[17.0, 17.0]
[76, 202]
p03242
u158620769
2,000
1,048,576
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.
['s=list(input())\n\nint a\nwhile a < 3:\n if s[a] == "1":\n s[a] = "9"\n else s[a] == "9":\n s[a] = "1"\n a += 1\n\nprint(int(s))', 's=list(input())\n\n\na = 0\nwhile a < 3:\n if s[a] == "1":\n s[a] = "9"\n elif s[a] == "9":\n s[a] = "1"\n a += 1\n\nprint(int(s))', 's=list(input())\n\nint a = 0\nwhile a < 3:\n if s[a] == "1":\n s[a] = "9"\n else s[a] == "9":\n s[a] = "1"\n a += 1\n\nprint(int(s))', 's=list(input())\n\n\na = 0\nwhile a < 3:\n if s[a] == "1":\n s[a] = "9"\n elif s[a] == "9":\n s[a] = "1"\n a += 1\n\ns = \'\'.join(s)\n\n\nprint(s)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s409218712', 's483200365', 's673214692', 's742393606']
[2940.0, 2940.0, 3064.0, 2940.0]
[17.0, 18.0, 17.0, 17.0]
[127, 128, 131, 140]
p03242
u163449343
2,000
1,048,576
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.
['n = input()\nans = ""\nfor i in n:\n if i = "1":\n ans += "9"\n else:\n ans += "1"\nprint(ans)', 'n = input()\nans = ""\nfor i in n:\n if i == "1":\n ans += "9"\n else:\n ans += "1"\nprint(ans)']
['Runtime Error', 'Accepted']
['s999617256', 's879473124']
[2940.0, 2940.0]
[17.0, 17.0]
[95, 96]
p03242
u166621202
2,000
1,048,576
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.
["N = str(input())\n\nprint(N.replace('1', '9').replace('9', '1')", "N = str(input())\n\nprint(N.replace('1', '9').replace('9', '1'))\n\n", 'N = input()\nL = list(N)\n\nfor i in range(3):\n if L[i] == "1":\n L[i] = "9"\n else:\n L[i] = "1"\nprint("".join(L))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s158897205', 's217435806', 's935504756']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[61, 64, 117]
p03242
u166696759
2,000
1,048,576
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.
['n = input()\nn = [β€˜1’ for a in n if a==β€˜9’ else β€˜9’]\nprint(β€œβ€.join(n))', 'n = input()\nans = β€œβ€\nfor a in n:\n if a == β€œ1”:\n ans = ans + β€œ9”\n else:\n ans = ans + β€œ1”\nprint(ans)\n', 'n = input()\nans = β€œβ€\nfor a in n:\n if a == β€œ1”:\n ans = ans + β€œ9”\n else:\n ans = ans + β€œ1”\nprint(ans)', "n = input()\nans = ''\nfor a in n:\n if a == '1':\n ans = ans + '9'\n else:\n ans = ans + '1'\nprint(ans)\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s072241381', 's204351931', 's869520528', 's741476918']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0, 17.0]
[85, 124, 123, 108]
p03242
u168416324
2,000
1,048,576
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.
['x=input()\nout=""\nfor i in x:\n if i==9:\n out+="1"\n else:\n out+="9"\nprint(out)', 'x=input()\nout=""\nfor i in x:\n if i=="9":\n out+="1"\n else:\n out+="9"\nprint(out)\n']
['Wrong Answer', 'Accepted']
['s412340331', 's981246682']
[9024.0, 8900.0]
[27.0, 28.0]
[84, 87]
p03242
u169138653
2,000
1,048,576
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.
["n=input()\nans=str()\nfor i in n:\n if i==1:\n ans+='9'\n else:\n ans+='1'\nprint(ans)", "n=input()\nans=str()\nfor i in n:\n if i=='1':\n ans+='9'\n else:\n ans+='1'\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s471618124', 's099069291']
[2940.0, 2940.0]
[17.0, 17.0]
[87, 89]
p03242
u173329233
2,000
1,048,576
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.
['n_str = input()\nres = 0\nfor i in range(3):\n s = 10**i - int(n_str[i])\n res = res + s\n\nprint(res)', "n_str = input()\nfor i in range(3):\n if n_str[i] == '1':\n n_str[i] = '9'\n else:\n n_str[i] = '1'\n \nprint(int(n_str))", "n_str = input()\nfor i in range(3):\n if n_str[i] == '1':\n n_str[i] = '9'\n else:\n n_str[i] = '1'\n \nprint(n_str)", 'n_str = input()\nres = 0\nfor i in range(3):\n s = (10 - int(n_str[i])) * 10**i\n res = res + s\n\nprint(res)', 'n_str = input()\nres = 0\nfor i in range(3):\n s = 10**i + int(n_str[i])\n res = res + s\n \nprint(res)', 'n_str = input()\nres = 0\nfor i in range(3):\n s = (10 - int(n_str[i])) * 10**(2-i)\n res = res + s\n\n\nprint(res)\n']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s109846703', 's658055717', 's662521154', 's698274516', 's785630788', 's421881620']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 17.0, 17.0, 20.0]
[98, 125, 120, 105, 100, 111]
p03242
u174536291
2,000
1,048,576
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.
["s = input()\nl = []\nfor i in range(3):\n l += s[i]\nfor i in range(3):\n if l[i] == '1':\n l[i] == '9'\n elif l[i] == '9':\n l[i] == '1'\nprint(l[0] + l[1] + l[2])", "s = input()\nl = []\nfor i in range(3):\n l += s[i]\nfor i in range(3):\n if l[i] == '1':\n l[i] = '9'\n elif l[i] == '9':\n l[i] = '1'\nprint(l[0] + l[1] + l[2])"]
['Wrong Answer', 'Accepted']
['s792699456', 's897434152']
[9000.0, 9112.0]
[24.0, 29.0]
[164, 162]
p03242
u178432859
2,000
1,048,576
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.
['a = input()\nfor i in range(len(a)):\n if a[i] == "1":\n a[i] = "9"\n elif a[i] == "9":\n a[i] = "1"\nprint(a)', 'a = input()\nl = list(a)\nfor i in range(len(a)):\n if l[i] == "9":\n l[i] = "1"\n elif l[i] == "1":\n l[i] = "9"\nprint("".join(l))']
['Runtime Error', 'Accepted']
['s918619580', 's951960073']
[2940.0, 3060.0]
[17.0, 17.0]
[124, 145]
p03242
u181215519
2,000
1,048,576
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.
['n = str( input() )\nn.replace( "1", "0" )\nn.replace( "9", "1" )\nn.replace( "0", "9" )', 'n = str( input() )\nn.replace( "1", "0" )\nn.replace( "9", "1" )\nn.replace( "0", "9" )\nprint( int( n ) )', 'n = str( input() )\nn.replace( "1", "0" ).replace( "9", "1" ).replace( "0", "9" )\nprint( n )', 'n = str( input() )\nn.replace( "1", "0" )\nn.replace( "9", "1" )\nn.replace( "0", "9" )\nprint( n )', 'n = str( input() )\nprint( n.replace( "1", "0" ).replace( "9", "1" ).replace( "0", "9" ) )']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s556330173', 's738202088', 's942512922', 's999666666', 's388828094']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[84, 102, 91, 95, 89]
p03242
u185037583
2,000
1,048,576
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.
["s = input()\nfor i in range(len(s)):\n if s[i]=='1':\n s[i]='9'\n else:\n s[i]='1'\n\nprint(s)", "s = input()\ns = s.replace('1','2')\ns = s.replace('9','1')\ns = s.replace('2','9')\nprint(s)\n "]
['Runtime Error', 'Accepted']
['s006597963', 's470421666']
[2940.0, 2940.0]
[17.0, 17.0]
[95, 94]
p03242
u185806788
2,000
1,048,576
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.
['print(int(input())-N)\n', 'print(1110-int(input()))\n']
['Runtime Error', 'Accepted']
['s762163706', 's643387264']
[9136.0, 9104.0]
[22.0, 24.0]
[22, 25]
p03242
u186838327
2,000
1,048,576
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.
['N = int(input())\nprint(1100-N)', 'N = int(input())\nprint(1110-N)']
['Wrong Answer', 'Accepted']
['s676145383', 's953967964']
[2940.0, 2940.0]
[17.0, 17.0]
[30, 30]
p03242
u187205913
2,000
1,048,576
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.
['n = int(input())\nv = list(map(int,input().split()))\nl1 = []\nl2 = []\nfor i,v_ in enumerate(v):\n if i%2==0:\n l1.append(v_)\n else:\n l2.append(v_)\n\nfrom collections import Counter\nif set(l1)==set(l2):\n print(n//2)\nelse:\n c1 = Counter(l1).most_common(2)\n c2 = Counter(l2).most_common(2)\n if c1[0][0]==c2[0][0]:\n print(n-max(c1[0][1]+c2[1][1], c1[1][1]+c2[0][1]))\n else:\n print(n-c1[0][1]-c2[0][1])\n', "n = input()\nfor n_ in n:\n if n_=='1':\n print('9',end='')\n else:\n print('1',end='')\nprint()"]
['Runtime Error', 'Accepted']
['s486453207', 's549307077']
[3064.0, 2940.0]
[18.0, 17.0]
[442, 110]
p03242
u187516587
2,000
1,048,576
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.
['n=int(input())\na,b=[None]*100000,[None]*100000\nfor i in range(100000):\n a[i]=[None]*2\n a[i][0]=0\n a[i][1]=i\n b[i]=[None]*2\n b[i][0]=0\n b[i][1]=i\nl=list(map(int,input().split()))\nfor i in range(n//2):\n a[l[2*i]-1][0]+=1\n b[l[2*i+1]-1][0]+=1\na.sort(reverse=True)\nb.sort(reverse=True)\nif a[0][1]==b[0][1]:\n print(n-max(a[0][0]+b[1][0],a[1][0]+b[0][0]))\nelse:\n print(n-a[0][0]-b[0][0])', 'n=input()\nl=""\nfor i in range(3):\n if n[i]=="1":\n l+="9"\n elif n[i]=="9":\n l+="1"\n else:\n l+=n[i]\nprint(l)']
['Runtime Error', 'Accepted']
['s901042779', 's510676644']
[26612.0, 3060.0]
[150.0, 20.0]
[411, 136]
p03242
u190875453
2,000
1,048,576
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.
['text = list(input())\n\ndef swap(char, a, b):\n if char == a:\n return(b)\n if char == b:\n return(a)\n\nres = list(map(lambda x: swap(x, "1", "9"), text))\nprint("".join(res))\n~ ', 'text = list(input())\n\ndef swap(char, a, b):\n if char == a:\n return(b)\n if char == b:\n return(a)\n\nres = list(map(lambda x: swap(x, "1", "9"), text))\nprint("".join(res))']
['Runtime Error', 'Accepted']
['s734185464', 's792239413']
[2940.0, 3060.0]
[17.0, 17.0]
[210, 187]
p03242
u197704813
2,000
1,048,576
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.
['import collections\n\ndef answer(list,n):\n Even = collections.Counter(list[::2]).most_common(2)\n Odd = collections.Counter(list[1::2]).most_common(2)\n\n if Even[0][0] != Odd[0][0]:\n return n - Even[0][1] - Odd[0][1]\n else:\n if len(Even) == 1 or len(Odd) == 1:\n return n // 2\n else:\n return n - max(Even[0][1]+Odd[1][1],Even[1][1]+Odd[0][1])\n\nN = int(input())\nlist = input().split(" ")\nprint(answer(list,N))\n', 'ans = int(input())\nprint(1110-ans)\n']
['Runtime Error', 'Accepted']
['s092948221', 's943837660']
[3316.0, 2940.0]
[20.0, 17.0]
[459, 35]
p03242
u201234972
2,000
1,048,576
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.
["n = input()\nans = ''\nfor x in n:\n if x == '1':\n ans += '9'\n else:\n ans += '1'\nprint(ans)", "n = input()\nans = ''\nfor x in n:\n if x == '1':\n ans += '9'\n else:\n ans += '1'\nprint(ans)"]
['Runtime Error', 'Accepted']
['s151208756', 's561220949']
[3064.0, 2940.0]
[18.0, 17.0]
[97, 96]
p03242
u205678452
2,000
1,048,576
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.
['N = input()\nprint(N)\nn=0\nif N == "111":\n n = 999\nelif N == "119":\n n = 991\nelif N == "199":\n n= 911\nelif N == "999":\n n = 111\nelif N == "911":\n n = 199\nelif N == "991":\n n = 119\n\nprint(n)', 'N = input()\nn=0\nif N == "111":\n n = 999\nelif N == "119":\n n = 991\nelif N == "199":\n n= 911\nelif N == "999":\n n = 111\nelif N == "911":\n n = 199\nelif N == "991":\n n = 119\nelif N == "191":\n n = 919\nelif N == "919":\n n = 191\n\nprint(n)']
['Wrong Answer', 'Accepted']
['s049637681', 's001236322']
[2940.0, 2940.0]
[17.0, 17.0]
[205, 254]
p03242
u206570055
2,000
1,048,576
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.
['n = int(input())\nAllList = list(map(int, input().split()))\nOddList = [0 for i in range(100001)]\nEvenList = [0 for i in range(100001)]\nfor i in range(n):\n if i % 2 == 0:\n OddList[AllList[i]] += 1\n else:\n EvenList[AllList[i]] += 1\n\nOddMax = max(OddList)\nEvenMax = max(EvenList)\nOddMaxNum = OddList.index(OddMax)\nEvenMaxNum = EvenList.index(EvenMax)\n\nif OddMaxNum == EvenMaxNum:\n if OddMax > EvenMax:\n EvenList[EvenMaxNum] = 0\n else:\n OddList[OddMaxNum] = 0\n\nOddMax = max(OddList)\nEvenMax = max(EvenList)\n\nans = n - OddMax - EvenMax\n\nprint(ans)\n\n', 'print(str(1110 - int(input())))\n']
['Runtime Error', 'Accepted']
['s015554121', 's557780184']
[3064.0, 2940.0]
[17.0, 17.0]
[583, 32]
p03242
u209620426
2,000
1,048,576
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.
['print(1110-int(inpout()))', 'print(1110-int(input()))']
['Runtime Error', 'Accepted']
['s669590757', 's956258996']
[2940.0, 2940.0]
[17.0, 17.0]
[25, 24]
p03242
u214592658
2,000
1,048,576
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.
["n = str(input())\n\nresult = n.replace('1', '2').replace('9','1').replace('2','9')\n\nreturn result\n", "n = str(input())\n\nresult = n.replace('1', '2').replace('9','1').replace('2','9')\n\nprint(result)\n"]
['Runtime Error', 'Accepted']
['s735204158', 's822928946']
[2940.0, 2940.0]
[17.0, 17.0]
[96, 96]
p03242
u215315599
2,000
1,048,576
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.
['import collections\n\nn = input()\nline = input().split()\nodd = line[::2]\neven = line[1::2]\no = collections.Counter(odd)\ne = collections.Counter(even)\nmaxoddcnt = o.most_common()[0][1]\nmaxevencnt = e.most_common()[0][1]\n\n\nif odd == even:\n print(len(odd))\n exit(0)\n\n\nif o.most_common()[0][0] == e.most_common()[0][0]:\n if len(o.most_common()) > 1 and len(e.most_common()) <= 1:\n maxoddcnt = o.most_common()[1][1]\n if len(o.most_common()) <= 1 and len(e.most_common()) > 1:\n maxevencnt = e.most_common()[1][1]\n if o.most_common()[1][1] + e.most_common()[0][1] >= o.most_common()[0][1] + e.most_common()[1][1]:\n maxoddcnt = o.most_common()[1][1]\n else: #if o.most_common()[1][1] + e.most_common()[0][1] <= o.most_common()[0][1] + e.most_common()[1][1] :\n maxevencnt = e.most_common()[1][1]\n input()\n\nprint(len(odd)-maxoddcnt+len(even)-maxevencnt)\n', 'import collections\n\nn = input()\nline = input().split()\nodd = line[::2]\neven = line[1::2]\no = collections.Counter(odd)\ne = collections.Counter(even)\nmaxoddcnt = o.most_common()[0][1]\nmaxevencnt = e.most_common()[0][1]\n\n\nif odd == even:\n print(len(odd))\n exit(0)\n\n\nif o.most_common()[0][0] == e.most_common()[0][0]:\n if o.most_common()[1][1] + e.most_common()[0][1] > o.most_common()[0][1] + e.most_common()[1][1]:\n maxoddcnt = o.most_common()[1][1]\n else: #if o.most_common()[1][1] + e.most_common()[0][1] <= o.most_common()[0][1] + e.most_common()[1][1] :\n maxevencnt = e.most_common()[1][1]\n\nprint(len(odd)-maxoddcnt+len(even)-maxevencnt)\n', "n = input()\nn = n.replace('9','x')\nn = n.replace('1','9')\nn = n.replace('x','1')\nprint(n)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s383831195', 's510362920', 's244273401']
[3316.0, 3316.0, 2940.0]
[20.0, 20.0, 17.0]
[1095, 867, 89]
p03242
u216631280
2,000
1,048,576
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.
["n = input()\nprint(n.replace('1', '9').replace('9', '1'))", "n = input()\nprint(n.replace('9', 'temp').replace('1', '9').replace('temp', '1'))"]
['Wrong Answer', 'Accepted']
['s756717905', 's858793472']
[2940.0, 2940.0]
[17.0, 17.0]
[56, 80]
p03242
u218494572
2,000
1,048,576
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.
['import collections\n\n\nn = int(input())\nv = list(map(int, input().split()))\nodd = []\neven = []\nfor i in range(int(n/2)):\n even.append(v[2*i])\n odd.append(v[2*i + 1])\nevencount = collections.Counter(even)\noddcount = collections.Counter(odd)\n\n\ndef hoge(i):\n global ans\n try:\n if evencount.most_common()[i][0] == oddcount.most_common()[i][0]:\n\n if evencount.most_common()[i][1] > oddcount.most_common()[i][1]:\n ans = n - evencount.most_common()[i][1] - oddcount.most_common()[i][1]\n print(ans)\n elif evencount.most_common()[i][1] < oddcount.most_common()[i][1]:\n ans = n - evencount.most_common()[i][1] - oddcount.most_common()[i][1]\n print(ans)\n else:\n if len(evencount) == 1:\n ans = int(n/2)\n print(ans)\n else:\n hoge(i+1)\n\n else: \n ans = n - evencount.most_common()[i][1] - oddcount.most_common()[i][1]\n print(ans)\n except IndexError: \n ans = n - evencount.most_common()[0][1] - oddcount.most_common()[1][1]\n print(ans) \n\n\nhoge(0)', 'import numpy as np\n\nn = int(input())\n\nans = 0\n\nif n % 10 == 9:\n ans += 1\nelse:\n ans += 9\nn = int(n/10)\n\n\nif n % 10 == 9:\n ans += 10\nelse:\n ans += 90\nn = int(n/10)\nif n % 10 == 9:\n ans += 100\nelse:\n ans += 900\n\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s982419847', 's136145136']
[3316.0, 21268.0]
[21.0, 1530.0]
[1174, 239]
p03242
u222801992
2,000
1,048,576
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.
['n=input()\nfor i in range(3):\n if n[i]=="1":\n n[i]="9"\n else:\n n[i]="1"\nprint(n)', 'n=input()\nfor i in range(3):\n if n[i]==1:\n n[i]=9\n else:\n n[i]=1\nprint("n")', 'n=list(input())\nfor i in range(3):\n if n[i]==1:\n n[i]=9\n else:\n n[i]=1\ns=""\nfor i in range(3):\n s+=n[i]\nprint(int(s))', 'n=list(input())\nfor i in range(3):\n if n[i]==1:\n n[i]=9\n else:\n n[i]=1\ns=""\nfor i in range(3):\n s+="n[i]"\nprint(int(s))', 'n=input()\nfor i in range(3):\n if n[i]==1:\n n[i]=9\n else:\n n[i]=1\nprint(n)', 'n=list(input())\nfor i in range(3):\n if n[i]=="1":\n n[i]=9\n else:\n n[i]=1\ns=""\nfor i in range(3):\n s+="n[i]"\nprint(int(s))', 'n=input()\nfor i in range(3):\n if n[i]=="1":\n n[i]=9\n else:\n n[i]=1\nprint(n)', 'n=list(input())\nfor i in range(3):\n if n[i]==1:\n n[i]=9\n else:\n n[i]=1\ns=""\nfor i in range(3):\n s+=n[i]\nprint(s)', 'n=list(input())\nfor i in range(3):\n if n[i]=="1":\n n[i]=9\n else:\n n[i]=1\ns=" "\nfor i in range(3):\n s+="n[i]"\nprint(int(s))', 'n=input()\nans=""\nfor i in range(3):\n if n[i]=="1":\n ans+="9"\n else:\n ans+="1"\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s187520788', 's208403255', 's312725325', 's361214169', 's697953524', 's698220591', 's842330851', 's849144053', 's944423161', 's056883935']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[87, 83, 126, 128, 81, 130, 83, 121, 131, 96]
p03242
u223646582
2,000
1,048,576
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.
["n = input()\nn.replace('1', 'a').replace('9', 'b').replace('a', '9').replace('b', '1')\nprint(n)", "n = input()\n\nprint(n.replace('1', 'a').replace('9', 'b').replace('a', '9').replace('b', '1'))"]
['Wrong Answer', 'Accepted']
['s957483128', 's860176824']
[2940.0, 2940.0]
[17.0, 17.0]
[94, 93]
p03242
u230621983
2,000
1,048,576
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.
["n = input()\nans = 0\nfor l in n:\n if l == '1':\n ans += 9\n else:\n ans += 1\nprint(ans)", "n = input()\nans =''\nfor l in n:\n if l == '1':\n ans += '9'\n else:\n ans += '1'\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s843697568', 's960564195']
[2940.0, 2940.0]
[17.0, 17.0]
[91, 95]
p03242
u231261695
2,000
1,048,576
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.
["n = input()\nans = []\nfor i in n:\n if i == '1':\n ans.append('9')\n elif i == '9':\n ans.append('1')\n else:\n ans.append(i)\nprint(ans)", "n = input()\nans = []\nfor i in n:\n if i == '1':\n ans.append('9')\n elif i == '9':\n ans.append('1')\n else:\n ans.append(i)\nprint(''.join(ans))"]
['Wrong Answer', 'Accepted']
['s642757761', 's586192673']
[3060.0, 2940.0]
[17.0, 17.0]
[159, 168]
p03242
u235066013
2,000
1,048,576
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.
["n=input()\nprint(n.replace('1','9').replace('9','1'))", "n=input()\nprint(n.replace('1','X').replace('9','1').replace('X','9'))"]
['Wrong Answer', 'Accepted']
['s741833630', 's193061619']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 69]
p03242
u243159381
2,000
1,048,576
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.
["n=input()\nresult=''\nfor i in n:\n if i=='1':\n result+='9'\n else:\n result+='1'\n print(result)", "n=input()\nresult=''\nfor i in n:\n if i==1:\n result+=9\n else:\n result+=1\n print(result)", "n=input()\nresult=''\nfor i in n:\n if i=='1':\n result+=9\n else:\n result+=1\n print(result)", "n=input()\nresult=''\nfor i in n:\n if i=='1':\n result.append('9')\n else:\n result.append('1')\n print(result)", "n=input()\nresult=''\nfor i in n:\n if i==1:\n result+=9\n else:\n result+=1\nprint(result)", "n=input()\nresult=''\nfor i in n:\n if i=='1':\n result+='9'\n else:\n result+='1'\nprint(result)"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s085762650', 's477926428', 's500899853', 's503285781', 's949820298', 's418307160']
[8988.0, 8976.0, 9040.0, 8948.0, 9008.0, 9100.0]
[23.0, 23.0, 25.0, 28.0, 21.0, 25.0]
[114, 108, 110, 128, 104, 110]
p03242
u244459371
2,000
1,048,576
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.
['n = int(input())\nfor i in range(1,10):\n if 111 * i >= n:\n print(111*i)\n exit(0)', "for i in input():\n if i == '9':\n print('1',end='')\n else:\n print('9',end='')\nprint()"]
['Wrong Answer', 'Accepted']
['s718131501', 's708390037']
[2940.0, 2940.0]
[17.0, 18.0]
[96, 104]
p03242
u244836567
2,000
1,048,576
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.
['a=int(input())\nif (a//100)%9==0:\n b=100\nelse:\n b=900\nif ((a-(a//100)*100)//10)%9==0:\n c=10\nelse:\n c=90\nif (a-(a//100)*100-(a//10)*10)%9==0:\n d=1\nelse:\n d=9\nprint(b+c+d)', 'a=input()\nif a[0]=="1":\n a[0]=="9"\nelif a[0]=="9":\n a[0]=="1"\nif a[1]=="1":\n a[1]=="9"\nelif a[1]=="9":\n a[1]=="1"\nif a[2]=="1":\n a[2]=="9"\nelif a[2]=="9":\n a[2]=="1"\nprint(a)', 'a=input()\nprint(a.replace(1,8),replace(9,1),replace(8,9))', 'a=input()\na.replace(9,8)\na.replace(1,9)\na.replace(8,1)\nprint(a)', 'a=input()\nif a[0]=="1":\n a[0]="9"\nif a[0]=="9":\n a[0]=="1"\nif a[1]=="1":\n a[1]=="9"\nif a[1]=="9":\n a[1]=="1"\nif a[2]=="1":\n a[2]=="9"\nif a[2]=="9":\n a[2]=="1"\nprint(a)', 'a=input()\nif a[0]=="1":\n a[0]="9":\nelse:\n a[0]=="1"\nif a[1]=="1":\n a[1]="9"\nelse:\n a[1]="1"\nif a[2]=="1":\n a[2]="9"\nelse:\n a[2]="1"\nprint(a)', 'a=input()\na.replace(1,8)\na.replace(9,1)\na.replace(8,9)\nprint(a)', 'a=input()\nprint(a.replace(1,8).replace(9,1).replace(8,9))', 'a=int(input())\nif (a//100)%9==0:\n b=100\nelse:\n b=900\nif ((a-(a//100)*100)//10)%9==0:\n c=10\nelse:\n c=90\nif (a-(a//10)*10)%9==0:\n d=1\nelse:\n d=9\nprint(b+c+d)']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s045549781', 's240491902', 's263929113', 's373437303', 's481855407', 's490621640', 's547385006', 's846535112', 's685992517']
[9044.0, 8984.0, 8976.0, 9020.0, 9008.0, 8900.0, 8916.0, 9028.0, 8952.0]
[28.0, 26.0, 20.0, 25.0, 30.0, 19.0, 25.0, 24.0, 29.0]
[174, 180, 57, 63, 173, 146, 63, 57, 161]
p03242
u248670337
2,000
1,048,576
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.
['print(input().replace("9","1"))', 'print(input().replace("9","a").replace("1","9").replace("a","1"))']
['Wrong Answer', 'Accepted']
['s214158611', 's852285056']
[2940.0, 2940.0]
[22.0, 17.0]
[31, 65]
p03242
u249727132
2,000
1,048,576
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.
['n = int(input())\ni = int(n / 111)\nif n % 111 != 0:\n i += 1\nprint(111 * i)', 'N = str(input())\nl = list(N)\na_l = []\nfor i in range(len(N)):\n a_l.append(10 - int(l[i]))\nans = "".join([str(i) for i in a_l])\nprint(ans)']
['Wrong Answer', 'Accepted']
['s979282886', 's137077395']
[2940.0, 2940.0]
[18.0, 18.0]
[76, 140]
p03242
u250944591
2,000
1,048,576
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.
["a=input()\nprint(a.replace('1','9').replace('9','1'))", "a=input()\nprint(a.replace('1','x').replace('9','1').replace('x','9'))"]
['Wrong Answer', 'Accepted']
['s715312623', 's890265988']
[8980.0, 9020.0]
[28.0, 27.0]
[52, 69]
p03242
u252828980
2,000
1,048,576
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.
['s = input()\na = ""\nfor i in range(len(s)):\n if i == 1:\n a += 9\n elif i == 9:\n a += 1\nprint(a)', 's = input()\n\na = ""\nfor i in range(len(s)):\n if s[i] == str(1):\n a += str(9)\n elif s[i] == str(9):\n a += str(1)\nprint(a)']
['Runtime Error', 'Accepted']
['s510530740', 's002907920']
[2940.0, 2940.0]
[17.0, 17.0]
[101, 128]
p03242
u252964975
2,000
1,048,576
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.
["S=str(input())\nif S[0]=='1':S[0]='9'\nif S[0]=='9':S[0]='1'\nif S[1]=='1':S[1]='9'\nif S[1]=='9':S[1]='1'\nif S[2]=='1':S[2]='9'\nif S[2]=='9':S[2]='1'\nprint(S)", 'S=str(input())\nif S[0]==\'1\':s[0]=\'9\'\nif S[0]==\'9\':s[0]=\'1\'\nif S[1]==\'1\':s[1]=\'9\'\nif S[1]=="9":s[1]="1"\nif S[2]==\'1\':s[2]=\'9\'\nif S[2]==\'9\':s[2]=\'1\'\nprint(s)\n', 'S = str(input())\nprint( 100*(10-int(S[0])) + 10*(10-int(S[1])) + 1*(10-int(S[2])) )']
['Runtime Error', 'Runtime Error', 'Accepted']
['s449851549', 's621700781', 's555234901']
[3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[155, 156, 83]
p03242
u255001744
2,000
1,048,576
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.
["input().replace('9','1').replace('1','9')", "print(input().replace('9','1').replace('1','9'))\n", "s = input()\nres = ''\nfor c in s:\n if(c=='1'):\n res +='9'\n elif(c=='9'):\n res +='1'\n else:\n res += c", "s = input()\nres = ''\nfor c in s:\n if(c=='1'):\n res +='9'\n elif(c=='9'):\n res +='1'\n else:\n res += c\nprint(res)"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s648087936', 's688494289', 's746767295', 's468129944']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0, 18.0]
[41, 49, 111, 122]
p03242
u256833330
2,000
1,048,576
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.
["n=input()\nprint(n.replace('1','x').replace('9','1').replace('x','1'))\n", "n=input()\nprint(n.replace('1','x').replace('9','1').replace('x','9'))\n"]
['Wrong Answer', 'Accepted']
['s697002829', 's460782454']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 70]
p03242
u259703270
2,000
1,048,576
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.
["n=int(input())\n\nl=list(map(int,input().split()))\nl1=[]\nl2=[]\n\nfor i in range(n):\n\tif i%2==0:\n\t\tl1.append(l[i])\n\telse:\n\t\tl2.append(l[i])\n\ncount1=[]\ncount2=[]\n\nfor i in range(100000):\n\tcount1.append(0)\n\tcount2.append(0)\n\nfor i in range(n//2):\n\tcount1[l1[i]-1]+=1\n\tcount2[l2[i]-1]+=1\n\nmax1=0\nmax2=0\n\nmaxc1=[]\nmaxc2=[]\n\nfor i in range(100000):\n\tif count1[i]>=max1:\n\t\tmax1=count1[i]\n\t\tmaxc1.append(i)\n\n\tif count2[i]>=max2:\n\t\tmax2=count2[i]\n\t\tmaxc2.append(i)\n\n# print('maxc1',maxc1)\n# print('maxc2',maxc2)\n# print('max1',max1)\n# print('max2',max2)\n\n# if len(maxc2)+len(maxc1)>2 or (len(maxc2)+len(maxc1)==2 and maxc1[0]!=maxc2[0]):\n# \tfinal=max1+max2\n\n# else :\nmax3=0\nmax4=0\nfor i in range(100000):\n\tif i!=maxc1[0]:\n\t\tif count1[i]>=max3:\n\t\t\tmax3=count1[i]\n\t\t\tmaxc1.append(i)\n\n\tif i!=maxc2[0]:\n\t\tif count2[i]>=max4:\n\t\t\tmax4=count2[i]\n\t\t\tmaxc2.append(i)\n\nfinal=max(max1+max4,max2+max3)\n\nprint(n-final)\n", "n=input()\nl=[]\n\nfor i in n:\n\tif i=='9':\n\t\tl.append('1')\n\telif i=='1':\n\t\tl.append('9')\n\telse:\n\t\tl.append(i)\n\nprint(''.join(l))\n\n"]
['Runtime Error', 'Accepted']
['s582657330', 's227778135']
[3064.0, 2940.0]
[17.0, 17.0]
[894, 127]
p03242
u266171694
2,000
1,048,576
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.
["n = str(input())\nprint(n.replace('1', 'a').replace('9', '1').replace('a', '1'))\n", "n = input()\nprint(n.replace('1', 'a').replace('9', '1').replace('a', '1'))\n", "n = input()\nprint(n.replace('1', 'a').replace('9', '1').replace('a', '9'))\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s735540253', 's876674589', 's457105522']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[80, 75, 75]
p03242
u266874640
2,000
1,048,576
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.
['n = int(input())\nfor i in n:\n if i == 1:\n i = 9\n elif i == 9:\n i = 1\nprint(n)\n', 'n = int(input())\nprint(1110 - n)\n']
['Runtime Error', 'Accepted']
['s049531454', 's084555834']
[2940.0, 2940.0]
[17.0, 17.0]
[98, 33]
p03242
u277556971
2,000
1,048,576
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.
["text = input()\nstr = ['1' if c == '9' else '1' for c in text]\nprint(''.join(str))", "text = input()\nstr = ['1' if c == '9' else '9' for c in text]\nprint(''.join(str))"]
['Wrong Answer', 'Accepted']
['s147358372', 's261444972']
[2940.0, 2940.0]
[18.0, 17.0]
[81, 81]
p03242
u286955577
2,000
1,048,576
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.
['print(1110-input())', 'print(1110-int(input()))']
['Runtime Error', 'Accepted']
['s950131167', 's195803906']
[2940.0, 2940.0]
[17.0, 17.0]
[19, 24]
p03242
u287431190
2,000
1,048,576
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.
["n = input()\nn.replace('1','x')\nn.replace('9','1')\nn.replace('x','9')\nprint(n)", "n = input()\na = n.replace('1','x')\nb = a.replace('9','1')\nc = b.replace('x','9')\nprint(c)"]
['Wrong Answer', 'Accepted']
['s210170515', 's442720606']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 89]
p03242
u294385082
2,000
1,048,576
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.
['a =input()\nprint(a.replace("1","x"),replace("9","1").replace("x","9"))', 'a = int(input())\nprint(a.replace(1,x),replace(9,1).replace(x,9))', 'a = int(input())\nprint(a.replace(1,x).replace(9,1).replace(x,9))', 'a = list(input())\nb = []\nfor i in a:\n if i = "1":\n b.append("9")\n else:\n b.append("1")\nprint("".join(b))', 'a = list(input())\nb = []\nfor i in a:\n if i == "1":\n b.append("9")\n else:\n b.append("1")\nprint("".join(b))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s475342115', 's554511103', 's906692193', 's920201996', 's978268288']
[2940.0, 2940.0, 2940.0, 2940.0, 3064.0]
[18.0, 17.0, 17.0, 17.0, 17.0]
[70, 64, 64, 112, 113]
p03242
u296518383
2,000
1,048,576
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.
['print(int(int(input())/111)*111)', 'print(999+111-int(input()))']
['Wrong Answer', 'Accepted']
['s744145348', 's739955678']
[2940.0, 2940.0]
[17.0, 17.0]
[32, 27]
p03242
u297046168
2,000
1,048,576
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.
['N = int(input())\nA = []\nA.append(N//100)\nA.append(N//10-A)\nA.append(N-A-B)\nfor i in range(3):\n if A[i]==1:\n A[i]=9\n if A[i]==9:\n A[i]=1\nprint(A[0]*100+A[1]*10+A[2])', 'N = int(input())\nA = []\na = N//100\nb = N//10-a*10\nc = N - a*100 - b*10\nA.append(a)\nA.append(b)\nA.append(c)\nfor i in range(3):\n if A[i]==1:\n A[i]=9\n elif A[i]==9:\n A[i]=1\nprint(A[0]*100+A[1]*10+A[2])']
['Runtime Error', 'Accepted']
['s342612222', 's004545923']
[3060.0, 3064.0]
[17.0, 17.0]
[184, 218]
p03242
u297109012
2,000
1,048,576
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.
['from collections import Counter\n\n\ndef solve(V):\n n = len(V)\n odd = Counter()\n even = Counter()\n total = Counter()\n for i, c in enumerate(V):\n total.update([c])\n if i % 2 == 0:\n even.update([c])\n else:\n odd.update([c])\n\n total_max = total.most_common()[0]\n if total_max[1] == len(V):\n return len(V) / 2\n\n even_maxs = even.most_common(2)\n odd_maxs = odd.most_common(2)\n if len(odd_maxs) > 1:\n odd_max, odd_2nd_max = odd_maxs[0], odd_maxs[1]\n else:\n odd_max, odd_2nd_max = odd_maxs[0], None\n\n if len(even_maxs) > 1:\n even_max, even_2nd_max = even_maxs[0], even_maxs[1]\n else:\n even_max, even_2nd_max = even_maxs[0], None\n\n ans = 0\n if odd_max[0] != even_max[0]:\n odd_max = odd_max[0]\n even_max = even_max[0]\n elif odd_2nd_max != None and even_2nd_max == None:\n even_max = even_max[0]\n odd_max = odd_2nd_max[0]\n elif odd_2nd_max == None and even_2nd_max != None:\n odd_max = odd_max[0]\n even_max = even_2nd_max[0]\n else: # odd_2nd_max != None and even_2nd_max != None:\n return n - max(even_maxs[0][1] + odd_maxs[1][1], \n even_maxs[1][1] + odd_maxs[0][1])\n\n for key, count in even.items():\n if key != even_max:\n ans += count\n for key, count in odd.items():\n if key != odd_max:\n ans += count\n return ans\n\n\nif __name__ == "__main__":\n n = int(input())\n l = input()\n print(solve(l.split(" ")))\n', 'def solve(N):\n return l.replace("1", "8").replace("9", "1").replace("8", "9")\n\nif __name__ == "__main__":\n l = input()\n print(solve(l))\n']
['Runtime Error', 'Accepted']
['s514773341', 's504273413']
[3316.0, 2940.0]
[21.0, 17.0]
[1543, 145]
p03242
u302292660
2,000
1,048,576
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.
['s = input()\nfor i in range(3):\n if s[i] =="1":\n s[i] = "9"\n else:\n s[i] = "1"\nprint(s)', 's = input()\ns.replace("1","a").replace("9","1").replace("a","1")\nprint(s)', 's = input()\ns =s.replace("1","a").replace("9","1").replace("a","9")\nprint(s)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s560652064', 's997059759', 's232824479']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[94, 73, 76]
p03242
u304146411
2,000
1,048,576
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.
["from collections import Counter\n\nn = int(input())\nv = list(map(int, input().split(' ')))\n\nv1 = v[::2]\nv2 = v[1::2]\n\ncounter = Counter(v1)\nx1 = counter.most_common()[0][0]\ncounter = Counter(v2)\nx2 = counter.most_common()[0][0]\n\nx1_count = v1.count(x1)\nx2_count = v2.count(x2)\n\nn = n//2\nans = (n - x1_count) + (n - x2_count)\nprint(ans)", "s = list(input())\nans = ''\nfor i in range(len(s)):\n if s[i] == '1':\n ans += '9'\n elif s[i] == '9':\n ans += '1'\n else:\n ans += s[i]\nprint(ans)\n"]
['Runtime Error', 'Accepted']
['s401686584', 's096265493']
[3316.0, 2940.0]
[20.0, 17.0]
[333, 172]
p03242
u313498252
2,000
1,048,576
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.
["a = input()\nfor i in range(len(a)):\n if a[i] == '1':\n a[i] = '9'\n elif a[i] == '9':\n a[i] = '1'\nprint(a)\n", "a = input()\nfor i in range(len(a)):\n if a[i] == '1':\n a = a[:i] + '9' + a[i+1:]\n elif a[i] == '9':\n a = a[:i] + '1' + a[i+1:]\nprint(a)\n"]
['Runtime Error', 'Accepted']
['s039062942', 's989991250']
[8972.0, 8888.0]
[24.0, 27.0]
[125, 155]
p03242
u316603606
2,000
1,048,576
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.
["x = input ()\nx = x.replace('1', '9')\nx = x.replace('9', '1')\nprint (x)", "x = input ()\nx = x.replace('1', 'a')\nx = x.replace('9', '1')\nx = x.replace('a', '9')\nprint (x)"]
['Wrong Answer', 'Accepted']
['s030371244', 's471845073']
[8972.0, 9080.0]
[27.0, 26.0]
[70, 94]
p03242
u319805917
2,000
1,048,576
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.
['a,b,c=map(int,input().split())\nif a*10+b>b*10+c:\n print(a*10+b+c)\nelse:\n print(b*10+c+a)', 'a=input()\nb=a.replace((1,9)and(9,1))\nprint(b)', 'a=input()\nb=a.replace(1,9)\nc=b.replace(9,1)\nprint(b)', 'N=int(input())\na=N%111\nif a==0:\n print(N)\nelse:\n b=N//111\n c=b+1\n print(c*111)', 'a=input()\nb=1110-a\nprint(b)', 'a=input()\nb=a.translate("1":"9","9":"1")\nprint(b)', 'a=str(input())\nb=a.replace(1,9)\nc=b.replace(9,1)\nprint(b)', 'a=input()\nb=a.replace("1","2")\nc=b.replace("9","8")\nd=c.replace("2","9")\ne=d.replace("8","1")\nprint(e)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s218071806', 's363643568', 's374601135', 's412391948', 's670956927', 's757073540', 's823937841', 's203241662']
[2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[90, 45, 52, 83, 27, 49, 57, 102]
p03242
u319818856
2,000
1,048,576
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.
["s = input()\nt = ''\nfor c in s:\n if c = '1':\n t += '9'\n elif c = '9':\n t += '1'\nprint(t)\n", 'if __name__ == "__main__":\n n = input()\n\n t = \'\'\n for c in n:\n if c == \'1\':\n t += \'9\'\n elif c == \'9\':\n t += \'1\'\n\n print(t)\n']
['Runtime Error', 'Accepted']
['s556279715', 's026258303']
[2940.0, 2940.0]
[18.0, 18.0]
[108, 171]
p03242
u323045245
2,000
1,048,576
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.
['n=list(input())\n\nfor i in range(3):\n if n[i] == 1:\n n[i] = 9\n elif n[i]==9:\n n[i] = 1\nprint(*n,sep="")', 'n=list(input())\n\nfor i in range(3):\n if n[i] == "1":\n n[i] = "9"\n elif n[i]=="9":\n n[i] = "1"\nprint(*n,sep="")']
['Wrong Answer', 'Accepted']
['s796124543', 's811121977']
[2940.0, 2940.0]
[17.0, 17.0]
[122, 130]
p03242
u325119213
2,000
1,048,576
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.
['n = input()\n\nprint(n[::-1])', "n = input()\n\nprint('{}{}{}'.format(n[2],n[1],n[0]))\n", "n = input()\n\nmapping_table = str.maketrans({'1': '9', '9': '1'})\n\nprint(n.translate(mapping_table))\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s379038340', 's733533367', 's180722751']
[3064.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[27, 52, 100]
p03242
u325227960
2,000
1,048,576
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.
['n=int(input())\nV=list(map(int,input().split()))\n\nA=[[0,i] for i in range(10**5+3)]\nB=[[0,i] for i in range(10**5+3)]\n\nfor i in range(0,n,2):\n A[V[i]][0]+=1\nfor i in range(1,n,2):\n B[V[i]][0]+=1\n\nA.sort(reverse=1)\nB.sort(reverse=1)\n\n#print(A[:10])\n#print(B[:10])\n\nMa=[]\nMb=[]\n\nma=A[0][0]\nmb=B[0][0]\ni=0\nj=0\nwhile A[i][0]==ma :\n Ma.append(A[i][1])\n i+=1\n\nwhile B[j][0]==mb :\n Mb.append(B[j][1])\n j+=1\n\nif Ma==Mb :\n print(min(n-ma-B[j][0],n-mb-A[i][0]))\nelse :\n print(n-ma-mb)\n', 'n=input()\n\nans=""\nfor i in range(len(n)):\n if n[i]=="1" :\n ans+="9"\n elif n[i]=="9" :\n ans+="1"\n\nprint(ans)\n\n']
['Runtime Error', 'Accepted']
['s687882104', 's950556670']
[3064.0, 2940.0]
[17.0, 19.0]
[498, 117]
p03242
u328510800
2,000
1,048,576
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.
['def f(c):\n if c == "1":\n return "9"\n elif c == "9":\n return 1\n else:\n return c\n \nprint(\'\'.join(list(map(f, input()))))', 'f = lambda c : "1" if c == "9" else "9"\n \nprint(\'\'.join(list(map(f, input()))))']
['Runtime Error', 'Accepted']
['s202378691', 's232802679']
[9012.0, 9072.0]
[29.0, 25.0]
[131, 80]
p03242
u329058683
2,000
1,048,576
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.
['import collections\nN=int(input())\nL=list(map(int,input().split()))\nE=[i for i in L[::2]]\nO=[i for i in L[1::2]]\ne = collections.Counter(E).most_common()\no = collections.Counter(O).most_common()\nif e[0][0] != o[0][0]:\n print(N - e[0][1] - o[0][1])\nelse:\n if len(e) == 1 or len(o) == 1:\n print(N // 2)\n else:\n a = N - e[1][1] - o[0][1]\n b = N - e[0][1] - o[1][1]\n print(min(a, b))', 'import collections\nN=int(input())\nL=list(map(int,input().split()))\nE=[i for i in L[::2]]\nO=[i for i in L[1::2]]\ne = collections.Counter(E)\no = collections.Counter(O)\ne1=e.most_common()[0][1]\ne2=e.most_common()[-1][1]\no1=o.most_common()[0][1]\no2=o.most_common()[-1][1]\n\nAns=[N-e1-o2,N-e2-o1,N-e2-o2,N-o1-e1]\n\nif len(set(L))==1:\n print(N//2)\nelse:\n print(min(Ans))', 'print(1110-int(input()))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s075864620', 's661807056', 's880288575']
[3316.0, 3316.0, 2940.0]
[20.0, 20.0, 17.0]
[415, 364, 24]
p03242
u331036636
2,000
1,048,576
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.
['n=int(input())\nc=111\nwhile True:\n if n<=c:\n print(c)\n break\n c+=111', 'for i in input():\n print([1,9][i=="1"],end="")\nprint()']
['Wrong Answer', 'Accepted']
['s209021278', 's249028569']
[2940.0, 2940.0]
[17.0, 17.0]
[87, 57]
p03242
u331464808
2,000
1,048,576
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.
["a =list(input())\nfor v in a:\n if v =='9':\n v=='1'\n elif v =='1':\n v =='9'\nprint(a)", "a =list(input())\naa=''\nfor i in range(a):\n if a[i]=='9':\n aa +='1'\n elif a[i]=='1':\n aa +='9'\nprint(aa)", "a =input()\naa =a.replace('9','1').replace('1','9')\nprint(aa)", "a =input()\naa=''\nfor i in range(a):\n if a[i]=='9':\n aa +='1'\n elif a[i]=='1':\n aa +='9'\nprint(aa)", "a =list(input())\nfor v in a:\n if v =='9':\n v=='1'\n elif v =='1':\n v =='9'\nprint(str(a))", "a =input()\naa =a.replace(('9','1'),('1','9'))\nprint(aa)", "s = input()\na=''\nfor i in range(len(s)):\n if s[i]=='9':\n a += '1'\n elif s[i]=='1':\n a += '9'\n else:\n a += s[i]\nprint(a)"]
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s343478979', 's416332933', 's504744861', 's650852139', 's766069831', 's965773422', 's709421258']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[90, 111, 60, 105, 95, 55, 131]
p03242
u333731247
2,000
1,048,576
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.
['n=int(input())\n\nN=[0]*3\nm=[0]*3\n\nN[0]=int(n/10)\nN[1]=int(N[0]/10)\nN[2]=int(N[1]/10)\n\nm[0]=int(n%10)\nm[1]=int(N[0]%10)\nm[2]=int(N[1]%10)\n\nfor i in range(0,3):\n if m[i]==1:\n m[i]=9\n elif [i]==9:\n m[i]=1\nprint(N[0],N[1],N[2]) \nprint(m[0],m[1],m[2])\nprint(int(m[2]*100+m[1]*10+m[0]))', 'n=int(input())\n\nN=[0]*3\nm=[0]*3\n\nN[0]=int(n/10)\nN[1]=int(N[0]/10)\nN[2]=int(N[1]/10)\n\nm[0]=int(n%10)\nm[1]=int(N[0]%10)\nm[2]=int(N[1]%10)\n\nfor i in range(0,3):\n if m[i]==1:\n m[i]=9\n elif m[i]==9:\n m[i]=1\n\nprint(int(m[2]*100+m[1]*10+m[0]))']
['Wrong Answer', 'Accepted']
['s775352403', 's410984898']
[3064.0, 3064.0]
[17.0, 17.0]
[306, 256]
p03242
u339550873
2,000
1,048,576
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.
['#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nn = ls[input()]\nnans =[]\nfor i in range (3):\n if n[i] == "1":\n nans.append("9")\n else:\n nans.append("1")\nprint("".join(nans))\n \n', '#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nn = ls(input())\nnans =[]\nfor i in range (3):\n if n[i] == "1":\n nans.append("9")\n else:\n nans.append("1")\nprint("".join(nans))\n \n', '#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\nn = list(input())\nnans =[]\nfor i in range (3):\n if n[i] == "1":\n nans.append("9")\n else:\n nans.append("1")\nprint("".join(nans))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s199369986', 's300272184', 's958115524']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[192, 192, 197]
p03242
u340947941
2,000
1,048,576
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.
['\n\nn=list(map(int,list(input())))\nno=[] \n\nfor ni in n:\n no.append(10-ni)\n\nprint("".join(no))', '\n\nn=list(map(int,list(input())))\nno=[] \n\nfor ni in n:\n no.append(str(10-ni))\n\nprint("".join(no))']
['Runtime Error', 'Accepted']
['s977949807', 's137320254']
[2940.0, 2940.0]
[17.0, 17.0]
[123, 128]
p03242
u346194435
2,000
1,048,576
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.
["n = input()\n\nresult = ''\nfor x in n:\n if n == '1':\n result += '9'\n else:\n result += '1'\n \nprint(result)", "n = input()\n\nresult = ''\nfor x in n:\n if x == '1':\n result += '9'\n else:\n result += '1'\n \nprint(result)"]
['Wrong Answer', 'Accepted']
['s046740483', 's771423257']
[2940.0, 2940.0]
[18.0, 18.0]
[114, 126]
p03242
u350093546
2,000
1,048,576
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.
['n=input()\nn.replace(1,x)\nn.replace(9,1)\nprint(n.replace(x,9))', "n=input()\nn.replace('1','x')\nn.replace('9','1')\nprint(n.replace('x','9'))\n", "n=input()\nn=n.replace('1','x')\nn=n.replace('9','1')\nn=n.replace('x','9')\nprint(n)"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s221856519', 's626305299', 's404657892']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[61, 74, 81]
p03242
u352429976
2,000
1,048,576
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.
["n = input()\nans = []\nfor i in n:\n if i == '1':\n ans.append('9')\n elif i == '9':\n ans append('1')\n else:\n ans.append(i)\nprint(''.join(ans))", "n = input()\nans = []\nfor i in n:\n if i == '1':\n ans.append('9')\n elif i == '9':\n ans.append('1')\n else:\n ans.append(i)\nprint(''.join(ans))"]
['Runtime Error', 'Accepted']
['s197518180', 's711552026']
[2940.0, 2940.0]
[18.0, 17.0]
[168, 168]
p03242
u353652911
2,000
1,048,576
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.
['n=input()\nans=[]\nfor i in n:\n if i==1:\n ans.append(9)\n elif i==9:\n ans.append(1)\n else:\n ans.append(i)\nprint("".join(x for x in ans))', 'n=int(input())\nl=[111,222,333,444,555,666,777,888,999]\nans=[]\nfor i in range(9):\n if l[i]-n>=0:\n ans.append(i)\n \nprint(l[ans[0]])', 'n=input()\nans=[]\nfor i in n:\n if i==1:\n ans.append(9)\n elif i==9:\n ans.append(1)\n else:\n ans.append(i)\nprint(str(ans[0])+str(ans[1])+str(ans[2]))\n', 'n=int(input())\n\nprint(((n-1)//111+1)*111)', 'ans=["9" if x=="1" else "1" for x in input()]\nprint("".join(ans))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s555279317', 's822313409', 's837300759', 's842566368', 's563956903']
[2940.0, 3060.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 18.0, 17.0]
[163, 146, 176, 41, 65]
p03242
u357218223
2,000
1,048,576
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.
["# coding : UTF-8\n\nfrom sys import stdin\n\nN = stdin.readline().rstrip()\n\ndef main():\n if int(N) <= int(N[0]*len(N)):\n print(N[0]*len(N))\n else:\n print((str(int(N[0])+1))*len(N))\n\nif __name__ == '__main__':\n main()", '# coding : UTF-8\n\nfrom sys import stdin\n\nn = stdin.readline().rstrip()\n\ndef main():\n ans = ""\n \n for _ in range(len(n)):\n if n[_] == \'1\':\n ans = ans + \'9\'\n else:\n ans = ans + \'1\'\n \n print(ans)\n\nif __name__ == \'__main__\':\n main()']
['Wrong Answer', 'Accepted']
['s259094358', 's009799199']
[3060.0, 2940.0]
[17.0, 17.0]
[235, 282]
p03242
u357751375
2,000
1,048,576
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.
["n = input()\ni = 0\nfor number in n:\n if number == '1':\n m[i] = '9'\n i = i + 1\n elif number == '9':\n m[i] = '1'\n i = i + 1\n else:\n m[i] = n[i]\n i = i + 1\n\nprint(n)", "n = input()\nprint(s.translate(str.maketrans({'1':'9','9':'1'})))", "n = input()\ni = 0\nfor number in n:\n if number == '1':\n n[i] = '9'\n i = i + 1\n elif number == '9':\n n[i] = '1'\n i = i + 1\n else:\n i = i + 1\n\nprint(n)", "n = list(input())\ni = 0\nwhile i < 3:\n if n[i] == '1':\n n[i] == '9'\n i = i + 1\n else:\n n[i] == '1'\n i = i + 1\n\nprint(''.join(n))", "n = list(input())\ni = 0\n\nwhile i < 3:\n if n[i] == '1':\n n[i] = '9'\n i = i + 1\n else:\n n[i] = '1'\n i = i + 1\n\nprint(''.join(n))"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s223740332', 's399023927', 's563654678', 's611172766', 's717908860']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[212, 64, 192, 161, 160]
p03242
u360031743
2,000
1,048,576
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.
['n = input()\n\nprint(n.replace("1","9"))', "n = input()\n\nprint(n.translate(str.maketrans({'1':'9','9':'1'})))"]
['Wrong Answer', 'Accepted']
['s191406188', 's244138559']
[2940.0, 2940.0]
[17.0, 17.0]
[38, 65]
p03242
u360842608
2,000
1,048,576
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.
['\ndef answer(in0, in1):\n even = {}\n odd = {}\n\n list = in1.split(" ")\n\n for i in range(len(list)):\n n = list[i]\n if i % 2 == 0:\n odd[n] = odd.get(n, 0) + 1\n else:\n even[n] = even.get(n, 0) + 1\n\n odd = sorted(\n [{\'key\': k, \'value\': odd[k]} for k in odd],\n key=lambda x: (-x[\'value\'], int(x[\'key\'])))\n\n even = sorted(\n [{\'key\': k, \'value\': even[k]} for k in even],\n key=lambda x: (-x[\'value\'], int(x[\'key\'])))\n\n oddMax = odd[0]\n evenMax = even[0]\n\n #print(odd)\n #print(even)\n\n \n if oddMax[\'key\'] == evenMax[\'key\']:\n \n if len(even) == 1 and len(odd) == 1:\n return int(int(in0) / 2)\n\n if oddMax[\'value\'] > evenMax[\'value\']:\n evenMax = even[1]\n else:\n oddMax = odd[1]\n\n oddCount = 0\n evenCount = 0\n\n for v in odd:\n if v[\'key\'] != oddMax[\'key\']:\n oddCount += v[\'value\']\n\n for v in even:\n if v[\'key\'] != evenMax[\'key\']:\n evenCount += v[\'value\']\n\n return oddCount + evenCount\n\nprint(answer(input(), input()))\n', "def answer(in0):\n\n result = ''\n\n for ch in str(in0):\n if ch == '9':\n result += '1'\n elif ch == '1':\n result += '9'\n\n return result\n\n\nprint(answer(input()))"]
['Runtime Error', 'Accepted']
['s026408739', 's454048195']
[3064.0, 2940.0]
[18.0, 17.0]
[1238, 200]
p03242
u363082601
2,000
1,048,576
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.
["n = input()\nn.replace('2','9')\n ", "n = input()\nfor i in range(len(n)):\n if n[i] == '1':\n print('9', end = '')\n else:\n print('1', end = '' )\n\nprint('')"]
['Wrong Answer', 'Accepted']
['s698475608', 's011373781']
[2940.0, 2940.0]
[17.0, 18.0]
[33, 135]
p03242
u363992934
2,000
1,048,576
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.
['s = input()\nchanger = {"1":"9", "9":"1"}\nanswer = ""\nfor chr in s:\n answer = changer[chr] + answer\nprint(int(answer))', 's = input()\nchanger = {"1":"9", "9":"1"}\nanswer = ""\nfor chr in s:\n answer += changer[chr] #+ answer\nprint(int(answer))']
['Wrong Answer', 'Accepted']
['s378737296', 's074103364']
[2940.0, 2940.0]
[17.0, 17.0]
[118, 122]
p03242
u365156087
2,000
1,048,576
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.
["S = input()\nS.replace('1', 'x').replace('9', '1').replace('x', '9')\nprint(S)", 'n = input()\nprint(n.replace("1", "x").replace("9", "1").replace("x", "9"))']
['Wrong Answer', 'Accepted']
['s768697748', 's364291464']
[8984.0, 9072.0]
[25.0, 26.0]
[76, 74]
p03242
u366886346
2,000
1,048,576
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.
['n=int(input())\nans=0\na=n//100\nb=n//10-(a*10)\nc=a%10\nif a==1:\n ans+=900\nelse:\n ans+=100\nif b==1:\n ans+=90\nelse:\n ans+=10\nif c==1:\n ans+=9\nelse:\n ans+=1\nprint(ans)\n', 'n=int(input())\nans=0\na=n//100\nb=n//10-(a*10)\nc=n%10\nif a==1:\n ans+=900\nelse:\n ans+=100\nif b==1:\n ans+=90\nelse:\n ans+=10\nif c==1:\n ans+=9\nelse:\n ans+=1\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s855798244', 's858852200']
[2940.0, 2940.0]
[17.0, 17.0]
[180, 180]
p03242
u369142620
2,000
1,048,576
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.
['n = input()\n\nlst = []\nres = []\n\nwhile n > 0:\n lst.append(n%10)\n n //= 10\nlst.reverse()\n\nfor i in lst:\n if i == 1:\n res.append(9)\n elif i == 9:\n res.append(1)\n else:\n res.append(i)\n\nS = ""\n\nfor j in res:\n Str += str(j)\n\nprint(S)\n', '\nn = input()\n\nlst = []\nres = []\n\nwhile n > 0:\n lst.append(n%10)\n n //= 10\nlst.reverse()\n\nfor i in lst:\n if i == 1:\n res.append(9)\n elif i == 9:\n res.append(1)\n else:\n res.append(i)\n\nStr = ""\n\nfor j in res:\n Str += str(j)\n\nprint(Str)\n', "N = list(str(input()))\nif N[0] == '9':\n N[0] = '1'\nelse : \n N[0] = '9'\nif N[1]=='9':\n N[1] = '1'\nelse:\n N[1] = '9'\nif N[2] == '9':\n N[2] = '1'\nelse:\n N[2] = '9'\nprint(N[0]+N[1]+N[2])"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s384234972', 's596132342', 's185259419']
[3060.0, 3060.0, 3060.0]
[17.0, 18.0, 17.0]
[267, 272, 200]
p03242
u370429695
2,000
1,048,576
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.
['a = input()\nfor i in range(a):\n if a[i] == "1":\n a[i] = "9"\n else:\n a[i] = "1"\nprint(a)', 'a = input()\nfor i in range(a):\n if a[i] == 1:\n a[i] = 9\n else:\n a[i] = 1\nprint(a)', 'a = input()\nfor i in range(len(a)):\n if a[i] == "1":\n a[i] = "9"\n else:\n a[i] = "1"\nprint(a)', 'a = input()\nb= ""\nfor i in range(len(a)):\n if a[i] == "1":\n b += "9"\n else:\n b += "1"\nprint(b)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s380789592', 's391466012', 's406541619', 's525614875']
[2940.0, 3064.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[95, 89, 100, 102]
p03242
u370793182
2,000
1,048,576
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.
['n = list(input())\nfor i range(len(n)):\n n[i] = "1" if n[i]==9 else "9"\nans = \',\'.join(n)\nprint(ans)', 'n = list(input())\nfor i in range(len(n)):\n n[i] = "1" if n[i]=="9" else "9"\nans = \'\'.join(n)\nprint(ans)']
['Runtime Error', 'Accepted']
['s892384345', 's323012369']
[2940.0, 2940.0]
[18.0, 18.0]
[100, 104]
p03242
u371467115
2,000
1,048,576
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.
['a,b,c=map(int,input().split())\na=10-a\nb=10-b\nc=10-c\ns=[a,b,c]\nprint("".join(s))', 'print(1110-int(input()))']
['Runtime Error', 'Accepted']
['s540129773', 's439464843']
[2940.0, 2940.0]
[18.0, 17.0]
[79, 24]
p03242
u371530330
2,000
1,048,576
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.
["n = list(str(input()))\n\nfor i in range(3):\n if n[i] == 1:\n n[i]=9\n elif n[i] == 9:\n n[i]=1\nprint(''.join(n))", "n = list(input())\n\nfor i in n:\n if n[i] == 1:\n n[i]=9\n elif n[i] == 9:\n n[i]=1\nprint(''.join(n))", "n = list(str(input()))\n\nfor i in range(3):\n if n[i] == 1:\n n[i]=9\n elif n[i] == 9:\n n[i]=1\nprint(int(''.join(n)))", "n = map(int,input().split())\n\nfor i in n:\n if n[i] == 1:\n n[i]=9\n elif n[i] == 9:\n n[i]=1\nprint(''.join(n))", "n = input()\nans = 0\nfor i in range(3):\n if n[i] == '1':\n ans += 10**(2-i) * 9\n else:\n ans += 10**(2-i) * 1\nprint(ans)"]
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s171439037', 's265968504', 's320260583', 's339086055', 's210382532']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[116, 104, 121, 115, 125]
p03242
u373047809
2,000
1,048,576
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.
['from collections import*\nn, *v = map(int, open(0).read().split())\na, b = [Counter(v[i::2]).most_common() + [(0,0)] for i in (0,1)]\ns, x = a[0]\nt, y = b[0]\nprint(n - [x+y, max(x+b[1][1], y+a[1][1])][s==t])', 'print(1110 - int(input()))']
['Runtime Error', 'Accepted']
['s714229093', 's176540599']
[3440.0, 2940.0]
[21.0, 17.0]
[204, 26]
p03242
u374802266
2,000
1,048,576
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.
["a=input()\nb1,b2,b3=0,0,0\nif a[0]==9:\n b1='1'\nelse:\n b1='9'\nif a[1]==9:\n b2='1'\nelse:\n b2='9'\nif a[2]==9:\n b3='1'\nelse:\n b3='9'\nprint(b1+b2+b3)", "a=input()\nb1,b2,b3=0,0,0\nif a[0]=='9':\n b1='1'\nelse:\n b1='9'\nif a[1]=='9':\n b2='1'\nelse:\n b2='9'\nif a[2]=='9':\n b3='1'\nelse:\n b3='9'\nprint(b1+b2+b3)"]
['Wrong Answer', 'Accepted']
['s629130664', 's980644279']
[2940.0, 3060.0]
[17.0, 17.0]
[160, 166]
p03242
u374974389
2,000
1,048,576
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.
["n = list(input())\nfor i in range(3):\n if n[i] == '1':\n n[i] = '9'\n else:\n n[i] = '1'\n\n", "n = list(input())\nfor i in range(3):\n if n[i] == '1':\n n[i] = '9'\n else:\n n[i] = '1'\nprint(int(n[0] + n[1] + n[2]))\n"]
['Wrong Answer', 'Accepted']
['s376527942', 's530970225']
[2940.0, 2940.0]
[17.0, 17.0]
[106, 136]
p03242
u375616706
2,000
1,048,576
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.
['import collections\nn = (int)(input())\nl = list(map(int,input().split()))\na = l[::2]\nb=l[1::2]\n\na_c=collections.Counter(a).most_common()\nb_c=collections.Counter(b).most_common()\nif a_c[0][0]==b_c[0][0]:\n if a_c[0][1]==b_c[0][1]:\n print(n//2)\n elif a_c[0][1]>b_c[0][1]:\n if len(b_c)>1:\n print(n-a_c[0][1]-b_c[1][1])\n else:\n print(n-a_c[0][1])\n else:\n if len(a_c)>1:\n print(n-a_c[1][1]-b_c[0][1])\n else:\n print(n-b_c[0][1])\nelse:\n print(n-a_c[0][1]-b_c[0][1])\n', "s=str(input())\ndst=s.translate({\n ord('1'):'9',\n ord('9'):'1',\n })\nprint(dst)\n"]
['Runtime Error', 'Accepted']
['s543999942', 's022142141']
[3444.0, 2940.0]
[21.0, 17.0]
[548, 87]
p03242
u382431597
2,000
1,048,576
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.
['n=input()\n\nn.replace("9", "a")\nn.replace("1", "b")\nn.replace("a", "1")\nn.replace("b", "9")\n\nprint(n)', "n = input()\nprint(n.translate(str.maketrans({'1':'9', '9':'1'})))"]
['Wrong Answer', 'Accepted']
['s456553331', 's016446565']
[2940.0, 2940.0]
[18.0, 17.0]
[100, 65]
p03242
u384793271
2,000
1,048,576
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.
["n = input()\n\nans = ''\nfor i in n:\n ans += '1' if i == '1' else '9'\nprint(ans)", "n = input()\n\nans = ''\nfor i in n:\n ans += '1' if i == '9' else '9'\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s242708719', 's264772201']
[2940.0, 2940.0]
[18.0, 18.0]
[80, 80]
p03242
u385244248
2,000
1,048,576
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.
['n = list(input())\nfor i in range(len(n)):\n if n[i] == 1:\n n[i] = 9\n elif n[i] == 9:\n n[i] = 1\n if i == 0:\n s = str(n[i])\n else:\n s += str(n[i])\nprint(int(s))\n ', 'n = list(input())\nfor i in range(len(n)):\n if n[i] == "1":\n n[i] = "9"\n elif n[i] == "9":\n n[i] = "1"\n if i == 0:\n s = str(n[i])\n else:\n s = s+ str(n[i])\nprint(int(s))\n']
['Wrong Answer', 'Accepted']
['s589282119', 's566715531']
[2940.0, 2940.0]
[17.0, 17.0]
[206, 208]
p03242
u386819480
2,000
1,048,576
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.
["n = input()\nln = list(n)\n\nfor i in range(len(ln)):\n if ln[i] == '1':\n ln[i] = '9'\n elif ln[i] == '9':\n ln[i] = '1'\n \nn = ''.join(ln)\nprint(n = ''.join(ln))", "n = input()\nln = list(n)\n \nfor i in range(len(ln)):\n if ln[i] == '1':\n ln[i] = '9'\n elif ln[i] == '9':\n ln[i] = '1'\n \nn = ''.join(ln)\nprint(int(n))"]
['Runtime Error', 'Accepted']
['s549311255', 's346577573']
[2940.0, 2940.0]
[17.0, 17.0]
[182, 174]
p03242
u387834551
2,000
1,048,576
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.
["n=input()\n\nanswer=[]\nfor i in range(len(n)):\n if n[i]=='1':\n answer.append(9)\n else:\n answer.append(1)\n \nfinal_answer=0\nfor i in range(len(answer)):\n final_answer+=answer[-(i+1)]*pow(10,i)\n \nfinal_answer ", "n=input()\n\ndef change_1_9(n):\n answer=[]\n for i in range(len(n)):\n if n[i]=='1':\n answer.append(9)\n else:\n answer.append(1) \n\n final_answer=''\n for n in range(len(answer)):\n final_answer+=str(answer[n])\n \n return final_answer \n \nprint(int(change_1_9(n)))\n "]
['Wrong Answer', 'Accepted']
['s335336315', 's795920143']
[2940.0, 2940.0]
[17.0, 17.0]
[240, 321]
p03242
u390793752
2,000
1,048,576
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.
['def main():\n n = input()\n ans = \'\'\n for i in range(3):\n if(n[i]==9):\n ans = ans + \'1\'\n else:\n ans = ans + \'9\'\n print(ans)\n\n\nif __name__ == "__main__":\n main()', 'def main():\n n = input()\n ans = \'\'\n for i in range(3):\n if(n[i]==\'9\'):\n ans = ans + \'1\'\n else:\n ans = ans + \'9\'\n print(ans)\n\n\nif __name__ == "__main__":\n main()']
['Wrong Answer', 'Accepted']
['s191701874', 's541266146']
[2940.0, 2940.0]
[17.0, 17.0]
[209, 211]
p03242
u392423112
2,000
1,048,576
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.
['n = int(input())\n\na = 1110 - n\nprint(n)', 'n = int(input())\n\na = 1110 - n\nprint(a)']
['Wrong Answer', 'Accepted']
['s564597492', 's065965933']
[2940.0, 2940.0]
[17.0, 18.0]
[39, 39]
p03242
u393512980
2,000
1,048,576
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.
['y = int(input())\nfor i in range(1, 10):\n x = i + i * 10 + i * 100\n if x >= y:\n print(x)\n break', 'S = input()\nfor x in S:\n if x == \'1\':\n print(\'9\', end = "")\n elif x == \'9\':\n print(\'1\', end = "")\n else:\n print(x, end = "")\nprint()']
['Wrong Answer', 'Accepted']
['s392763344', 's745565526']
[2940.0, 2940.0]
[17.0, 17.0]
[102, 144]