{"nl": {"description": "Gaius Julius Caesar, a famous general, loved to line up his soldiers. Overall the army had n1 footmen and n2 horsemen. Caesar thought that an arrangement is not beautiful if somewhere in the line there are strictly more that k1 footmen standing successively one after another, or there are strictly more than k2 horsemen standing successively one after another. Find the number of beautiful arrangements of the soldiers. Note that all n1 + n2 warriors should be present at each arrangement. All footmen are considered indistinguishable among themselves. Similarly, all horsemen are considered indistinguishable among themselves.", "input_spec": "The only line contains four space-separated integers n1, n2, k1, k2 (1 ≤ n1, n2 ≤ 100, 1 ≤ k1, k2 ≤ 10) which represent how many footmen and horsemen there are and the largest acceptable number of footmen and horsemen standing in succession, correspondingly.", "output_spec": "Print the number of beautiful arrangements of the army modulo 100000000 (108). That is, print the number of such ways to line up the soldiers, that no more than k1 footmen stand successively, and no more than k2 horsemen stand successively.", "sample_inputs": ["2 1 1 10", "2 3 1 2", "2 4 1 1"], "sample_outputs": ["1", "5", "0"], "notes": "NoteLet's mark a footman as 1, and a horseman as 2.In the first sample the only beautiful line-up is: 121In the second sample 5 beautiful line-ups exist: 12122, 12212, 21212, 21221, 22121"}, "positive_code": [{"source_code": "print(function(n1, n2, k1, k2) {\n\t\tvar dp = [];\n\n\t\tfor (var i = 0; i < 102; i++) {\n\t\t\tvar x1 = [];\n\t\t\tdp.push(x1);\n\t\t\tfor (var j = 0; j < 102; j++) {\n\t\t\t\tvar x2 = [];\n\t\t\t\tx1.push(x2);\n\t\t\t\tfor (var k = 0; k < 12; k++) {\n\t\t\t\t\tvar x3 = [];\n\t\t\t\t\tx2.push(x3);\n\t\t\t\t\tfor (var l = 0; l < 12; l++) {\n\t\t\t\t\t\tx3.push(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdp[0][0][0][0] = 1;\n\t\tfor (var i = 0; i <= n1; i++)\n\t\tfor (var j = 0; j <= n2; j++)\n\t\tfor (var k = 0; k <= k1; k++)\n\t\tfor (var l = 0; l <= k2; l++){\n\t\t\t\tdp[i + 1][j][k + 1][0] = (dp[i + 1][j][k + 1][0] + dp[i][j][k][l])%1e8;\n\t\t\t\tdp[i][j+1][0][l+1] = (dp[i][j+1][0][l+1] + dp[i][j][k][l])%1e8;\n\t\t}\n\n\n\tvar ans=0;\n\tfor(var x=0; x<=k1; x++) for(var y=0; y<=k2; y++)\n\t\tans+=dp[n1][n2][x][y],\n\t\tans%=1e8;\n\n\treturn ans;\n}.apply(0, readline().split(' ').map(Number)));"}, {"source_code": "var n1, n2, k1, k2, input;\nvar dp = new Array(101);\nvar M = 100000000;\nfor (var i = 0; i < 101; i++) {\n\tdp[i] = new Array(101);\n}\nfor (var i = 0 ; i < 101; i++) {\n\tfor (var j = 0 ; j < 101; j++) {\n\t\tdp[i][j] = new Array(2).fill(0);\n\t}\n}\ninput = readline();\nn1 = Number(input.split(\" \")[0]);n2 = Number(input.split(\" \")[1]);\nk1 = Number(input.split(\" \")[2]);k2 = Number(input.split(\" \")[3]);\n\ndp[0][0][0] = 1;\ndp[0][0][1] = 1;\nfor (var f = 0; f <= n1; f++) {\n\tfor (var h = 0; h <= n2; h++) {\n\t\tfor (var i = 1; i <= min(k1, f); i++)\n\t\t\tdp[f][h][0] = (dp[f][h][0] + dp[f-i][h][1]) % M;\n\t\tfor (var i = 1; i <= min(k2, h); i++)\n\t\t\tdp[f][h][1] = (dp[f][h][1] + dp[f][h-i][0]) % M;\n\t}\n}\nprint((dp[n1][n2][0]+dp[n1][n2][1]) % M);\n\nfunction min(x, y) {\n\treturn (x > y) ? y : x;\n}\n"}], "negative_code": [{"source_code": "var dpf = new Array(101);\nvar dph = new Array(101);\nvar n1, n2, k1, k2, input;\nvar M = 100000000;\n \nfor (var i = 0; i < 101; i++) {\n dpf[i] = new Array(101).fill(-1);\n dph[i] = new Array(101).fill(-1);\n}\n\ninput = readline();\n\n\nn1 = Number(input.split(\" \")[0]);n2 = Number(input.split(\" \")[1]);\nk1 = Number(input.split(\" \")[0]);k2 = Number(input.split(\" \")[0]);\n\n\nprint((footMan(n1, n2) + horseMan(n1, n2)) % M);\n\nfunction footMan(f, h) {\n // footman을 먼저 세우기 시작하여 배치할 수 있는 모든 경우의 수\n if (f == 0) {// 풋맨이 더 이상 없다면\n return (h == 0) ? 1 : 0;\n }\n var ret = dpf[f][h];\n if (ret != -1) {\n return ret;\n }\n var sum = 0;\n for (var i = 1; i <= min(k1, f); i++) {\n sum += horseMan(f - i, h);\n sum %= M;\n }\n return sum;\n\n}\nfunction horseMan(f, h) {\n // horseman을 먼저 세우기 시작하여 배치할 수 있는 모든 경우의 수\n if (h == 0) {// 홀스맨이 더 이상 없다면\n return (f == 0) ? 1 : 0;\n }\n var ret = dph[f][h];\n if (ret != -1) {\n return ret;\n }\n var sum = 0;\n for (var i = 1; i <= min(k2, h); i++) {\n sum += footMan(f, h - i);\n sum %= M;\n }\n return sum;\n}\nfunction min(x, y) {\n return (x < y) ? x : y;\n}\n \n\n"}, {"source_code": "var n1, n2, k1, k2, input;\nvar dp = new Array(101);\nvar M = 100000000;\nfor (var i = 0; i < 101; i++) {\n\tdp[i] = new Array(101);\n}\nfor (var i = 0 ; i < 101; i++) {\n\tfor (var j = 0 ; j < 101; j++) {\n\t\tdp[i][j] = new Array(2).fill(-1);\n\t}\n}\ninput = readline();\nn1 = Number(input.split(\" \")[0]);n2 = Number(input.split(\" \")[1]);\nk1 = Number(input.split(\" \")[2]);k2 = Number(input.split(\" \")[3]);\n\ndp[0][0][0] = 1;\ndp[0][0][1] = 1;\nfor (var f = 0; f <= n1; f++) {\n\tfor (var h = 0; h <= n2; h++) {\n\t\tfor (var i = 1; i <= min(k1, f); i++)\n\t\t\tdp[f][h][0] = (dp[f][h][0] + dp[f-i][h][1]) % M;\n\t\tfor (var i = 1; i <= min(k2, h); i++)\n\t\t\tdp[f][h][1] = (dp[f][h][1] + dp[f][h-i][0]) % M;\n\t}\n}\nprint((dp[n1][n2][0]+dp[n1][n2][1]) % M);\n\nfunction min(x, y) {\n\treturn (x > y) ? y : x;\n}\n"}, {"source_code": "var n1, n2, k1, k2, input;\nvar dp = new Array(101);\nvar M = 100000000;\nfor (var i = 0; i < 101; i++) {\n\tdp[i] = new Array(101);\n}\nfor (var i = 0 ; i < 101; i++) {\n\tfor (var j = 0 ; j < 101; j++) {\n\t\tdp[i][j] = new Array(2);\n\t}\n}\ninput = readline();\nn1 = Number(input.split(\" \")[0]);n2 = Number(input.split(\" \")[1]);\nk1 = Number(input.split(\" \")[2]);k2 = Number(input.split(\" \")[3]);\n\ndp[0][0][0] = 1;\ndp[0][0][1] = 1;\nfor (var f = 0; f <= n1; f++) {\n\tfor (var h = 0; h <= n2; h++) {\n\t\tfor (var i = 1; i <= min(k1, f); i++)\n\t\t\tdp[f][h][0] = (dp[f][h][0] + dp[f-i][h][1]) % M;\n\t\tfor (var i = 1; i <= min(k2, h); i++)\n\t\t\tdp[f][h][1] = (dp[f][h][1] + dp[f][h-i][0]) % M;\n\t}\n}\nprint((dp[n1][n2][0]+dp[n1][n2][1]) % M);\n\nfunction min(x, y) {\n\treturn (x > y) ? y : x;\n}\n"}], "src_uid": "63aabef26fe008e4c6fc9336eb038289"} {"nl": {"description": "The three friends, Kuro, Shiro, and Katie, met up again! It's time for a party...What the cats do when they unite? Right, they have a party. Since they wanted to have as much fun as possible, they invited all their friends. Now $$$n$$$ cats are at the party, sitting in a circle and eating soup. The rules are simple: anyone having finished their soup leaves the circle.Katie suddenly notices that whenever a cat leaves, the place where she was sitting becomes an empty space, which means the circle is divided into smaller continuous groups of cats sitting next to each other. At the moment Katie observes, there are $$$m$$$ cats who left the circle. This raises a question for Katie: what is the maximum possible number of groups the circle is divided into at the moment?Could you help her with this curiosity?You can see the examples and their descriptions with pictures in the \"Note\" section.", "input_spec": "The only line contains two integers $$$n$$$ and $$$m$$$ ($$$2 \\leq n \\leq 1000$$$, $$$0 \\leq m \\leq n$$$) — the initial number of cats at the party and the number of cats who left the circle at the moment Katie observes, respectively.", "output_spec": "Print a single integer — the maximum number of groups of cats at the moment Katie observes.", "sample_inputs": ["7 4", "6 2", "3 0", "2 2"], "sample_outputs": ["3", "2", "1", "0"], "notes": "NoteIn the first example, originally there are $$$7$$$ cats sitting as shown below, creating a single group: At the observed moment, $$$4$$$ cats have left the table. Suppose the cats $$$2$$$, $$$3$$$, $$$5$$$ and $$$7$$$ have left, then there are $$$3$$$ groups remaining. It is possible to show that it is the maximum possible number of groups remaining. In the second example, there are $$$6$$$ cats sitting as shown below: At the observed moment, $$$2$$$ cats have left the table. Suppose the cats numbered $$$3$$$ and $$$6$$$ left, then there will be $$$2$$$ groups remaining ($$$\\{1, 2\\}$$$ and $$$\\{4, 5\\}$$$). It is impossible to have more than $$$2$$$ groups of cats remaining. In the third example, no cats have left, so there is $$$1$$$ group consisting of all cats.In the fourth example, all cats have left the circle, so there are $$$0$$$ groups."}, "positive_code": [{"source_code": "var firstLine = readline().split(' ');\nvar rdy = false\nif(+firstLine[1] === 0) print(1);\nif(+firstLine[1] !== 0) {\nif(+firstLine[1] === +firstLine[0]){ rdy = true; print(0);}\nif((+firstLine[0] - +firstLine[1] >= +firstLine[1]) && !rdy){rdy = true; print(+firstLine[1]);}\nif((+firstLine[0] - +firstLine[1] < +firstLine[1]) && !rdy) print(+firstLine[0] - +firstLine[1]);\n}\n"}, {"source_code": "ip = readline().split(' ').map(Number);\nn = ip[0], k = ip[1];\nif (k === 0){\n print(1);\n}else\nif (k <= n/2){\n print(k)\n} else {\n print(n-k);\n}"}, {"source_code": "var n, m;\nreadline().split(' ').forEach(function(v, i){\n if (i === 0) {\n n = parseInt(v);\n } else {\n m = parseInt(v);\n }\n});\n\nif (n === 0 || n === m) {\n print(0);\n} else if (m === 0){\n print(1);\n} else {\n arr = [];\n\n for(var i = 0; i < n; i++) {\n if (!arr[i - 1] && m > 0) {\n arr[i] = 1;\n m--;\n } else {\n arr[i] = 0;\n }\n }\n \n \n print(arr.filter(x => x).length - arr[arr.length - 1] - m); \n}"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (d) => {\n const [n, m] = d.split(' ').map(Number);\n\n if (m === 0 || m === 1) {\n console.log(1);\n }\n else if (n === m) {\n console.log(0);\n }\n else if (n / 2 > m) {\n console.log(m);\n }\n else {\n console.log(n - m);\n }\n\n c++;\n});\n"}, {"source_code": "var stdin = process.openStdin();\n\nstdin.addListener(\"data\", function(d) {\n const arr = d.toString().trim().split(\" \");\n console.log(findg(parseInt(arr[0]), parseInt(arr[1])));\n });\n \n function findg(n, m){\n if(n === m){\n return 0;\n } else if(m === 0){\n return 1;\n }\n m--;\n n--;\n let gcount = 1;\n for(let i = 0; i < m; i++){\n if(n === 0 || n === 1){\n gcount--;\n } else if (n === 2) {\n n-=2;\n } else {\n gcount++;\n n-=2;\n }\n }\n return gcount;\n }"}], "negative_code": [{"source_code": "var firstLine = readline().split(' ');\nif(+firstLine[1] === +firstLine[0]) print(0);\nif(+firstLine[0] / +firstLine[1] === +firstLine[1]) print(+firstLine[1]);\nif(+firstLine[0] / +firstLine[1] > +firstLine[1]) print(+firstLine[1]);\nif(+firstLine[0] / +firstLine[1] < +firstLine[1]) print(+firstLine[0] - +firstLine[1]);"}, {"source_code": "var firstLine = readline().split(' ');\nif(+firstLine[1] === 0) print(1);\nif(+firstLine[1] === +firstLine[0]) print(0);\nif(+firstLine[0] / +firstLine[1] === +firstLine[1]) print(+firstLine[1]);\nif(+firstLine[0] / +firstLine[1] > +firstLine[1]) print(+firstLine[1]);\nif(+firstLine[0] / +firstLine[1] < +firstLine[1]) print(+firstLine[0] - +firstLine[1]);"}, {"source_code": "var firstLine = readline().split(' ');\nif(+firstLine[1] === 0) print(1);\nif(+firstLine[1] !== 0) {\n if(+firstLine[1] === +firstLine[0]) print(0);\n if(+firstLine[0] / +firstLine[1] >= +firstLine[1]) print(+firstLine[1]);\n if(+firstLine[0] / +firstLine[1] < +firstLine[1]) print(+firstLine[0] - +firstLine[1]);\n}"}, {"source_code": "var firstLine = readline().split(' ');\nvar rdy = false\nif(+firstLine[1] === 0) print(1);\nif(+firstLine[1] !== 0) {\nif(+firstLine[1] === +firstLine[0]){ rdy = true; print(0);}\nif((+firstLine[0] / +firstLine[1] >= +firstLine[1]) && !rdy) print(+firstLine[1]);\nif((+firstLine[0] / +firstLine[1] < +firstLine[1]) && !rdy) print(+firstLine[0] - +firstLine[1]);\n}\n"}, {"source_code": "var firstLine = readline().split(' ');\nvar rdy = false\nif(+firstLine[1] === 0) print(1);\nif(+firstLine[1] !== 0) {\nif(+firstLine[1] === +firstLine[0]){ rdy = true; print(0);}\nif((+firstLine[0] / +firstLine[1] >= +firstLine[1]) && !rdy){rdy = true; print(+firstLine[1]);}\nif((+firstLine[0] / +firstLine[1] < +firstLine[1]) && !rdy) print(+firstLine[0] - +firstLine[1]);\n}\n"}, {"source_code": "ip = readline().split(' ').map(Number);\nn = ip[0], k = ip[1];\nif (k <= n/2){\n print(k)\n} else {\n print(n-k);\n}\n"}, {"source_code": "ip = readline().split(' ').map(Number);\nn = ip[0], k = ip[1];\nif (k <= n/2 && k !== 0){\n print(k)\n} else {\n print(n-k);\n}"}, {"source_code": "var n, m;\nreadline().split(' ').forEach(function(v, i){\n if (i === 0) {\n n = parseInt(v);\n } else {\n m = parseInt(v);\n }\n});\n\nif (n === 0 || n === m) {\n print(0);\n} else if (m === 0){\n print(1);\n} else {\n arr = [];\n\n for(var i = 0; i < n; i++) {\n if (!arr[i - 1] && m > 0) {\n arr[i] = 1;\n m--;\n } else {\n arr[i] = 0;\n }\n }\n \n\n print(arr.filter(x => x).length - arr[arr.length - 1]); \n}"}, {"source_code": "var n, m;\nreadline().split(' ').forEach(function(v, i){\n if (i === 0) {\n n = parseInt(v);\n } else {\n m = parseInt(v);\n }\n});\n\nif (m === 0 || n === m) {\n print(0);\n} else if (m === 0){\n print(1);\n} else {\n arr = [];\n\n for(var i = 0; i < n; i++) {\n if (!arr[i - 1] && m > 0) {\n arr[i] = 1;\n m--;\n } else {\n arr[i] = 0;\n }\n }\n \n\n print(arr.filter(x => x).length - arr[arr.length - 1]); \n}"}, {"source_code": "var n, m;\nreadline().split(' ').forEach(function(v, i){\n if (i === 0) {\n n = parseInt(v);\n } else {\n m = parseInt(v);\n }\n});\n\nif (m === 0 || n === m) {\n print(0);\n} else if (m === 0){\n print(1);\n} else {\n arr = [];\n\n for(var i = 0; i < n; i++) {\n if (!arr[i - 1] && m > 0) {\n arr[i] = 1;\n m--;\n } else {\n arr[i] = 0;\n }\n }\n \n \n print(arr);\n print(arr.filter(x => x).length - arr[arr.length - 1]); \n}"}, {"source_code": "var n, m;\nreadline().split(' ').forEach(function(v, i){\n if (i === 0) {\n n = parseInt(v);\n } else {\n m = parseInt(v);\n }\n});\n\nif (m === 0 || n === m) {\n print(0);\n} else if (m === 1){\n print(1);\n} else {\n arr = [];\n\n for(var i = 0; i < n; i++) {\n if (!arr[i - 1] && m > 0) {\n arr[i] = 1;\n m--;\n } else {\n arr[i] = 0;\n }\n }\n \n \n print(arr.filter(x => x).length - arr[arr.length - 1]); \n}"}, {"source_code": "var n, m;\nreadline().split(' ').forEach(function(v, i){\n if (i === 0) {\n n = parseInt(v);\n } else {\n m = parseInt(v);\n }\n});\n\nif (m === 0 || n === m) {\n print(0);\n} else if (m === 0){\n print(1);\n} else {\n arr = [];\n\n for(var i = 0; i < n; i++) {\n if (!arr[i - 1] && m > 0) {\n arr[i] = 1;\n m--;\n } else {\n arr[i] = 0;\n }\n }\n \n \n print(arr.filter(x => x).length - arr[arr.length - 1] - m); \n}"}, {"source_code": "var n, m;\nreadline().split(' ').forEach(function(v, i){\n if (i === 0) {\n n = parseInt(v);\n } else {\n m = parseInt(v);\n }\n});\n\nif (m === 0 || m === 1 || n === m) {\n print(0);\n} else {\n arr = [];\n\n for(var i = 0; i < n; i++) {\n if (!arr[i - 1] && m > 0) {\n arr[i] = 1;\n m--;\n } else {\n arr[i] = 0;\n }\n }\n \n print(arr.filter(x => x).length - arr[arr.length - 1]); \n}"}, {"source_code": "var firstLine = readline().split(' ');\nif(+firstLine[1] === +firstLine[0]) print(0);\nif(+firstLine[0] / +firstLine[1] === +firstLine[1]) print(+firstLine[1]);\nif(+firstLine[0] / +firstLine[1] > +firstLine[1]) print(+firstLine[0] - +firstLine[1]);\nif(+firstLine[0] / +firstLine[1] < +firstLine[1]) print(+firstLine[1]);"}, {"source_code": "var stdin = process.openStdin();\n\nstdin.addListener(\"data\", function(d) {\n const arr = d.toString().trim().split(\" \");\n console.log(findg(parseInt(arr[0]), parseInt(arr[1])));\n });\n \n function findg(n, m){\n if(n === m){\n return 0;\n } else if(m === 0){\n return 1;\n }\n m--;\n let gcount = 1;\n for(let i = 0; i < m-1; i++){\n if(n === 0 || n === 1){\n gcount--;\n } else {\n gcount++;\n n-=2;\n }\n }\n return gcount;\n }"}, {"source_code": "var stdin = process.openStdin();\n\nstdin.addListener(\"data\", function(d) {\n const arr = d.toString().trim().split(\" \");\n console.log(findg(parseInt(arr[0]), parseInt(arr[1])));\n });\n \n function findg(n, m){\n if(n === m){\n return 0;\n } else if(m === 0){\n return 1;\n }\n m--;\n let gcount = 0;\n for(let i = 0; i < m-1; i++){\n if(n === 0 || n === 1){\n gcount--;\n } else {\n gcount++;\n n-=2;\n }\n }\n return n;\n }"}, {"source_code": "var stdin = process.openStdin();\n\nstdin.addListener(\"data\", function(d) {\n const arr = d.toString().trim().split(\" \");\n console.log(findg(parseInt(arr[0]), parseInt(arr[1])));\n });\n \n function findg(n, m){\n if(n === m){\n return 0;\n } else if(m === 0){\n return 1;\n }\n m--;\n let gcount = 1;\n for(let i = 0; i < m-1; i++){\n if(n === 0 || n === 1){\n gcount--;\n } else {\n gcount++;\n n-=2;\n }\n }\n return n;\n }"}, {"source_code": "var stdin = process.openStdin();\n\nstdin.addListener(\"data\", function(d) {\n const arr = d.toString().trim().split(\" \");\n console.log(findg(parseInt(arr[0]), parseInt(arr[1])));\n });\n \n function findg(n, m){\n if(n === m){\n return 0;\n } else if(m === 0){\n return 1;\n }\n m--;\n let gcount = 1;\n for(let i = 0; i < m; i++){\n if(n === 0 || n === 1){\n gcount--;\n } else {\n gcount++;\n n-=2;\n }\n }\n return gcount;\n }"}], "src_uid": "c05d0a9cabe04d8fb48c76d2ce033648"} {"nl": {"description": "There are n walruses sitting in a circle. All of them are numbered in the clockwise order: the walrus number 2 sits to the left of the walrus number 1, the walrus number 3 sits to the left of the walrus number 2, ..., the walrus number 1 sits to the left of the walrus number n.The presenter has m chips. The presenter stands in the middle of the circle and starts giving the chips to the walruses starting from walrus number 1 and moving clockwise. The walrus number i gets i chips. If the presenter can't give the current walrus the required number of chips, then the presenter takes the remaining chips and the process ends. Determine by the given n and m how many chips the presenter will get in the end.", "input_spec": "The first line contains two integers n and m (1 ≤ n ≤ 50, 1 ≤ m ≤ 104) — the number of walruses and the number of chips correspondingly.", "output_spec": "Print the number of chips the presenter ended up with.", "sample_inputs": ["4 11", "17 107", "3 8"], "sample_outputs": ["0", "2", "1"], "notes": "NoteIn the first sample the presenter gives one chip to the walrus number 1, two chips to the walrus number 2, three chips to the walrus number 3, four chips to the walrus number 4, then again one chip to the walrus number 1. After that the presenter runs out of chips. He can't give anything to the walrus number 2 and the process finishes.In the third sample the presenter gives one chip to the walrus number 1, two chips to the walrus number 2, three chips to the walrus number 3, then again one chip to the walrus number 1. The presenter has one chip left and he can't give two chips to the walrus number 2, that's why the presenter takes the last chip."}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (d) => {\n const [n, m] = d.split(' ').map(Number);\n let ans = m;\n let iter = 1;\n\n while (ans >= iter) {\n ans -= iter;\n iter++;\n\n if (iter > n) {\n iter = 1;\n }\n }\n\n console.log(ans);\n\n c++;\n});\n"}, {"source_code": "print(function(n,m){\n\tm%=(n*n+n)/2\n\tfor(var i=1; m>=i; m-=i++);\n\treturn m;\n}.apply(0, readline().split(' ').map(Number)))"}, {"source_code": "var line = readline().split(\" \");\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\n// var a = 4\n// var b = 11\n\nvar j = 0;\nfor (var i = 1; i <= a; i++) {\n\tj += i;\n}\n\nb = b % j;\nvar i = 1;\n\nwhile (b>=i) {\n\tb-=i;\n\ti++;\n}\nprint(b)"}, {"source_code": ";(function () {\n\tvar n = readline().split(' ').map(Number),\n\t\ti = 1;\n\n\twhile (n[1] >= i) {\n\t\tn[1] -= i;\n\t\tif (i == n[0]) i = 0;\n\t\telse i = i + 1;\n\t}\n\n\tprint(n[1]);\n\n}).call(this)"}, {"source_code": "var nm = readline();\nnm = nm.split(\" \");\nnm[0] = parseInt(nm[0]);\nnm[1] = parseInt(nm[1]);\nvar i = 1;\nwhile(8)\n{\n if(nm[1] - i < 0){print(nm[1]); break;}\n nm[1] -= i;\n i++;\n if(i > nm[0]){i = 1;}\n}"}], "negative_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (d) => {\n const [n, m] = d.split(' ').map(Number);\n let ans = m;\n let iter = 1;\n\n while (ans > iter) {\n ans -= iter;\n iter++;\n\n if (iter > n) {\n iter = 1;\n }\n\n if (iter === 1 && ans === 1) {\n ans = 0;\n }\n }\n\n console.log(ans);\n\n c++;\n});\n"}, {"source_code": "var line = readline().split();\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n// var a = 4\n// var b = 11\n\nvar j = 0;\nfor (var i = 1; i <= a; i++) {\n\tj += i;\n}\n\nb = b % j;\nvar i = 1;\n\nwhile (b>=i) {\n\tb-=i;\n\ti++;\n}\nprint(b)"}, {"source_code": "var line = readline().split();\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\nvar j=0;\nfor (var i = 1; i <= a; i++) {\n\tj += i;\n}\n\nb = b % j;\ni=1;\n\nwhile (b>=i) {\n\tb-=i;\n\ti++;\n}\nprint(b+\"\\n\");"}, {"source_code": "var line = readline().split();\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\nvar a = 4\nvar b = 11\n\nvar j=0;\nfor (var i = 1; i <= a; i++) {\n\tj += i;\n}\n\nb = b % j;\ni=1;\n\nwhile (b>=i) {\n\tb-=i;\n\ti++;\n}\nprint(line)"}, {"source_code": "var line = readline().split();\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\nvar a = 4\nvar b = 11\n\nvar j = 0;\nfor (var i = 1; i <= a; i++) {\n\tj += i;\n}\n\nb = b % j;\nvar i = 1;\n\nwhile (b>=i) {\n\tb-=i;\n\ti++;\n}\nprint(b)"}, {"source_code": "var line = readline().split();\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\nvar j=0;\nfor (var i = 1; i <= a; i++) {\n\tj += i;\n}\n\nb = b % j;\ni=1;\n\nwhile (b>=i) {\n\tb-=i;\n\ti++;\n}\nprint(b);"}, {"source_code": "var line = readline().split();\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\n// var a = 4\n// var b = 11\n\nvar j = 0;\nfor (var i = 1; i <= a; i++) {\n\tj += i;\n}\n\nb = b % j;\nvar i = 1;\n\nwhile (b>=i) {\n\tb-=i;\n\ti++;\n}\nprint(line[0], line[1])"}, {"source_code": "var line = readline().split();\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n// var a = 4\n// var b = 11\n\nvar j=0;\nfor (var i = 1; i <= a; i++) {\n\tj += i;\n}\n\nb = b % j;\ni=1;\n\nwhile (b>=i) {\n\tb-=i;\n\ti++;\n}\nprint(b.toString()+\"\\n\");"}, {"source_code": "var line = readline().split()\nvar a = parseInt(line[0])\nvar b = parseInt(line[1])\n\nvar j=0\nfor (var i = 1; i <= a; i++) {\n\tj += i\n}\n\nb = b % j\ni=1\n\nwhile (b>=i) {\n\tb-=i\n\ti++\n}\nprint(b)"}], "src_uid": "5dd5ee90606d37cae5926eb8b8d250bb"} {"nl": {"description": "You have r red, g green and b blue balloons. To decorate a single table for the banquet you need exactly three balloons. Three balloons attached to some table shouldn't have the same color. What maximum number t of tables can be decorated if we know number of balloons of each color?Your task is to write a program that for given values r, g and b will find the maximum number t of tables, that can be decorated in the required manner.", "input_spec": "The single line contains three integers r, g and b (0 ≤ r, g, b ≤ 2·109) — the number of red, green and blue baloons respectively. The numbers are separated by exactly one space.", "output_spec": "Print a single integer t — the maximum number of tables that can be decorated in the required manner.", "sample_inputs": ["5 4 3", "1 1 1", "2 3 3"], "sample_outputs": ["4", "1", "2"], "notes": "NoteIn the first sample you can decorate the tables with the following balloon sets: \"rgg\", \"gbb\", \"brr\", \"rrg\", where \"r\", \"g\" and \"b\" represent the red, green and blue balls, respectively."}, "positive_code": [{"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n}); \n\nrl.on('line', input => {\n console.log(min(input.split(' ')));\n process.exit();\n});\n\nconst min = input => {\n const r = parseInt(input[0]);\n const g = parseInt(input[1]);\n const b = parseInt(input[2]);\n\n return Math.floor(Math.min((r+g+b)/3, (r+b+g)-Math.max(r,g,b)));\n}"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\ninp = inp.sort(function(a,b){return a > b;})\nprint(Math.min((Math.floor((inp[0]+inp[1]+inp[2])/3)), inp[0]+inp[1]));"}, {"source_code": "var a = readline().split(\" \");\nfor(var i=0; i(a[0]+a[1])*2)a[2]=2*(a[0]+a[1]);\nprint(Math.floor((a[2]+a[1]+a[0])/3));\n"}, {"source_code": "var main = function(r, b, g) { \n print(Math.min((r+g), (b+g), (r+b), Math.floor((r+b+g)/3))); \n}\n\nmain.apply(0, readline().split(' ').map(Number)); \n"}, {"source_code": "var nums = readline().split(' ');\nvar a = new Array();\nfor(var i=0;i<3;i++)\n{\n a[i] = parseInt(nums[i]);\n}\n\na.sort(sortNum);\nvar b = false;\nif(a[0]>2*(a[1]+a[2]))\n{\n print(a[1]+a[2]);\n}\nelse\n{\n var x = a[0]+a[1]+a[2];\n\tprint((x-x%3)/3);\n}\n\nfunction sortNum(a, b)\n{\n return b - a;\n}\n"}], "negative_code": [{"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n}); \n\nrl.on('line', input => {\n console.log(min(input.split(' ')));\n process.exit();\n});\n\nconst min = input => {\n return parseInt(input.reduce((ant, act) => parseInt(ant) + parseInt(act)) / input.length);\n}"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\nvar r = inp[0];\nvar g = inp[1];\nvar b = inp[2];\n\nprint(Math.floor((r+g+b) % 3));"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\nvar r = inp[0];\nvar g = inp[1];\nvar b = inp[2];\n\nprint(Math.max(Math.min(r + g, b),Math.min(r +b, g),Math.min(b +g ,r)));"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\nvar r = inp[0];\nvar g = inp[1];\nvar b = inp[2];\n\nprint((r+g+b) % 3);"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\ninp = inp.sort(function(a,b){return a > b;})\n\nprint(Math.max((Math.floor((inp[0]+inp[1]+inp[2])/3)), inp[0]+inp[1]));"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\ninp = inp.sort(function(a,b){return a > b;})\nvar res = inp[0];\nif (inp[1] - inp[0] != 0){\n\tres+=Math.min(inp[1]-inp[0], Math.floor((inp[2] - inp[0])/2));\n}\n\nprint(res);"}, {"source_code": "var main = function(r, b, g) { \n print(Math.min((r+g), (b+g), (r+g), Math.floor((r+b+g)/3))); \n}\n\nmain.apply(0, readline().split(' ').map(Number)); \n"}], "src_uid": "bae7cbcde19114451b8712d6361d2b01"} {"nl": {"description": "Alena has successfully passed the entrance exams to the university and is now looking forward to start studying.One two-hour lesson at the Russian university is traditionally called a pair, it lasts for two academic hours (an academic hour is equal to 45 minutes).The University works in such a way that every day it holds exactly n lessons. Depending on the schedule of a particular group of students, on a given day, some pairs may actually contain classes, but some may be empty (such pairs are called breaks).The official website of the university has already published the schedule for tomorrow for Alena's group. Thus, for each of the n pairs she knows if there will be a class at that time or not.Alena's House is far from the university, so if there are breaks, she doesn't always go home. Alena has time to go home only if the break consists of at least two free pairs in a row, otherwise she waits for the next pair at the university.Of course, Alena does not want to be sleepy during pairs, so she will sleep as long as possible, and will only come to the first pair that is presented in her schedule. Similarly, if there are no more pairs, then Alena immediately goes home.Alena appreciates the time spent at home, so she always goes home when it is possible, and returns to the university only at the beginning of the next pair. Help Alena determine for how many pairs she will stay at the university. Note that during some pairs Alena may be at the university waiting for the upcoming pair.", "input_spec": "The first line of the input contains a positive integer n (1 ≤ n ≤ 100) — the number of lessons at the university. The second line contains n numbers ai (0 ≤ ai ≤ 1). Number ai equals 0, if Alena doesn't have the i-th pairs, otherwise it is equal to 1. Numbers a1, a2, ..., an are separated by spaces.", "output_spec": "Print a single number — the number of pairs during which Alena stays at the university.", "sample_inputs": ["5\n0 1 0 1 1", "7\n1 0 1 0 0 1 0", "1\n0"], "sample_outputs": ["4", "4", "0"], "notes": "NoteIn the first sample Alena stays at the university from the second to the fifth pair, inclusive, during the third pair she will be it the university waiting for the next pair. In the last sample Alena doesn't have a single pair, so she spends all the time at home."}, "positive_code": [{"source_code": "n = +readline();\na = readline().split(\" \").map(Number);\n\nanswer = 0;\nlast_i = -100;\nfor (var i = 0; i < n; i++) {\n\tif (a[i] == 1) {\n\t\tif (last_i >=0 && last_i+2 == i) {\n\t\t\t// a[i-1] == 0\n\t\t\tanswer += 1;\n\t\t}\n\t\tanswer += 1;\n\t\tlast_i = i;\n\t}\n}\nwrite(answer);"}, {"source_code": "function checkPairs (pairs) {\n pairs = pairs.split(\" \").join(\"\");\n pairs = pairs.replace(/0+$/g, \"\"); // strip trailing zeros\n pairs = pairs.replace(/^0+/g, \"\"); // strip first zeros\n pairs = pairs.replace(/0{2,}/g, \"\"); //strip 00\n\n return pairs.length;\n}\n\nvar smth = readline(),\n input = readline();\n\nvar output = checkPairs.call(null, input);\n\nwrite(output);\n"}], "negative_code": [{"source_code": "function checkPairs (pairs) {\n pairs = pairs.split(\" \").join(\"\");\n pairs = pairs.replace(/0+$/g, \"\"); // strip trailing zeros\n pairs = pairs.replace(/^0+/g, \"\"); // strip first zeros\n pairs = pairs.replace(/00/g, \"\"); //strip 00\n\n return pairs.length;\n}\n\nvar input = readline();\n\nvar output = checkPairs.call(null, input);\n\nwrite(output);\n"}, {"source_code": "function checkPairs (pairs) {\n pairs = pairs.split(\" \").join(\"\");\n pairs = pairs.replace(/0+$/g, \"\"); // strip trailing zeros\n pairs = pairs.replace(/^0+/g, \"\"); // strip first zeros\n pairs = pairs.replace(/00/g, \"\"); //strip 00\n\n return pairs.length;\n}\n\nvar smth = readline(),\n input = readline();\n\nvar output = checkPairs.call(null, input);\n\nwrite(output);\n"}], "src_uid": "2896aadda9e7a317d33315f91d1ca64d"} {"nl": {"description": "At a geometry lesson Bob learnt that a triangle is called right-angled if it is nondegenerate and one of its angles is right. Bob decided to draw such a triangle immediately: on a sheet of paper he drew three points with integer coordinates, and joined them with segments of straight lines, then he showed the triangle to Peter. Peter said that Bob's triangle is not right-angled, but is almost right-angled: the triangle itself is not right-angled, but it is possible to move one of the points exactly by distance 1 so, that all the coordinates remain integer, and the triangle become right-angled. Bob asks you to help him and find out if Peter tricks him. By the given coordinates of the triangle you should find out if it is right-angled, almost right-angled, or neither of these.", "input_spec": "The first input line contains 6 space-separated integers x1, y1, x2, y2, x3, y3 — coordinates of the triangle's vertices. All the coordinates are integer and don't exceed 100 in absolute value. It's guaranteed that the triangle is nondegenerate, i.e. its total area is not zero.", "output_spec": "If the given triangle is right-angled, output RIGHT, if it is almost right-angled, output ALMOST, and if it is neither of these, output NEITHER.", "sample_inputs": ["0 0 2 0 0 1", "2 3 4 5 6 6", "-1 0 2 0 0 1"], "sample_outputs": ["RIGHT", "NEITHER", "ALMOST"], "notes": null}, "positive_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar input = tokenizeIntegers(readline());\n\n\tfunction isRightTriangle(input) {\n\t\tvar squares = [];\n\t\tfor (var i = 0; i < 3; i += 1) {\n\t\t\tsquares.push(Math.pow(input[(2*i+2)%6]-input[2*i], 2) +\n\t\t\t\t\t Math.pow(input[(2*i+3)%6]-input[2*i+1], 2));\n\t\t}\n\t\tsquares.sort(function(a, b) {\n\t\t\treturn a-b;\n\t\t});\n\t\tif (squares[0] == 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (squares[2] == squares[1] + squares[0]);\n\t}\n\n\tif (isRightTriangle(input)) {\n\t\tprint(\"RIGHT\");\n\t\treturn;\n\t}\n\n\tvar dx = [0, 1, 0, -1], dy = [-1, 0, 1, 0];\n\tfor (var i = 0; i < 3; i += 1) {\n\t\tfor (var j = 0; j < 4; j += 1) {\n\t\t\tinput[2*i] += dx[j];\n\t\t\tinput[2*i+1] += dy[j];\n\t\t\tif (isRightTriangle(input)) {\n\t\t\t\tprint(\"ALMOST\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tinput[2*i] -= dx[j];\n\t\t\tinput[2*i+1] -= dy[j];\n\t\t}\n\t}\n\n\tprint(\"NEITHER\");\n}\n\nmain();\n"}, {"source_code": "'use strict'\n\nlet lll = readline().split(' ').map(v => parseInt(v))\n\nlet x1 = lll[0]\nlet y1 = lll[1]\nlet x2 = lll[2]\nlet y2 = lll[3]\nlet x3 = lll[4]\nlet y3 = lll[5]\n\nfunction is (x1, y1, x2, y2, x3, y3) {\n let ss = []\n ss.push(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2))\n ss.push(Math.pow(x1 - x3, 2) + Math.pow(y1 - y3, 2))\n ss.push(Math.pow(x2 - x3, 2) + Math.pow(y2 - y3, 2))\n ss = ss.sort((a, b) => a - b)\n return ss[0] + ss[1] == ss[2]\n && !(x1 === x2 === x3) && !(y1 === y2 === y3)\n && !(x1 === x2 && y1 === y2 || x1 === x3 && y1 === y3 || x2 === x3 && y2 === y3)\n}\n\nfunction vars (x1, y1, x2, y2, x3, y3) {\n return [\n [x1 - 1, y1, x2, y2, x3, y3],\n [x1, y1 - 1, x2, y2, x3, y3],\n [x1, y1, x2 - 1, y2, x3, y3],\n [x1, y1, x2, y2 - 1, x3, y3],\n [x1, y1, x2, y2, x3 - 1, y3],\n [x1, y1, x2, y2, x3, y3 - 1],\n [x1 + 1, y1, x2, y2, x3, y3],\n [x1, y1 + 1, x2, y2, x3, y3],\n [x1, y1, x2 + 1, y2, x3, y3],\n [x1, y1, x2, y2 + 1, x3, y3],\n [x1, y1, x2, y2, x3 + 1, y3],\n [x1, y1, x2, y2, x3, y3 + 1]\n ]\n}\n\n(function () {\n if (is(x1, y1, x2, y2, x3, y3)) return print('RIGHT')\n if (vars(x1, y1, x2, y2, x3, y3).some(v => is.apply(null, v))) return print('ALMOST')\n print('NEITHER')\n})()"}], "negative_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar input = tokenizeIntegers(readline());\n\n\tfunction isRightTriangle(input) {\n\t\tvar squares = [];\n\t\tfor (var i = 0; i < 3; i += 1) {\n\t\t\tsquares.push(Math.pow(input[(2*i+2)%6]-input[2*i], 2) +\n\t\t\t\t\t Math.pow(input[(2*i+3)%6]-input[2*i+1], 2));\n\t\t}\n\t\tsquares.sort(function(a, b) {\n\t\t\treturn a-b;\n\t\t});\n\t\treturn (squares[2] == squares[1] + squares[0]);\n\t}\n\n\tif (isRightTriangle(input)) {\n\t\tprint(\"RIGHT\");\n\t\treturn;\n\t}\n\n\tvar dx = [0, 1, 0, -1], dy = [-1, 0, 1, 0];\n\tfor (var i = 0; i < 3; i += 1) {\n\t\tinput[2*i] += dx[i];\n\t\tinput[2*i+1] += dy[i];\n\t\tif (isRightTriangle(input)) {\n\t\t\tprint(\"ALMOST\");\n\t\t\treturn;\n\t\t}\n\t\tinput[2*i] -= dx[i];\n\t\tinput[2*i+1] -= dy[i];\n\t}\n\n\tprint(\"NEITHER\");\n}\n\nmain();\n"}, {"source_code": "'use strict'\n\nlet lll = readline().split(' ').map(v => parseInt(v))\n\nlet x1 = lll[0]\nlet y1 = lll[1]\nlet x2 = lll[2]\nlet y2 = lll[3]\nlet x3 = lll[4]\nlet y3 = lll[5]\n\nfunction is (x1, y1, x2, y2, x3, y3) {\n let ss = []\n ss.push(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2))\n ss.push(Math.pow(x1 - x3, 2) + Math.pow(y1 - y3, 2))\n ss.push(Math.pow(x2 - x3, 2) + Math.pow(y2 - y3, 2))\n ss = ss.sort((a, b) => a - b)\n return ss[0] + ss[1] == ss[2]\n}\n\nfunction vars (x1, y1, x2, y2, x3, y3) {\n return [\n [x1 - 1, y1, x2, y2, x3, y3],\n [x1, y1 - 1, x2, y2, x3, y3],\n [x1, y1, x2 - 1, y2, x3, y3],\n [x1, y1, x2, y2 - 1, x3, y3],\n [x1, y1, x2, y2, x3 - 1, y3],\n [x1, y1, x2, y2, x3, y3 - 1],\n [x1 + 1, y1, x2, y2, x3, y3],\n [x1, y1 + 1, x2, y2, x3, y3],\n [x1, y1, x2 + 1, y2, x3, y3],\n [x1, y1, x2, y2 + 1, x3, y3],\n [x1, y1, x2, y2, x3 + 1, y3],\n [x1, y1, x2, y2, x3, y3 + 1]\n ]\n}\n\n(function () {\n if (is(x1, y1, x2, y2, x3, y3)) return print('RIGHT')\n if (vars(x1, y1, x2, y2, x3, y3).some(v => is.apply(null, v))) return print('ALMOST')\n print('NEITHER')\n})()"}, {"source_code": "'use strict'\n\nlet lll = readline().split(' ').map(v => parseInt(v))\n\nlet x1 = lll[0]\nlet y1 = lll[1]\nlet y2 = lll[2]\nlet x2 = lll[3]\nlet y3 = lll[4]\nlet x3 = lll[5]\n\nfunction is (x1, y1, x2, y2, x3, y3) {\n let ss = []\n ss.push(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2))\n ss.push(Math.pow(x1 - x3, 2) + Math.pow(y1 - y3, 2))\n ss.push(Math.pow(x2 - x3, 2) + Math.pow(y2 - y3, 2))\n ss = ss.sort((a, b) => a - b)\n return ss[0] + ss[1] == ss[2]\n}\n\nfunction vars (x1, y1, x2, y2, x3, y3) {\n return [\n [x1 - 1, y1, x2, y2, x3, y3],\n [x1, y1 - 1, x2, y2, x3, y3],\n [x1, y1, x2 - 1, y2, x3, y3],\n [x1, y1, x2, y2 - 1, x3, y3],\n [x1, y1, x2, y2, x3 - 1, y3],\n [x1, y1, x2, y2, x3, y3 - 1],\n [x1 + 1, y1, x2, y2, x3, y3],\n [x1, y1 + 1, x2, y2, x3, y3],\n [x1, y1, x2 + 1, y2, x3, y3],\n [x1, y1, x2, y2 + 1, x3, y3],\n [x1, y1, x2, y2, x3 + 1, y3],\n [x1, y1, x2, y2, x3, y3 + 1]\n ]\n}\n\n(function () {\n if (is(x1, y1, x2, y2, x3, y3)) return print('RIGHT')\n if (vars(x1, y1, x2, y2, x3, y3).some(v => is.apply(null, v))) return print('ALMOST')\n print('NEITHER')\n})()"}], "src_uid": "8324fa542297c21bda1a4aed0bd45a2d"} {"nl": {"description": "Today an outstanding event is going to happen in the forest — hedgehog Filya will come to his old fried Sonya!Sonya is an owl and she sleeps during the day and stay awake from minute l1 to minute r1 inclusive. Also, during the minute k she prinks and is unavailable for Filya.Filya works a lot and he plans to visit Sonya from minute l2 to minute r2 inclusive.Calculate the number of minutes they will be able to spend together.", "input_spec": "The only line of the input contains integers l1, r1, l2, r2 and k (1 ≤ l1, r1, l2, r2, k ≤ 1018, l1 ≤ r1, l2 ≤ r2), providing the segments of time for Sonya and Filya and the moment of time when Sonya prinks.", "output_spec": "Print one integer — the number of minutes Sonya and Filya will be able to spend together.", "sample_inputs": ["1 10 9 20 1", "1 100 50 200 75"], "sample_outputs": ["2", "50"], "notes": "NoteIn the first sample, they will be together during minutes 9 and 10.In the second sample, they will be together from minute 50 to minute 74 and from minute 76 to minute 100."}, "positive_code": [{"source_code": "function stradd(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) + (parseInt(b[j])||0) + carry\n carry = tmp >= 10 ? 1 : 0\n res = (tmp%10).toString() + res\n }\n return carry ? '1'+res : res\n}\n\nfunction strsub(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) - (parseInt(b[j])||0) - carry\n if (tmp < 0) tmp += 10, carry = 1\n else carry = 0\n res = tmp.toString() + res\n }\n return res\n}\n\nfunction strz(a, n) {\n if (a.length >= n) return a\n var res = a\n for (var i = a.length ; i < n ; i++) {\n res = '0' + res\n }\n return res\n}\n\nfunction trimz(a) {\n var i = 0\n while (a[i] === '0') i++\n return a.substr(i)||'0'\n}\n\nvar given = readline().split(' '),\n length = given.reduce((p,v,i,a)=>{return Math.max(p,v.length)}, 0),\n normz = given.map((v,i,a)=>{return strz(v, length)}),\n start = normz[0] > normz[2] ? normz[0] : normz[2],\n end = normz[1] > normz[3] ? normz[3] : normz [1]\n\nif (end < start) print('0')\nelse if (normz[4] >= start && normz[4] <= end) print(trimz(strsub(end,start)))\nelse print(trimz(stradd('1', strsub(end, start))))\n\n/*\nfunction readIntTabLine(n) {\n var l = readline().split(' ')\n for (var i = 0 ; i < n ; i++) {\n l[i] = parseInt(l[i])\n }\n return l\n}\n\nvar given = readIntTabLine(5)\n\nvar start = Math.max(given[0],given[2]),\n end = Math.min(given[1],given[3])\n\nif (end < start) print(0)\nelse if (given[4] >= start && given[4] <= end) print(end - start)\nelse print(end - start + 1)\n*/\n"}], "negative_code": [{"source_code": "function stradd(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) + (parseInt(b[j])||0) + carry\n carry = tmp >= 10 ? 1 : 0\n res = (tmp%10).toString() + res\n }\n return carry ? '1'+res : res\n}\n\nfunction strsub(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) - (parseInt(b[j])||0) - carry\n if (tmp < 0) tmp += 10, carry = 1\n else carry = 0\n res = tmp.toString() + res\n }\n return res\n}\n\nfunction strz(a, n) {\n if (a.length >= n) return a\n var res = a\n for (var i = a.length ; i < n ; i++) {\n res = '0' + res\n }\n return res\n}\n\nfunction trimz(a) {\n var i = 0\n while (a[i] === '0') i++\n return a.substr(i)||'0'\n}\n\nvar given = readline().split(' '),\n length = given.reduce((p,v,i,a)=>{return Math.max(p,v.length)}, 0),\n normz = given.map((v,i,a)=>{return strz(v, length)}),\n start = normz[0] > normz[2] ? normz[0] : normz[2],\n end = normz[1] > normz[3] ? normz[3] : normz [1]\nprint(normz,start,end)\nif (end < start) print('0')\nelse if (normz[4] >= start && normz[4] <= end) print(trimz(strsub(end,start)))\nelse print(trimz(stradd('1', strsub(end, start))))\n\n/*\nfunction readIntTabLine(n) {\n var l = readline().split(' ')\n for (var i = 0 ; i < n ; i++) {\n l[i] = parseInt(l[i])\n }\n return l\n}\n\nvar given = readIntTabLine(5)\n\nvar start = Math.max(given[0],given[2]),\n end = Math.min(given[1],given[3])\n\nif (end < start) print(0)\nelse if (given[4] >= start && given[4] <= end) print(end - start)\nelse print(end - start + 1)\n*/\n"}, {"source_code": "function stradd(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) + (parseInt(b[j])||0) + carry\n carry = tmp >= 10 ? 1 : 0\n res = (tmp%10).toString() + res\n }\n return carry ? '1'+res : res\n}\n\nfunction strsub(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) - (parseInt(b[j])||0) - carry\n if (tmp < 0) tmp += 10, carry = 1\n res = tmp.toString() + res\n }\n return res\n}\n\nfunction strz(a, n) {\n if (a.length >= n) return a\n var res = a\n for (var i = a.length ; i < n ; i++) {\n res = '0' + res\n }\n return res\n}\n\nfunction trimz(a) {\n var i = 0\n while (a[i] === '0') i++\n return a.substr(i)\n}\n\nvar given = readline().split(' '),\n length = given.reduce((p,v,i,a)=>{return Math.max(p,v.length)}, 0),\n normz = given.map((v,i,a)=>{return strz(v, length)}),\n start = normz[0] > normz[2] ? normz[0] : normz[2],\n end = normz[1] > normz[3] ? normz[3] : normz [1]\nprint(start,end)\nif (end < start) print('0')\nelse if (normz[4] >= start && normz[4] <= end) print(trimz(strsub(end,start)))\nelse print(trimz(stradd('1', strsub(end, start))))\n\n/*\nfunction readIntTabLine(n) {\n var l = readline().split(' ')\n for (var i = 0 ; i < n ; i++) {\n l[i] = parseInt(l[i])\n }\n return l\n}\n\nvar given = readIntTabLine(5)\n\nvar start = Math.max(given[0],given[2]),\n end = Math.min(given[1],given[3])\n\nif (end < start) print(0)\nelse if (given[4] >= start && given[4] <= end) print(end - start)\nelse print(end - start + 1)\n*/\n"}, {"source_code": "function stradd(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) + (parseInt(b[j])||0) + carry\n carry = tmp >= 10 ? 1 : 0\n res = (tmp%10).toString() + res\n }\n return carry ? '1'+res : res\n}\n\nfunction strsub(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) - (parseInt(b[j])||0) - carry\n if (tmp < 0) tmp += 10, carry = 1\n res = tmp.toString() + res\n }\n return res\n}\n\nfunction strz(a, n) {\n if (a.length >= n) return a\n var res = a\n for (var i = a.length ; i < n ; i++) {\n res = '0' + res\n }\n return res\n}\n\nfunction trimz(a) {\n var i = 0\n while (a[i] === '0') i++\n return a.substr(i)||'0'\n}\n\nvar given = readline().split(' '),\n length = given.reduce((p,v,i,a)=>{return Math.max(p,v.length)}, 0),\n normz = given.map((v,i,a)=>{return strz(v, length)}),\n start = normz[0] > normz[2] ? normz[0] : normz[2],\n end = normz[1] > normz[3] ? normz[3] : normz [1]\n\nif (end < start) print('0')\nelse if (normz[4] >= start && normz[4] <= end) print(trimz(strsub(end,start)))\nelse print(trimz(stradd('1', strsub(end, start))))\n\n/*\nfunction readIntTabLine(n) {\n var l = readline().split(' ')\n for (var i = 0 ; i < n ; i++) {\n l[i] = parseInt(l[i])\n }\n return l\n}\n\nvar given = readIntTabLine(5)\n\nvar start = Math.max(given[0],given[2]),\n end = Math.min(given[1],given[3])\n\nif (end < start) print(0)\nelse if (given[4] >= start && given[4] <= end) print(end - start)\nelse print(end - start + 1)\n*/\n"}, {"source_code": "function stradd(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) + (parseInt(b[j])||0) + carry\n carry = tmp >= 10 ? 1 : 0\n res = (tmp%10).toString() + res\n }\n return carry ? '1'+res : res\n}\n\nfunction strsub(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) - (parseInt(b[j])||0) - carry\n if (tmp < 0) tmp += 10, carry = 1\n res = tmp.toString() + res\n }\n return res\n}\n\nfunction strz(a, n) {\n if (a.length >= n) return a\n var res = a\n for (var i = a.length ; i < n ; i++) {\n res = '0' + res\n }\n return res\n}\n\nfunction trimz(a) {\n var i = 0\n while (a[i] === '0') i++\n return a.substr(i)\n}\n\nvar given = readline().split(' '),\n length = given.reduce((p,v,i,a)=>{return Math.max(p,v.length)}, 0),\n normz = given.map((v,i,a)=>{return strz(v, length)}),\n start = normz[0] > normz[2] ? normz[0] : normz[2],\n end = normz[1] > normz[3] ? normz[3] : normz [1]\n\nif (end < start) print('0')\nelse if (normz[4] >= start && normz[4] <= end) print(trimz(strsub(end,start)))\nelse print(trimz(stradd('1', strsub(end, start))))\n\n/*\nfunction readIntTabLine(n) {\n var l = readline().split(' ')\n for (var i = 0 ; i < n ; i++) {\n l[i] = parseInt(l[i])\n }\n return l\n}\n\nvar given = readIntTabLine(5)\n\nvar start = Math.max(given[0],given[2]),\n end = Math.min(given[1],given[3])\n\nif (end < start) print(0)\nelse if (given[4] >= start && given[4] <= end) print(end - start)\nelse print(end - start + 1)\n*/\n"}, {"source_code": "function stradd(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) + (parseInt(b[j])||0) + carry\n carry = tmp >= 10 ? 1 : 0\n res = (tmp%10).toString() + res\n }\n return carry ? '1'+res : res\n}\n\nfunction strsub(a, b) {\n var res = \"\",\n carry = 0,\n tmp = 0\n for (var i = a.length-1, j = b.length-1 ; i >= 0 || j >= 0 ; i--, j--) {\n tmp = (parseInt(a[i])||0) - (parseInt(b[j])||0) - carry\n if (tmp < 0) tmp += 10, carry = 1\n res = tmp.toString() + res\n }\n return res\n}\n\nfunction strz(a, n) {\n if (a.length >= n) return a\n var res = a\n for (var i = a.length ; i < n ; i++) {\n res = '0' + res\n }\n return res\n}\n\nfunction trimz(a) {\n var i = 0\n while (a[i] === '0') i++\n return a.substr(i)\n}\n\nvar given = readline().split(' '),\n length = given.reduce((p,v,i,a)=>{return Math.max(p,v.length)}, 0),\n normz = given.map((v,i,a)=>{return strz(v, length)}),\n start = normz[0] > normz[2] ? normz[0] : normz[2],\n end = normz[1] > normz[3] ? normz[3] : normz [1]\n\nif (end < start) print('0')\nelse if (normz[4] >= start && normz[4] <= end) print(trimz(strsub(end,start)))\nelse print(trimz(stradd(1, strsub(end, start))))\n\n/*\nfunction readIntTabLine(n) {\n var l = readline().split(' ')\n for (var i = 0 ; i < n ; i++) {\n l[i] = parseInt(l[i])\n }\n return l\n}\n\nvar given = readIntTabLine(5)\n\nvar start = Math.max(given[0],given[2]),\n end = Math.min(given[1],given[3])\n\nif (end < start) print(0)\nelse if (given[4] >= start && given[4] <= end) print(end - start)\nelse print(end - start + 1)\n*/\n"}, {"source_code": "function readIntTabLine(n) {\n var l = readline().split(' ')\n for (var i = 0 ; i < n ; i++) {\n l[i] = parseInt(l[i])\n }\n return l\n}\n\nvar given = readIntTabLine(5)\n\nvar start = Math.max(given[0],given[2]),\n end = Math.min(given[1],given[3])\n\nif (end < start) print(0)\nelse if (given[4] >= start && given[4] <= end) print(end - start)\nelse print(end - start + 1)\n"}], "src_uid": "9a74b3b0e9f3a351f2136842e9565a82"} {"nl": {"description": "Valera has got n domino pieces in a row. Each piece consists of two halves — the upper one and the lower one. Each of the halves contains a number from 1 to 6. Valera loves even integers very much, so he wants the sum of the numbers on the upper halves and the sum of the numbers on the lower halves to be even.To do that, Valera can rotate the dominoes by 180 degrees. After the rotation the upper and the lower halves swap places. This action takes one second. Help Valera find out the minimum time he must spend rotating dominoes to make his wish come true.", "input_spec": "The first line contains integer n (1 ≤ n ≤ 100), denoting the number of dominoes Valera has. Next n lines contain two space-separated integers xi, yi (1 ≤ xi, yi ≤ 6). Number xi is initially written on the upper half of the i-th domino, yi is initially written on the lower half.", "output_spec": "Print a single number — the minimum required number of seconds. If Valera can't do the task in any time, print  - 1.", "sample_inputs": ["2\n4 2\n6 4", "1\n2 3", "3\n1 4\n2 3\n4 4"], "sample_outputs": ["0", "-1", "1"], "notes": "NoteIn the first test case the sum of the numbers on the upper halves equals 10 and the sum of the numbers on the lower halves equals 6. Both numbers are even, so Valera doesn't required to do anything.In the second sample Valera has only one piece of domino. It is written 3 on the one of its halves, therefore one of the sums will always be odd.In the third case Valera can rotate the first piece, and after that the sum on the upper halves will be equal to 10, and the sum on the lower halves will be equal to 8."}, "positive_code": [{"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', inputStd => inputString += inputStd);\nprocess.stdin.on('end', () => {\n inputString = inputString.trim().split('\\n').map(str => str.trim());\n solve();\n});\nlet readLine = () => inputString[currentLine++];\n\nfunction solve(){\n const n = +(readLine());\n let a = [], b = [];\n let suma = 0, sumb = 0;\n for(let i = 0; i < n; i++){\n let line = readLine();\n a.push(+(line[0]));\n b.push(+(line[2]));\n suma += a[i];\n sumb += b[i];\n }\n let check = (s,t) => s%2 == 0 && t%2 == 0;\n let bool = false;\n if(check(suma, sumb)){\n console.log(0);\n return;\n }\n for(let i = 0; i < n; i++){\n let at = suma, bt = sumb;\n at -= a[i];\n bt -= b[i];\n at += b[i];\n bt += a[i];\n if(check(at, bt)){\n console.log(1);\n return;\n }\n }\n console.log(-1);\n}\n"}, {"source_code": "var n=+readline();\nvar f=false;\nvar low=0;\nvar high=0;\nwhile(n--){\n\t(function(x, y){\n\t\tif(x%2!==y%2) f=true;\n\t\tlow+=x;\n\t\thigh+=y;\n\t}).apply(0, readline().split(' ').map(Number));\n}\nif(low%2===high%2){\n\tif(low%2===0){\n\t\tprint(0);\n\t}else if(f){\n\t\tprint(1);\n\t}else{\n\t\tprint(-1);\n\t}\n}else{\n\tprint(-1);\n}"}, {"source_code": "function rda(){ return readline().split(\" \").map(Number); }\nfunction rdn(){ return Number(readline()); }\n\nvar n = rdn();\nvar l = 0, r = 0, dif = false;\nfor(var i = 0; i < n; i++){\n var inp = rda();\n l += inp[0];\n r += inp[1];\n if( (inp[0]%2 == 1 && inp[1]%2 == 0) || (inp[1]%2 == 1 && inp[0]%2 == 0) ){\n dif = true;\n }\n}\n\nvar ans;\nif(l%2 == 0 && r%2 == 0){\n ans = 0;\n}else if(l%2 == 1 && r%2 == 1 && dif){\n ans = 1;\n}else{\n ans = -1;\n}\n\nwrite(ans);"}, {"source_code": "var n=+readline();\nvar f=false;\nvar low=0;\nvar high=0;\nwhile(n--){\n\t(function(x, y){\n\t\tif(x%2!==y%2) f=true;\n\t\tlow+=x;\n\t\thigh+=y;\n\t}).apply(0, readline().split(' ').map(Number));\n}\nif(low%2===high%2){\n\tif(low%2===0){\n\t\tprint(0);\n\t}else if(f){\n\t\tprint(1);\n\t}else{\n\t\tprint(-1);\n\t}\n}else{\n\tprint(-1);\n}"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar numDominoes = parseInt(readline(), 10);\n\tvar sums = [0, 0],\n\t\tparity = [0, 1, 0, 1, 0, 1, 0],\n\t\tfoundImbalancedDomino = false;\n\n\tfor (var dominoIndex = 0; dominoIndex < numDominoes; ++dominoIndex) {\n\t\tvar domino = tokenizeIntegers(readline());\n\t\tsums[0] += domino[0];\n\t\tsums[1] += domino[1];\n\t\tif (!foundImbalancedDomino && parity[domino[0]] != parity[domino[1]]) {\n\t\t\tfoundImbalancedDomino = true;\n\t\t}\n\t}\n\n\tvar left = sums[0] % 2, right = sums[1] % 2;\n\n\tif (left == 0 && right == 0) {\n\t\tprint(0);\n\t}\n\telse if (left == 1 && right == 1) {\n\t\tprint(foundImbalancedDomino ? 1 : -1);\n\t}\n\telse {\n\t\tprint(-1);\n\t}\n}\n\nmain();\n"}, {"source_code": "(function (){\n var i, j, n = parseInt(readline());\n var a = [], sumup = 0, sumlow = 0;\n for(i = 0 ; i < n ; ++i){\n a[i] = readline().split(' ');\n a[i][0] = parseInt(a[i][0]);\n a[i][1] = parseInt(a[i][1]);\n sumup += a[i][0];\n sumlow += a[i][1];\n }\n var time = 0;\n if ( sumup % 2 + sumlow % 2 == 2 ){\n for(i = 0 ; i < n ; ++i){\n if ( a[i][0] % 2 + a[i][1] % 2 == 1 ){\n time = 1;\n break;\n }\n }\n if ( time == 0 ) --time;\n }else if ( sumup % 2 + sumlow % 2 == 1 ){\n time = -1;\n }\n print(time);\n\n})();"}], "negative_code": [{"source_code": ";(function () {\n\tvar n = +readline();\n\tvar d = [];\n\n\tvar s = 0;\n\tfor (var i = 0; i < n; i++) d.push( readline().split(' ').map(function (e) { e = +e; s += e; return e; }) );\n\n\tif (s % 2) {\n\t\tprint(-1);\n\t\treturn;\n\t}\n\n\ts = d.reduce(function (p, e) { return p + e[0]; }, 0);\n\tprint( s%2 ? 1 : ( n != 1 ? 0 : -1 ) );\n\n}).call(this);"}, {"source_code": ";(function () {\n\tvar n = +readline();\n\tvar d = [];\n\n\tvar s = 0;\n\tfor (var i = 0; i < n; i++) d.push( readline().split(' ').map(function (e) { e = +e; s += e; return e; }) );\n\n\tif (s % 2) {\n\t\tprint(-1);\n\t\treturn;\n\t}\n\n\ts = d.reduce(function (p, e) { return p + e[0]; }, 0);\n\tprint( s%2 ? 1 : 0 );\n\n}).call(this);"}, {"source_code": ";(function () {\n\tvar n = +readline();\n\tvar d = [];\n\n\tvar s = 0;\n\tfor (var i = 0; i < n; i++) d.push( readline().split(' ').map(function (e) { e = +e; s += e; return e; }) );\n\n\tif (s % 2 || n == 1) {\n\t\tprint(-1);\n\t\treturn;\n\t}\n\n\ts = d.reduce(function (p, e) { return p + e[0]; }, 0);\n\tprint( s%2 ? 1 : 0 );\n\n}).call(this);"}, {"source_code": ";(function () {\n\tvar n = +readline();\n\tvar d = [];\n\n\tfor (var i = 0; i < n; i++) d.push( readline().split(' ').map( Number ) );\n\n\tvar s = 0;\n\ts = d.reduce( function (p, e) { return p + e[0] + e[1]; }, 0 );\n\n\tif (s % 2) {\n\t\tprint(-1);\n\t\treturn;\n\t}\n\n\tvar t = 0;\n\tt = d.reduce(function (p, e) { return p + ( e[0] % 2 && e[1] % 2 ); }, 0);\n\n\tif (!(t % 2) && t != 0) {\n\t\tprint(-1);\n\t\treturn;\n\t}\n\n\tprint( d.reduce( function (p, e) { return p + e[0]; }, 0 ) % 2 ? 1 : 0 );\n\n}).call(this);"}, {"source_code": "(function (){\n var i, j, n = parseInt(readline());\n var a = [], sumup = 0, sumlow = 0;\n for(i = 0 ; i < n ; ++i){\n a[i] = readline().split(' ');\n sumup += a[i][0];\n sumlow += a[i][1];\n }\n var time = 0;\n if ( sumup % 2 + sumlow % 2 == 2 ){\n for(i = 0 ; i < n ; ++i){\n if ( a[i][0] % 2 + a[i][1] % 2 == 1 ){\n time = 1;\n break;\n }\n }\n }else if ( sumup % 2 + sumlow % 2 == 1 ){\n time = -1;\n }\n print(time);\n\n})();"}, {"source_code": "(function (){\n var i, j, n = parseInt(readline());\n var a = [], sumup = 0, sumlow = 0;\n for(i = 0 ; i < n ; ++i){\n a[i] = readline().split(' ');\n sumup += a[i][0];\n sumlow += a[i][1];\n }\n var time = 0;\n if ( sumup % 2 + sumlow % 2 == 2 ){\n for(i = 0 ; i < n ; ++i){\n if ( a[i][0] % 2 + a[i] % 2 == 1 ){\n time = 1;\n break;\n }\n }\n }else if ( sumup % 2 + sumlow % 2 == 1 ){\n time = -1;\n }\n print(time);\n\n})();"}, {"source_code": "(function (){\n var i, j, n = parseInt(readline());\n var a = [], sumup = 0, sumlow = 0;\n for(i = 0 ; i < n ; ++i){\n a[i] = readline().split(' ');\n a[i][0] = parseInt(a[i][0]);\n a[i][1] = parseInt(a[i][1]);\n sumup += a[i][0];\n sumlow += a[i][1];\n }\n var time = 0;\n if ( sumup % 2 + sumlow % 2 == 2 ){\n for(i = 0 ; i < n ; ++i){\n if ( a[i][0] % 2 + a[i][1] % 2 == 1 ){\n time = 1;\n break;\n }\n }\n }else if ( sumup % 2 + sumlow % 2 == 1 ){\n time = -1;\n }\n print(time);\n\n})();"}], "src_uid": "f9bc04aed2b84c7dd288749ac264bb43"} {"nl": {"description": "Two bored soldiers are playing card war. Their card deck consists of exactly n cards, numbered from 1 to n, all values are different. They divide cards between them in some manner, it's possible that they have different number of cards. Then they play a \"war\"-like card game. The rules are following. On each turn a fight happens. Each of them picks card from the top of his stack and puts on the table. The one whose card value is bigger wins this fight and takes both cards from the table to the bottom of his stack. More precisely, he first takes his opponent's card and puts to the bottom of his stack, and then he puts his card to the bottom of his stack. If after some turn one of the player's stack becomes empty, he loses and the other one wins. You have to calculate how many fights will happen and who will win the game, or state that game won't end.", "input_spec": "First line contains a single integer n (2 ≤ n ≤ 10), the number of cards. Second line contains integer k1 (1 ≤ k1 ≤ n - 1), the number of the first soldier's cards. Then follow k1 integers that are the values on the first soldier's cards, from top to bottom of his stack. Third line contains integer k2 (k1 + k2 = n), the number of the second soldier's cards. Then follow k2 integers that are the values on the second soldier's cards, from top to bottom of his stack. All card values are different.", "output_spec": "If somebody wins in this game, print 2 integers where the first one stands for the number of fights before end of game and the second one is 1 or 2 showing which player has won. If the game won't end and will continue forever output  - 1.", "sample_inputs": ["4\n2 1 3\n2 4 2", "3\n1 2\n2 1 3"], "sample_outputs": ["6 2", "-1"], "notes": "NoteFirst sample: Second sample: "}, "positive_code": [{"source_code": "function Stack(){this.a=[]}function Queue(){this.l=new Stack,this.r=new Stack}function Reader(){this.b=[],this.c=0}function Writer(){this.l=[\"\"],this.c=0}Array.prototype.back=function(){return this[this.length-1]},Math.gcd=function(t,i){return i?gcd(i,t%i):t},Math.lcm=function(t,i){return t/gcd(t,i)*i},Math.sign=function(t){return(t>0)-(0>t)},Math.cmp=function(t,i){return(+t>+i)-(+i>+t)},Math.icmp=function(t,i){return(+i>+t)-(+t>+i)},Stack.prototype.empty=function(){return 0==this.a.length},Stack.prototype.push=function(t){this.a.push(t)},Stack.prototype.pop=function(){return this.empty()?void 0:this.a.pop()},Stack.prototype.top=function(){return this.empty()?void 0:this.a[this.a.length-1]},Stack.prototype.clear=function(){this.a=[]},Stack.prototype.size=function(){return this.a.length},Queue.prototype.push=function(t){this.l.push(t)},Queue.prototype.empty=function(){return this.r.empty()&&this.l.empty()},Queue.prototype.pop=function(){if(this.r.empty())for(;!this.l.empty();)this.r.push(this.l.pop());return this.r.empty()?void 0:this.r.pop()},Queue.prototype.front=function(){if(this.r.empty())for(;!this.l.empty();)this.r.push(this.l.pop());return this.r.empty()?void 0:this.r.top()},Queue.prototype.size=function(){return l.size()+r.size()},Queue.prototype.clear=function(){l.clear(),r.clear()},Reader.prototype.next=function(){return this.c==this.b.length&&(this.c=0,this.b=readline().split(\" \")),this.b[this.c++]},Writer.prototype.print=function(t){this.l[this.c]+=t},Writer.prototype.println=function(t){this.l[this.c]+=t,this.l.push(\"\"),++this.c},Writer.prototype.flush=function(){print(this.l.join(\"\\n\")),this.l=[]};\n\nfunction main(cin, cout)\n{\n var n = +cin.next();\n var k1 = +cin.next();\n var q1 = new Queue();\n var q2 = new Queue();\n var t;\n for(var i = 0; i < k1; ++i)\n {\n t = +cin.next();\n q1.push(t);\n }\n var k2 = +cin.next();\n for(var i = 0; i < k2; ++i)\n {\n t = +cin.next(); \n q2.push(t);\n }\n var iter = 0;\n var c1, c2;\n \n while(!q1.empty() && !q2.empty())\n {\n c1 = q1.front();\n q1.pop();\n c2 = q2.front();\n q2.pop();\n if (c1 > c2)\n {\n q1.push(c2);\n q1.push(c1);\n } else\n {\n q2.push(c1);\n q2.push(c2);\n }\n iter++;\n if (iter == 10000000)\n break;\n }\n if (iter == 10000000)\n cout.print(\"-1\");\n else\n cout.print(iter + \" \" + (q1.empty() ? 2 : 1));\n}\n\nvar cin = new Reader();\nvar cout = new Writer(); \n\nmain(cin, cout);\n\ncout.flush();"}, {"source_code": "function ProblemSolver() {\n this.HAS_TEST_CASES = false;\n this.INPUT_FILE_NAME = \"test.in\";\n this.OUTPUT_FILE_NAME = \"out.txt\";\n this.DO_OUTPUT_TO_FILE = false;\n this.CLEAR_ARRAY_PER_CASE = false;\n \n this.rec = function( arr , brr , firstFlag , cn ) {\n \tvar res , r1 , newArr , newBrr , fl , sz , i , sz1 , sz2 ;\n \tif( cn > 1000 ) {\n \t\treturn -1 ;\n \t}\n \tif( firstFlag == false && arr.length == this.baseCaseArr.length && brr.length == this.baseCaseBrr.length ) {\n \t\tfl = 1 ;\n \t\tsz = arr.length ;\n \t\tfor( i = 0 ; i < sz ; i++ ) {\n \t\t\tif( arr[ i ] != this.baseCaseArr[ i ] ) {\n \t\t\t\tfl = 0 ;\n \t\t\t\tbreak ;\n \t\t\t}\n \t\t}\n \t\tsz = brr.length ;\n \t\tfor( i = 0 ; i < sz ; i++ ) {\n \t\t\tif( brr[ i ] != this.baseCaseBrr[ i ] ) {\n \t\t\t\tfl = 0 ;\n \t\t\t\tbreak ;\n \t\t\t}\n \t\t}\n \t\tif( fl == 1 ) {\n \t\t\treturn -1 ;\n \t\t}\n \t}\n \tif( arr.length == 0 ) {\n \t\tthis.winner = 2 ;\n \t\treturn 0 ;\n \t}\n \tif( brr.length == 0 ) {\n \t\tthis.winner = 1 ;\n \t\treturn 0 ;\n \t}\n \tnewArr = [] ;\n \tnewBrr = [] ;\n \tsz1 = arr.length ;\n \tsz2 = brr.length ;\n \tfor( i = 1 ; i < sz1 ; i++ ) {\n\t\t\tnewArr.push( arr[ i ] ) ;\n\t\t}\n\t\tfor( i = 1 ; i < sz2 ; i++ ) {\n\t\t\tnewBrr.push( brr[ i ] ) ;\n\t\t}\n \tif( arr[ 0 ] > brr[ 0 ] ) {\n \t\tnewArr.push( brr[ 0 ] ) ;\n \t\tnewArr.push( arr[ 0 ] ) ;\n \t}\n \telse {\n \t\tnewBrr.push( arr[ 0 ] ) ;\n \t\tnewBrr.push( brr[ 0 ] ) ;\n \t}\n \tr1 = this.rec( newArr , newBrr , false , cn + 1 ) ;\n \tif( r1 == -1 ) {\n \t\tres = -1 ;\n \t}\n \telse {\n \t\tres = r1 + 1 ;\n \t}\n \treturn res ;\n } ;\n\n this.solveCase = function() {\n var res , i , j , fl , cn , temp ;\n res = 0 ;\n this.baseCaseArr = [] ;\n for( i = 0 ; i < this.k1 ; i++ ) {\n \tthis.baseCaseArr.push( this.arr[ i ] ) ;\n }\n this.baseCaseBrr = [] ;\n for( i = 0 ; i < this.k2 ; i++ ) {\n \tthis.baseCaseBrr.push( this.brr[ i ] ) ;\n }\n this.winner = -1 ;\n res = this.rec( this.arr , this.brr , true , 0 ) ;\n if( res == -1 ) {\n \tprint( res );\n }\n else {\n \tprint( res + ' ' + this.winner );\n }\n };\n\n this.init = function() {\n this.lim1 = 100010;\n this.lim2 = 110;\n this.cc = 1;\n this.ind = 1;\n this.n = 0;\n this.cn = 0;\n this.declareAndFillArrays();\n };\n\n this.getInput = function( irObj ) {\n var hasMoreInput , i;\n hasMoreInput = true;\n try {\n this.n = irObj.nextInt();\n this.k1 = irObj.nextInt();\n this.arr = [] ;\n for( i = 0 ; i < this.k1 ; i++ ) {\n this.arr.push( irObj.nextInt() ) ;\n }\n this.brr = [] ;\n this.k2 = irObj.nextInt();\n for( i = 0 ; i < this.k2 ; i++ ) {\n this.brr.push( irObj.nextInt() ) ;\n }\n }\n catch( ex ) {\n hasMoreInput = false;\n }\n return hasMoreInput;\n };\n\n this.clearArraysPerCase = function() {\n var i;\n this.arr = new Array();\n this.adj_list = new Array();\n for( i = 0 ; i < this.lim1 ; i++ ) {\n this.arr.push( 0 );\n this.adj_list.push( new Array() );\n }\n };\n\n this.clearPerCase = function() {\n this.cn = 0;\n this.cc++;\n if( this.CLEAR_ARRAY_PER_CASE == true ) {\n this.clearArraysPerCase() ;\n }\n };\n\n this.declareAndFillArrays = function() {\n var i , j;\n this.srr = new Array();\n this.vis = new Array();\n this.arr = new Array();\n this.brr = new Array();\n this.memo = new Array();\n this.done = new Array();\n this.adj_list = new Array();\n for( i = 0 ; i < this.lim1 ; i++ ) {\n this.srr.push( \"\" );\n this.vis.push( 0 );\n this.arr.push( 0 );\n this.brr.push( 0 );\n this.adj_list.push( new Array() );\n }\n for( i = 0 ; i < this.lim2 ; i++ ) {\n this.memo.push( new Array() );\n this.done.push( new Array() );\n for( j = 0 ; j < this.lim2 ; j++ ) {\n this.memo[ i ].push( -1 );\n this.done[ i ].push( 0 );\n }\n }\n };\n\n this.init();\n}\n\nfunction InputReader() {\n var self = this ;\n this.allLines = new Array();\n this.currrentLineNumber = 0;\n this.currrentCharacterIndex = 0;\n this.callBackFunction = null ;\n this.parentContext = null ;\n\n this.readAllLines = function() {\n var singleLine;\n while( true ) {\n try {\n singleLine = readline();\n if( singleLine == null ) {\n break;\n }\n }\n catch( ex ) {\n break;\n }\n this.allLines.push( singleLine );\n }\n };\n \n this.readAllLinesFromRhino = function() {\n var brObj , line ;\n importPackage( java.io ) ;\n importPackage( java.lang ) ;\n brObj = new BufferedReader( new InputStreamReader( System[ 'in' ] ) ) ;\n this.allLines = [] ;\n while( true ) {\n line = brObj.readLine() ;\n if( line == null ) {\n break;\n }\n this.allLines.push( line ) ;\n }\n };\n \n this.readSingleLinesFromNodeJsJudgeServer = function( chunk ) {\n self.chunkData += chunk ;\n };\n\n this.readEndFromNodeJsJudgeServer = function() {\n self.parseRawData( self.chunkData ) ;\n self.parentContext.runCases() ;\n };\n \n this.readAllLinesFromNodeJsJudgeServer = function( parentContext ) {\n this.parentContext = parentContext ;\n process.stdin.resume() ;\n process.stdin.setEncoding( 'utf8' ) ;\n this.chunkData = '' ;\n process.stdin.on( 'data' , this.readSingleLinesFromNodeJsJudgeServer ) ;\n process.stdin.on( 'end' , this.readEndFromNodeJsJudgeServer ) ;\n };\n\n this.parseRawData = function( data ) {\n var len , i , currentString;\n len = data.length;\n currentString = \"\";\n this.allLines = [] ;\n for( i = 0 ; i < len ; i++ ) {\n if( data[ i ] == '\\r' ) {\n }\n else if( data[ i ] == '\\n' ) {\n this.allLines.push( currentString );\n currentString = \"\";\n }\n else {\n currentString += data[ i ];\n }\n }\n if( currentString != \"\" ) {\n this.allLines.push( currentString );\n }\n };\n\n this.readAllLinesFromFile = function( inputFileName ) {\n var currentDirectory , fsObj , inputFilePath , rawData;\n fsObj = require( 'fs' );\n currentDirectory = __dirname;\n inputFilePath = currentDirectory + \"\\\\\" + inputFileName;\n rawData = fsObj.readFileSync( inputFilePath , \"utf8\" );\n this.parseRawData( rawData );\n };\n\n this.next = function( flag ) {\n var len , i , startIdx , res , endIdx;\n if( flag == 0 ) {\n if( this.currrentCharacterIndex != 0 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n }\n res = \"\";\n len = this.allLines[ this.currrentLineNumber ].length;\n if( typeof( len ) == 'function' ) {\n len = this.allLines[ this.currrentLineNumber ].length() ;\n }\n for( i = this.currrentCharacterIndex ; i < len ; i++ ) {\n res += '' + this.allLines[ this.currrentLineNumber ].charAt( i ) ;\n }\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n return res;\n }\n while( true ) {\n if( this.currrentLineNumber >= this.allLines.length ) {\n throw new Error( \"No more tokens available!\" );\n }\n startIdx = -1;\n len = this.allLines[ this.currrentLineNumber ].length;\n if( typeof( len ) == 'function' ) {\n len = this.allLines[ this.currrentLineNumber ].length() ;\n }\n for( i = this.currrentCharacterIndex ; i < len ; i++ ) {\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) != ' '.charCodeAt( 0 ) ) {\n startIdx = i;\n break;\n }\n }\n if( startIdx == -1 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n continue;\n }\n res = \"\";\n endIdx = len - 1 ;\n for( i = startIdx ; i < len ; i++ ) {\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) == ' '.charCodeAt( 0 ) ) {\n endIdx = i;\n break;\n }\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) >= 48 && this.allLines[ this.currrentLineNumber ].charCodeAt( i ) <= 57 ) {\n res += '' + ( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) - 48 ) ;\n }\n else {\n res += '' + this.allLines[ this.currrentLineNumber ].charAt( i );\n }\n }\n this.currrentCharacterIndex = endIdx;\n if( endIdx == len - 1 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n }\n return res;\n }\n };\n\n this.nextInt = function() {\n return parseInt( this.next( 1 ) );\n };\n\n this.nextDouble = function() {\n return parseFloat( this.next( 1 ) );\n };\n\n this.nextString = function() {\n return this.next( 1 );\n };\n\n this.nextLine = function() {\n return this.next( 0 );\n };\n}\n\nfunction FileOutputHandler() {\n this.resultantStringArray = new Array();\n\n this.addNewLine = function( newString ) {\n this.resultantStringArray.push( newString );\n };\n\n this.clearPercase = function() {\n this.resultantStringArray = new Array();\n };\n\n this.flushOutOutputToFile = function( outputFileName ) {\n var i , sz , res , currentDirectory , fsObj , outputFilePath;\n res = \"\";\n sz = this.resultantStringArray.length;\n for( i = 0 ; i < sz ; i++ ) {\n if( i != 0 ) {\n res += \"\\n\";\n }\n res += this.resultantStringArray[ i ];\n }\n fsObj = require( 'fs' );\n currentDirectory = __dirname;\n outputFilePath = currentDirectory + \"\\\\\" + outputFileName;\n fsObj.writeFileSync( outputFilePath , res );\n this.clearPercase();\n };\n}\n\nfunction CodeExecutioner() {\n this.irObj = new InputReader();\n this.psObj = new ProblemSolver();\n this.fohObj = new FileOutputHandler();\n\n this.runCases = function() {\n if( this.psObj.HAS_TEST_CASES == true ) {\n testCases = this.irObj.nextInt();\n for( i = 0 ; i < testCases ; i++ ) {\n this.psObj.clearPerCase();\n this.psObj.getInput( this.irObj );\n this.psObj.solveCase();\n }\n }\n else {\n while( true ) {\n this.psObj.clearPerCase();\n hasMoreTestCases = this.psObj.getInput( this.irObj );\n if( hasMoreTestCases == false ) {\n break;\n }\n this.psObj.solveCase();\n }\n }\n if( this.psObj.DO_OUTPUT_TO_FILE == true ) {\n this.fohObj.flushOutOutputToFile( this.psObj.OUTPUT_FILE_NAME );\n }\n };\n\n this.detectEnvironmentType = function() {\n var environmentType = null ;\n try {\n if( importPackage != null ) {\n environmentType = 'rhino' ;\n }\n }\n catch( ex1 ) {\n try {\n //for nodejs local server check\n if( __dirname != null && readline != null && typeof( readline ) != 'function' ) {\n environmentType = 'local-node-js' ;\n }\n }\n catch( ex2 ) {\n try {\n if( readline == null || typeof( readline ) != 'function' ) {\n environmentType = 'server-node-js' ;\n }\n else {\n try {\n if( Map != null ) {\n environmentType = 'spider-monkey' ;\n }\n else {\n environmentType = 'javascript-v8' ;\n }\n }\n catch( ex3 ) {\n environmentType = 'javascript-v8' ;\n }\n }\n }\n catch( ex3 ) {\n environmentType = 'server-node-js' ;\n }\n }\n }\n return environmentType ;\n };\n\n this.configureStreamsAndReadInput = function() {\n var testCases , i , hasMoreTestCases , isLocal , localContext , isNodeJsJudgeServer , environmentType ;\n isNodeJsJudgeServer = false ;\n environmentType = this.detectEnvironmentType() ;\n if( environmentType == 'local-node-js' ) {\n try {\n if( print == null || typeof( print ) != 'function' ) {\n print = console.log;\n }\n }\n catch( ex ) {\n print = console.log;\n }\n if( this.psObj.DO_OUTPUT_TO_FILE == true ) {\n localContext = this.fohObj;\n print = function() {\n localContext.addNewLine.apply( localContext , arguments );\n }\n }\n this.irObj.readAllLinesFromFile( this.psObj.INPUT_FILE_NAME );\n this.runCases() ;\n }\n else if( environmentType == 'server-node-js' ) {\n try {\n if( print == null || typeof( print ) != 'function' ) {\n print = console.log;\n }\n }\n catch( ex ) {\n print = console.log;\n }\n this.irObj.readAllLinesFromNodeJsJudgeServer( this ) ;\n }\n else if( environmentType == 'javascript-v8' ) {\n this.irObj.readAllLines();\n this.runCases() ;\n }\n else if( environmentType == 'rhino' ) {\n this.irObj.readAllLinesFromRhino();\n this.runCases() ;\n }\n else if( environmentType == 'spider-monkey' ) {\n this.irObj.readAllLines();\n this.runCases() ;\n }\n };\n \n this.configureStreamsAndReadInput();\n}\n\nnew CodeExecutioner();\n"}], "negative_code": [], "src_uid": "f587b1867754e6958c3d7e0fe368ec6e"} {"nl": {"description": "Mikhail walks on a 2D plane. He can go either up or right. You are given a sequence of Mikhail's moves. He thinks that this sequence is too long and he wants to make it as short as possible.In the given sequence moving up is described by character U and moving right is described by character R. Mikhail can replace any pair of consecutive moves RU or UR with a diagonal move (described as character D). After that, he can go on and do some other replacements, until there is no pair of consecutive moves RU or UR left.Your problem is to print the minimum possible length of the sequence of moves after the replacements.", "input_spec": "The first line of the input contains one integer n (1 ≤ n ≤ 100) — the length of the sequence. The second line contains the sequence consisting of n characters U and R.", "output_spec": "Print the minimum possible length of the sequence of moves after all replacements are done.", "sample_inputs": ["5\nRUURU", "17\nUUURRRRRUUURURUUU"], "sample_outputs": ["3", "13"], "notes": "NoteIn the first test the shortened sequence of moves may be DUD (its length is 3).In the second test the shortened sequence of moves can be UUDRRRDUDDUUU (its length is 13)."}, "positive_code": [{"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n\tvar N = nextInt();\n\tvar s = next();\n\tvar output = 0;\n\tfor(var i = 0; i < N; i++){\n\t\tif(s[i] == \"U\" && s[i + 1] == \"R\" || s[i] == \"R\" && s[i + 1] == \"U\"){\n\t\t\toutput++;\n\t\t\ti++;\n\t\t}else{\n\t\t\toutput++;\n\t\t}\n\t}\n\tmyout(output);\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (str) => {\n if (c === 0) {\n c++;\n return;\n }\n\n let ans = 0;\n\n for (let i = 0; i < str.length; i++) {\n if (str[i] === 'R' && str[i + 1] === 'U' || str[i] === 'U' && str[i + 1] === 'R') {\n ans++;\n i++;\n }\n else {\n ans++;\n }\n }\n\n console.log(ans);\n\n c++;\n});\n"}, {"source_code": "let data = '';\nprocess.stdin.on('data', c => data += c);\nconst solution = () => {\n\tlet line = data.split('\\n');\n\tlet n = parseInt(line[0], 10);\n\tlet a = line[1].replace(/RU|UR/g,\"D\").trim();\n\tconsole.log(a.length);\n\t\n};\n\n\nprocess.stdin.on('end', solution);"}, {"source_code": "print((readline(),readline().replace(/UR|RU/g, 'D').length));"}, {"source_code": "function main() {\n var n = readline();\n var line = readline();\n\n line = line.replace(/(UR|RU)/g, 'D');\n\n print(line.length);\n}\n\nmain();\n"}, {"source_code": "readline();\nvar walk = readline();\nvar pointer = 0;\nvar counter = 0;\nwhile (pointer < (walk.length - 1)) {\n if (walk[pointer] != walk[pointer + 1]) {\n counter++;\n pointer += 2;\n } else {\n pointer++;\n }\n}\nprint(walk.length - counter);\n"}, {"source_code": "n = readline();\nstr = readline().split('');\n\nvar count = 0;\n\nfor (var i = 0; i < n; i++) {\n\tif ((str[i] == 'R' && str[i + 1] == 'U') || (str[i] == 'U' && str[i + 1] == 'R')) {\n\t\tcount++;\n\t\ti++;\n\t} else {\n\t\tcount++;\n\t};\n};\n\nprint(count);"}], "negative_code": [{"source_code": "let data = '';\nprocess.stdin.on('data', c => data += c);\nconst solution = () => {\n\tlet line = data.split('\\n');\n\tlet n = parseInt(line[0], 10);\n\tlet a = line[1].replace(\"RU\",\"D\").replace(\"UR\",\"D\");\n\tconsole.log(a.length);\n\t\n};\n\n\nprocess.stdin.on('end', solution);"}, {"source_code": "let data = '';\nprocess.stdin.on('data', c => data += c);\nconst solution = () => {\n\tlet line = data.split('\\n');\n\tlet n = parseInt(line[0], 10);\n\tlet a = line[1].replace(/RU|UR/g,\"D\");\n\tconsole.log(a.length);\n\t\n};\n\n\nprocess.stdin.on('end', solution);\n"}, {"source_code": "function main() {\n var n = readline();\n var line = readline();\n\n line = line.replace(/UR/g, 'D');\n line = line.replace(/RU/g, 'D');\n\n print(line.length);\n}\n\nmain();\n"}, {"source_code": "var walk = readline();\nvar pointer = 0;\nvar counter = 0;\nwhile (pointer < (walk.length - 1)) {\n if (walk[pointer] != walk[pointer + 1]) {\n counter++;\n pointer += 2;\n } else {\n pointer++;\n }\n}\nprint(walk.length - counter);\n"}], "src_uid": "986ae418ce82435badadb0bd5588f45b"} {"nl": {"description": "You are given a non-negative integer n, its decimal representation consists of at most 100 digits and doesn't contain leading zeroes.Your task is to determine if it is possible in this case to remove some of the digits (possibly not remove any digit at all) so that the result contains at least one digit, forms a non-negative integer, doesn't have leading zeroes and is divisible by 8. After the removing, it is forbidden to rearrange the digits.If a solution exists, you should print it.", "input_spec": "The single line of the input contains a non-negative integer n. The representation of number n doesn't contain any leading zeroes and its length doesn't exceed 100 digits. ", "output_spec": "Print \"NO\" (without quotes), if there is no such way to remove some digits from number n. Otherwise, print \"YES\" in the first line and the resulting number after removing digits from number n in the second line. The printed number must be divisible by 8. If there are multiple possible answers, you may print any of them.", "sample_inputs": ["3454", "10", "111111"], "sample_outputs": ["YES\n344", "YES\n0", "NO"], "notes": null}, "positive_code": [{"source_code": "function rda(){ return readline().split(\" \").map(Number); }\nfunction rdn(){ return +readline(); }\n\nvar n = readline().split(\"\").map(Number);\n\nvar ans = \"NO\";\n\nfor(var i = 0; i < n.length; i++){\n if(ans != \"NO\") break;\n var x = n[i];\n if(x % 8 == 0){\n ans = \"YES\\n\" + x;\n break;\n }\n}\n\nfor(var i = 0; i < n.length; i++){\n if(ans != \"NO\") break;\n for(var j = i+1; j < n.length; j++){\n if(ans != \"NO\") break;\n var x = n[i]*10 + n[j];\n if(x % 8 == 0){\n ans = \"YES\\n\" + x;\n break;\n }\n }\n}\n\nfor(var i = 0; i < n.length; i++){\n if(ans != \"NO\") break;\n for(var j = i+1; j < n.length; j++){\n if(ans != \"NO\") break;\n for(var k = j+1; k < n.length; k++){\n if(ans != \"NO\") break;\n var x = n[i]*100 + n[j]*10 + n[k];\n if(x % 8 == 0){\n ans = \"YES\\n\" + x;\n break;\n }\n }\n }\n}\n\nwrite(ans);"}, {"source_code": "function ProblemSolver() {\n this.HAS_TEST_CASES = false;\n this.INPUT_FILE_NAME = \"test.in\";\n this.OUTPUT_FILE_NAME = \"out.txt\";\n this.DO_OUTPUT_TO_FILE = false;\n this.CLEAR_ARRAY_PER_CASE = false;\n\n\tthis.dp = function( i , rem , fl ) {\n\t\tvar ret , res , r1 , re , a ;\n\t\tif( i >= this.n ) {\n\t\t\tif( rem == 0 && fl == 1 ) {\n\t\t\t\treturn 1 ;\n\t\t\t}\n\t\t\treturn 0 ;\n\t\t}\n\t\tre = this.done[ i ][ rem ][ fl ] ;\n\t\tret = this.memo[ i ][ rem ][ fl ] ;\n\t\tif( re == this.cc ) {\n\t\t\treturn ret ;\n\t\t}\n\t\tthis.done[ i ][ rem ][ fl ] = this.cc ;\n\t\tres = 0 ;\n\t\tr1 = this.dp( i + 1 , rem , fl ) ;\n\t\tres |= r1 ;\n\t\ta = this.s.charCodeAt( i ) - '0'.charCodeAt( 0 ) ;\n\t\tr1 = this.dp( i + 1 , ( rem * 10 + a ) % 8 , 1 ) ;\n\t\tres |= r1 ;\n\t\tthis.memo[ i ][ rem ][ fl ] = res ;\n\t\treturn res ;\n\t} ;\n\t\n\tthis.dpPrint = function( i , rem , fl ) {\n\t\tvar r1 , a ;\n\t\tif( i >= this.n ) {\n\t\t\treturn '' ;\n\t\t}\n\t\tr1 = this.dp( i + 1 , rem , fl ) ;\n\t\tif( r1 == 1 ) {\n\t\t\treturn this.dpPrint( i + 1 , rem , fl ) ;\n\t\t}\n\t\ta = this.s.charCodeAt( i ) - '0'.charCodeAt( 0 ) ;\n\t\tr1 = this.dp( i + 1 , ( rem * 10 + a ) % 8 , 1 ) ;\n\t\tif( r1 == 1 ) {\n\t\t\treturn this.s.charAt( i ) + this.dpPrint( i + 1 , ( rem * 10 + a ) % 8 , 1 ) ;\n\t\t}\n\t} ;\n\n this.solveCase = function() {\n var res , i , j , fl , cn , temp , len , numberString , resNumber ;\n res = 0 ;\n this.n = this.s.length ;\n res = this.dp( 0 , 0 , 0 ) ;\n if( res == 0 ) {\n \tprint( 'NO' );\n }\n else {\n \tprint( 'YES' );\n \tnumberString = this.dpPrint( 0 , 0 , 0 ) ;\n \tlen = numberString.length ;\n \tresNumber = '' ;\n \tfl = 0 ;\n \tfor( i = 0 ; i < len ; i++ ) {\n \t\tif( numberString.charCodeAt( i ) > '0'.charCodeAt( 0 ) ) {\n \t\t\tfl = 1 ;\n \t\t}\n \t\tif( fl == 1 ) {\n \t\t\tresNumber += numberString.charAt( i ) ;\n \t\t}\n \t}\n \tif( resNumber == '' ) {\n \t\tresNumber = '0' ;\n \t}\n \tprint( resNumber );\n }\n };\n\n this.init = function() {\n this.lim1 = 100010;\n this.lim2 = 110;\n this.cc = 1;\n this.ind = 1;\n this.n = 0;\n this.cn = 0;\n this.declareAndFillArrays();\n };\n\n this.getInput = function( irObj ) {\n var hasMoreInput , i;\n hasMoreInput = true;\n try {\n this.s = irObj.nextString();\n }\n catch( ex ) {\n hasMoreInput = false;\n }\n return hasMoreInput;\n };\n\n this.clearArraysPerCase = function() {\n var i;\n this.arr = new Array();\n this.adjList = new Array();\n for( i = 0 ; i < this.lim1 ; i++ ) {\n this.arr.push( 0 );\n this.adjList.push( new Array() );\n }\n };\n\n this.clearPerCase = function() {\n this.cn = 0;\n this.cc++;\n if( this.CLEAR_ARRAY_PER_CASE == true ) {\n this.clearArraysPerCase() ;\n }\n };\n\n this.declareAndFillArrays = function() {\n var i , j;\n this.srr = new Array();\n this.vis = new Array();\n this.arr = new Array();\n this.brr = new Array();\n this.memo = new Array();\n this.done = new Array();\n this.adjList = new Array();\n for( i = 0 ; i < this.lim1 ; i++ ) {\n this.srr.push( \"\" );\n this.vis.push( 0 );\n this.arr.push( 0 );\n this.brr.push( 0 );\n this.adjList.push( new Array() );\n }\n for( i = 0 ; i < this.lim2 ; i++ ) {\n this.memo.push( new Array() );\n this.done.push( new Array() );\n for( j = 0 ; j < this.lim2 ; j++ ) {\n this.memo[ i ].push( new Array() );\n this.done[ i ].push( new Array() );\n for( k = 0 ; k < 2 ; k++ ) {\n \tthis.memo[ i ][ j ].push( -1 );\n \tthis.done[ i ][ j ].push( 0 );\n }\n }\n }\n };\n\n this.init();\n}\n\nfunction InputReader() {\n var self = this ;\n this.allLines = new Array();\n this.currrentLineNumber = 0;\n this.currrentCharacterIndex = 0;\n this.callBackFunction = null ;\n this.parentContext = null ;\n\n this.readAllLines = function() {\n var singleLine;\n while( true ) {\n try {\n singleLine = readline();\n if( singleLine == null ) {\n break;\n }\n }\n catch( ex ) {\n break;\n }\n this.allLines.push( singleLine );\n }\n };\n \n this.readAllLinesFromRhino = function() {\n var brObj , line ;\n importPackage( java.io ) ;\n importPackage( java.lang ) ;\n brObj = new BufferedReader( new InputStreamReader( System[ 'in' ] ) ) ;\n this.allLines = [] ;\n while( true ) {\n line = brObj.readLine() ;\n if( line == null ) {\n break;\n }\n this.allLines.push( line ) ;\n }\n };\n \n this.readSingleLinesFromNodeJsJudgeServer = function( chunk ) {\n self.chunkData += chunk ;\n };\n\n this.readEndFromNodeJsJudgeServer = function() {\n self.parseRawData( self.chunkData ) ;\n self.parentContext.runCases() ;\n };\n \n this.readAllLinesFromNodeJsJudgeServer = function( parentContext ) {\n this.parentContext = parentContext ;\n process.stdin.resume() ;\n process.stdin.setEncoding( 'utf8' ) ;\n this.chunkData = '' ;\n process.stdin.on( 'data' , this.readSingleLinesFromNodeJsJudgeServer ) ;\n process.stdin.on( 'end' , this.readEndFromNodeJsJudgeServer ) ;\n };\n\n this.parseRawData = function( data ) {\n var len , i , currentString;\n len = data.length;\n currentString = \"\";\n this.allLines = [] ;\n for( i = 0 ; i < len ; i++ ) {\n if( data[ i ] == '\\r' ) {\n }\n else if( data[ i ] == '\\n' ) {\n this.allLines.push( currentString );\n currentString = \"\";\n }\n else {\n currentString += data[ i ];\n }\n }\n if( currentString != \"\" ) {\n this.allLines.push( currentString );\n }\n };\n\n this.readAllLinesFromFile = function( inputFileName ) {\n var currentDirectory , fsObj , inputFilePath , rawData;\n fsObj = require( 'fs' );\n currentDirectory = __dirname;\n inputFilePath = currentDirectory + \"\\\\\" + inputFileName;\n rawData = fsObj.readFileSync( inputFilePath , \"utf8\" );\n this.parseRawData( rawData );\n };\n\n this.next = function( flag ) {\n var len , i , startIdx , res , endIdx;\n if( flag == 0 ) {\n if( this.currrentCharacterIndex != 0 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n }\n res = \"\";\n len = this.allLines[ this.currrentLineNumber ].length;\n if( typeof( len ) == 'function' ) {\n len = this.allLines[ this.currrentLineNumber ].length() ;\n }\n for( i = this.currrentCharacterIndex ; i < len ; i++ ) {\n res += '' + this.allLines[ this.currrentLineNumber ].charAt( i ) ;\n }\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n return res;\n }\n while( true ) {\n if( this.currrentLineNumber >= this.allLines.length ) {\n throw new Error( \"No more tokens available!\" );\n }\n startIdx = -1;\n len = this.allLines[ this.currrentLineNumber ].length;\n if( typeof( len ) == 'function' ) {\n len = this.allLines[ this.currrentLineNumber ].length() ;\n }\n for( i = this.currrentCharacterIndex ; i < len ; i++ ) {\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) != ' '.charCodeAt( 0 ) ) {\n startIdx = i;\n break;\n }\n }\n if( startIdx == -1 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n continue;\n }\n res = \"\";\n endIdx = len - 1 ;\n for( i = startIdx ; i < len ; i++ ) {\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) == ' '.charCodeAt( 0 ) ) {\n endIdx = i;\n break;\n }\n if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) >= 48 && this.allLines[ this.currrentLineNumber ].charCodeAt( i ) <= 57 ) {\n res += '' + ( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) - 48 ) ;\n }\n else {\n res += '' + this.allLines[ this.currrentLineNumber ].charAt( i );\n }\n }\n this.currrentCharacterIndex = endIdx;\n if( endIdx == len - 1 ) {\n this.currrentLineNumber++;\n this.currrentCharacterIndex = 0;\n }\n return res;\n }\n };\n\n this.nextInt = function() {\n return parseInt( this.next( 1 ) );\n };\n\n this.nextDouble = function() {\n return parseFloat( this.next( 1 ) );\n };\n\n this.nextString = function() {\n return this.next( 1 );\n };\n\n this.nextLine = function() {\n return this.next( 0 );\n };\n}\n\nfunction FileOutputHandler() {\n this.resultantStringArray = new Array();\n\n this.addNewLine = function( newString ) {\n this.resultantStringArray.push( newString );\n };\n\n this.clearPercase = function() {\n this.resultantStringArray = new Array();\n };\n\n this.flushOutOutputToFile = function( outputFileName ) {\n var i , sz , res , currentDirectory , fsObj , outputFilePath;\n res = \"\";\n sz = this.resultantStringArray.length;\n for( i = 0 ; i < sz ; i++ ) {\n if( i != 0 ) {\n res += \"\\n\";\n }\n res += this.resultantStringArray[ i ];\n }\n fsObj = require( 'fs' );\n currentDirectory = __dirname;\n outputFilePath = currentDirectory + \"\\\\\" + outputFileName;\n fsObj.writeFileSync( outputFilePath , res );\n this.clearPercase();\n };\n}\n\nfunction CodeExecutioner() {\n this.irObj = new InputReader();\n this.psObj = new ProblemSolver();\n this.fohObj = new FileOutputHandler();\n\n this.runCases = function() {\n if( this.psObj.HAS_TEST_CASES == true ) {\n testCases = this.irObj.nextInt();\n for( i = 0 ; i < testCases ; i++ ) {\n this.psObj.clearPerCase();\n this.psObj.getInput( this.irObj );\n this.psObj.solveCase();\n }\n }\n else {\n while( true ) {\n this.psObj.clearPerCase();\n hasMoreTestCases = this.psObj.getInput( this.irObj );\n if( hasMoreTestCases == false ) {\n break;\n }\n this.psObj.solveCase();\n }\n }\n if( this.psObj.DO_OUTPUT_TO_FILE == true ) {\n this.fohObj.flushOutOutputToFile( this.psObj.OUTPUT_FILE_NAME );\n }\n };\n\n this.detectEnvironmentType = function() {\n var environmentType = null ;\n try {\n if( importPackage != null ) {\n environmentType = 'rhino' ;\n }\n }\n catch( ex1 ) {\n try {\n //for nodejs local server check\n if( __dirname != null && readline != null && typeof( readline ) != 'function' ) {\n environmentType = 'local-node-js' ;\n }\n }\n catch( ex2 ) {\n try {\n if( readline == null || typeof( readline ) != 'function' ) {\n environmentType = 'server-node-js' ;\n }\n else {\n try {\n if( Map != null ) {\n environmentType = 'spider-monkey' ;\n }\n else {\n environmentType = 'javascript-v8' ;\n }\n }\n catch( ex3 ) {\n environmentType = 'javascript-v8' ;\n }\n }\n }\n catch( ex3 ) {\n environmentType = 'server-node-js' ;\n }\n }\n }\n return environmentType ;\n };\n\n this.configureStreamsAndReadInput = function() {\n var testCases , i , hasMoreTestCases , isLocal , localContext , isNodeJsJudgeServer , environmentType ;\n isNodeJsJudgeServer = false ;\n environmentType = this.detectEnvironmentType() ;\n if( environmentType == 'local-node-js' ) {\n try {\n if( print == null || typeof( print ) != 'function' ) {\n print = console.log;\n }\n }\n catch( ex ) {\n print = console.log;\n }\n if( this.psObj.DO_OUTPUT_TO_FILE == true ) {\n localContext = this.fohObj;\n print = function() {\n localContext.addNewLine.apply( localContext , arguments );\n }\n }\n this.irObj.readAllLinesFromFile( this.psObj.INPUT_FILE_NAME );\n this.runCases() ;\n }\n else if( environmentType == 'server-node-js' ) {\n try {\n if( print == null || typeof( print ) != 'function' ) {\n print = console.log;\n }\n }\n catch( ex ) {\n print = console.log;\n }\n this.irObj.readAllLinesFromNodeJsJudgeServer( this ) ;\n }\n else if( environmentType == 'javascript-v8' ) {\n this.irObj.readAllLines();\n this.runCases() ;\n }\n else if( environmentType == 'rhino' ) {\n this.irObj.readAllLinesFromRhino();\n this.runCases() ;\n }\n else if( environmentType == 'spider-monkey' ) {\n this.irObj.readAllLines();\n this.runCases() ;\n }\n };\n \n this.configureStreamsAndReadInput();\n}\n\nnew CodeExecutioner();\n"}, {"source_code": "const memo = {};\n\nfunction isDivisibleBy8(n) {\n if (n.length >= 3) {\n var lastThree = parseInt(n.slice(n.length - 3), 10);\n if (lastThree % 8 === 0) {\n return true;\n }\n return false;\n }\n var remainder = parseInt(n, 10) % 8;\n return remainder === 0;\n}\n\nfunction resolve(n) {\n if (n.length === 0) {\n return null;\n }\n if (memo[n] === null) {\n return null;\n }\n if (isDivisibleBy8(n)) {\n return n;\n }\n if (n.length >= 3) {\n var arr = n.split('');\n for (var i = 1; i < 4; i++) {\n var sub = arr\n .slice(0, n.length - i)\n .concat(arr.slice(n.length - i + 1))\n .join('');\n var res = resolve(sub);\n if (res !== null) {\n return res;\n }\n }\n }\n if (n.length === 2) {\n if (n[0] === '0' || n[1] === '0') {\n return '0';\n }\n if (n[0] === '8' || n[1] === '8') {\n return '8';\n }\n }\n memo[n] = null;\n return null;\n}\n\n//test\nconst k = readline();\n\nconst result = resolve(k);\n\nprint(result === null ? 'NO' : 'YES\\n' + result);\n"}, {"source_code": "const memo = {};\n\nfunction isDivisibleBy8(n) {\n if (n.length >= 3) {\n var lastThree = parseInt(n.slice(n.length - 3), 10);\n if (lastThree % 8 === 0) {\n return true;\n }\n return false;\n }\n var remainder = parseInt(n, 10) % 8;\n return remainder === 0;\n}\n\nfunction resolve(n) {\n if (n.length === 0) {\n return null;\n }\n if (memo[n] === null) {\n return null;\n }\n if (isDivisibleBy8(n)) {\n return n;\n }\n if (n.length >= 3) {\n var arr = n.split('');\n for (var i = 1; i < 4; i++) {\n var sub = arr\n .slice(0, n.length - i)\n .concat(arr.slice(n.length - i + 1))\n .join('');\n var res = resolve(sub);\n if (res !== null) {\n return res;\n }\n }\n }\n if (n.length === 2) {\n if (n[0] === '8' || n[1] === '8') {\n return '8';\n }\n if (n[0] === '0' || n[1] === '0') {\n return '0';\n }\n }\n memo[n] = null;\n return null;\n}\n\nconst k = readline();\n\nconst result = resolve(k);\n\nprint(result === null ? 'NO' : 'YES\\n' + result);\n"}, {"source_code": "const memo = {};\n\nfunction isDivisibleBy8(n) {\n if (n.length >= 3) {\n var lastThree = parseInt(n.slice(n.length - 3), 10);\n if (lastThree % 8 === 0) {\n return true;\n }\n return false;\n }\n var remainder = parseInt(n, 10) % 8;\n return remainder === 0;\n}\n\nfunction resolve(n) {\n if (n.length === 0) {\n return null;\n }\n if (memo[n] === null) {\n return null;\n }\n if (isDivisibleBy8(n)) {\n return n;\n }\n if (n.length >= 3) {\n var arr = n.split('');\n for (var i = 1; i < 4; i++) {\n var sub = arr\n .slice(0, n.length - i)\n .concat(arr.slice(n.length - i + 1))\n .join('');\n var res = resolve(sub);\n if (res !== null) {\n return res;\n }\n }\n }\n if (n.length === 2) {\n if (n[0] === '0' || n[1] === '0') {\n return '0';\n }\n if (n[0] === '8' || n[1] === '8') {\n return '8';\n }\n }\n memo[n] = null;\n return null;\n}\n\nconst k = readline();\n\nconst result = resolve(k);\n\nprint(result === null ? 'NO' : 'YES\\n' + result);\n"}, {"source_code": "var input = readline();\nvar check = [];\nfor (var i = 0;i<1000;i++){\n if (i%8 == 0){\n check.push(i.toString());\n }\n}\nvar finded = false;\nfor (var k = 0 ;k=3){\n print('YES');\n print(input[0]+'000');\n }\n else\n print('NO');\n}\n"}], "negative_code": [{"source_code": "const memo = {};\n\nfunction isDivisibleBy8(n) {\n if (n.length >= 3) {\n var lastThree = parseInt(n.slice(n.length - 3), 10);\n if (lastThree % 8 === 0) {\n return true;\n }\n return false;\n }\n var remainder = n % 8;\n return remainder === 0;\n}\n\nfunction resolve(n) {\n if (memo[n] === null) {\n return null;\n }\n if (isDivisibleBy8(n)) {\n return n;\n } else {\n var arr = n.split('');\n for (var i = 0; i < arr.length; i++) {\n var sub = arr\n .slice(0, i)\n .concat(arr.slice(i + 1))\n .join('');\n var res = resolve(sub);\n if (res !== null) {\n return res;\n }\n }\n memo[n] = null;\n return null;\n }\n}\n\nconst k = readline();\n\nconst result = resolve(k);\n\nprint(result === null ? 'NO' : 'YES\\n' + result);\n"}, {"source_code": "const memo = {};\n\nfunction resolve(n) {\n if (memo[n] === null) {\n return null;\n }\n if (parseInt(n, 10) % 8 === 0) {\n return n;\n } else {\n var arr = n.split('');\n for (var i = 0; i < arr.length; i++) {\n var sub = arr\n .slice(0, i)\n .concat(arr.slice(i + 1))\n .join('');\n var res = resolve(sub);\n if (res !== null) {\n return res;\n }\n }\n memo[n] = null;\n return null;\n }\n}\n\nconst k = readline();\n\nconst result = resolve(k);\n\nprint(result === null ? 'NO' : 'YES\\n' + result);\n"}], "src_uid": "0a2a5927d24c70aca24fc17aa686499e"} {"nl": {"description": "Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0, 0) and Varda's home is located in point (a, b). In each step, he can move in a unit distance in horizontal or vertical direction. In other words, from position (x, y) he can go to positions (x + 1, y), (x - 1, y), (x, y + 1) or (x, y - 1). Unfortunately, Drazil doesn't have sense of direction. So he randomly chooses the direction he will go to in each step. He may accidentally return back to his house during his travel. Drazil may even not notice that he has arrived to (a, b) and continue travelling. Luckily, Drazil arrived to the position (a, b) successfully. Drazil said to Varda: \"It took me exactly s steps to travel from my house to yours\". But Varda is confused about his words, she is not sure that it is possible to get from (0, 0) to (a, b) in exactly s steps. Can you find out if it is possible for Varda?", "input_spec": "You are given three integers a, b, and s ( - 109 ≤ a, b ≤ 109, 1 ≤ s ≤ 2·109) in a single line.", "output_spec": "If you think Drazil made a mistake and it is impossible to take exactly s steps and get from his home to Varda's home, print \"No\" (without quotes). Otherwise, print \"Yes\".", "sample_inputs": ["5 5 11", "10 15 25", "0 5 1", "0 0 2"], "sample_outputs": ["No", "Yes", "No", "Yes"], "notes": "NoteIn fourth sample case one possible route is: ."}, "positive_code": [{"source_code": "var input = readline().split(\" \"), a = +input[0], b = +input[1], s = +input[2];\n\nif( s < (Math.abs(a) + Math.abs(b)) ){\n\twrite(\"No\");\n}\nelse if( s == (Math.abs(a) + Math.abs(b)) ){\n\twrite(\"Yes\");\n}\nelse{\n\ts -= (Math.abs(a) + Math.abs(b));\n\tif(s % 2 == 0){\n\t\twrite(\"Yes\");\n\t}\n\telse{\n\t\twrite(\"No\");\n\t}\n}"}, {"source_code": "///////////////////////////////////////////////////////////////////////////////\nfunction readNumber () { return Number(readline()); }\nfunction readNumbersArray () { return readline().split(' ').map(Number); }\nfunction algebraicSum (startValue, finishValue, size) { return (startValue + finishValue) * size / 2; }\n///////////////////////////////////////////////////////////////////////////////\n\nprint((function () {\n\n\tvar array = readNumbersArray();\n\tvar a = Math.abs(array[0]), b = Math.abs(array[1]), s = array[2];\n\n\tif (a + b > s) return 'No';\n\tif (a + b === s) return 'Yes';\n\treturn ((s - a - b) % 2 === 0) ? 'Yes' : 'No';\n})());\n"}, {"source_code": "var tok = null;\nvar index = 0;\nfunction next() {\n while (tok == null || index == tok.length) {\n tok = readline().split(' ');\n index = 0;\n }\n var res = tok[index++];\n return res;\n}\n\nfunction nextInt() {\n return parseInt(next());\n}\n\nfunction sortNumber(a, b) {\n return a - b;\n}\n\nfunction main() {\n var a=nextInt();\nvar b=nextInt();\nvar s=nextInt();\nvar c=Math.abs(a)+Math.abs(b);\nif(s>=c&&(s-c)%2==0){\nprint(\"Yes\");\n}else{\nprint(\"No\");\n}\n}\n\nmain();\n"}, {"source_code": "var data = readline().split(' ');\nvar dist1 = parseInt(data[0]);\nvar dist2 = parseInt(data[1]);\nvar dist3 = parseInt(data[2]);\ncalculate(dist1, dist2, dist3);\n\nfunction calculate(a, b, s)\n{\n var distance = Math.abs(a) + Math.abs(b);\n var extra = s - distance;\n if(extra < 0)\n {\n write('No');\n return;\n }\n if(extra % 2 !== 0)\n {\n write('No');\n return;\n }\n write('Yes');\n}\n"}, {"source_code": " var app = {\n 'main' : function main() {\n var result = 'NO',\n targetX, targetY, stepCount,\n minStepCount;\n\n targetX = readline().split(/\\s/gi).map(Number);\n targetY = Math.abs(targetX[1]);\n stepCount = targetX[2];\n targetX = Math.abs(targetX[0]);\n\n minStepCount = targetX + targetY;\n\n if(stepCount >= minStepCount) {\n if((stepCount - minStepCount) % 2 == 0) result = 'YES';\n else result = 'NO';\n }\n\n print(result);\n }\n };\n\napp.main();"}], "negative_code": [{"source_code": "var input = readline().split(\" \"), a = +input[0], b = +input[1], s = +input[2];\n\nif(s < a+b){\n\twrite(\"No\");\n}\nelse if(s == a+b){\n\twrite(\"Yes\");\n}\nelse{\n\ts -= a+b\n\tif(s % 2 == 0){\n\t\twrite(\"Yes\");\n\t}\n\telse{\n\t\twrite(\"No\");\n\t}\n}"}, {"source_code": "///////////////////////////////////////////////////////////////////////////////\nfunction readNumber () { return Number(readline()); }\nfunction readNumbersArray () { return readline().split(' ').map(Number); }\nfunction algebraicSum (startValue, finishValue, size) { return (startValue + finishValue) * size / 2; }\n///////////////////////////////////////////////////////////////////////////////\n\nprint((function () {\n\n\tvar array = readNumbersArray();\n\tvar a = array[0], b = array[1], s = array[2];\n\n\tif (a + b > s) return 'No';\n\tif (a + b === s) return 'Yes';\n\treturn ((s - a - b) % 2 === 0) ? 'Yes' : 'No';\n})());\n"}, {"source_code": "///////////////////////////////////////////////////////////////////////////////\nfunction readNumber () { return Number(readline()); }\nfunction readNumbersArray () { return readline().split(' ').map(Number); }\nfunction algebraicSum (startValue, finishValue, size) { return (startValue + finishValue) * size / 2; }\n///////////////////////////////////////////////////////////////////////////////\n\nprint((function () {\n\n\tvar array = readNumbersArray();\n\tvar a = array[0], b = array[1], s = array[2];\n\n\tif (a + b > s) return 'No';\n\tif (a + b === s) return 'Yes';\n\treturn ((s - a - b) % 2 === 0) ? 'No' : 'Yes';\n})());\n"}, {"source_code": "var tok = null;\nvar index = 0;\nfunction next() {\n while (tok == null || index == tok.length) {\n tok = readline().split(' ');\n index = 0;\n }\n var res = tok[index++];\n return res;\n}\n\nfunction nextInt() {\n return parseInt(next());\n}\n\nfunction sortNumber(a, b) {\n return a - b;\n}\n\nfunction main() {\n var a=nextInt();\nvar b=nextInt();\nvar s=nextInt();\nvar c=a+b;\nif(s>=c&&(s-c)%2==0){\nprint(\"Yes\");\n}else{\nprint(\"No\");\n}\n}\n\nmain();\n"}, {"source_code": " var app = {\n 'main' : function main() {\n var result = 'NO',\n targetX, targetY, stepCount,\n minStepCount;\n\n targetX = readline().split(/\\s/gi).map(Number);\n targetY = targetX[1];\n stepCount = targetX[2];\n targetX = targetX[0];\n\n minStepCount = targetX + targetY;\n\n if(stepCount >= minStepCount) {\n if((stepCount - minStepCount) % 2 == 0) result = 'YES';\n else result = 'NO';\n }\n\n print(result);\n }\n };\n\napp.main();"}], "src_uid": "9a955ce0775018ff4e5825700c13ed36"} {"nl": {"description": "The girl Taylor has a beautiful calendar for the year y. In the calendar all days are given with their days of week: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday.The calendar is so beautiful that she wants to know what is the next year after y when the calendar will be exactly the same. Help Taylor to find that year.Note that leap years has 366 days. The year is leap if it is divisible by 400 or it is divisible by 4, but not by 100 (https://en.wikipedia.org/wiki/Leap_year).", "input_spec": "The only line contains integer y (1000 ≤ y < 100'000) — the year of the calendar.", "output_spec": "Print the only integer y' — the next year after y when the calendar will be the same. Note that you should find the first year after y with the same calendar.", "sample_inputs": ["2016", "2000", "50501"], "sample_outputs": ["2044", "2028", "50507"], "notes": "NoteToday is Monday, the 13th of June, 2016."}, "positive_code": [{"source_code": "var year = parseInt(readline());\nvar isCurrYearLeap = isLeap(year);\nvar diff = 0;\nfunction isLeap(_year) {\n\tif (_year%4 !== 0){\n\t\treturn false;\n\t} else if (_year%100 !== 0) {\n\t\treturn true;\n\t} else if (_year%400 !== 0) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}\n\nwhile(true){\n\tif (isLeap(year)) {\n\t\tdiff += 2;\n\t} else {\n\t\tdiff += 1;\n\t}\n\tyear++;\n\tif(diff % 7 === 0 && isLeap(year) === isCurrYearLeap){\n\t\tbreak;\n\t}\n}\n\nprint(year);"}, {"source_code": "input = readline().split(' ');\nd = 0;\ntemp_year = year = parseInt(input[0]);\nwhile (true) {\n if (!(d % 7) && is_leap(year) == is_leap(temp_year) && d) {\n print(temp_year);\n break\n }\n temp_year++;\n d += (is_leap(temp_year) ? 366 : 365)\n}\n\nfunction is_leap(year) {\n return (!(year % 400) || (year % 100)) && !(year % 4)\n}"}], "negative_code": [], "src_uid": "565bbd09f79eb7bfe2f2da46647af0f2"} {"nl": {"description": "A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.", "input_spec": "Input contains one integer number n (1 ≤ n ≤ 3000).", "output_spec": "Output the amount of almost prime numbers between 1 and n, inclusive.", "sample_inputs": ["10", "21"], "sample_outputs": ["2", "8"], "notes": null}, "positive_code": [{"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n// utils\nconst MOD = 1e9 + 7;\nconst mod = (n) => ((n % MOD) + MOD) % MOD;\nconst add = (a, b) => mod(mod(a) + mod(b));\nfunction mul() {\n for (var a = arguments, r = a[0], i = a.length; --i; )\n r = ((((r >> 16) * a[i]) % MOD) * 65536 + (r & 65535) * a[i]) % MOD;\n return r;\n}\nfunction inv(b) {\n for (var a = MOD, u = 0, v = 1, t; b; v = t)\n (t = (a / b) | 0), (a -= t * b), (u -= t * v), (t = a), (a = b), (b = t), (t = u), (u = v);\n u %= MOD;\n return u < 0 ? u + MOD : u;\n}\n\nfunction main() {\n const n = +readLine();\n\n function countAlmostPrimes(n) {\n const primes = getAllPrimesUpto(n);\n let almostPrimeCount = 0;\n\n for (let i = 1; i <= n; i++) {\n let count = 0;\n let j = 0;\n while (primes[j] < i && j < n) {\n if (i % primes[j] === 0) count++;\n j++;\n }\n if (count === 2) almostPrimeCount++;\n }\n return almostPrimeCount;\n }\n\n console.log(countAlmostPrimes(n));\n}\n\nfunction getAllPrimesUpto(n) {\n const primes = [];\n for (let i = 2; i <= n; i++) {\n let isPrime = true;\n for (let j = 2; j <= Math.floor(Math.sqrt(i)); j++) {\n if (i % j === 0) {\n isPrime = false;\n break;\n }\n }\n if (isPrime) primes.push(i);\n }\n\n return primes;\n}\n"}, {"source_code": "\nconst readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nvar isPrime = function (n) {\n if (n === 2)\n return true;\n if (n % 2 === 0) return false;\n let limit = parseInt(Math.sqrt(n));\n for (let i = 3; i <= limit; i += 2) {\n if (n % i === 0)\n return false;\n }\n return true;\n}\n\n\nvar hasExactlyTwoPrimeDivs = function (n) {\n let counter = 0, limit = parseInt(n / 2);\n for (let i = 2; i <= limit; i++)\n counter += (n % i == 0 && isPrime(i));\n\n return counter == 2;\n}\n\n\n\nrl.on('line', function (input) {\n let n = parseInt(input), ans = 0;\n for (let i = 6; i <= n; i++)\n ans += hasExactlyTwoPrimeDivs(i);\n console.log(ans);\n rl.close();\n\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nconst getPrimes = (d) => {\n const maxN = d;\n const arr = new Array(maxN + 1).fill(1);\n arr[0] = 0;\n arr[1] = 0;\n\n for (let i = 2; i*i <= maxN; i++) {\n if (arr[i]) {\n for (let j = i*i; j <= maxN; j += i) {\n arr[j] = 0;\n }\n }\n }\n\n const primes = [];\n\n for (let i = 0; i < arr.length; i++) {\n if (arr[i]) {\n primes.push(i);\n }\n }\n\n return primes;\n}\n\nrl.on('line', (d) => {\n const primes = getPrimes(+d);\n\n let ans = 0;\n\n for (let i = 6; i <= +d; i++) {\n let primeDivisors = 0;\n for (let p = 0; p < primes.length; p++) {\n if (i % primes[p] === 0) {\n primeDivisors++;\n }\n }\n\n if (primeDivisors === 2) {\n ans++;\n }\n }\n\n console.log(ans);\n c++;\n});\n"}, {"source_code": "const readline = require('readline');\n\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n\nfunction isPrime(num) {\n if (num == 2) return true;\n if (num % 2 == 0 || num < 2) return false;\n let s = Math.sqrt(num);\n for (let i = 3; i <= s; i+=2) {\n if (num % i == 0) return false;\n }\n return true;\n};\n\nfunction hasExactlyTwoPrimeDivis(num) {\n var counter = 0;\n for (var i = 2; i < num; i++) {\n if (num % i == 0 && isPrime(i))\n counter++;\n if (counter > 2)\n return false;\n \n }\n return counter==2;\n}\n\n\nrl.on('line', (input) => {\n var N = parseInt(input);\n var ans = 0;\n for (let i = 6; i <= N; i++) \n ans+=hasExactlyTwoPrimeDivis(i);\n \n \n console.log(ans);\n rl.close();\n});\n\n\n"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n\n\n\n\nrl.on('line', function (input) {\n // myArr = input.split(' ').map(item => {return parseInt(item);});\nvar N = parseInt(input); \nvar Primes = [];\nfor(var i = 2; i <= N; i++)\n if (IsPrime(i)) Primes.push(i); \n \nvar ans = 0;\nfor (var i = 1; i <= N; i++)\n if (IsAlmostPrime(i, Primes)) ans++;\n \n \nconsole.log(ans);\n\n rl.close();\n})\n\n\n//******************************MY FUNCTIONS */\n\nfunction IsPrime(n)\n{\n if (n == 2 ) return true;\n if (n <= 1|| n%2==0)\n return false;\n //for (int i = 2; i <= n/2; i++)\n // if (n % i == 0)\n // return false;\n var limit = parseInt(Math.sqrt(n));\n for (var i = 3; i <= limit; i+=2) \n if (n % i == 0)\n return false;\n\n return true; \n}\n\nfunction IsAlmostPrime(n, pNums)\n{ \n var countDivisor = 0;\n for (var i = 0; i < pNums.length; i++)\n {\n if (n % pNums[i] == 0) countDivisor++;\n if (pNums[i] > n / 2) break;\n }\n return countDivisor == 2;\n}\n"}, {"source_code": "'use strict'\n\nconst N = +readline()\n\nlet s = getSimples(N)\n\nlet as = []\n\no: for (let i = 6; i <= N; i++) {\n let dc = 0\n for (let j = 0; j < s.length; j++) {\n if (!(i % s[j])) dc++\n }\n if (dc == 2) as.push(i)\n}\n\nprint(as.length)\n\nfunction getSimples (n) {\n let simples = [2]\n o: for (let i = 3; i <= n; i++) {\n for (let j = 0; j < simples.length | 0; j++) {\n if (!(i % simples[j])) continue o\n }\n simples.push(i)\n }\n return simples\n}"}, {"source_code": "var n = +readline(),\n nums = new Array(n + 1).fill(1);\n\nfor (var i = 2; i <= n; i ++)\n{\n if (nums[i] === 1)\n {\n for (var j = 2 * i; j <= n; j += i)\n {\n nums[j] ++;\n }\n }\n}\n\nvar total = 0;\nfor (var i = 2; i <= n; i ++)\n{\n if (nums[i] === 3)\n {\n total ++;\n }\n}\n\nprint(total);\n"}], "negative_code": [{"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n// utils\nconst MOD = 1e9 + 7;\nconst mod = (n) => ((n % MOD) + MOD) % MOD;\nconst add = (a, b) => mod(mod(a) + mod(b));\nfunction mul() {\n for (var a = arguments, r = a[0], i = a.length; --i; )\n r = ((((r >> 16) * a[i]) % MOD) * 65536 + (r & 65535) * a[i]) % MOD;\n return r;\n}\nfunction inv(b) {\n for (var a = MOD, u = 0, v = 1, t; b; v = t)\n (t = (a / b) | 0), (a -= t * b), (u -= t * v), (t = a), (a = b), (b = t), (t = u), (u = v);\n u %= MOD;\n return u < 0 ? u + MOD : u;\n}\n\nfunction main() {\n const n = +readLine();\n\n function countAlmostPrimes(n) {\n const primes = getAllPrimesUpto(n);\n let almostPrimeCount = 0;\n\n for (let i = 1; i <= n; i++) {\n let count = 0;\n let j = 0;\n while (primes[j] < i && j <= n) {\n if (i % primes[j] === 0) count++;\n if (count >= 2) {\n almostPrimeCount++;\n break;\n }\n j++;\n }\n }\n return almostPrimeCount;\n }\n\n console.log(countAlmostPrimes(n));\n}\n\nfunction getAllPrimesUpto(n) {\n const primes = [];\n for (let i = 2; i <= n; i++) {\n let isPrime = true;\n for (let j = 2; j <= Math.floor(Math.sqrt(i)); j++) {\n if (i % j === 0) {\n isPrime = false;\n break;\n }\n }\n if (isPrime) primes.push(i);\n }\n\n return primes;\n}\n"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n// utils\nconst MOD = 1e9 + 7;\nconst mod = (n) => ((n % MOD) + MOD) % MOD;\nconst add = (a, b) => mod(mod(a) + mod(b));\nfunction mul() {\n for (var a = arguments, r = a[0], i = a.length; --i; )\n r = ((((r >> 16) * a[i]) % MOD) * 65536 + (r & 65535) * a[i]) % MOD;\n return r;\n}\nfunction inv(b) {\n for (var a = MOD, u = 0, v = 1, t; b; v = t)\n (t = (a / b) | 0), (a -= t * b), (u -= t * v), (t = a), (a = b), (b = t), (t = u), (u = v);\n u %= MOD;\n return u < 0 ? u + MOD : u;\n}\n\nfunction main() {\n function countAlmostPrimes(n) {\n const primes = getAllPrimesUpto(n);\n let almostPrimeCount = 0;\n\n for (let i = 1; i <= n; i++) {\n let count = 0;\n let j = 0;\n while (primes[j] < i && j <= n) {\n if (i % primes[j] === 0) count++;\n if (count >= 2) {\n almostPrimeCount++;\n break;\n }\n j++;\n }\n }\n return almostPrimeCount;\n }\n\n console.log(countAlmostPrimes(3000));\n}\n\nfunction getAllPrimesUpto(n) {\n const primes = [];\n for (let i = 2; i <= n; i++) {\n let isPrime = true;\n for (let j = 2; j <= Math.floor(Math.sqrt(i)); j++) {\n if (i % j === 0) {\n isPrime = false;\n break;\n }\n }\n if (isPrime) primes.push(i);\n }\n\n return primes;\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nconst getPrimes = () => {\n const maxN = 25;\n const arr = new Array(maxN + 1).fill(1);\n arr[0] = 0;\n arr[1] = 0;\n\n for (let i = 2; i*i <= maxN; i++) {\n if (arr[i]) {\n for (let j = i*i; j <= maxN; j += i) {\n arr[j] = 0;\n }\n }\n }\n\n const primes = [];\n\n for (let i = 0; i < arr.length; i++) {\n if (arr[i]) {\n primes.push(i);\n }\n }\n\n return primes;\n}\n\nrl.on('line', (d) => {\n const primes = getPrimes();\n\n let ans = 0;\n\n for (let i = 6; i <= +d; i++) {\n let primeDivisors = 0;\n for (let p = 0; p < primes.length; p++) {\n if (primes[p] > i) {\n break;\n }\n\n if (i % primes[p] === 0) {\n primeDivisors++;\n }\n }\n\n if (primeDivisors === 2) {\n ans++;\n }\n }\n\n console.log(ans);\n c++;\n});\n"}], "src_uid": "356666366625bc5358bc8b97c8d67bd5"} {"nl": {"description": "A tennis tournament with n participants is running. The participants are playing by an olympic system, so the winners move on and the losers drop out.The tournament takes place in the following way (below, m is the number of the participants of the current round): let k be the maximal power of the number 2 such that k ≤ m, k participants compete in the current round and a half of them passes to the next round, the other m - k participants pass to the next round directly, when only one participant remains, the tournament finishes. Each match requires b bottles of water for each participant and one bottle for the judge. Besides p towels are given to each participant for the whole tournament.Find the number of bottles and towels needed for the tournament.Note that it's a tennis tournament so in each match two participants compete (one of them will win and the other will lose).", "input_spec": "The only line contains three integers n, b, p (1 ≤ n, b, p ≤ 500) — the number of participants and the parameters described in the problem statement.", "output_spec": "Print two integers x and y — the number of bottles and towels need for the tournament.", "sample_inputs": ["5 2 3", "8 2 4"], "sample_outputs": ["20 15", "35 32"], "notes": "NoteIn the first example will be three rounds: in the first round will be two matches and for each match 5 bottles of water are needed (two for each of the participants and one for the judge), in the second round will be only one match, so we need another 5 bottles of water, in the third round will also be only one match, so we need another 5 bottles of water. So in total we need 20 bottles of water.In the second example no participant will move on to some round directly."}, "positive_code": [{"source_code": "var str = readline().split(\" \", 3);\nvar n = Number(str[0]), b = Number(str[1]), p = Number(str[2]);\n \nvar pa = n * p;\n \nvar sum = 0;\nwhile(n !== 1) {\n var k = 1;\n while (k * 2 <= n) {\n k *= 2;\n }\n n = n % k + k / 2;\n sum += k / 2;\n}\n \nprint(sum * (2 * b + 1) + \" \" + pa);"}, {"source_code": "/* TEST CASE\ninput\n5 2 3\noutput\n20 15\ninput\n8 2 4\noutput\n35 32\n */\nfunction main() {\n\tvar splitted = readline().split(\" \");\n\tvar nParticipants = parseInt(splitted[0]);\n\tvar nBottlesPerEachPersons = parseInt(splitted[1]);\n\tvar nTowelsPerEachPersons = parseInt(splitted[2]);\n\tvar nTowels = nTowelsPerEachPersons * nParticipants;\n\tvar nBottles = 0;\n\t\n\twhile (nParticipants > 1) {\n\t\tvar nPersons = 1 << Math.floor(Math.log(nParticipants)/Math.LN2);\n\t\tvar nJudges = nPersons / 2; \n\t\t\n\t\tnBottles += nBottlesPerEachPersons * nPersons + nJudges;\n\t\tnParticipants -= nJudges;\n\t}\n\tprint(nBottles, nTowels);\n}\n\nmain();"}, {"source_code": "function main() {\n\n var arr = readline().split(' ');\n var n = arr[0], b = arr[1], p = arr[2];\n\n var numberOfTowels = n*p;\n var bottlePerMatches = 2*b + 1;\n var totalMatches = 0;\n var matchesOfRound = 0;\n var next = 0;\n\n if(n == 1){\n print(0+' '+p);\n }else {\n\n while (Math.floor(n/2)){\n matchesOfRound = Math.floor(n/2);\n next = n%2;\n totalMatches += matchesOfRound;\n\n n = matchesOfRound + next;\n }\n\n print(totalMatches*bottlePerMatches + ' ' + numberOfTowels);\n }\n\n}\n\nmain();"}, {"source_code": "var str = readline().split(\" \", 3);\nvar n = Number(str[0]), b = Number(str[1]), p = Number(str[2]);\n\nvar pa = n * p;\n\nvar sum = 0;\nwhile(n !== 1) {\n var k = 1;\n while (k * 2 <= n) {\n k *= 2;\n }\n n = n % k + k / 2;\n sum += k / 2;\n}\n\nprint(sum * (2 * b + 1) + \" \" + pa);"}], "negative_code": [{"source_code": "function main() {\n\n var arr = readline().split(' ');\n var n = arr[0], b = arr[1], p = arr[2];\n\n var numberOfTowels = n*p;\n var bottlePerMatches = 2*b + 1;\n var totalMatches = 0;\n var matchesOfRound = 0;\n var next = 0;\n\n if(n == 1){\n print((b+1)+' '+p);\n }\n\n while (Math.floor(n/2)){\n matchesOfRound = Math.floor(n/2);\n next = n%2;\n totalMatches += matchesOfRound;\n\n n = matchesOfRound + next;\n }\n\n print(totalMatches*bottlePerMatches + ' ' + numberOfTowels);\n\n}\n\nmain();"}, {"source_code": "function main() {\n\n var arr = readline().split(' ');\n var n = arr[0], b = arr[1], p = arr[2];\n\n var numberOfTowels = n*p;\n var bottlePerMatches = 2*b + 1;\n var totalMatches = 0;\n var matchesOfRound = 0;\n var next = 0;\n\n if(n == 1){\n print(0+' '+p);\n }\n\n while (Math.floor(n/2)){\n matchesOfRound = Math.floor(n/2);\n next = n%2;\n totalMatches += matchesOfRound;\n\n n = matchesOfRound + next;\n }\n\n print(totalMatches*bottlePerMatches + ' ' + numberOfTowels);\n\n}\n\nmain();"}], "src_uid": "eb815f35e9f29793a120d120968cfe34"} {"nl": {"description": "Pasha has a positive integer a without leading zeroes. Today he decided that the number is too small and he should make it larger. Unfortunately, the only operation Pasha can do is to swap two adjacent decimal digits of the integer.Help Pasha count the maximum number he can get if he has the time to make at most k swaps.", "input_spec": "The single line contains two integers a and k (1 ≤ a ≤ 1018; 0 ≤ k ≤ 100).", "output_spec": "Print the maximum number that Pasha can get if he makes at most k swaps.", "sample_inputs": ["1990 1", "300 0", "1034 2", "9090000078001234 6"], "sample_outputs": ["9190", "300", "3104", "9907000008001234"], "notes": null}, "positive_code": [{"source_code": "var line = readline().split(' ')\nvar a = line[0].split(\"\")\nvar k = parseInt(line[1])\n\nfor (var i = 0; i + 1 < a.length; i++) {\n\tvar p = i\n\tfor (var j = 1; j <= k && i + j < a.length; j++) {\n\t\tvar q = i + j\n\t\tif (a[q] > a[p]) p = q\n\t}\n\n\tfor (var j = p - 1; j >= i; j--) {\n\t\tvar t = a[j]\n\t\ta[j] = a[j + 1]\n\t\ta[j + 1] = t\n\t}\n\n\tk -= p - i\n}\n\nprint(a.join(\"\"))\n"}, {"source_code": "var nm = readline().trim().split(' ');\nvar a=nm[0],k=parseInt(nm[1]);\n\nvar cursor = 0;\nvar iMaxi = 0;\n\nwhile(k>0 && cursor 0 && pos < n; ++pos) {\n\t\tvar max = digits[pos], best = pos,\n\t\t\tlimit = Math.min(pos+swapNum, n-1);\n\t\tfor (var seek = pos+1; seek <= limit; ++seek) {\n\t\t\tif (digits[seek] > max) {\n\t\t\t\tbest = seek;\n\t\t\t\tmax = digits[seek];\n\t\t\t}\n\t\t}\n\t\tif (best != pos) {\n\t\t\tfor (var i = best; i > pos; --i) {\n\t\t\t\tdigits[i] = digits[i-1];\n\t\t\t}\n\t\t\tdigits[pos] = max;\n\t\t\tswapNum -= (best-pos);\n\t\t}\n\t}\n\tprint(digits.join(''));\n}\n\nmain();\n"}, {"source_code": "var tmp = readline().split(' '),\n a = tmp[0].split(''), n, m, k = parseInt(tmp[1]), i, j, x,\n swap = function(p, q) {\n var t = a[q], i;\n for (i = q; i > p; i--) {\n a[i] = a[i - 1];\n }\n a[p] = t;\n };\n\nfor (i = 0, n = a.length - 1; i < n && k > 0; i++) {\n out:\n for (x = 9; x > a[i]; x--) {\n for (j = i + 1, m = Math.min(n, i + k); j <= m; j++) {\n if (a[j] == x) {\n swap(i, j);\n k -= (j - i);\n break out;\n }\n }\n }\n}\n\nprint(a.join(''));"}], "negative_code": [{"source_code": "var line = readline().split(' ')\nvar a = line[0].split(\"\")\nvar k = parseInt(line[1])\n\nfor (var i = 0; i + 1 < a.length; i++) {\n\tvar p = i\n\tfor (var j = 1; j <= k && i + j < a.length; j++) {\n\t\tvar q = i + j\n\t\tif (a[q] > a[p]) p = q\n\t}\n\n\tvar t = a[i]\n\ta[i] = a[p]\n\ta[p] = t\n\n\tk -= p - i\n}\n\nprint(a.join(\"\"))\n"}, {"source_code": "var line = readline().split(' ')\nvar a = line[0].split(\"\")\nvar k = parseInt(line[1])\n\nfor (var i = 0; i + 1 < a.length; i++) {\n\tvar p = i\n\tfor (var j = 0; j < k && i + j < a.length; j++) {\n\t\tvar q = i + j\n\t\tif (a[q] > a[p]) p = q\n\t}\n\n\tvar t = a[i]\n\ta[i] = a[p]\n\ta[p] = t\n\n\tk -= p - i\n}\n\nprint(a.join(\"\"))\n"}, {"source_code": "var nm = readline().trim().split(' ').map((x)=>parseInt(x));\nvar a=nm[0]+\"\",k=nm[1];\n\nvar cursor = 0;\nvar iMaxi = 0;\n\nwhile(k>0 && cursorparseInt(x));\nvar a=nm[0]+\"\",k=nm[1];\n\nvar cursor = 0;\nvar iMaxi = 0;\n\nwhile(k>0 && cursor +item);\n }\n }\n\n var a = read.arrNumber(' ');\n var ncount = Math.floor(a[0] / 3);\n\n var n2 = Math.floor(a[1] / 2);\n if (n2 < ncount) ncount = n2;\n\n var n3 = Math.floor(a[2] / 2);\n if (n3 < ncount) ncount = n3;\n\n a[0] -= ncount * 3;\n a[1] -= ncount * 2;\n a[2] -= ncount * 2;\n\n var sdcount = 0;\n var rf = [0,1,2,0,2,1,0];\n for(var i = 0; i < 7; i++) {\n var test = [...a];\n var end = false;\n var sum = 0;\n var myi = i;\n \n while (!end) {\n if(test[rf[myi]] === 0) {\n end = true\n }\n else {\n sum ++;\n test[rf[myi]]--;\n myi++;\n if(myi === 7) {\n myi = 0;\n }\n }\n\n }\n if(sdcount < sum) {\n sdcount = sum;\n }\n }\n\n print((ncount * 7) + +sdcount);\n}());\n"}, {"source_code": "'use strict';\n\nconst fs = require('fs');\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++].split(' ');\n}\n\nfunction readInt(s) {\n return parseInt(s, 10);\n}\n\nfunction readIntArray(a) {\n\n return a.map(e => parseInt(e, 10));\n}\n\nfunction solve(n) {\n let a = [0, 1, 2, 0, 2, 1, 0];\n let max = 0;\n for (let i = 0; i < 7; i++) {\n let korm = n.slice(0);\n let days = 0;\n let ok = true;\n for (let j = i; j < 7; j++) {\n if (korm[a[j]] > 0) {\n korm[a[j]]--;\n days++;\n } else {\n ok = false;\n break;\n }\n }\n if (!ok) {\n if (days > max) max = days;\n continue;\n }\n let weeks = Math.min(Math.floor(korm[0] / 3), Math.floor(korm[1] / 2), Math.floor(korm[2] / 2));\n days += weeks * 7;\n korm[0] -= 3 * weeks;\n korm[1] -= 2 * weeks;\n korm[2] -= 2 * weeks;\n for (let j = 0; j < 7; j++) {\n if (korm[a[j]] > 0) {\n korm[a[j]]--;\n days++;\n } else {\n break;\n }\n }\n if (days > max) max = days;\n }\n return max;\n}\n\nfunction main() {\n\n const a = readIntArray(readLine());\n let result = solve(a);\n console.log(result);\n}\n"}], "negative_code": [{"source_code": "'use strict';\n\nconst fs = require('fs');\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++].split(' ');\n}\n\nfunction readInt(s) {\n return parseInt(s, 10);\n}\n\nfunction readIntArray(a) {\n return a.map(e => parseInt(e, 10));\n}\n\nfunction solve(n) {\n let a = [0, 1, 2, 0, 2, 1, 0];\n let max = 0;\n for (let i = 0; i < 7; i++) {\n let korm = n.slice(0);\n let days = 0;\n let ok = true;\n for (let j = i; j < 7; j++) {\n if (korm[a[j]] > 0) {\n korm[a[j]]--;\n days++;\n } else {\n ok = false;\n break;\n }\n }\n if (!ok) {\n if (days > max) max = days;\n continue;\n }\n let weeks = Math.min(Math.floor(a[0] / 3), Math.floor(a[1] / 2), Math.floor(a[2] / 2));\n days += weeks * 7;\n korm[0] -= 3 * weeks;\n korm[1] -= 2 * weeks;\n korm[2] -= 2 * weeks;\n for (let j = 0; j < 7; j++) {\n if (korm[a[j]] > 0) {\n korm[a[j]]--;\n days++;\n } else {\n break;\n }\n }\n if (days > max) max = days;\n }\n return max;\n}\n\nfunction main() {\n\n const a = readIntArray(readLine());\n\n\n let result = solve(a);\n console.log(result);\n}\n"}], "src_uid": "e17df52cc0615585e4f8f2d31d2daafb"} {"nl": {"description": "Let quasi-palindromic number be such number that adding some leading zeros (possible none) to it produces a palindromic string. String t is called a palindrome, if it reads the same from left to right and from right to left.For example, numbers 131 and 2010200 are quasi-palindromic, they can be transformed to strings \"131\" and \"002010200\", respectively, which are palindromes.You are given some integer number x. Check if it's a quasi-palindromic number.", "input_spec": "The first line contains one integer number x (1 ≤ x ≤ 109). This number is given without any leading zeroes.", "output_spec": "Print \"YES\" if number x is quasi-palindromic. Otherwise, print \"NO\" (without quotes).", "sample_inputs": ["131", "320", "2010200"], "sample_outputs": ["YES", "NO", "YES"], "notes": null}, "positive_code": [{"source_code": "function pal(s,l,r)\n{\n if (r-l<=0)\n {\n return 1;\n }\n return s[l]==s[r]&&pal(s,l+1,r-1);\n}\n\ns=readline()\nvar fl=\"NO\";\nfor (var i=0;i<=11;i++)\n{\n if (pal(s,0,s.length-1))\n {\n fl=\"YES\"\n break;\n }\n s='0'+s\n}\nprint(fl)"}, {"source_code": "/**\n * Created by lukask on 9/24/17.\n */\nfunction isPalindrome(number) {\n var i = 0;\n for (i = 0; i < number.length / 2; i++) {\n // print(number[i] + ' === ' + number[number.length - i - 1]);\n if (number[i] !== number[number.length - i - 1]) {\n return false;\n }\n }\n return true;\n}\n\nfunction isQuasiPalindrome(number) {\n if (isPalindrome(number)) {\n return 'YES';\n }\n var zeroesInFront = 0;\n var zeroesInBack = 0;\n var i = 0;\n while (number[i] === '0') {\n i++;\n }\n zeroesInFront = i;\n i = number.length - 1;\n while (number[i] === '0') {\n i--;\n }\n zeroesInBack = number.length - i - 1;\n if (zeroesInFront > zeroesInBack) {\n // print(zeroesInFront + ' ' + zeroesInBack);\n return 'NO';\n }\n number = number.substring(0, number.length - (zeroesInBack - zeroesInFront));\n // print(number);\n if (isPalindrome(number)) {\n return 'YES'\n }\n // print(zeroesInBack);\n return 'NO';\n}\n\nprint(isQuasiPalindrome(readline()));\n\n"}, {"source_code": "var line = readline();\n\nfunction isQuasi(input) {\n var end = input.length - 1;\n while (end >= 0 && input[end] === '0') {\n end--;\n }\n\n var start = 0;\n while (start < end) {\n if (input[start] !== input[end]) {\n return 'NO';\n }\n\n start++;\n end--;\n }\n\n return 'YES';\n}\n\nprint(isQuasi(line));"}, {"source_code": "//var input = readline()\n\nvar str = readline().split(' ');\nvar s = str[0];\n\n// Last char zero delete\nvar x = s.replace(/0*$/g, '');\n\n// Palindrome check function \nfunction check(str) {\n var s = str.replace(/[^A-Za-z0-9]/g, '').split('').reverse().join('')\n return s == str\n}\n\nprint(check(x) ? 'YES' : 'NO');\n\n//"}, {"source_code": "var s = readline();\n\nvar a = s.replace(/0*$/g, ''); \nvar b = a.replace(/[^A-Za-z0-9]/g, '').split('').reverse().join(''); \n\nprint(a == b ? 'YES' : 'NO');\n"}, {"source_code": "var s = readline();\n\nvar a = s.replace(/0*$/g, '');\nvar b = a.split('').reverse().join('');\n\nprint(a == b ? 'YES' : 'NO');\n"}, {"source_code": "//var input = readline()\nvar str = readline().split(' ');\nvar s = str[0];\n\nvar a = s.replace(/0*$/g, ''); // last char zero delete\nvar b = a.replace(/[^A-Za-z0-9]/g, '').split('').reverse().join(''); // palindrome check\n\nprint(a == b ? 'YES' : 'NO');\n\n//"}, {"source_code": "\nfunction trimZeros(num){\n\n if(!(typeof num == 'number'))\n num = parseInt(num);\n \n //make a string of the number\n num = num + \"\";\n\n //trim leading zeros\n num = parseInt(num);\n num = num + \"\";\n\n //trim the last zeros\n num = num.split(\"\").reverse().join(\"\");\n num = parseInt(num);\n\n return num;\n}\n\nfunction odd(num){\n return ( +num % 2 == 1);\n}\n\nfunction even(num){\n return (!odd(num));\n}\n\nfunction quasiPalindromic(num){\n\n num = trimZeros(num);\n num = num + \"\";\n \n var searchScope;\n if(odd(num)) searchScope = (num.length - 1) / 2;\n else searchScope = num.length / 2;\n\n for(var i = 0; i < searchScope; i++){\n if(!(num[i] == num[num.length-i-1]))\n return \"NO\";\n }\n\n return \"YES\"\n}\n\nvar inputData = readline();\n\nprint(quasiPalindromic(+inputData));"}, {"source_code": "let data = '';\nprocess.stdin.on('data', c => data += c);\nconst sol = () => {\n\tlet x = Number(data);\n\twhile(x%10 === 0) x /= 10;\n\tlet a = x, b = 0;\n\twhile(x > 0){\n\t\tb *= 10;\n\t\tb += x%10;\n\t\tx = Math.trunc(x/10);\n\t}\n\tconsole.log(a === b?'YES':'NO');\n};\nprocess.stdin.on('end', sol);\n"}], "negative_code": [{"source_code": "var line = readline();\n\nfunction isQuasi(input) {\n var end = input.length - 1;\n while (end >= 0 && input[end] === '0') {\n end--;\n }\n\n var start = 0;\n while (start < end) {\n if (input[start] !== input[end]) {\n return false;\n }\n\n start++;\n end--;\n }\n\n return true;\n}\n\nprint(isQuasi(line));"}], "src_uid": "d82278932881e3aa997086c909f29051"} {"nl": {"description": "Vasily the Programmer loves romance, so this year he decided to illuminate his room with candles.Vasily has a candles.When Vasily lights up a new candle, it first burns for an hour and then it goes out. Vasily is smart, so he can make b went out candles into a new candle. As a result, this new candle can be used like any other new candle.Now Vasily wonders: for how many hours can his candles light up the room if he acts optimally well? Help him find this number.", "input_spec": "The single line contains two integers, a and b (1 ≤ a ≤ 1000; 2 ≤ b ≤ 1000).", "output_spec": "Print a single integer — the number of hours Vasily can light up the room for.", "sample_inputs": ["4 2", "6 3"], "sample_outputs": ["7", "8"], "notes": "NoteConsider the first sample. For the first four hours Vasily lights up new candles, then he uses four burned out candles to make two new ones and lights them up. When these candles go out (stop burning), Vasily can make another candle. Overall, Vasily can light up the room for 7 hours."}, "positive_code": [{"source_code": "var str = readline().split(\" \");\nvar n = +str[0];\nvar m = +str[1];\nvar res=n;\nvar r = 0;\nwhile (n>=1) {\n if(n%m==0){\n\t n=(n/m);\n\t res+=+n;\n\t n=n+r;\n\t r=0;\n }\n\telse {\n\tn--; \n\tr++;\t\n\t}\n \n}\nprint(res);"}, {"source_code": "var p = readline().split(\" \");\nvar c = parseInt(p[0]);\nvar s = parseInt(p[1]);\nvar t;\nvar w = 0;\nvar h = 0;\n\nwhile (c>0) {\n\th += c;\n\tw += c;\n\tc = ~~(w/s);\n\tw = w%s;\n}\n\nprint(h);"}, {"source_code": "var line = readline().split(' ');\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\nvar toRepair = a;\nvar hours = a;\nvar leftovers = 0;\n\nwhile (toRepair >= b) {\n // write(toRepair);\n\n var repaired = Math.floor(toRepair / b);\n\n leftovers = toRepair % b;\n hours += repaired;\n toRepair = repaired + leftovers;\n\n // write(\" \" + repaired + \"\\n\");\n}\n\nprint(hours);\n"}, {"source_code": "/* TEST CASE\nExamples\ninput\n4 2\noutput\n7\n\ninput\n6 3\noutput\n8\n*/\nfunction main() {\n\tvar splitted = readline().split(' ');\n\tvar a = parseInt(splitted[0]);\n\tvar b = parseInt(splitted[1]);\n\n\tvar answer = a;\n\t\n\tif (a >= b) {\n\t\tanswer += 1 + Math.floor((a - b)/(b - 1));\n\t}\n\tprint(answer);\n}\n\nmain();"}, {"source_code": "var l = readline().split(' ')\nvar a = +l[0], b = +l[1], z = a\nfor (; a >= b; ) {\n\tz += Math.floor(a / b)\n\ta = a % b + Math.floor(a / b)\n}\nprint(z)"}, {"source_code": "var s = readline().split(' ');\nvar n = Number(s[0]), m = Number(s[1]);\n\nvar hours = 0;\nhours = n + Math.floor((n-1)/(m-1));\n\nprint(hours);"}, {"source_code": "var ar = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar a = ar[0], b = ar[1];\nvar sum = a;\nwhile(a >= b) {\n var div = Math.floor(a / b);\n var mod = a % b;\n a = mod + div;\n sum += div;\n}\nprint (sum);"}, {"source_code": "function f(a,b,c){\n if (a==0){ return 0; }\n else { return a + f(Math.floor((a+c)/b), b, (a+c)%b); }\n}\na = readline().split(' ').map(Number);\nprint(f(a[0], a[1], 0));\n"}, {"source_code": "var params = readline().split(\" \").map(value => +value);\nvar a = params[0], b = params[1];\nvar hours = a, period = b, temp;\n\nwhile(a >= 1) {\n\ttemp = (a - a % b) / b;\n\thours += temp;\n\ta = temp + (temp > 0) * (a % b);\n}\n\nprint(hours);"}, {"source_code": "function main() {\n var line = readline().split(' ')\n var a = parseInt(line[0])\n var b = parseInt(line[1])\n\n var res = solve(a, 0, b, 0)\n print(res);\n}\n\nfunction solve(newc, usedc, b, res) {\n // print(newc, usedc, b, res)\n res += newc\n usedc += newc;\n newc = Math.floor(usedc / b)\n usedc %= b;\n\n if (newc == 0) {\n return res;\n } else {\n return solve(newc, usedc, b, res);\n }\n}\n\nmain()\n"}, {"source_code": "var\n line = readline().split(\" \"),\n num = parseInt(line[0]),\n brok = parseInt(line[1])\n h = num\n;\n\nwhile(num >= brok) {\n \n var newSt = parseInt(num / brok);\n h += newSt;\n num = newSt + num % brok;\n\n}\n\nprint(h);\n"}, {"source_code": "var line = readline().split(' ').map(Number);\n\nvar a = line[0];\nvar b = line[1];\n\nvar leftover = a;\n\nvar hours = a;\n\nwhile(Math.floor(leftover/b)>0){\n\n hours += Math.floor(leftover/b);\n var temp = leftover%b;\n leftover = Math.floor(leftover/b);\n leftover+=temp;\n}\n\nprint(hours);"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar ans = 0\n\n\nwhile (a >= b)\n{\n ans += a - a%b;\n a = a%b + ~~(a/b);\n}\n\nprint (ans + a)"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar ans = 0\n\n\nwhile (a >= b)\n{\n ans += a - a%b;\n a = a%b + Math.floor(a/b);\n}\n\nprint (ans + a)"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar ans = 0\n\n\nwhile (a >= b)\n{\n ans += a - a%b;\n a = a%b + (a/b)>>0;\n}\n\nprint (ans + a)"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar cnt = 0, ans = 0\n\n\nwhile (a)\n{\n a--;\n cnt++;\n ans++;\n if (cnt == b)\n {\n cnt = 0\n a++;\n }\n}\n\nprint (ans)"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar ans = 0\n\n\nwhile (a >= b)\n{\n ans += a - a%b;\n a = a%b + (a-a%b)/b;\n}\n\nprint (ans + a)"}, {"source_code": "var \n\tr = readline().split(' '),\n\ta = +r[0],\n\tb = +r[1],\n\tresult = a\n;\nwhile(a >= b){\n\tvar new_value = Math.floor(a / b); \n\tresult += new_value;\n\ta = a % b + new_value;\n}\nprint(result);"}, {"source_code": "var r= readline().split(' ');\n\tvar a=Number(r[0]);\n\tvar b=Number(r[1]);\n\n\tvar hours=0;\n\thours = a+(Math.floor((a-1)/(b-1)));\n\tprint(hours);"}, {"source_code": "r= readline().split(' ');\na=Number(r[0])\nprint(a+(Math.floor((a-1)/(Number(r[1])-1))));"}, {"source_code": " function main(){\n var s = readline().split(' ');\n var a = parseInt(s[0]);\n var b = parseInt(s[1]);\n\n var answer = a;\n while(parseInt(a/b) > 0){\n answer += parseInt(a / b);\n a = parseInt(a/b) + a % b;\n }\n print(answer);\n }\n main();"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [a, b] = input[0].split(' ').map(x => parseInt(x));\n let answ = a;\n\n let ost = a;\n while (ost >= b) {\n answ += parseInt(ost/b);\n ost = parseInt(ost/b) + (ost % b);\n }\n\n console.log(answ);\n}); \n"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction main() {\n\tlet [a, b] = readLine()\n\t\t.split(' ')\n\t\t.map(x => parseInt(x));\n\tlet s = a;\n\tlet hours = 0;\n\n\twhile (Math.floor(a / b) > 0) {\n\t\thours += Math.floor(a / b);\n\t\ta = Math.floor(a / b) + (a % b);\n\t}\n\n\tconsole.log(Math.round(s + hours));\n}\n"}, {"source_code": "var ab = readline().split(' ');\nvar a = parseInt(ab[0]);\nvar b = parseInt(ab[1]);\n\nvar ret = 0;\n\nwhile(a >= b){\n\tret += b;\n\ta = a-b+1;\n}\n\nret += a;\n\nprint(ret);"}, {"source_code": "var input = readline().split(\" \"), a = +input[0], b = +input[1], hours = 0, rest = 0;\n\nfor(i = 0; a > 0 ;i++){\n\thours += a;\n\trest += a%b;\n\ta = Math.floor(a/b) + Math.floor(rest/b);\n\tif(rest/b >= 1){\n\t\trest -= Math.floor(rest/b)*b;\n\t}\n}\nwrite(hours);"}, {"source_code": "var solve = function(n,m) {\n var res = 0;\n var b = 0;\n while (n > 0) {res ++; n--; b++; if (b == m) {n++; b = 0;}}\n return res;\n}\n\nvar str = readline().split(' ');\nvar n = +str[0];\nvar m = +str[1];\nprint(solve(n,m));"}, {"source_code": "var line = readline();\nvar arr = line.split(\" \");\nvar sum = parseInt(arr[0]);\nvar rest = \"0\";\n\nwhile(arr[0]>0) {\n arr[0] = +arr[0] + +rest;\n rest = Math.floor(arr[0]%arr[1]);\n arr[0] = Math.floor(arr[0]/arr[1]);\n sum = +sum + +arr[0];\n}\n\nprint(sum)\n"}, {"source_code": "var token = readline().split(' ');\n\nvar a = token[0], b = token[1];\nvar wasted = 0;\nvar ans = 0;\n\nwhile(a>0) {\n ++wasted;\n --a;\n\n ++ans;\n\n if(wasted==b) {\n wasted=0;\n ++a;\n }\n}\n\nprint(ans);\n"}, {"source_code": "var r = readline().split(' ');\nvar a = +r[0];\nvar b = +r[1];\nvar result = a;\nwhile(a >= b){\n\tresult += Math.floor(a / b);\n\ta = a % b + Math.floor(a / b);\n}\nprint(result);"}, {"source_code": "var \n\tr = readline().split(' '),\n\ta = +r[0],\n\tb = +r[1],\n\tresult = a\n;\nwhile(a >= b){\n\tresult += parseInt(a / b);\n\ta = a % b + parseInt(a / b);\n}\nprint(result);"}, {"source_code": "var \n\tr = readline().split(' '),\n\ta = +r[0],\n\tb = +r[1],\n\tresult = a\n;\nwhile(a >= b){\n\tvar new_value = Math.floor(a / b); \n\tresult += new_value;\n\ta = a % b + new_value;\n}\nprint(result);"}, {"source_code": "var data = readline().split(' ').map(function (e) { return parseInt(e) })\na = data[0]\nb = data[1]\n\nr = a\nburnedCandle = a\n\nwhile (burnedCandle >= b) {\n newBurndeCandle = Math.trunc(burnedCandle / b)\n r += newBurndeCandle\n burnedCandle -= newBurndeCandle * b\n burnedCandle += newBurndeCandle\n}\n\nprint(r)"}, {"source_code": "var line = readline().split(' ');\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\nvar res=0;\nvar rest =0;\n\n\twhile (a>=1){\n\n\tres+= a;\n\trest += ( a - Math.floor(a/b)*b);\n\t\n\t\ta = Math.floor(a/b);\n\n\t\tif (rest>=b) {\n\t\ta+=Math.floor(rest/b);\n\t\trest-=b;\n\t\t}\n\n\t}\n\nprint(res);"}, {"source_code": ";(function () {\n\n\tvar s = readline().split(' ');\n\tvar a = +s[0], b = +s[1], d = 0, t = 0;\n\n\tdo {\n\t\tt += a;\n\t\td += a;\n\t\ta = Math.floor(d / b);\n\t\td -= a * b;\n\t} while ( (d+a) >= b )\n\n\tt += a;\n\n\tprint(t);\n\n}).call(this);"}, {"source_code": "var s = readline().split(\" \");\nvar a = Number(s[0]), b = Number(s[1]);\n\nvar hours = 0;\nvar left = 0;\nwhile(a!==0) {\n hours++;\n left++;\n a--;\n if (left === b) {\n a++;\n left = 0;\n }\n}\nprint(hours);"}, {"source_code": "r= readline().split(' ');\na=Number(r[0])\nprint(a+(a-1)/(Number(r[1])-1)>>0);"}, {"source_code": "r=readline().split(' ');a=r[0]>>0;print(a+(a-1)/(r[1]-1)>>0);"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+([][[]]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]+!+[]])()+[])[+[]]+[+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+([][[]]+[])[!+[]+!+[]])+([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[!+[]+!+[]]+([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[!+[]+!+[]]+[+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(![]+[])[+!+[]]+(+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]])+[])[!+[]+!+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(![]+[])[+!+[]]+(+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(![]+[+![]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(!![]+[])[+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]+!+[]])()+[])[+[]]+[+!+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+([][[]]+[])[!+[]+!+[]])+(+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[!+[]+!+[]]+([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[!+[]+!+[]]+[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]])))()"}, {"source_code": "'use strict'\n\nString.prototype.getNumArray = function () {\n return String(this).split(' ').map(function (value) {\n return parseInt(value);\n });\n}\n\nlet temp = readline().getNumArray(),\n a = temp[0],\n b = temp[1],\n usedA = 0,\n hours = 0;\n\nwhile(a) {\n a--;\n usedA++;\n hours++;\n if(usedA === b) {\n usedA = 0;\n a++;\n }\n};\n\n\nwrite(hours);"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+([][[]]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]+!+[]])()+[])[+[]]+[+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+([][[]]+[])[!+[]+!+[]])+([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[!+[]+!+[]]+([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[!+[]+!+[]]+[+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(![]+[])[+!+[]]+(+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]])+[])[!+[]+!+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(![]+[])[+!+[]]+(+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(![]+[+![]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(!![]+[])[+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]+!+[]])()+[])[+[]]+[+!+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+([][[]]+[])[!+[]+!+[]])+(+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[!+[]+!+[]]+([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[!+[]+!+[]]+[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]])))()\n"}, {"source_code": "var r= readline().split(\" \");\n\tvar a=Number(r[0]) , b=Number(r[1]);\n\t\n\n\tvar hours=0;\n\thours = a+Math.floor((a-1)/(b-1));\n\tprint(hours);"}, {"source_code": "var line = readline().split(' ');\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\nvar h = a;\nvar extra = Math.floor(a/b);\nvar burned = extra;\nvar rest = a%b;\nwhile(extra>=1){\nh=h+burned;\nextra = Math.floor((burned+rest)/b);\nrest = (burned+rest)%b;\nburned = extra;\n}\n\nprint(h);"}, {"source_code": "var candils= readline().split(' ');\n\tvar a=Number(candils[0]);\n\tvar b=Number(candils[1]);\n \n\tvar hours=0;\n\thours = a+(Math.floor((a-1)/(b-1)));\n print(hours);\n // console.log(hours);"}], "negative_code": [{"source_code": "var str = readline().split(\" \");\nvar n = str[0];\nvar m = str[1];\nvar res=0;\nwhile (n>=1) {\n res+=+n;\n n=n/m;\n}\nprint(Math.round(res));"}, {"source_code": "var str = readline().split(\" \");\nvar n = str[0];\nvar m = str[1];\nvar res=0;\nwhile (n>=1) {\n res+=+n;\n n=n/m;\n}\nprint(res);"}, {"source_code": "var str = readline().split(\" \");\nvar n = str[0];\nvar m = str[1];\nvar res=0;\nwhile (n>=1) {\n res+=+n;\n n=n/m;\n}\nprint(Math.ceil(res));"}, {"source_code": "var line = readline().split(' ');\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\nvar toRepair = a;\nvar hours = a;\nvar leftovers = 0;\n\nwhile (toRepair >= b) {\n // write(toRepair);\n toRepair = toRepair + leftovers;\n\n var repaired = Math.floor(toRepair / b);\n leftovers = toRepair % b;\n\n hours += repaired;\n toRepair = repaired;\n\n // write(\" \" + repaired + \"\\n\");\n}\n\nprint(hours);\n"}, {"source_code": "var line = readline().split(' ');\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\nvar toRepair = a;\nvar hours = a;\n\n// print(6 / 3 / 3);\n\nwhile (toRepair >= b) {\n var repaired = Math.floor(toRepair / b);\n\n hours += repaired;\n toRepair = repaired;\n\n // print(toRepair, repaired);\n}\n\nprint(hours);\n"}, {"source_code": "var l = readline().split(' ')\nvar a = +l[0], b = +l[1], z = 0\nfor (; a; a = Math.floor(a / b)) {\n\tz += a\n}\nprint(z)"}, {"source_code": "var ar = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar a = ar[0], b=ar[1], h = a;\nwhile (true){\n a /= b;\n h+=Math.floor(a);\n if (a < 1) break;\n}\nprint (h);"}, {"source_code": "var ar = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar a = ar[0], b=ar[1], h = 0;\nwhile (true){\n h+= a;\n a = a / b;\n if (a < 0.0000000000001) { h += a; break };\n}\nprint (Math.floor(h));"}, {"source_code": "var ar = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar a = ar[0], b=ar[1], h = a;\nwhile (true){\n a /= b;\n h+=Math.floor(a);\n if (a < b) break;\n}\nprint (h);"}, {"source_code": "var ar = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar a = ar[0], b=ar[1], rem = 0, h = a;\nwhile (true){\n h+=Math.floor(a / b);\n a = Math.floor(a / b) + a % b;\n if (a < b) { h += a; break };\n}\nprint (h);"}, {"source_code": "var ar = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar a = ar[0], b=ar[1], h = 0;\nwhile (true){\n h+= Math.floor(a);\n a = Math.floor(a / b);\n if (a < b) { h += Math.floor(a); break };\n}\nprint (h);"}, {"source_code": "var ar = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar a = ar[0], b=ar[1], h = 0;\nwhile (true){\n h+= Math.floor(a);\n a =a / b;\n if (a < b) { h += Math.floor(a); break };\n}\nprint (h);"}, {"source_code": "function f(a,b,c){\n if (a==0){ return 0; }\n else { return a + f(Math.floor((a+c)/b), b, a%b); }\n}\na = readline().split(' ').map(Number);\nprint(f(a[0], a[1], 0));\n"}, {"source_code": "print(function f(a,b){\n if (a==0){ return 0;\n } else { return a + f(Math.floor(a/b), b);}\n}.apply(0,readline().split(' ').map(Number)));"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar ans = 0\n\n\nwhile (a >= b)\n{\n ans += a - a%b;\n a = a%b + ~~a/b;\n}\n\nprint (ans + a)"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar cnt = 0, ans = 0\n\n\nwhile (a >= b)\n{\n ans += a - a%b;\n a = a%b + a/b;\n}\n\nprint (ans + a)"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar ans = 0\n\n\nwhile (a >= b)\n{\n ans += (a / b) * b;\n a = a%b + a/b;\n}\n\nprint (ans + a)"}, {"source_code": "var l = readline().split (\" \");\n\nvar a = parseInt(l[0])\nvar b = parseInt(l[1])\nvar ans = 0\n\n\nwhile (a >= b)\n{\n ans += a - a%b;\n a = a%b + a/b;\n}\n\nprint (ans + a)"}, {"source_code": "var a=readline();\nvar b=readline();\nvar sum = a;\nwhile(a>=b){\n sum += parseInt(a / b);\n\ta = a % b + parseInt(a / b);\n}\nprint(sum);"}, {"source_code": "r= readline().split(' ');\na=Number(r[0])\nprint(a+(a-1)/(Number(r[1])-1));"}, {"source_code": "function main(){\n var s = readline().split();\n \n var a = parseInt(s[0]);\n var b = parseInt(s[1]);\n\n var answer = a;\n while(a/b > 0){\n answer += a / b;\n a /= b;\n }\n print(answer);\n}\nmain();"}, {"source_code": "function main(){\n var s = readline().split();\n \n var a = parseInt(s[0]);\n var b = parseInt(s[1]);\n\n var answer = a;\n while(parseInt(a/b) > 0){\n answer += parseInt(a / b);\n a = bparseInt(a/b);\n }\n print(answer);\n}\nmain();"}, {"source_code": "function main(){\n var s = readline().split();\n \n var a = parseInt(s[0]);\n var b = parseInt(s[1]);\n\n var answer = a;\n while(parseInt(a/b) > 0){\n answer += parseInt(a / b);\n a = parseInt(a/b);\n }\n print(answer);\n}\nmain();"}, {"source_code": "function main(){\n var s = readline().split(' ');\n \n var a = parseInt(s[0]);\n var b = parseInt(s[1]);\n\n var answer = a;\n while(parseInt(a/b) > 0){\n answer += parseInt(a / b);\n a = parseInt(a/b);\n }\n print(answer);\n}\nmain();"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [a, b] = input[0].split(' ').map(x => parseInt(x));\n let answ = a;\n\n let ost = a;\n while (ost > 0) {\n answ += parseInt(ost/b);\n ost = parseInt(ost/b);\n }\n\n console.log(answ);\n}); \n"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction main() {\n\tlet [a, b] = readLine()\n\t\t.split(' ')\n\t\t.map(x => parseInt(x));\n\tlet s = a;\n\tlet hours = 0;\n\n\twhile (Math.floor(a / b) !== 0) {\n\t\thours += Math.floor(a / b);\n\t\ta = Math.floor(a / b);\n\t}\n\n\tconsole.log(s + hours);\n}\n"}, {"source_code": "var line = readline().split(' ');\nvar a = parseInt( line[0] );\nvar b = parseInt( line[1] );\n\nvar ret = b; 2\nwhile( (a = a-b+1) >= b){\n\tret += b;\n}\nret += a;\nprint(ret);"}, {"source_code": "var line = readline().split(' ');\nvar a = parseInt( line[0] );\nvar b = parseInt( line[1] );\n\nvar ret = b;\nwhile( (a = a-b+1) >= b){\n\tret += b;\n}\nret += a;\nprint(ret);"}, {"source_code": "\nvar line = readline().split(' ');\nvar a = parseInt( line[0] );\nvar b = parseInt( line[1] );\n\nvar ret = a;\n\na = a - b + 1;\nwhile( (a = a-b+1) > 0){\n\t\n\tret += a;\n}\nprint(ret);"}, {"source_code": "\nvar line = readline().split(' ');\nvar a = parseInt( line[0] );\nvar b = parseInt( line[1] );\n\nvar ret = a;\n\nwhile( a=~~(a/b) ){\n\tret += a;\n}\nprint(ret);"}, {"source_code": "\nvar line = readline().split(' ');\nvar a = parseInt( line[0] );\nvar b = parseInt( line[1] );\n\nvar ret = a-b;\nwhile( (a = a-b+1) > 0){\n\t\n\tret += a;\n}\nprint(ret);"}, {"source_code": "var input = readline().split(\" \"), a = +input[0], b = +input[1], hours = 0, rest = 0;\n\nfor(i = 0; a > 0 ;i++){\n\thours += a;\n\trest += (a/b > 1) ? a%b : 0;\n\ta = Math.floor(a/b) + Math.floor(rest/b);\n\tif(rest/b >= 1){\n\t\trest -= Math.floor(rest/b)*b;\n\t}\n}\nwrite(hours);"}, {"source_code": "var line = readline();\nvar arr = line.split(\" \");\nvar sum = 0;\n\nwhile(arr[0]>0) {\n sum+=parseInt(arr[0]);\n arr[0] = Math.floor(arr[0]/arr[1])\n}\n\nprint(sum)\n"}, {"source_code": "var token = readline().split(' ');\n\nvar a = token[0], b = token[1];\nvar ans = 0, curr = 1;\n\nwhile(curr<=a) {\n ans+=((a/curr)>>0);\n curr*=b;\n}\n\nprint(ans);\n"}, {"source_code": "var r = readline().split(' ');\nvar a = +r[0];\nvar b = +r[1];\n\nvar result = 0;\n\tif(b % 2 == 0 && a !== b){\n\t\tresult = (a + b) + 1;\n\t}else if(b % 2 == 0 && a === b){\n\t\tresult = a + 1;\n\t}else if(b % 2 !== 0 && a !== b){\n\t\tresult = (a + b) - 1\n\t}else if(b % 2 !== 0 && a === b){\n\t\tresult = a - 1;\n\t}\n\t\nprint(result);"}, {"source_code": "var r = readline();\nvar a = +r[0];\nvar b = +r[1];\n\nif(b % 2 == 0){\n\tvar result = a + a/b + 1;\n}else {\n\tvar result = a + a/b;\n}\nprint(result);"}, {"source_code": "var r = readline().split(' ');\nvar a = +r[0];\nvar b = +r[1];\nvar z = a;\nfor(;a >= b; ){\n\tz += Math.floor(a / b);\n\ta = Math.floor(a / b);\n}\nprint(z);"}, {"source_code": "var r = readline();\nvar a = +r[0];\nvar b = +r[1];\n\nvar result = 0;\nif(b % 2 == 0){\n\tresult = a + a/b + 1;\n}else {\n\tresult = a + a/b;\n}\nprint(result);"}, {"source_code": "var r = readline();\nvar a = +r[0];\nvar b = +r[1];\n\nvar result = 0;\n\tif(b % 2 !== 0){\n\t\tresult = a + b + 1;\n\t}else {\n\t\tresult = a + b - 1;\n\t}\nprint(result);"}, {"source_code": "var r = readline();\nvar a = +r[0];\nvar b = +r[1];\nvar result = 0;\nvar i = 0;\n\n// while(a -= 2){\n// \tresult += a;\n// \ti++;\n// }\n\nvar result = 0;\nif(b % 2 == 0){\n\tresult = a + (a/b) + 1;\n}else {\n\tresult = a + (a/b);\n}\nprint(result);"}, {"source_code": "var r = readline();\nvar a = +r[0];\nvar b = +r[1];\nvar result = 0;\nvar i = 0;\n\n// while(a -= 2){\n// \tresult += a;\n// \ti++;\n// }\n\nvar result = 0;\nif(b % 2 == 0){\n\tresult += (a + (a/b) + 1);\n}else {\n\tresult += (a + (a/b));\n}\nprint(result);"}, {"source_code": "var r = readline().split(' ');\nvar a = +r[0];\nvar b = +r[1];\n\nvar result = 0;\n\tif(b % 2 == 0){\n\t\tresult = (a + b) + 1;\n\t}else {\n\t\tresult = (a + b) - 1;\n\t}\nprint(result);"}, {"source_code": "var r = readline();\nvar a = +r[0];\nvar b = +r[1];\n\nvar result = 0;\n\tif(b % 2 == 0){\n\t\tresult = a + b + 1;\n\t}else {\n\t\tresult = a + b - 1;\n\t}\nprint(result);"}, {"source_code": "var r = readline().split(' ');\nvar a = +r[0];\nvar b = +r[1];\n\nvar result = 0;\n\tif(b % 2 == 0){\n\t\tresult = (a + (a/b)) + 1;\n\t}else {\n\t\tresult = (a + (a/b)) - 1;\n\t}\nprint(result);"}, {"source_code": "var data = readline().split(' ').map(function (e) { return parseInt(e) })\na = data[0]\nb = data[1]\n\nr = a\nburnCandle = a\n\nwhile (burnCandle >= b) {\n r += Math.trunc(burnCandle / b)\n burnCandle = Math.trunc(burnCandle / b)\n}\n\nprint(r)"}, {"source_code": "var line = readline().split(' ');\nvar a = parseInt(line[0]);\nvar b = parseInt(line[1]);\n\nvar res=0;\n\nwhile (a>=1){\n\nres+= a;\n\na = Math.floor(a/b);\n\n}\n\nprint(res);"}, {"source_code": "var s = readline().split(\" \");\nvar a = Number(s[0]), b = Number(s[1]);\n\nvar hours = 0;\nvar left = 0;\nwhile(a!==0) {\n hours++;\n left++;\n a--;\n if (left === b) {\n a++;\n }\n}\nprint(hours);"}, {"source_code": "r=readline().split(' ');a=r[0];print(a+(a-1)/(r[1]-1)>>0);"}, {"source_code": "var r= readline().split('');\n\tvar a=Number(r[0]);\n\tvar b=Number(r[1]);\n\n\tvar hours=0;\n\thours = a+Math.floor((a-1)/(b-1));\n\tprint(hours);"}, {"source_code": "var r= readline().split(\"'\");\n\tvar a=Number(r[0]) , b=Number(r[1]);\n\t\n\n\tvar hours=0;\n\thours = a+Math.floor((a-1)/(b-1));\n\tprint(hours);"}, {"source_code": "var r= readline().split('');\n\tvar a=Number(r[0]);\n\tvar b=Number(r[1]);\n\n\tvar hours=0;\n\thours = a+(Math.floor((a-1)/(b-1)));\n\tprint(hours);"}, {"source_code": "var r= readline().split('');\n\tvar a=Number(r[1]);\n\tvar b=Number(r[2]);\n\n\tvar hours=0;\n\thours = a+Math.floor((a-1)/(b-1));\n\tprint(hours);"}, {"source_code": "var r= readline().split(\"\");\n\tvar a=Number(r[0]) , b=Number(r[1]);\n\t\n\n\tvar hours=0;\n\thours = a+Math.floor((a-1)/(b-1));\n\tprint(hours);"}], "src_uid": "a349094584d3fdc6b61e39bffe96dece"} {"nl": {"description": "Apart from having lots of holidays throughout the year, residents of Berland also have whole lucky years. Year is considered lucky if it has no more than 1 non-zero digit in its number. So years 100, 40000, 5 are lucky and 12, 3001 and 12345 are not.You are given current year in Berland. Your task is to find how long will residents of Berland wait till the next lucky year.", "input_spec": "The first line contains integer number n (1 ≤ n ≤ 109) — current year in Berland.", "output_spec": "Output amount of years from the current year to the next lucky one.", "sample_inputs": ["4", "201", "4000"], "sample_outputs": ["1", "99", "1000"], "notes": "NoteIn the first example next lucky year is 5. In the second one — 300. In the third — 5000."}, "positive_code": [{"source_code": "\n var n = parseInt(readline());\n var s = n.toString().split('');\n \n if(s[0] === '9') {\n print(parseInt('1' + new Array(s.length).fill(0).join('')) - n);\n } else {\n print(parseInt((parseInt(s[0]) + 1).toString() + new Array(s.length - 1).fill(0).join('')) - n);\n }\n "}, {"source_code": "var a =parseInt(readline());\nvar sol=2000000000;\nfunction min(a,b){\n if(aa){\n sol=min(sol,cur);\n return;\n }\n if(cur==0){\n for (var i = 1; i <= 9; i++) {\n recurse(i);\n }\n }\n else\n recurse(cur*10);\n}\nrecurse(0);\nprint(sol-a);\n"}, {"source_code": "var input = readline();\nvar n = input;\nvar val = [0];\nwhile (true) {\n val[0] = (val[0] + 1) % 10;\n if (val[0] === 0) {\n val.push(0);\n val[0] = 1;\n }\n if (+(val.join('')) > +n) {\n print(+(val.join('')) - +n);\n break;\n }\n}"}, {"source_code": "var data = readline();\nvar a = String(data);\nvar b;\nvar c = '';\nvar d;\n\nif(a.length == 1) {\n d = parseInt(a) + 1;\n d = d-parseInt(a)\n print(d);\n \n} else {\n b = parseInt(a[0])+1;\n for(var i = 1; i< a.length; i++) {\n c += '0';\n }\n \n b = parseInt(String(b)+c);\n \n print(b-parseInt(a));\n}\n"}, {"source_code": "var a = parseInt(readline());\nvar t = 1;\nvar b = 0;\nfor (var i = 1; i <= 10; i ++)\n{\n\tif (a/Math.pow(10, i) < 1)\n\t{\n\t\tt = Math.pow(10, i-1);\n\t\tb = parseInt(a/t) * t;\n\t\tbreak;\n\t}\n}\nprint(t+b-a);\n"}, {"source_code": "\n var n = parseInt(readline());\n var s = n.toString().split('');\n \n if(s[0] === '9') {\n print(parseInt('1' + new Array(s.length).fill(0).join('')) - n);\n } else {\n print(parseInt((parseInt(s[0]) + 1).toString() + new Array(s.length - 1).fill(0).join('')) - n);\n }\n "}], "negative_code": [{"source_code": "var a =parseInt(readline());\nvar sol=200000000;\nfunction min(a,b){\n if(aa){\n sol=min(sol,cur);\n return;\n }\n if(cur==0){\n for (var i = 1; i <= 9; i++) {\n recurse(i);\n }\n }\n else\n recurse(cur*10);\n}\nrecurse(0);\nprint(sol-a);\n"}, {"source_code": "var input = readline();\n\nvar n = input;\n\n\nif (n.indexOf('0') != -1) {\n var m = n.split('');\n for (var i = m.indexOf('0') + 1; i < m.length; i++) {\n if (m[i] === '0') {\n m[i] = '1';\n }\n }\n print(+(m.join('')) - +n);\n} else {\n print(10 - (+n[n.length - 1]));\n}"}, {"source_code": "var data = readline();\nvar a = String(data);\nvar b,c='';\n\nif(a.length == 1) {\n a = parseInt(a) + 1;\n print(a)\n} else {\n b = parseInt(a[0])+1;\n for(var i = 1; i< a.length; i++) {\n c += '0';\n }\n \n b = parseInt(String(b)+c);\n \n print(b-parseInt(a));\n}\n"}, {"source_code": "var data = readline();\nvar a = String(data);\nvar b;\nvar c = '';\nvar d;\n\nif(a.length == 1) {\n d = parseInt(a) + 1;\n d = d-parseInt(a)\n print(d);\n \n} else {\n b = parseInt(a[0])+1;\n for(var i = 1; i< a.length; i++) {\n c += '0';\n }\n \n b = parseInt(String(b)+c);\n \n print(typeof b-parseInt(a));\n}\n"}, {"source_code": "var data = readline();\nvar a = String(data);\nvar b;\nvar c = '';\n\nif(a.length == 1) {\n a = parseInt(a) + 1;\n print(a);\n \n} else {\n \n b = parseInt(a[0])+1;\n for(var i = 1; i< a.length; i++) {\n c += '0';\n }\n \n b = parseInt(String(b)+c);\n \n print(b-parseInt(a));\n}\n"}], "src_uid": "a3e15c0632e240a0ef6fe43a5ab3cc3e"} {"nl": {"description": "One cold winter evening Alice and her older brother Bob was sitting at home near the fireplace and giving each other interesting problems to solve. When it was Alice's turn, she told the number n to Bob and said:—Shuffle the digits in this number in order to obtain the smallest possible number without leading zeroes.—No problem! — said Bob and immediately gave her an answer.Alice said a random number, so she doesn't know whether Bob's answer is correct. Help her to find this out, because impatient brother is waiting for the verdict.", "input_spec": "The first line contains one integer n (0 ≤ n ≤ 109) without leading zeroes. The second lines contains one integer m (0 ≤ m ≤ 109) — Bob's answer, possibly with leading zeroes.", "output_spec": "Print OK if Bob's answer is correct and WRONG_ANSWER otherwise.", "sample_inputs": ["3310\n1033", "4\n5"], "sample_outputs": ["OK", "WRONG_ANSWER"], "notes": null}, "positive_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar s = trim(readline()), guess = trim(readline());\n\tif (s == '0') {\n\t\tprint(guess == '0' ? \"OK\" : \"WRONG_ANSWER\");\n\t\treturn;\n\t}\n\n\tvar digits = [];\n\tfor (var i = 0; i < s.length; i += 1) {\n\t\tdigits.push(s[i]);\n\t}\n\tdigits.sort();\n\n\tif (digits[0] == '0') {\n\t\tfor (var i = 1; i < digits.length; i += 1) {\n\t\t\tif (digits[i] != '0') {\n\t\t\t\tdigits[0] = digits[i];\n\t\t\t\tdigits[i] = '0';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar correct = digits.join('');\n\tprint(guess == correct ? \"OK\" : \"WRONG_ANSWER\");\n}\n\nmain();\n"}, {"source_code": "var N = readline()\nvar M = readline()\n\nvar n = N.split('').sort()\n\nvar i = 0\nwhile (n[i++] == '0') {}\ni--\n\nif (i) {\n\tn[0] = n[i]\n\tn[i] = '0'\n}\n\nn = n.join('')\n\nprint(M == n ? 'OK' : 'WRONG_ANSWER')"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n \nfunction main() {\n comparison(stdin[0],stdin[1]) \n}\n \nvar stdin = [];\nrl.on('line', function (line) {stdin.push(line);});\nrl.on('close', main);\n/*\nconst main = async () => {\n await question1()\n rl.close()\n}\n\nmain()\n*/\n\nfunction comparison(n, m) {\n var firstStr = String(n);\n if(String(n).length == 1 || String(m).length == 1){\n return n == m ? console.log(\"OK\") : console.log(\"WRONG_ANSWER\")\n } \n var result = '';\n var count = 0\n while( firstStr ) {\n var min = 999;\n for(var i = 0; i < firstStr.length; i++) {\n if(Number(firstStr[i] < min)) {\n \tif(count == 0 && Number(firstStr[i]) == 0){ \n } else {\n \tmin = firstStr[i]\n }\n }\n \t}\n var index = firstStr.indexOf(min);\n result += firstStr.slice(index, index+1)\n firstStr = firstStr.slice(0, index) + firstStr.slice(index+1, firstStr.length)\n count ++\n } \n if(result == m) {\n \tconsole.log(\"OK\")\n } else {\n \tconsole.log(\"WRONG_ANSWER\")\n }\n}"}], "negative_code": [{"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\nconst question1 = () => {\n return new Promise((resolve, reject) => {\n rl.question(\"\", answer );//=> \n rl.question(\"\", answer2 );\n \n \tconsole.log(\"answer\");\n \tconsole.log(answer);\n {\n comparison(answer, answer2)\n resolve()\n }\n })\n}\n\nconst main = async () => {\n await question1()\n rl.close()\n}\n\nmain()\n\n\nfunction comparison(n, m) {\n var firstStr = String(n);\n if(String(n).length == 1 || String(m).length == 1){\n return n == m ? console.log(\"OK\") : console.log(\"WRONG_ANSWER\")\n } \n var result = '';\n var count = 0\n while( firstStr ) {\n var min = 999;\n for(var i = 0; i < firstStr.length; i++) {\n if(Number(firstStr[i] < min)) {\n \tif(count == 0 && Number(firstStr[i]) == 0){ \n } else {\n \tmin = firstStr[i]\n }\n }\n \t}\n var index = firstStr.indexOf(min);\n result += firstStr.slice(index, index+1)\n firstStr = firstStr.slice(0, index) + firstStr.slice(index+1, firstStr.length)\n count ++\n }\n \tconsole.log(result);\n \tconsole.log(m);\n if(result == m) {\n \tconsole.log(\"OK\")\n } else {\n \tconsole.log(\"WRONG_ANSWER\")\n }\n}"}], "src_uid": "d1e381b72a6c09a0723cfe72c0917372"} {"nl": {"description": "You are given an integer sequence $$$1, 2, \\dots, n$$$. You have to divide it into two sets $$$A$$$ and $$$B$$$ in such a way that each element belongs to exactly one set and $$$|sum(A) - sum(B)|$$$ is minimum possible.The value $$$|x|$$$ is the absolute value of $$$x$$$ and $$$sum(S)$$$ is the sum of elements of the set $$$S$$$.", "input_spec": "The first line of the input contains one integer $$$n$$$ ($$$1 \\le n \\le 2 \\cdot 10^9$$$).", "output_spec": "Print one integer — the minimum possible value of $$$|sum(A) - sum(B)|$$$ if you divide the initial sequence $$$1, 2, \\dots, n$$$ into two sets $$$A$$$ and $$$B$$$.", "sample_inputs": ["3", "5", "6"], "sample_outputs": ["0", "1", "1"], "notes": "NoteSome (not all) possible answers to examples:In the first example you can divide the initial sequence into sets $$$A = \\{1, 2\\}$$$ and $$$B = \\{3\\}$$$ so the answer is $$$0$$$.In the second example you can divide the initial sequence into sets $$$A = \\{1, 3, 4\\}$$$ and $$$B = \\{2, 5\\}$$$ so the answer is $$$1$$$.In the third example you can divide the initial sequence into sets $$$A = \\{1, 4, 5\\}$$$ and $$$B = \\{2, 3, 6\\}$$$ so the answer is $$$1$$$."}, "positive_code": [{"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var N = nextInt();\n if(N % 4 == 2 || N % 4 == 1){\n myout(1);\n }else{\n myout(0);\n }\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n const [n] = [d].map(BigInt);\n const total = n * (n + 1n) / 2n;\n\n console.log((total % 2n).toString());\n});\n"}, {"source_code": "var n =parseInt(readline());\nprint(Math.ceil(n/2)%2);"}, {"source_code": "function main() {\n var n = +readline();\n if(n === 1 || n === 2)\n return 1;\n if(n === 3 || n === 0 || n%4 === 0) \n return 0;\n if(n%2 === 0)\n return 1;\n \n var a = Math.floor((n + 1) / 4);\n if(a * 4 - 1 === n)\n return 0;\n return 1\n}\n\nprint(main());"}, {"source_code": "function main(n){\n\n var ans = [0,1,1,0];\n var printe = 0;\n if(n>=4)printe = ans[n%4];\n else printe = ans[n]\n print(printe);\n}\n\nvar n = parseInt(readline());\n\nmain(n);\n"}, {"source_code": "var a = readline().split(' ');\nprint(Math.ceil(a/2)%2)"}, {"source_code": "var n = readline().split(' ');\nprint(Math.ceil(n/2)%2)"}, {"source_code": "function calc(n) {\n if (n === 0 || n % 4 === 0 || n % 4 === 3) {\n return 0\n } else {\n return 1\n }\n}\n\nvar n = parseInt(readline());\n\n\n\nprint(calc(n));"}, {"source_code": "var number = parseInt(readline());\nvar result = number % 4;\nprint(result === 1 || result ===2 ? 1 : 0);\n"}, {"source_code": "var n = readline();\nn = parseInt(n);\n\nif (n%4 == 0 || n%4 == 3) print (0)\n\telse print (1);"}, {"source_code": "var n = parseInt(readline()); write((n & 1) ? (((n >> 1) & 1) ? 0 : 1) : (((n >> 1) & 1) ? 1 : 0));"}], "negative_code": [{"source_code": "var n=parseInt(readline);\nprint(Math.ceil(n/2)%2);"}, {"source_code": " var n = readline();\n print( ((1 + n) * n / 2) % 2 );"}, {"source_code": "var n = readline();\nvar s = (1 + n) * n / 2;\nprint( s % 2 === 0 ? 'YES' : 'NO');"}, {"source_code": "function main() {\n var n = +readline();\n if(n === 1 || n === 2)\n return 1;\n if(n === 3 || n === 0 || n%4 ===0) \n return 0;\n if(n%2 === 0)\n return 1;\n \n var a = Math.floor((n + 1) / 4);\n if(a * 4 + 1 === n)\n return 0;\n return 1\n}\n\nprint(main());"}, {"source_code": "var n = +readline();\nprint((((1 + n) * n )/ 2) % 2);"}, {"source_code": "function main(n){\n\n var ans = [0,1,1,0];\n var printe = 0;\n if(n>=4)printe = ans[n%4];\n else if (ans < 4) printe = ans[n]\n print(printe);\n}\n\nvar n = parseInt(readline());\n\nmain(n);\n"}, {"source_code": "var a = readline().split(' ');\nprint(a);\nvar sum = 0;\nfor(var i=1; i<=a; i++) {\n sum+=i;\n}\n\nprint(sum%2)"}, {"source_code": "var n = readline().split(' ');\nvar ans = (n*(1+n))/2;\nprint(ans%2);"}], "src_uid": "fa163c5b619d3892e33e1fb9c22043a9"} {"nl": {"description": "One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales showed w kilos. They rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.Pete and Billy are great fans of even numbers, that's why they want to divide the watermelon in such a way that each of the two parts weighs even number of kilos, at the same time it is not obligatory that the parts are equal. The boys are extremely tired and want to start their meal as soon as possible, that's why you should help them and find out, if they can divide the watermelon in the way they want. For sure, each of them should get a part of positive weight.", "input_spec": "The first (and the only) input line contains integer number w (1 ≤ w ≤ 100) — the weight of the watermelon bought by the boys.", "output_spec": "Print YES, if the boys can divide the watermelon into two parts, each of them weighing even number of kilos; and NO in the opposite case.", "sample_inputs": ["8"], "sample_outputs": ["YES"], "notes": "NoteFor example, the boys can divide the watermelon into two parts of 2 and 6 kilos respectively (another variant — two parts of 4 and 4 kilos)."}, "positive_code": [{"source_code": "var weight = readline();\nprint(weight && weight > 2 && !(weight % 2) ? \"YES\" : \"NO\");\n"}, {"source_code": "process.stdin.on('data',c=>{a=Number(c);console.log(c>2&&c%2==0?\"YES\":\"NO\")})"}, {"source_code": "//nodejs v4.2.6\nprocess.stdin.resume(); \n\tprocess.stdin.setEncoding('utf8');\n\t//Taking a usr input\n\tprocess.stdin.on('data', function (text) {\n\t\t\t//Printing out user input\n\t\t\tvar input = parseInt(text)\n\t\t\t\tif(input===2){\n\t\t\t\t\tconsole.log('NO')\n\t\t\t\t}else\n\t\t\t\tif(input%2 === 0){\n\t\t\t\t\tconsole.log('YES');\n\t\t\t\t}else{\n\t\t\t\t\tconsole.log('NO')\n\t\t\t\t}\n\t});\n "}, {"source_code": "var x = readline();\n\n if (x % 2 === 0 && x > 2 )\n print(\"yes\")\nelse \n print(\"no\") "}, {"source_code": "var w = readline();\nif (w == 2){\n print(\"NO\");\n}\nelse if(w % 2 == 0){\n print(\"YES\")\n }\n \nelse\n {\n print(\"NO\")\n }\n\n"}, {"source_code": "var line = readline().split(' ');\nif ( line[0] > 3 && line % 2 == 0 ) {\n print('YES') ;\n}\nelse {\n print('NO');\n}"}, {"source_code": "var w = readline();\nif (w == 2){\n print(\"NO\");\n}\nelse if(w % 2 == 0){\n print(\"YES\")\n }\n \nelse\n {\n print(\"NO\")\n }\n\n"}, {"source_code": "var w = readline();\nif (w == 2){\n print(\"NO\");\n}\nelse if(w % 2 == 0){\n print(\"YES\")\n }\n \nelse\n {\n print(\"NO\")\n }\n\n"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (w) => {\n main(w);\n rl.close();\n});\n\nfunction main(watermelon) {\n watermelon = parseInt(watermelon);\n let numbersPar = fragWatermelon(watermelon);\n let totalNumbers = numbersPar.length;\n if (numbersPar.length >= 1 && (numbersPar[0] + numbersPar[totalNumbers-1]) === watermelon){\n console.log('YES')\n } else {\n console.log('NO')\n }\n}\n\nfunction fragWatermelon(watermelon) {\n let numbersPar = [];\n for(let i = 1; i < watermelon; i++){\n if ((i%2) === 0){\n numbersPar.push(i)\n }\n }\n return numbersPar;\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf8');\nlet input= '', readline, cout;\nprocess.stdin.on('data', (chunk) => input+=chunk);\nprocess.stdin.on('end', () => {\n input = input.split('\\n');\n cout = (data) => process.stdout.write(data+'\\n');\n var inputLineIndex = 0;\n readline = function(){return inputLineIndex>=input.length?undefined:input[inputLineIndex++]};\n process.exit(main() || 0);\n});\n\nfunction main(){\n let a = readline();\n if(a > 2 && a % 2 === 0) console.log(\"YES\");\n else console.log(\"NO\")\n return 0;\n}"}, {"source_code": "var w = readline();\n \nif ((w % 2 === 0) && (w != 2)) {\n print(\"YES\");\n} else {\n print(\"NO\");\n}\n"}, {"source_code": "const { read } = require('fs');\n\nconst readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nreadline.question('', w => {\n if(parseInt(w) %2==0 && parseInt(w)>=4){\n console.log('YES');\n }\n else{\n console.log('NO');\n }\n readline.close();\n})"}, {"source_code": "const input = readline();\nconst num = parseInt(input);\n\nif ((num>2) && (num%2 === 0)) {\n print(\"YES\");\n} else {\n print(\"NO\");\n}"}, {"source_code": "var input = readline().split(' ');\nvar check = false;\nfor(var i=2;i2 && w%2===0){\n\tprint('YES');\n}\nelse{\n\tprint('NO');\n}"}, {"source_code": "var stdin = process.stdin;\nstdin.setEncoding( 'utf8' );\nstdin.on( 'data', function( key ){\n const weight = parseInt(key);\n const available = (weight !== 2) && (weight % 2 === 0);\n process.stdout.write(available ? \"YES\" : \"NO\" );\n});\n"}, {"source_code": "var n = parseInt(readline());\nprint (n!=2 && n % 2 == 0 ? \"YES\" : \"NO\");"}, {"source_code": "var fullWeight = readline(),\n\tvasyaWeight = petyaWeight = 0,\n\toutput = 'NO';\n\nfor(var i = 1; i < fullWeight; i++){\n\tvasyaWeight = i;\n\tpetyaWeight = fullWeight - vasyaWeight;\n\tif(!(vasyaWeight%2) && !(petyaWeight%2)){\n\t\toutput = 'YES';\n\t\tbreak;\n\t}\n}\n\nwrite(output);"}, {"source_code": "const w = readline()\nif (w <= 2){\n print('NO')\n} else if ( w % 2 == 0){\n print('YES')\n} else {\n print('NO')\n}"}, {"source_code": "var w = readline(); \nif (w % 2 == 0 && w > 2){\n\tprint(\"YES\");\n} else {\n\tprint(\"NO\")\n}\n"}, {"source_code": "var w = Number(readline());\n\nfunction delitarbuz() {\n\tif (w%2 === 0 && w !== 2 && w !== 0){\n\t\treturn ('Yes');\n\t}\n\telse if (w%2 !== 0 || w === 2 || w ===0){\n\t\treturn ('No');\n\t}\n return 0;\n}\n\nprint(delitarbuz());"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n rl.question(\"\",function (x) {\n \n \n\n\n if (x%2 === 0 && x!=2 ) {\n console.log('YES');\n \n }else {\n console.log('NO')\n }\n \n })"}, {"source_code": "var x;\nx = Number(readline());\n\nif((x % 2 == 0) && (x > 2)){\n print(\"YES\");\n}\nelse{\n print(\"NO\");\n}"}, {"source_code": "function printAans()\n{\n\tvar weight;\n\n\tweight=readline();\n\n\tif( weight!=2 )\n {\n if(weight%2===0)print(\"YES\");\n else print(\"NO\");\n \n }\n else print(\"NO\");\n\n}\nprintAans();"}, {"source_code": "var w = readline(); \nif (w % 2 == 0 && w > 2){\n\tprint(\"YES\");\n} else {\n\tprint(\"NO\")\n}\n"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n const x = readline();\n // process.stdout.write('hello')\n console.log(x % 2 == 0 && x > 3 ? 'YES' : 'NO');\n}\n\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"utf8\");\n\n// var getline;\nvar input = \"\";\nvar read;\nvar writeline = (x) => process.stdout.write(x + \"\\n\");\nvar write = (x) => process.stdout.write(x);\n\nprocess.stdin.on(\"data\", (chunk) => input += chunk);\nprocess.stdin.on(\"end\", () => {\n // input = input.split(/\\r?\\n/);\n // getline = () => input.shift();\n input = input.trim().split(/\\s+/);\n read = () => input.shift();\n process.exit(main() || 0);\n});\n\nfunction main() {\n let l;\n while ((l = read()) !== undefined) {\n let x = parseInt(l);\n if (x === 0 || (x > 2 && x % 2 === 0)) {\n writeline('YES')\n } else {\n writeline('NO')\n }\n }\n return 0;\n}"}, {"source_code": "const x = parseInt(readline());\n if (x < 4) {\n print('NO');\n }\n else if (x % 2) {\n // console.log('NO');\n print('NO');\n } else {\n // console.log('YES');\n print('YES');\n }"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf8');\nvar input= '', readline, cout;\nprocess.stdin.on('data', function(chunk) {\n input+=chunk;\n});\nprocess.stdin.on('end', function() {\n input = input.split('\\n');\n cout = function(data) {process.stdout.write(data+'\\n')};\n var inputLineIndex = 0;\n readline = function(){return inputLineIndex>=input.length?undefined:input[inputLineIndex++]};\n process.exit(main() || 0);\n});\n\nfunction main()\n{\n let a = readline();\n if(a > 2 && a % 2 === 0) console.log(\"YES\");\n else console.log(\"NO\")\n return 0;\n}"}, {"source_code": " \n var arbuz = readline();\n arbuz = parseInt(arbuz);\n print(devideWaterMellon(arbuz))\n \n \nfunction devideWaterMellon(weight) {\n var result = 'NO';\n for (var index = 2; index < weight; index++) {\n if (index % 2 == 0 && ((weight - index) % 2 == 0) && weight > 3) {\n result = 'YES'\n break;\n }\n }\n return result\n}"}, {"source_code": "const state = { stdin: Buffer.alloc(0) };\nconst consume = (chunk) =>\n (state.stdin = Buffer.concat(\n [state.stdin, chunk],\n state.stdin.length + chunk.length\n ));\nconst commit = (answer) => process.stdout.write(answer);\n//\nconst main = (args) => {\n let data = parseInt(state.stdin.toString(\"utf8\"));\n let solution = \"NO\";\n// if (data < 1 || data > 100) return commit(solution);\n\n for (let i = 1; i < data; i++) {\n let part = (data - i) % 2 ===0;\n if (i % 2 === 0 && part) {\n solution = \"YES\";\n commit(solution);\n return;\n }\n }\n commit(solution);\n};\n\nprocess.stdin.on(\"data\", consume).on(\"end\", main);\n"}, {"source_code": "var line = readline().split(' ');\nif ( line[0] > 3 && line[0] % 2 == 0 ) {\n print('YES') ;\n}\nelse {\n print('NO');\n}"}, {"source_code": "'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readLine() {\n return inputString[currentLine++];\n}\n \n \nfunction main() {\n const parameterVariable = readLine();\n const line2 = readLine();\n \n if(parameterVariable > 2 && parameterVariable % 2 === 0) console.log('YES')\n else console.log('NO')\n \n}"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (w) => {\n main(w);\n rl.close();\n});\n\nfunction main(watermelon) {\n watermelon = parseInt(watermelon);\n let numbersPar = fragWatermelon(watermelon);\n let totalNumbers = numbersPar.length;\n if (numbersPar.length >= 1 && (numbersPar[0] + numbersPar[totalNumbers-1]) === watermelon){\n console.log('YES')\n } else {\n console.log('NO')\n }\n}\n\nfunction fragWatermelon(watermelon) {\n let numbersPar = [];\n for(let i = 1; i < watermelon; i++){\n if ((i%2) === 0){\n numbersPar.push(i)\n }\n }\n return numbersPar;\n}\n"}, {"source_code": " \n var weight;\n\n\tweight=readline();\n\n\tif( weight!=2 )\n {\n if(weight%2===0)print(\"YES\");\n else print(\"NO\");\n \n }\n else print(\"NO\");"}, {"source_code": "process.stdin.on('data', (n) => {\n if (n > 3 && n % 2 === 0) console.log('YES');\n else console.log('NO');\n});"}, {"source_code": "function checkDivide(weight){\n if( weight % 2 === 0 && weight !== 0 && weight != 2){\n print(\"YES\");\n }\n else {\n print(\"NO\");\n }\n\n}\n\ncheckDivide(readline());\n"}, {"source_code": "function main(){\n var n = +readline();\n var m = n/2;\n if(n == 2 || m.toString().includes(\".\"))\n print(\"NO\");\n else\n print(\"YES\");\n}\n\nmain();\n"}, {"source_code": "var line = readline()\n// var firstLine = lines[0]\n\nprint((line % 2 === 0 && line > 2) ? 'YES' : 'NO')"}, {"source_code": "// readline = require('readline')\nlet stdinInput = '';\n\n// //file\n// var fs = require('fs');\n// const inputfile = '_in.txt';\n// const outputfile = '_out.txt';\n// fs.writeFileSync(outputfile, '');\n// var myInterface = readline.createInterface({\n// input: fs.createReadStream(inputfile),\n// });\n// myInterface.on('line', function (line) {\n// stdinInput += line+'\\n';\n// }).on('close', () => {\n// main(); \n// process.exit(0);\n// })\n /*\n * Api Scanner\n */\n class Scanner {\n constructor() {\n this.index = -1;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n \n nextLine() {\n this.index += 1;\n return this.lines[this.index].trim();\n }\n nextArray(fn) {\n const array = this.nextLine().split(' ');\n return fn === String ? array : array.map(fn);\n }\n \n hasNext() {\n return this.index < this.lines.length;\n }\n }\n \n process.stdin.resume();\n process.stdin.setEncoding('utf-8');\n process.stdin.on('data', (input) => { stdinInput += input; });\n process.stdin.on('end', () => { main(); });\n\nvar n;\nfunction main() {\n const is = new Scanner();\n \n // const s = is.nextArray(Number);\n // const t = is.nextArray(Number);\n // // const k = is.nextArray();\n\n n = parseInt(is.nextLine());\n // console.log(n);\n\n\n if(kt()==1)\n console.log(\"YES\");\n\t\telse\n console.log(\"NO\");\n }\n \n function kt(){\n for(var i=2; i 3 && line % 2 == 0 ) {\n print('YES') ;\n}\nelse {\n print('NO');\n}"}, {"source_code": "const readline = require('readline');\nconst z=2 ;\nconst x=1;\nconst c=100\nconst rl = readline.createInterface({\n input: process.stdin\n});\nrl.on('line', (input) => {\n if (input.trim()>=x && input.trim()<=c){\n if (input.trim() % z != 0 || input.trim()==2 )\n {\n console.log(\"NO\");\n }\n else\n {\n console.log(\"YES\");\n }\n}\n rl.close();\n});"}, {"source_code": "// https://codeforces.com/problemset/problem/4/A\n\nfunction main(weight) {\n process.stdout.write(weight > 2 && weight % 2 === 0 ? 'YES' : 'NO')\n}\n\n// Handle standard input\nprocess.stdin.resume()\nprocess.stdin.setEncoding('utf-8')\n\nlet inputString = ''\n\nprocess.stdin.on('data', (inputStdin) => inputString += inputStdin)\nprocess.stdin.on('end', () => main(+inputString.trim()))\n"}, {"source_code": "'use strict';\n\nconst fs = require('fs');\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\nmain();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction solve(n) {\n return n%2===0 && n>=4 ? `YES`: `NO`;\n}\n\nfunction main() {\n\n const nk = readLine().split(' ');\n\n const n = parseInt(nk[0], 10);\n\n let result = solve(n);\n console.log(result);\n}\n"}, {"source_code": "x = readline();\nif (!(x & 1) && x != 2)print(\"YES\"); else print(\"NO\");\n"}, {"source_code": "var input = readline();\n(input > 2 && input%2 == 0) ? print(\"YES\") : print(\"NO\");"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) \n console.log(divideEvenly(lines[0]));\n});\n \nfunction divideEvenly(w){\n if (w < 3 || w > 100) return 'NO';\n if (w % 2 === 0 ) return 'YES'\n return 'NO';\n}\n "}, {"source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n \nfunction solution(input){\n if(input === \"2\"){\n return \"NO\"\n }\n return input % 2 === 0 ? \"YES\" : \"NO\"\n}\n \nrl.on('line', function(line){\n console.log(solution(line))\n})"}, {"source_code": "\nconst readline = require('readline')\n\nclass ReadStream {\n lines = []\n\n currPromise = undefined\n\n readlineHandler = input => {\n this.lines.push(input)\n }\n\n constructor() {\n this.rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n this.rl.on('line', this.readlineHandler)\n }\n\n async next() {\n this.currPromise = new Promise((resolve, reject) => {\n const tempPromise = this.currPromise ? this.currPromise : Promise.resolve()\n \n tempPromise.then(_ => {\n if (this.lines .length) {\n resolve(this.lines.shift())\n }\n else {\n this.rl.off('line', this.readlineHandler)\n this.rl.once('line', (input) => {\n resolve(input)\n this.rl.on('line', this.readlineHandler)\n })\n }\n })\n \n })\n return this.currPromise\n }\n\n close() {\n this.rl.off('list', this.readlineHandler)\n this.rl.close()\n }\n}\n\n\nconst cin = new ReadStream()\n\nasync function main() {\n const weight = parseInt(await cin.next())\n\n if (weight % 2 === 0 && weight > 2) {\n console.log('YES')\n } else {\n console.log('NO')\n }\n\n // cin.close()\n}\n\nmain()"}, {"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// read each line\nrl.on(\"line\", (lineInput) => {\n if (lineInput % 2 == 0 && lineInput != 2) {\n console.log(\"Yes\");\n } else console.log(\"NO\");\n});\n\n// when all file readed\nrl.on(\"close\", () => {});\n"}, {"source_code": " var arbuz = readline();\n arbuz = parseInt(arbuz);\n write(devideWaterMellon(arbuz))\n \n \nfunction devideWaterMellon(weight) {\n var result = 'NO';\n for (var index = 2; index < weight; index++) {\n if (index % 2 == 0 && ((weight - index) % 2 == 0) && weight > 3) {\n result = 'YES'\n break;\n }\n }\n return result\n}"}, {"source_code": "var a = readline();\na = parseInt(a);\nif (a % 2 === 0 && a !== 2){\n print(\"YES\");\n}else{\n print(\"NO\");\n}"}, {"source_code": "var ent = parseInt(readline());\nif (ent<=2) print(\"NO\");\nelse\n{\n if (ent%2==0) print(\"YES\"); \n else print(\"NO\");\n}\n"}, {"source_code": "(function f(){\nvar n = parseInt(readline());\n\tif(n!=2&&n%2==0){\n\t\t//console.log(\"NO\");\n\t\t print(\"YES\");\n\t}\n\telse \n\t\t//console.logt(\"YES\");\n\t print(\"NO\");\n\t \n})();"}, {"source_code": "\nconst readline = require('readline')\n\nclass ReadStream {\n lines = []\n\n currPromise = undefined\n\n readlineHandler = input => {\n this.lines.push(input)\n }\n\n constructor() {\n this.rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n this.rl.on('line', this.readlineHandler)\n }\n\n async next() {\n this.currPromise = new Promise((resolve, reject) => {\n const tempPromise = this.currPromise ? this.currPromise : Promise.resolve()\n \n tempPromise.then(_ => {\n if (this.lines .length) {\n resolve(this.lines.shift())\n }\n else {\n this.rl.off('line', this.readlineHandler)\n this.rl.once('line', (input) => {\n resolve(input)\n this.rl.on('line', this.readlineHandler)\n })\n }\n })\n \n })\n return this.currPromise\n }\n\n close() {\n this.rl.off('list', this.readlineHandler)\n this.rl.close()\n }\n}\n\n\nconst cin = new ReadStream()\n\nasync function main() {\n const weight = parseInt(await cin.next())\n\n if (weight % 2 === 0 && weight > 2) {\n console.log('YES')\n } else {\n console.log('NO')\n }\n\n cin.close()\n}\n\nmain()"}, {"source_code": "let readline = require('readline');\nlet rl = readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout,\n\tterminal: false\n});\n\nlet input = [];\nrl.on('line', function(line) {\n\tinput.push(line);\n\tif (input.length === 1) {\n\t\twaterMelon(parseInt(input[0]));\n\t\trl.close();\n\t}\n});\n\nlet waterMelon = (input) => {\n\tlet start = 1;\n\tlet end = input - 1;\n\tlet result = 'NO';\n\tfor (let i = start; i <= end; i++) {\n\t\tif (i % 2 === 0 && end % 2 === 0) {\n\t\t\tresult = 'YES';\n\t\t}\n\t\tend--;\n\t}\n\tconsole.log(result);\n};\n"}, {"source_code": " const map = {\n true: 'YES',\n false: 'NO'\n }\n \n const w = readline().split(' ').map(i => parseInt(i))[0];\nif (w > 2) {\n write(map[(w - 2) % 2 === 0]);\n} else {\n write('NO')\n}"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n let theNum = readline();\n\n let result = isTrue(theNum);\n\n if(result) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n}\n\nfunction isTrue(theNum) {\n if(theNum == 2) {\n return false;\n }\n let secondNum = theNum - 2;\n for(let i = 2; i <= theNum; i+=2, secondNum-=2) {\n if(i + secondNum == theNum) {\n if(i % 2 == 0 && secondNum % 2 == 0) {\n return true;\n }\n }\n }\n return false;\n}\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) \n divideEvenly(lines[0]);\n});\n \nfunction divideEvenly(w){\n if (w < 3 || w > 100) return console.log('NO');\n if (w % 2 === 0 ){ return console.log('YES')}\n else{ return console.log('NO');}\n}\n "}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inp = 0\nprocess.stdin.on(\"data\",input=>{\n inp = input\n})\nprocess.stdin.on(\"end\",input=>{\n \n main();\n \n})\n\n\n\n\nfunction main(){\nif(inp%2===0&&inp!=2){console.log(\"YES\")} else {console.log(\"NO\")}}"}, {"source_code": "(function f(){\n\t var nums = readline().split(' ');\n var n = nums[0];\n//\tvar n = parseInt(s);\n\tif(n!=2&&n%2==0){\n\t\t//console.log(\"NO\");\n\t\t print(\"YES\");\n\t}\n\telse \n\t\t//console.logt(\"YES\");\n\t print(\"NO\");\n\t \n})();"}, {"source_code": "var a= readline();\nif(a>2&&a%2===0) print(\"YES\");\nelse print(\"NO\");"}, {"source_code": "const state = { stdin: Buffer.alloc(0) };\nconst consume = (chunk) =>\n (state.stdin = Buffer.concat(\n [state.stdin, chunk],\n state.stdin.length + chunk.length\n ));\nconst commit = (answer) => process.stdout.write(answer);\n//\nconst main = (args) => {\n let data = parseInt(state.stdin.toString(\"utf8\"));\n let solution = \"NO\";\n if (data < 1 || data > 100) return commit(solution);\n\n // divide the watermelon into two parts,\n // each of them weighing even (%2==0) number of kilos;\n\n for (let i = 1; i < data; i++) {\n let part = (data - i) % 2 ===0;\n if (i % 2 === 0 && part) {\n solution = \"YES\";\n // console.log(data, partOne, partTwo)\n commit(solution);\n return;\n }\n }\n commit(solution);\n};\n\nprocess.stdin.on(\"data\", consume).on(\"end\", main);\n"}, {"source_code": "var input = readline().split(' ')[0];\nprint((input > 2 && !(input % 2)) ? 'YES' : 'NO');\n"}, {"source_code": "var num = parseInt(readline());\nif (num % 2 || num < 4) \n{\n print('NO');\n}\nelse \n{\n print('YES');\n}"}, {"source_code": "var input = null;\n//input = ['2'];\nfunction main(input) {\n var w = parseInt(input[0]);\n if (w == 2)\n solution('NO');\n for (var i = 2; i < 50; i += 2) {\n if (w % 2 == 0)\n solution('YES');\n }\n solution('NO');\n}\n///////////////////////////////////////////////////////////////////////////////////////\nif (!input) {\n var input_1 = '';\n process.stdin.on('data', function (char) { return input_1 += char; });\n process.stdin.on('end', function () {\n var EOL = require('os').EOL;\n var inputs = input_1.split(EOL).slice(0, -1);\n main(inputs);\n });\n}\nelse\n main(input);\nfunction solution(data) {\n console.log(data);\n process.exit(0);\n}\n"}, {"source_code": "\nfunction divideBerry(w) {\n if (w % 2 === 0 && w !== 2) {\n print('YES');\n } else {\n print('NO');\n }\n}\n\nvar input = readline();\ndivideBerry(parseInt(input));"}, {"source_code": "// readline = require('readline')\nlet stdinInput = '';\n\n// //file\n// var fs = require('fs');\n// const inputfile = '_in.txt';\n// const outputfile = '_out.txt';\n// fs.writeFileSync(outputfile, '');\n// var myInterface = readline.createInterface({\n// input: fs.createReadStream(inputfile),\n// });\n// myInterface.on('line', function (line) {\n// stdinInput += line+'\\n';\n// }).on('close', () => {\n// main(); \n// process.exit(0);\n// })\n /*\n * Api Scanner\n */\n class Scanner {\n constructor() {\n this.index = -1;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n \n nextLine() {\n this.index += 1;\n return this.lines[this.index].trim();\n }\n nextArray(fn) {\n const array = this.nextLine().split(' ');\n return fn === String ? array : array.map(fn);\n }\n \n hasNext() {\n return this.index < this.lines.length;\n }\n }\n \n process.stdin.resume();\n process.stdin.setEncoding('utf-8');\n process.stdin.on('data', (input) => { stdinInput += input; });\n process.stdin.on('end', () => { main(); });\n\nvar n;\nfunction main() {\n const is = new Scanner();\n \n // const s = is.nextArray(Number);\n // const t = is.nextArray(Number);\n // // const k = is.nextArray();\n\n n = parseInt(is.nextLine());\n // console.log(n);\n\n\n if(kt()==1)\n console.log(\"YES\");\n\t\telse\n console.log(\"NO\");\n }\n \n function kt(){\n for(var i=2; i {\n if (input.trim()>=x && input.trim()<=c){\n if (input.trim() % z != 0 || input.trim()==2 )\n {\n console.log(\"NO\");\n }\n else\n {\n console.log(\"YES\");\n }\n}\n rl.close();\n});"}, {"source_code": "var w = readline();\nprint(w%2===0 && w>2 ? \"YES\":\"NO\");"}, {"source_code": "var n =parseInt(readline());\nvar b = false;\nfor (var i = 4; i <= n; i+=2){\n if(i == 100) break;\n if(((i % 2 === 0) && (n-i) % 2 ===0) || n == 4)\n b = true;\n \n }\n write(b ? \"YES\":\"NO\");"}, {"source_code": "var num = parseInt(readline());\nif (num % 2 || num < 4) \n{\n print('NO');\n}\nelse \n{\n print('YES');\n}"}, {"source_code": "var weight = readline();\n\nif(weight <= 100 && weight >= 1){\n if(weight > 2 && weight % 2 == 0){\n print(\"YES\");\n }else{\n print(\"NO\");\n }\n}"}, {"source_code": "function printAnss()\n{\n\tvar weight;\n\n\tweight=readline();\n\n\tif( weight!=2 )\n {\n if(weight%2===0)print(\"YES\");\n else print(\"NO\");\n \n }\n else print(\"NO\");\n\n}\nprintAnss();"}, {"source_code": "let i = ''\n\nfunction main(w) {\n // let dem = 0;\n // for(let i = 2; i <= w ; i++){\n // if(w % i == 0){\n // dem++;\n // }\n // };\n //\n // if(dem >= 2){\n // console.log(\"YES\");\n // }else {\n // console.log(\"NO\");\n // }\n if(w % 2 == 0 && w > 2){\n console.log(\"YES\");\n }else {\n console.log(\"NO\");\n }\n}\n// main(6);\n\n\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL)\n const line1Array = lines[0].split(' ').map(x => parseInt(x))\n const w = line1Array[0]\n\n main(w);\n})\n\n"}, {"source_code": "var w = readline(); \nif (w % 2 == 0 && w > 2){\n\tprint(\"YES\");\n} else {\n\tprint(\"NO\")\n}\n"}, {"source_code": "// Problem # : 4A\n// Created on : 2019-01-15 00:36:24\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf8\");\n\nvar input = \"\",\n readline,\n print;\n\nprocess.stdin.on(\"data\", function(chunk) {\n input += chunk;\n});\n\nprocess.stdin.on(\"end\", function() {\n input = input.split(\"\\n\");\n print = function(data) {\n process.stdout.write(data + \"\\n\");\n };\n var inputLineIndex = 0;\n readline = function() {\n return inputLineIndex >= input.length ? undefined : input[inputLineIndex++];\n };\n process.exit(main() || 0);\n});\n\nfunction main() {\n // Your code here\n let l = readline();\n let n = Number(l);\n if (n > 2 && n % 2 == 0) {\n print(\"YES\");\n } else {\n print(\"NO\");\n }\n\n return 0;\n}\n"}, {"source_code": "// Input\n'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readline() {\n return inputString[currentLine++];\n}\n \n//main\nfunction main() {\n var n = parseInt(readline());\n console.log((n<=2 || n%2) ? \"NO\" : \"YES\");\n}"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// single line input\nreadline.on('line', line => {\n readline.close(), console.log(parseInt(line) % 2 === 0 && parseInt(line) > 2 ? \"YES\" : \"NO\");\n});\n "}, {"source_code": "const input = readline();\nconst num = parseInt(input);\n\nif ((num>2) && (num%2 === 0)) {\n print(\"YES\");\n} else {\n print(\"NO\");\n}"}, {"source_code": "// let x = readline()\n// .split(\" \")\n// .map(function (x) {\n// return parseInt(x);\n// });\n\nvar x = readline();\n\nif (x > 2 && x % 2 == 0) {\n write(\"YES\");\n} else {\n write(\"NO\");\n}\n"}, {"source_code": "var input = null;\n//input = ['2'];\nfunction main(input) {\n var w = parseInt(input[0]);\n if (w == 2)\n solution('NO');\n for (var i = 2; i < 50; i += 2) {\n if (w % 2 == 0)\n solution('YES');\n }\n solution('NO');\n}\n///////////////////////////////////////////////////////////////////////////////////////\nif (!input) {\n var input_1 = '';\n process.stdin.on('data', function (char) { return input_1 += char; });\n process.stdin.on('end', function () {\n var EOL = require('os').EOL;\n var inputs = input_1.split(EOL).slice(0, -1);\n main(inputs);\n });\n}\nelse\n main(input);\nfunction solution(data) {\n console.log(data);\n process.exit(0);\n}\n"}, {"source_code": "var ent = parseInt(readline());\nif (ent<=2) print(\"NO\");\nelse\n{\n if (ent%2==0) print(\"YES\"); \n else print(\"NO\");\n}\n"}, {"source_code": "var readline = require('readline'),\n rl = readline.createInterface(process.stdin, process.stdout);\n\n \nrl.on('line', function (line) {\n \n var n=line.split(' ')\n n%2==0 && n!=2 ? console.log(\"YES\") : console.log(\"NO\");\n rl.close();\n\n}).on('close', function () {\n\n process.exit(0);\n});"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf8');\nvar input= '', readline, cout;\nprocess.stdin.on('data', function(chunk) {\n input+=chunk;\n});\nprocess.stdin.on('end', function() {\n input = input.split('\\n');\n cout = function(data) {process.stdout.write(data+'\\n')};\n var inputLineIndex = 0;\n readline = function(){return inputLineIndex>=input.length?undefined:input[inputLineIndex++]};\n process.exit(main() || 0);\n});\n\nfunction main()\n{\n let a = readline();\n if(a > 2 && a % 2 === 0) console.log(\"YES\");\n else console.log(\"NO\")\n return 0;\n}"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('ascii');\n \nvar input_stdin = \"\";\nvar input_stdin_array = \"\";\nvar input_currentline = 0;\n \nprocess.stdin.on('data', function (data) {\n input_stdin += data;\n});\n \nprocess.stdin.on('end', function () {\n input_stdin_array = input_stdin.split(\"\\n\");\n main(); \n});\n \nfunction readLine() {\n return input_stdin_array[input_currentline++];\n}\n \nfunction solveMeFirst(a) {\n // Hint: Type return a+b below \n return a > 2 && a % 2 === 0 ? \"YES\" : \"NO\"; \n}\n \n \nfunction main() {\n var a = parseInt(readLine());\n \n var res = solveMeFirst(a);\n console.log(res);\n}"}, {"source_code": "process.stdin.on('data',c=>{a=Number(c);console.log(c>2&&c%2==0?\"YES\":\"NO\")})"}, {"source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', function(line){\n const weight = parseInt(line);\n if(weight <= 2 || weight % 2 !== 0) {\n console.log(\"NO\");\n } else {\n console.log(\"YES\"); \n }\n})"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) \n divideEvenly(lines[0]);\n});\n \nfunction divideEvenly(w){\n if (w < 3 || w > 100) return console.log('NO');\n if (w % 2 === 0 ){ return console.log('YES')}\n else{ return console.log('NO');}\n}\n "}, {"source_code": "var input = readline();\n(input > 2 && input%2 == 0) ? print(\"YES\") : print(\"NO\");"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// var numbers = readline().split(\" \").map(function(x) { return parseInt(x); });\n \nreadline.on('line', line => {\n readline.close();\n\n const number = line.split(\" \")[0];\n \n if (number > 2 && number % 2 === 0) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n});"}, {"source_code": "var num = parseInt(readline());\nif (num % 2 || num < 4) \n{\n print('NO');\n}\nelse \n{\n print('YES');\n}"}, {"source_code": "\"use strict\";\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", function() {\n inputString = inputString\n .replace(/\\s*$/, \"\")\n .split(\"\\n\")\n .map(str => str.replace(/\\s*$/, \"\"));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n const firstLine = readLine();\n const weight = parseInt(firstLine, 10);\n // const a = readLine().split(' ').map(aTemp => parseInt(aTemp, 10));\n\n console.log(watermelon(weight));\n}\n\nfunction watermelon(weight) {\n return weight === 2 || (weight & 1) === 1 ? \"NO\" : \"YES\";\n}\n"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (input) => {\n if (input > 2 && input % 2 === 0) {\n console.log('YES')\n } else {\n console.log('NO')\n }\n rl.close();\n});"}, {"source_code": "var kilos = +readline();\nvar isEven = false;\nfor (var i = 1; i < kilos; i++) {\n for (var j = kilos - 1; j > 0; j--) {\n if (i % 2 === 0 && j % 2 === 0 && i + j === kilos) {\n isEven = true;\n print('YES');\n break;\n }\n }\n if (isEven) break;\n}\nif (!isEven) print('NO');"}, {"source_code": " \n var weight;\n\n\tweight=readline();\n\n\tif( weight!=2 )\n {\n if(weight%2===0)print(\"YES\");\n else print(\"NO\");\n \n }\n else print(\"NO\");"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf8');\nvar input= '', readline, cout;\nprocess.stdin.on('data', function(chunk) {\n input+=chunk;\n});\nprocess.stdin.on('end', function() {\n input = input.split('\\n');\n cout = function(data) {process.stdout.write(data+'\\n')};\n var inputLineIndex = 0;\n readline = function(){return inputLineIndex>=input.length?undefined:input[inputLineIndex++]};\n process.exit(main() || 0);\n});\n\nfunction main()\n{\n let a = readline();\n if(a > 2 && a % 2 === 0) console.log(\"YES\");\n else console.log(\"NO\")\n return 0;\n}"}, {"source_code": "var weight = parseInt(readline('weight? '));\nif (weight%2===0 && weight !==0 && weight>2)\nprint('YES');\nelse\nprint('NO');"}, {"source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\nfunction main(input) {\n let output = nameLookUp(input);\n\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n\n// Write your code here\nfunction nameLookUp(arr) {\n let nLines = arr.split('\\n');\n let nWeight = nLines[0];\n let quotient = nWeight % 2 === 0 && nWeight > 2 ? 'yes' : 'no';\n return quotient;\n\n}"}], "negative_code": [{"source_code": "// const readline = require('readline');\n\n// const rl = readline.createInterface({\n// input: process.stdin,\n// output: process.stdout\n// });\n\n// let w;\n// rl.on('line', (input) => {\n// w = input;\n// console.log(w % 2 === 0 ? 'YES' : 'NO');\n\n// rl.close();\n// });\n\nconst numbers = readline();\nprint(numbers % 2 === 0 ? 'YES' : 'NO');"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (weight) => {\n if (weight <= 3) console.log('NO');\n\n var answer = weight % 2;\n console.log(answer === 1 ? 'NO' : 'YES');\n rl.close();\n});"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\nreadline.question(\"\", (weight) => {\n if (weight % 2 == 0)\n console.log(\"YES\")\n else\n console.log(\"NO\")\n readline.close()\n})"}, {"source_code": "(function f(s){\n\tvar n = 5;// parseInt(s);\n\tif(n>2&&n%(2!==0)){\n\t\t//console.log(\"NO\");\n\t\tprint(\"NO\");\n\t}\n\telse \n\t\t//console.logt(\"YES\");\n\t print(\"YES\");\n\t \n\n})();"}, {"source_code": "#!/usr/bin/env nodejs\n\n// 4A - Watermelon\n\nfunction main(stdin) {\n console.log(parseInt(stdin) % 4 === 0 ? \"YES\" : \"NO\");\n}\n\nmain(require(\"fs\").readFileSync(0, \"utf-8\"));\n"}, {"source_code": "(function f(s){\n\tvar n = parseInt(s);\n\tif(n>2&&n%2!=0){\n\t\t print(\"YES\");\n\t}\n\telse \n\t\tprint(\"NO\");\n\t \n\t \n\t return 0;\n})();"}, {"source_code": "var myArgs = process.argv.slice(2);\nif(myArgs[0]%2==0)console.log('YES');"}, {"source_code": "var w;\n\t\tfor(i=0;(2*(i+2))<=w;i++)\n\t\t{\n\tif(((w-2*(i+2))%2!==0)||(w-2)%2!==0)\n\t{\n\t\tprint(\"YES\");\n\t}\n\n\telse\n\t{ print(\"NO\");}\n}"}, {"source_code": "function selicomArbuz(w) {\n var selicom = w % 2\n if (selicom === 0) {\n print(\"YES\")\n } else {\n print(\"NO\")\n }\n}\n\nselicomArbuz()"}, {"source_code": "let state = {stdin:Buffer.alloc(0)}\nprocess.stdin\n .on('data', chunk=> {\n state.stdin = Buffer.concat([state.stdin, chunk], state.stdin.length+chunk.length )\n })\n .on('end', ()=> {\n let data = state.stdin.toString('utf8')\n process.stdout.write( (data/2)%2===0 ? 'YES': 'NO')\n })"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n rl.question(\"\",function (x) {\n \n \n\n\n if (x%2 === 0 || x===2 ) {\n console.log('YES');\n \n }else {\n console.log('NO')\n }\n \n })"}, {"source_code": "(function f(s){\n\tvar n = parseInt(s);\n\tif(n>2&&n%2===0)\n\t\tprint(\"YES\");\n\telse \n\t print(\"NO\");\n})();"}, {"source_code": " var n = +readline();\n\n\tif (n%2==0){\n print(\"Yes\")\n } else {\n print(\"No\")\n }\n"}, {"source_code": "function f(chislo){\n this.ch = chislo;\n \n\tif(chislo%2==0)\n\t\treturn true;\n\t\n\treturn false;\n}"}, {"source_code": "var n = readline();\n\nif (n % 2 === 0) {\n print(\"YES\")\n} else if (n == 2) {\n print(\"NO\")\n} else {\n print(\"NO\")\n}"}, {"source_code": "console.log(parseInt(process.argv[2])%2 === 0 ? \"YES\":\"NO\")"}, {"source_code": "var value = parseInt(readline())\nvar response = value % 2 == 0 && (value / 2) % 2 == 0? \"YES\" : \"NO\"\nprint(response)"}, {"source_code": "const a = parseInt(readline());\nconst d = a % 2 === 0;\n\nd ? r = 'YES' : r = 'NO';\n\nprint(r);"}, {"source_code": "var n = readline();\n\nif (n % 2 === 0) {\n print(\"YES\")\n} else if (n == 2) {\n print(\"NO\")\n} else {\n print(\"NO\")\n}"}, {"source_code": "var w = readline();\n\nif(((w % 2) === 0) &&((w % 2) === 1)){\n print(\"YES\");\n} else {\n print(\"NO\");\n}"}, {"source_code": "a = readline();\nif (a <= 2 ){\n print(\"NO\")\n}\nif (a % 2 === 0){\n print(\"YES\");\n}\nprint(\"NO\") ;"}, {"source_code": "var b = readline();\nif(b<2)print(\"NO\")\nprint((b%2===0)?\"YES\":\"NO\");"}, {"source_code": "n=readline();\nif(n%2===0&&n%2!==1){\nprint('YES');\n} else{\nprint('NO');\n}\n"}, {"source_code": "\nfunction Watermelon(w) {\n if(w % 2 == 0) {\n print('yes');\n } else {\n print('no');\n }\n}\n\nvar w = readline();\n\n print('input');\n print(w);\n\nif(w>=1 && w<=100) {\n print('output');\n Watermelon(w); \n} else {\n print('wrong input');\n} "}, {"source_code": "const readline = require('readline');\n \nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n \nrl.question('', (answer) => {\n if (answer % 2 === 0) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n \n rl.close();\n});"}, {"source_code": "\tvar n = readline();\n\n\tprint(n % 2 === 0 ? \"YES\" : \"NO\");"}, {"source_code": "var print = this.print || require('lol-io').print\nvar write = this.write || require('lol-io').write\nvar readline = this.readline || require('lol-io').readline\n// a + b\n\nif(readline%2==0){\nprint('YES');\n}else{\n print('NO');\n}"}, {"source_code": "const wWeight = readline();\n\ncheckIfWatermelonIsEven(wWeight);\n\nfunction checkIfWatermelonIsEven(w){\n print(((w/2)%2?'NO':'YES'));\n}\n"}, {"source_code": "var stdin = \"\";\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"ascii\");\nprocess.stdin.on(\"data\", function(data) {\n stdin += data;\n});\nprocess.stdin.on(\"end\", function() {\n main(stdin);\n});\n\nconst debug = 0;\nvar log = console.log;\nvar dbg = debug ? console.log : _ => {};\n\n/////////////// ignore above this line ////////////////////\n\nfunction main(stdin) {\n log(stdin % 2 ? \"NO\" : \"YES\");\n}\n"}, {"source_code": "var x;\nx = readline();\n\nif(Number(x) % 2 == 0){\n print(\"YES\");\n}\nelse{\n print(\"NO\");\n}"}, {"source_code": "function watermellon(n){if (n % 2 === 0) {return \"YES\";} else {return \"NO\";}}"}, {"source_code": "process.stdin.on('data', function(chunk){\n console.log(Number(chunk) % 2 === 0);\n});"}, {"source_code": "function selicomArbuz(w) {\n var selicom = w % 2\n if (selicom === 0) {\n return \"YES\"\n } else {\n console.log(\"NO\")\n }\n}"}, {"source_code": "write((readline()%2===0 && readline()>2)?'SÍ':'NO')"}, {"source_code": "console.log(parseInt(process.argv[2])%2 === 0 ? \"YES\":\"NO\")"}, {"source_code": "\nvar a=readline();\nevenOdd(a);\n\nfunction evenOdd(weight){\n if(weight%2===0){\n print('YES')\n\n }else{\n print('NO')\n }\n}\n\n\n"}, {"source_code": "a=readline();\nif (a <= 2){\n print(\"NO\")\n}\nif (a % 2 === 0){\n print(\"YES\");\n}\nprint(\"NO\") ;"}, {"source_code": "var num = readline();\n\nif (num % 2 === 0 && num !== 2) {\n var isOk = true;\n for (var i = 2; i <= num; i+=2) {\n if ((num - i) % 2 !== 0) {\n isOk = false;\n }\n }\n \n print(isOk ? 'YES' : 'NO')\n} else {\n print('NO')\n}\n"}, {"source_code": "var n = readline();\n\nif(n%2 !== 0 && n ==2) {\n print('NO');\n} else {\n print('YES');\n}"}, {"source_code": "var lines = readline().split('\\n').join('')\nvar firstLine = lines[0]\n\nprint(firstLine % 2 === 0 ? 'YES' : 'NO')"}, {"source_code": "\nvar a=readline();\nevenOdd(a);\n\nfunction evenOdd(weight){\n if(weight%2===0){\n print('YES')\n\n }else{\n print('NO')\n }\n}\n\n\n"}, {"source_code": "process.stdin.on('data', chunk => console.log(chunk.toString() % 2 === 0 ? \"YES\":\"NO\"))\n"}, {"source_code": "var n = readline();\nif (n % 2 === 0) {print('YES');} else {print('NO');}"}, {"source_code": "const input = readline();\nconst num = parseInt(input);\n\nif ((num>2) && (num%2 === 0)) {\n //console.log(\"YES\");\n} else {\n //console.log(\"NO\");\n}"}, {"source_code": "var arr = [];\nfunction watemelon(input){\n if((input % 2) === 0){\n print('YES');\n } else {\n print('NO');\n }\n}"}, {"source_code": "var n = readline();\nif (n % 2 === 0 && n > 2 && n < 100) {print('YES');} else {print('NO');}"}, {"source_code": "var a= readline().split(\" \");\nif(a%2===0){\n var b=a/2;\n if(b%2===0){\n print(\"YES\");\n }\n else {\n print(\"NO\");\n }\n}\nelse print(\"NO\");"}, {"source_code": "num = process.argv[0]\n\nfunction test(t) {\n if ( t<1 || t>100 ) {\n console.log(\"input error\")\n process.exit()\n }\n}\n\ntest(num)\n\nfor(let i = 1; i < num; i++) {\n if (i%2 == 0) {\n let m = num-i\n if (m%2 == 0) {\n console.log(\"YES\");\n process.exit();\n }\n\n }\n}\nconsole.log(\"NO\")\n"}, {"source_code": "var w = readline();\n\tif(w==2)\n\t{\n\t\tprint(\"NO\");\n\t}\n\tif(w%2==0)\n\t{\n\t\tprint(\"YES\");\n\t}\n\telse \n\t{\n\t\tprint(\"NO\");\n\t}"}, {"source_code": "let i = ''\n\nfunction main(w) {\n let tong = 0;\n for(let i = 1; i < w ; i++){\n if(i % 2 === 0){\n tong += i;\n }\n }\n\n if(tong == w){\n console.log(\"YES\");\n }else {\n console.log(\"NO\");\n }\n}\n// main(5);\n\n\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL)\n const line1Array = lines[0].split(' ').map(x => parseInt(x))\n const w = line1Array[0]\n\n main(w);\n})\n\n"}, {"source_code": "var x;\nx = readline();\nif (x === 2 || (x % 2) == 1) {\n print(\"NO\\n\");\n} else {\n print(\"YES\\n\");\n}\n"}, {"source_code": "var num = readline();\n\nprint(num % 2 === 0 ? 'YES' : 'NO');\n"}, {"source_code": "var w = readline();\n\nw > 0 && w % 2 === 0 ? print('YES') : print('NO');"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n \n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n console.log(lines); \n \n})"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n\nreadline.on('line', line => {\n readline.close(), problem(parseInt(line));\n});\n\nfunction problem(i) {\n console.log(i % 2 === 0);\n}\n"}, {"source_code": "#!/usr/bin/env nodejs\n\n// 4A - Watermelon\n\nfunction main(stdin) {\n console.log(parseInt(stdin) % 2 === 0 ? \"YES\" : \"NO\");\n}\n\nmain(require(\"fs\").readFileSync(0, \"utf-8\"));\n"}, {"source_code": "function watermelon (){\n\tw = prompt (\"Introduce kg\");\n\tw = parseInt(w);\n\tif ((w>=1)&&(w<=100)&&(w%2===0)&&(w>2)){\n\t\talert (\"YES\");\n\t} else {alert (\"NO\");\n\t}\n}"}, {"source_code": "function watermelon(num) {\n var media;\n media = num / 2;\n if (media % 2 == 0) {\n return \"YES\";\n }\n \n return \"NO\";\n}"}, {"source_code": "'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readLine() {\n return inputString[currentLine++];\n}\n \n \nfunction main() {\n const parameterVariable = readLine();\n const line2 = readLine();\n \n console.log(line2)\n console.log(typeof line2)\n \n if(parseInt(line2) % 2 === 0) {\n console.log('YES')\n \n }\n else {console.log('NO');}\n \n}"}, {"source_code": "var cli = +readline() / 2;\nif (cli % 2 === 0) {\n print('YES');\n} else {\n print('NO');\n}"}, {"source_code": "//nodejs v4.2.6\nprocess.stdin.resume(); \n\tprocess.stdin.setEncoding('utf8');\n\t//Taking a usr input\n\tprocess.stdin.on('data', function (text) {\n\t\t\t//Printing out user input\n\t\t\tvar input = parseInt(text)\n\t\t\t\tif(input%2 === 0){\n\t\t\t\t\tconsole.log('Yes');\n\t\t\t\t}else{\n\t\t\t\t\tconsole.log('No')\n\t\t\t\t}\n\t});\n"}, {"source_code": "let i = '';\nprocess.stdin.on('data', c => i += c);\nprocess.stdin.on('end', () => {\n const { EOL, } = require('os');\n const weight = i.split(EOL);\n const res = (weight) => weight % 2 === 0 ? 'YES' : 'NO';\n const ver = res(weight);\n\n console.log(weight, ver);\n});"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n let theNum = readline();\n\n let result = isTrue(theNum);\n\n if(result) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n}\n\nfunction isTrue(theNum) {\n let secondNum = theNum - 2;\n for(let i = 2; i <= theNum; i+=2, secondNum-=2) {\n if(i + secondNum == theNum) {\n if(i % 2 == 0 && secondNum % 2 == 0) {\n return true;\n }\n }\n }\n return false;\n}\n"}, {"source_code": "var w = readline();\n\nif (w % 2=== 0) {\n print(\"YES\");\n} else {\n print(\"NO\");\n}"}, {"source_code": "\nfunction divideBerry(w) {\n if (w % 2 === 0 && w !== 2) {\n print('YES');\n } else {\n print('NO');\n }\n}\n\ndivideBerry(readline());"}, {"source_code": "function task1(a){if((a/2)%2==0){return \"yes\"}else{ return \"no\"}};"}, {"source_code": "var weight = readline();\n\nif(weight <= 100 && weight >= 1 && weight % 2 == 0){\n print('YES');\n}else{\n print('NO');\n}\n"}, {"source_code": "var input = readline().split(' ');\nvar watermelon_weight = input[0];\n\nfor(var even = 0; even <= watermelon_weight; even += 2){\n if(watermelon_weight === 2) { var verdict = 'NO'; break;}\n var verdict = watermelon_weight%2 === 0 ? 'YES' : 'NO';\n if(verdict === 'YES') { break; }\n}\nprint(verdict);"}, {"source_code": "\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", (inputStdin) => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = getArray(inputString, '\\n');\n\n main();\n});\n\nfunction getArray(str, delimiter) {\n return str\n .trim()\n .split(delimiter)\n .map((string) => {\n return string.trim();\n });\n}\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction pi(str) {\n return parseInt(str);\n}\n\nfunction main() {\n var n = readLine();\n if (pi(n) %2 === 0 && pi(n) > 0) {\n console.log(\"YES\");\n } else {\n console.log(\"NO\");\n }\n}\n"}, {"source_code": "const state = {stdin:Buffer.alloc(0)}\nconst consume = chunk => state.stdin = Buffer.concat([state.stdin, chunk], state.stdin.length+chunk.length )\nconst commit = answer => process.stdout.write(answer)\n// \nconst main = args => {\n let data = parseInt(state.stdin.toString('utf8'))\n let solution = 'NO'\n if(data < 1 || data > 100) return null\n\n // divide the watermelon into two parts, \n // each of them weighing even number of kilos;\n \n for(let i = 1; i < data; i++){\n let partOne = data-i\n let partTwo = data-partOne\n if( partOne % 2 == 0 && partTwo % 2 == 0 ) {\n solution = 'YES'\n return commit(solution)\n }\n }\n}\n\nprocess.stdin\n .on('data', consume)\n .on('end', main)"}, {"source_code": "var a= parseInt(readline().split(\" \"));\nif(a%2===0){\n print(\"YES\");\n}\nelse \n{\n print(\"NO\");\n}"}, {"source_code": "function f(chislo){\n\tif(chislo&1)\n\t\tconsole.log(YES);\n\telse \n\tconsole.log(NO);\n}"}, {"source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\nfunction main(input) {\n let output = nameLookUp(input);\n\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n\n// Write your code here\nfunction nameLookUp(arr) {\n let nLines = arr.split('\\n');\n let nWeight = nLines[0];\n let quotient = (nWeight / 2) % 2 == 0 ? 'yes' : 'no';\n return quotient;\n\n}"}, {"source_code": "function main(){\n var n = +readline();\n if(n == 2 || n.toString().includes(\".\"))\n print(\"NO\");\n else\n print(\"YES\");\n}\n\nmain();\n"}, {"source_code": "let i = ''\n\nfunction main(w) {\n let dem = 0;\n for(let i = 1; i < w ; i++){\n if(w % i == 0){\n dem++\n }\n };\n\n if(dem >= 2){\n console.log(\"YES\");\n }else {\n console.log(\"NO\");\n }\n}\n// main(5);\n\n\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL)\n const line1Array = lines[0].split(' ').map(x => parseInt(x))\n const w = line1Array[0]\n\n main(w);\n})\n\n"}, {"source_code": "\"use stict\"\n\nvar current = write();\nif(current > 2 && current % 2 == 0){\n print(\"YES\");\n}\nelse{\n print(\"NO\");\n}"}, {"source_code": "const readline = require('readline');\n\nconst r1= readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout\n})\nr1.on('line', (line) => {\n\twatermelon(+line)\n\tr1.close();\n})\n\nfunction watermelon(kg) {\n\treturn kg % 2 ? 'NO' : 'YES'\n}\n\n\n"}, {"source_code": "var arr = [];\nfor(var i = 0; i < 100; i++){if(i % 2 === 0){arr.push(i);}}"}, {"source_code": "'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readLine() {\n return inputString[currentLine++];\n}\n \n \nfunction main() {\n const parameterVariable = readLine();\n const line2 = readLine();\n \n if(parameterVariable >= 2 && parameterVariable % 2 === 0) console.log('YES')\n else console.log('NO')\n \n}"}, {"source_code": "//nodejs v4.2.6\nprocess.stdin.resume(); \n\tprocess.stdin.setEncoding('utf8');\n\t//Taking a usr input\n\tprocess.stdin.on('data', function (text) {\n\t\t\t//Printing out user input\n\t\t\tvar input = parseInt(text)\n\t\t\t\tif(input%2 === 0){\n\t\t\t\t\tconsole.log('Yes');\n\t\t\t\t}else{\n\t\t\t\t\tconsole.log('No')\n\t\t\t\t}\n\t});\n"}, {"source_code": "var input = readline().split(' ');\nvar watermelon_weight = input[0];\nprint((watermelon_weight/2)%2 === 0 ? 'YES' : 'NO');"}, {"source_code": "const a = parseInt(readline());\nconst d = a % 2 === 0;\n\nd ? r = 'YES' : r = 'NO';\n\nprint(r);"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('ascii');\n\nconst readable = process.stdin;\n\nreadable.on('data', (data) => {\n\tlet a = data\n \tif (a !== null) {\n \t\tconsole.log(a % 2 === 0 ? \"YES\" : \"NO\")\n \t\tprocess.exit(0)\n \t}\n})"}, {"source_code": "function divideEvenly(w){\n if (w < 1 || w > 100) return console.log('NO');\n if (w % 2 === 0) return console.log('YES');\n return console.log('NO');\n}\nconsole.log(divideEvenly());"}, {"source_code": "const num = parseInt(readline());\nif(num%2===0){\n print('YES');\n}\nelse{\n print('NO');\n}"}, {"source_code": "function divide(weight){\n return weight > 2 && weight % 2 === 0;\n}"}, {"source_code": "var numbers = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nwrite(numbers)\nwrite(numbers[0])\nwrite('test')"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"ascii\");\n_input = \"\";\nprocess.stdin.on(\"data\", function (input) {\n _input += input;\n});\n\nprocess.stdin.on(\"end\", function () {\n processData(_input);\n});\n\nfunction processData(input) {\n const values = input.split('\\n')\n if (values && values.length > 0 && values[0]%2 === 0) {\n const temp = Math.floor(values[0]/2)\n if (temp%2 === 0) {\n console.log(\"YES\")\n\n } else {\n console.log(\"NO\")\n\n }\n\n } else {\n console.log(\"NO\")\n }\n}"}, {"source_code": "var w = readline();\n\nw%2 === 0 ? print('YES') : print('NO');"}, {"source_code": "var w = readline();\n print('input');\n print(w);\n\n print('output');\n (w % 2 == 0 && w!=2)? print('YES'): print('NO');"}, {"source_code": "(function f(){\n\t var nums = readline().split(' ');\n var n = nums[0];\n//\tvar n = parseInt(s);\n\tif(n=>2&&n%2!==0){\n\t\t//console.log(\"NO\");\n\t\tprint(\"NO\");\n\t}\n\telse \n\t\t//console.logt(\"YES\");\n\t print(\"YES\");\n\t \n\treturn 0;\n})();"}, {"source_code": "var lines = readline().split('\\n').join('')\nvar firstLine = lines[0]\n\nprint(firstLine % 2 === 0 && firstLine > 2) ? 'YES' : 'NO'"}, {"source_code": "a = readline();\nprint((a !== 2 && a%2 === 0)? \"YES\": \"NO\");"}, {"source_code": "const readline = require(\"readline\").createInterface({\n input: process.stdin,\n output: process.stdout,\n});\nlet input;\nreadline.on(\"line\", (line) => {\n readline.close(), input=line;\n});\n\nconsole.log(`这是我的输入: ${input}`)\n"}, {"source_code": "a = readline();\nif (a <= 2 ){\n print(\"NO\")\n}\nif (a % 2 === 0){\n print(\"YES\");\n}\nprint(\"NO\") ;"}, {"source_code": "var kilo = readline();\nwrite((kilo/2)%2? 'NO':'YES'); "}, {"source_code": "var w = readline();\n\tif(w%2==0)\n\t{\n\t\tprint(\"YES\");\n\t}\n\t\telse \n\t\t{\n\t\t\tprint(\"NO\");\n\t\t}"}, {"source_code": "var a= readline().split(\" \");\nif(a%2===0){\n var b=a/2;\n if(b%2===0){\n print(\"YES\");\n }\n else {\n print(\"NO\");\n }\n}\nelse print(\"NO\");"}, {"source_code": "const readline = require(\"readline\").createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\n// single line input\n// readline.on(\"line\", (line) => {\n// readline.close();\n// });\n\n// multi line input\nreadline.on(\"line\", (line) => {\n const input = +line.split(\" \")[0];\n readline.close();\n const half = input / 2;\n if (input % 2 === 0) {\n if (half % 2 === 0) {\n console.log(\"YES\");\n return;\n }\n }\n console.log(\"NO\");\n});\n"}, {"source_code": "function selicomArbuz(w) {\n var selicom = w % 2\n if (selicom === 0) {\n print(\"YES\")\n } else {\n print(\"NO\")\n }\n}\n\nselicomArbuz(8);"}], "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2"} {"nl": {"description": "A triangular number is the number of dots in an equilateral triangle uniformly filled with dots. For example, three dots can be arranged in a triangle; thus three is a triangular number. The n-th triangular number is the number of dots in a triangle with n dots on a side. . You can learn more about these numbers from Wikipedia (http://en.wikipedia.org/wiki/Triangular_number).Your task is to find out if a given integer is a triangular number.", "input_spec": "The first line contains the single number n (1 ≤ n ≤ 500) — the given integer.", "output_spec": "If the given integer is a triangular number output YES, otherwise output NO.", "sample_inputs": ["1", "2", "3"], "sample_outputs": ["YES", "NO", "YES"], "notes": null}, "positive_code": [{"source_code": "var n = Number(readline())\nvar i = 1\nwhile (true) {\n if (i * (i+1) / 2 == n) {\n print('YES')\n break\n }\n\n if (i * (i+1) / 2 > n) {\n print('NO')\n break\n }\n\n i++\n}\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction solve(target) {\n\tvar triangle = 1, naturalNumber = 1;\n\twhile (triangle < target) {\n\t\t++naturalNumber;\n\t\ttriangle += naturalNumber;\n\t}\n\treturn (triangle == target);\n}\n\nfunction main() {\n\tvar target = parseInt(readline());\n\tprint(solve(target) ? \"YES\" : \"NO\");\n}\n\nmain();\n"}, {"source_code": "'use strict'\n\nlet N = +readline()\nprint(Number.isInteger(Math.sqrt(1 + 8 * N)) ? 'YES' : 'NO')"}, {"source_code": "var tokenizer;\nvar index = 0;\n\nfunction next(){\n while(tokenizer == null || index == tokenizer.length){\n tokenizer = readline().split(\" \");\n index = 0;\n }\n var res = tokenizer[index++];\n return res;\n}\n\nfunction nextInt(){\n return parseInt(next());\n}\n\nfunction nextFloat(){\n return parseFloat(next());\n}\n\nfunction solve(){\n var n = nextInt();\n var t = 0;\n var flag = false;\n for(var i = 0; t <= n; ++i){\n if(t == n) flag = true;\n t = (i*(i+1))/2;\n }\n if(flag){\n print(\"YES\");\n } else {\n print(\"NO\");\n }\n}\nsolve();"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (d) => {\n let curr = 0;\n let n = +d;\n let ans = 'NO';\n\n let inc = 0;\n while (curr <= n) {\n curr = inc * (inc + 1) / 2;\n if (curr === n) {\n ans = 'YES';\n }\n inc++;\n }\n\n console.log(ans);\n\n c++;\n});\n"}], "negative_code": [], "src_uid": "587d4775dbd6a41fc9e4b81f71da7301"} {"nl": {"description": "The finalists of the \"Russian Code Cup\" competition in 2214 will be the participants who win in one of the elimination rounds.The elimination rounds are divided into main and additional. Each of the main elimination rounds consists of c problems, the winners of the round are the first n people in the rating list. Each of the additional elimination rounds consists of d problems. The winner of the additional round is one person. Besides, k winners of the past finals are invited to the finals without elimination.As a result of all elimination rounds at least n·m people should go to the finals. You need to organize elimination rounds in such a way, that at least n·m people go to the finals, and the total amount of used problems in all rounds is as small as possible.", "input_spec": "The first line contains two integers c and d (1 ≤ c, d ≤ 100) — the number of problems in the main and additional rounds, correspondingly. The second line contains two integers n and m (1 ≤ n, m ≤ 100). Finally, the third line contains an integer k (1 ≤ k ≤ 100) — the number of the pre-chosen winners. ", "output_spec": "In the first line, print a single integer — the minimum number of problems the jury needs to prepare.", "sample_inputs": ["1 10\n7 2\n1", "2 2\n2 1\n2"], "sample_outputs": ["2", "0"], "notes": null}, "positive_code": [{"source_code": "if (!this.readline) print = console.log, readline = require('./readline');\n\nfunction readNums() {\n\treturn readline().split(' ').map(Number);\n}\n\n\nprint(function(cb, ca, na, nb, k) {\n\tnb -= ~~(k / na);\n\tk %= na;\n\n\tif (nb <= 0) {\n\t\treturn 0;\n\t}\n\treturn (Math.min(nb * cb, Math.min((na - k) * ca + (nb - 1) * cb, (na - k) * ca + (nb - 1) * na * ca)));\n}.apply(0, readNums().concat(readNums()).concat(readNums())));"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar data = tokenizeIntegers(readline()),\n\t\tsizeA = data[0], sizeB = data[1];\n\tdata = tokenizeIntegers(readline());\n\tvar winA = data[0], multiple = data[1],\n\t\tseeds = parseInt(readline());\n\tvar needWinners = Math.max(0, winA*multiple - seeds),\n\t\tneedProblems = 0;\n\tif (winA*sizeB > sizeA) {\n\t\tvar rounds = Math.floor(needWinners / winA);\n\t\tneedProblems = rounds * sizeA;\n\t\tneedWinners -= rounds * winA;\n\t\tneedProblems += Math.min(sizeA, needWinners * sizeB);\n\t} else {\n\t\tneedProblems = needWinners * sizeB;\n\t}\n\tprint(needProblems);\n}\n\nmain();\n"}, {"source_code": "\nfunction tokenize(s) {\n\treturn s.split(/\\s+/);\n}\n\nfunction tokenize_integers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i++) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\nfunction nextArray() {\n\treturn tokenize_integers(readline());\n}\nfunction nextInt() {\n\treturn parseInt(readline());\n\t//\treturn tokenize_integers(readline())[0];\n}\nfunction main() {\n\tvar data = nextArray();\n\tvar c = data[0], d = data[1];\n\tdata = nextArray();\n\tvar n = data[0], m = data[1];\n\tvar k = nextInt();\n\tvar needWinners = Math.max(0, n * m - k);\n//\tprint(needWinners);\n\tvar ret = -1;\n\tfor(var x = 0; x <= 10000; x++) {\n\t\tvar y = needWinners - x * n ;\n\t\ty = Math.max(y, 0);\n\t\tvar tmp = c * x + y * d;\n//\t\tif(x < 10)print(tmp);\n\t\tif(ret == -1 || tmp < ret) {\n\t\t\tret = tmp;\n\t\t}\n\t}\n\tprint(ret);\n}\nmain();\n"}, {"source_code": "function main() {\n\n var arr1 = readline().split(' ').map(Number);\n var c = arr1[0], d = arr1[1];\n var arr2 = readline().split(' ').map(Number);\n var n = arr2[0], m = arr2[1];\n var k = Number(readline());\n\n var winners = Math.max(0, n * m - k);\n\n var problems = -1;\n\n for (var x = 0; x <= 10000; x++) {\n var y = winners - x * n;\n y = Math.max(y, 0);\n var temp = c * x + y * d;\n\n if (problems == -1 || temp < problems) {\n problems = temp;\n }\n }\n print(problems);\n \n\n}\n\nmain();"}], "negative_code": [{"source_code": "if (!this.readline) print = console.log, readline = require('./readline');\n\nfunction readNums() {\n\treturn readline().split(' ').map(Number);\n}\n\n\nprint(function(c, d, n, m, k) {\n\tm -= Math.floor(k / n);\n\tk %= n;\n\treturn m <= 0 ? 0 : Math.min(m * c, Math.min((n - k) * d + (m - 1) * c, (n - k) * n + (m - 1) * n * n));\n}.apply(0, readNums().concat(readNums()).concat(readNums())));"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar data = tokenizeIntegers(readline()),\n\t\tsizeA = data[0], sizeB = data[1];\n\tdata = tokenizeIntegers(readline());\n\tvar winA = data[0], multiple = data[1],\n\t\tseeds = parseInt(readline());\n\tvar needWinners = winA*multiple - seeds,\n\t\tneedProblems = 0;\n\tif (winA*sizeB > sizeA) {\n\t\tvar rounds = Math.floor(needWinners / winA);\n\t\tneedProblems = rounds * sizeA;\n\t\tneedWinners -= rounds * winA;\n\t\tneedProblems += Math.min(sizeA, needWinners * sizeB);\n\t} else {\n\t\tneedProblems = needWinners * sizeB;\n\t}\n\tprint(needProblems);\n}\n\nmain();\n"}, {"source_code": "\nfunction tokenize(s) {\n\treturn s.split(/\\s+/);\n}\n\nfunction tokenize_integers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i++) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\nfunction nextArray() {\n\treturn tokenize_integers(readline());\n}\nfunction nextInt() {\n\treturn parseInt(readline());\n\t//\treturn tokenize_integers(readline())[0];\n}\nfunction main() {\n\tvar data = nextArray();\n\tvar c = data[0], d = data[1];\n\tdata = nextArray();\n\tvar n = data[0], m = data[1];\n\tvar k = nextInt();\n\tvar needWinners = Math.max(0, n * m - k);\n//\tprint(needWinners);\n\tvar ret = -1;\n\tfor(var x = 0; x <= 10000; x++) {\n\t\tvar y = needWinners - c * x * n ;\n\t\ty /= d;\n\t\ty = Math.max(y, 0);\n\t\tvar tmp = c * x + y * d;\n\t\tif(ret == -1 || tmp < ret) {\n\t\t\tret = tmp;\n\t\t}\n\t}\n\tprint(ret);\n}\nmain();\n"}], "src_uid": "c6ec932b852e0e8c30c822a226ef7bcb"} {"nl": {"description": "Two-gram is an ordered pair (i.e. string of length two) of capital Latin letters. For example, \"AZ\", \"AA\", \"ZA\" — three distinct two-grams.You are given a string $$$s$$$ consisting of $$$n$$$ capital Latin letters. Your task is to find any two-gram contained in the given string as a substring (i.e. two consecutive characters of the string) maximal number of times. For example, for string $$$s$$$ = \"BBAABBBA\" the answer is two-gram \"BB\", which contained in $$$s$$$ three times. In other words, find any most frequent two-gram.Note that occurrences of the two-gram can overlap with each other.", "input_spec": "The first line of the input contains integer number $$$n$$$ ($$$2 \\le n \\le 100$$$) — the length of string $$$s$$$. The second line of the input contains the string $$$s$$$ consisting of $$$n$$$ capital Latin letters.", "output_spec": "Print the only line containing exactly two capital Latin letters — any two-gram contained in the given string $$$s$$$ as a substring (i.e. two consecutive characters of the string) maximal number of times.", "sample_inputs": ["7\nABACABA", "5\nZZZAA"], "sample_outputs": ["AB", "ZZ"], "notes": "NoteIn the first example \"BA\" is also valid answer.In the second example the only two-gram \"ZZ\" can be printed because it contained in the string \"ZZZAA\" two times."}, "positive_code": [{"source_code": "// http://codeforces.com/contest/977/problem/B\n\nvar arg1 = readline();\nvar arg2 = readline();\n\nvar length = parseInt(arg1);\nvar string = arg2;\n\nfunction main(length, string) {\n var hash = {};\n\n for (var i = 0; i < length - 1; i++) {\n var substring = `${string[i]}${string[i + 1]}`;\n if (hash[substring]) {\n hash[substring] = hash[substring] + 1;\n } else {\n hash[substring] = 1;\n }\n }\n\n var twogrammaList = Object.keys(hash);\n var biggest = twogrammaList[0];\n\n for (var j = 1; j < twogrammaList.length; j++) {\n var tg = twogrammaList[j];\n\n if (hash[tg] > hash[biggest]) {\n biggest = twogrammaList[j];\n }\n }\n\n return biggest;\n}\n\nprint(main(length, string));\n"}, {"source_code": "var n = parseInt(readline());\nvar s = readline();\nvar twoGram;\nvar testTwoGram;\nvar counter = 0;\nvar tempCounter = 0;\nvar result;\nvar x;\nvar y;\n\nfor(var i = 0; i < n - 1; i++)\n{\n x = s[i];\n y = s[i + 1];\n twoGram = x + y;\n\n for(var j = 0; j < n - 1; j++)\n {\n x = s[j];\n y = s[j + 1];\n\n testTwoGram = x + y;\n \n if(testTwoGram == twoGram)\n tempCounter++;\n }\n if(tempCounter > counter)\n {\n result = twoGram;\n counter = tempCounter;\n }\n tempCounter = 0;\n}\n\nprint(result);"}, {"source_code": "var n = +readline();\nvar s = readline();\nvar mx = 0, id = 0;\nfor(var i = 0; i < n-1; i ++){\n var cnt = 0;\n for(var j = 0; j < n-1; j ++){\n if(s[i] == s[j] && s[i+1] == s[j+1]){\n cnt ++;\n }\n }\n if(cnt > mx){\n mx = cnt;\n id = i;\n }\n}\nvar res = s[id] + s[id+1];\nprint(res);"}, {"source_code": "var n = readline(), str = readline().split('');\nvar cnt = new Map();\nvar ans = str[0] + str[1], max = 1;\nfor(var i = 0; i < str.length - 1; i++) {\n var tp = str[i] + str[i + 1];\n if(cnt.has(tp)) {\n cnt.set(tp, cnt.get(tp) + 1);\n if(max < cnt.get(tp)) {\n max = cnt.get(tp);\n ans = tp;\n }\n }\n else {\n cnt.set(tp, 1);\n }\n}\nprint(ans);"}, {"source_code": "var t = Number(readline());\nvar str = readline().split('');\nvar arr = [];\nstr.forEach((cur, i) => {\n arr.push(str.slice(i,i+2).join(''));\n});\nvar obj= {}, maxEl, maxCount = 0;\narr.forEach((cur, i) => {\n if(!obj[cur]){\n obj[cur] = 1;\n }else{\n obj[cur]++;\n }\n \n if(obj[cur] > maxCount){\n maxCount = obj[cur];\n maxEl = cur;\n }\n});\n\nprint(maxEl);\n"}, {"source_code": "var n = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar input = readline();\n \nvar k = 0;\nvar out = \"\";\nvar maxK = -1;\n \nfor(var i = 0; i < n - 1; i++) {\n\tvar str1 = input.substr(i,2);\n\tk = 0;\n\tfor(var j = 0; j < n - 1; j++){\n\t\tvar str2 = input.substr(j,2);\n\t\tif(str2 == str1)\n\t\t\tk++;\n\t}\n\tif(maxK < (k-1)) {\n\t\tmaxK = k - 1;\n\t\tout = str1;\n\t}\n}\n \nprint(out);"}, {"source_code": "var uselessLine = readline();\nvar input = readline();\n\n\nvar splitted = input.split('');\nvar maximal = 0;\nvar twogram = ''; \n\n\nfunction check(str,currentTwogram) {\n var n = 0;\n for(var j = 0; j maximal) {\n maximal = numOccurr;\n twogram = current;\n }\n}\n\nprint(twogram)\n"}, {"source_code": "var n = readline();\nvar s = readline();\n\nvar map = {};\n\nfor (var i = 0; i < n - 1; i++) {\n var d = s[i] + s[i+1];\n map[d] === undefined ? map[d] = 1 : map[d]++;\n}\nvar max = 0;\nvar ans = \"\";\nObject.keys(map).map(function(key) {\n if (map[key] > max ) {\n ans = key;\n max = map[key];\n }\n});\n\nprint(ans);"}, {"source_code": "var n = readline().split(\"\").map(function(elem) {\n\treturn parseInt(elem);\n});\nvar inputs = readline();\n\n// var n = 7, inputs = 'ABABCABA';\n\nfunction divide(n, inputs){\n\tvar arr = new Map();\n \tfor(var i = 0; i max_value){\n\t\t\tmax_value = value;\n\t\t\tmax_key = key;\n\t\t}\n\t});\n\tprint(max_key);\n\t// console.log(max_key);\n}\ndivide(n,inputs);"}, {"source_code": "var n = readline();\nvar s = readline();\nvar d = {},tmp, max=0, v, out=s.substring(0,2);\n \nfor(var i=0;imax){\n max=d[tmp];\n out=tmp;\n }\n }\n}\n \nprint(out)"}, {"source_code": "var n = readline();\nvar s = readline();\nvar d = {};\nvar tmp, max=0, v, out=\"\";\n\nfor(var i=0;imax){\n max=v+1;\n out=tmp;\n }\n }\n}\n\nprint(out)"}, {"source_code": "var n = readline();\nvar s = readline();\n//print(str)\nvar d = {};\nvar tmp;\nvar max=0;\nvar v;\nvar out=\"\";\nfor(var i=0;imax){\n max=v+1;\n out=tmp;\n }\n }\n}\nprint(out)"}, {"source_code": "var n = readline();\nvar s = readline();\nvar d = {},tmp, max=0, v, out=s.substring(0,2);\n\nfor(var i=0;imax){\n max=v+1;\n out=tmp;\n }\n }\n}\n\nprint(out)"}, {"source_code": "function calculateProb(str1, str2) {\n var num = parseInt(str1);\n var max = 0;\n var ans = '';\n var ob = {};\n\n for (var i = 0; i < str2.length - 1; i++) {\n var str = str2[i] + str2[i + 1];\n\n if (!ob[str]) {\n ob[str] = 0;\n }\n\n ob[str]++;\n }\n\n\n for (var j in ob) {\n if (ob.hasOwnProperty(j)) {\n if (max < ob[j]) {\n max = ob[j];\n ans = j;\n }\n }\n }\n\n return ans;\n}\n\nvar s1 = readline();\nvar s2 = readline();\n\nprint(calculateProb(s1, s2));\n"}, {"source_code": "let i = '';\n\nprocess.stdin.on('data', c => i += c);\nprocess.stdin.on('end', function(data) {\n const {EOL} = require('os')\n const [length, input] = i.split(EOL);\n const n = parseInt(length);\n const s = input.trim();\n console.log(getTwoGrams(n, s));\n})\n\nfunction getTwoGrams(n, s) {\n let max = 0;\n let pair;\n let i = 0;\n let sub = s.substring(i, i+2);\n\n function getReducer(matches) {\n return (carry, match, index) => {\n carry = carry + (matches[index].length - 1);\n return carry;\n };\n }\n\n while (sub.length === 2) {\n const regex = sub[0] == sub[1] ? `${sub}+` : `${sub}`;\n\n const matches = s.match(new RegExp(regex, 'g'));\n const occurances = matches.reduce(getReducer(matches), 0);\n\n if (max <= occurances) {\n max = occurances;\n pair = sub;\n }\n i++;\n sub = s.substring(i, i+2);\n }\n\n return pair;\n}\n"}, {"source_code": "process.stdin.resume()\nprocess.stdin.setEncoding('utf-8')\n\nvar arr = ''\nprocess.stdin.on('data', (i) => {\n arr += i\n})\n\nprocess.stdin.on('end', () => {\n arr = arr.split('\\n')\n const n = parseInt(arr[0])\n const a = arr[1]\n const map = {}\n for(let i = 1; i < n; i ++) {\n var key = a[i - 1] + a[i]\n if(!map[key]) map[key] = 1\n else map[key] = map[key] + 1\n }\n\n var max = 0\n var maxK = ''\n for(let i in map) {\n if(map[i] > max) {\n max = map[i]\n maxK = i\n }\n }\n console.log(maxK)\n\n})"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet stdinInput = '';\n \nprocess.stdin.on('data', input => {\n stdinInput += input;\n})\n \nprocess.stdin.on('end', () => {\n main(stdinInput);\n})\n \nfunction main(data) {\n data = data.split(/\\r?\\n/);\n const testCases = data[0] * 1;\n \n solve(data[1], testCases)\n}\n\nfunction solve(line, length) {\n let map = {}\n let i;\n for(i = 0; i < length - 1; i++) {\n let twogram = line.substring(i, i + 2)\n map[twogram] = twogram in map ? map[twogram] + 1 : 1\n }\n\n let maxtg = \"\"\n let curMax = 0\n let keys = Object.keys(map)\n keys.forEach( key =>\n {\n if (map[key] > curMax) {\n curMax = map[key]\n maxtg = key\n }\n }\n )\n console.log(maxtg)\n}"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString= '';\nlet currentLine = 0;\n\nfunction readLine(){\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData =>{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\nfunction main(){\n\n //first line in input\n let [n] = readLine().split(' ').map(Number);\n\n\n let line = readLine().split('');\n let prev = 0;\n\n let result = '';\n for(let i = 0; i prev){\n prev = counter;\n result = line[i] + line[i+1];\n }\n }\n console.log(result);\n\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (str) => {\n if (c === 0) {\n c++;\n return;\n }\n\n const obj = {};\n\n for (let i = 0; i < str.length - 1; i++) {\n let pair = str[i] + str[i + 1];\n\n if (obj[pair]) {\n obj[pair]++;\n }\n else {\n obj[pair] = 1;\n }\n }\n\n let ans;\n let max = 0;\n\n Object.keys(obj).forEach(x => {\n if (obj[x] > max) {\n max = obj[x];\n ans = x;\n }\n });\n\n console.log(ans);\n\n c++;\n});\n"}, {"source_code": "'use strict';\n \nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n \nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main(){\nlet n=readLine();\nlet twoGram=readLine();\nlet res=0;\nlet answer=\" \";\nfor(let i=0;i {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;\n const currentOcurrences = occurrences + 1;\n if (currentOcurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = currentOcurrences;\n }\n\n gramOccurrences[twogram] = currentOcurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// Time complexity: O(n)\n// Space complexity: O(n)\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;\n const currentOcurrences = occurrences + 1;\n if (currentOcurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = currentOcurrences;\n }\n\n gramOccurrences[twogram] = currentOcurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// Time complexity: O(n)\n// Space complexity: O(n)\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;\n if (occurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = occurrences;\n }\n\n gramOccurrences[twogram] = occurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// n: string length\n// Time complexity: O(n)\n// Space complexity:\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;\n const mostCommonOccurrences = gramOccurrences[mostCommonGram] ? gramOccurrences[mostCommonGram] : 0;\n if (occurrences > mostCommonOccurrences) {\n mostCommonGram = twogram;\n }\n\n gramOccurrences[twogram] = occurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// Time complexity:\n// Space complexity:\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;\n const currentOcurrences = occurrences + 1;\n if (currentOcurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = currentOcurrences;\n }\n\n gramOccurrences[twogram] = currentOcurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// n: string length\n// Time complexity: O(n)\n// Space complexity: O(n)\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;\n if (occurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = occurrences;\n }\n\n gramOccurrences[twogram] = occurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// Time complexity:\n// Space complexity:\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;\n if (occurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = occurrences;\n }\n\n gramOccurrences[twogram] = occurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// n: string length\n// Time complexity: O(n)\n// Space complexity:\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;\n if (occurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = occurrences;\n }\n\n gramOccurrences[twogram] = occurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// n: string length\n// Time complexity: O(n)\n// Space complexity:\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;\n const currentOcurrences = occurrences + 1;\n if (currentOcurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = currentOcurrences;\n }\n\n gramOccurrences[twogram] = currentOcurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// Time complexity: O(n)\n// n: string length\n// Space complexity: O(n)\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;\n const currentOcurrences = occurrences + 1;\n if (currentOcurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = currentOcurrences;\n }\n\n gramOccurrences[twogram] = currentOcurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "// https://codeforces.com/problemset/problem/977/B\n// Big O:\n// Time complexity: O(n)\n// Space complexity:\n\nconst readline = require(\"readline\");\n\n// Read input\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet stringLength;\nrl.on('line', (input) => {\n if (stringLength) {\n console.log(findMostCommonGram(input, stringLength));\n rl.close();\n } else {\n stringLength = input;\n }\n});\n\n// Problem\nfunction findMostCommonGram(string, stringLength) {\n let mostCommonGram = \"\";\n let mostCommonGramOccurrences = 0;\n const gramOccurrences = {};\n\n for (let i = 0; i < stringLength - 1; i++) {\n const twogram = string[i] + string[i + 1];\n const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;\n const currentOcurrences = occurrences + 1;\n if (currentOcurrences > mostCommonGramOccurrences) {\n mostCommonGram = twogram;\n mostCommonGramOccurrences = currentOcurrences;\n }\n\n gramOccurrences[twogram] = currentOcurrences;\n }\n\n return mostCommonGram;\n}"}, {"source_code": "const f = (n, s) => {\n const k = 2;\n\n const result = new Map();\n let best = null;\n let preBest = null;\n\n const compare = (sub) => {\n result[sub] = result[sub] ? result[sub] + 1 : 1;\n if (!best) {\n best = sub;\n } else if (result[sub] > result[best]) {\n preBest = best;\n best = sub;\n }\n };\n\n for (let i = 0; i < n - 1; i += 1) {\n if (result[best] > n / 2) { return best; }\n if (preBest) {\n const leftSteps = n - 1 - i;\n const bestLeadSteps = result[best] - result[preBest];\n if (leftSteps < bestLeadSteps) { return best; }\n }\n\n compare(s.slice(i, i + k));\n }\n\n return best;\n};\n\nlet i = '';\nprocess.stdin.on('data', c => i += c);\nprocess.stdin.on('end', () => {\n const {EOL} = require('os');\n const [ n, s ] = i.split(EOL);\n console.log(f(n, s));\n});"}], "negative_code": [{"source_code": "var uselessLine = readline();\nvar input = readline();\n\n\nvar splitted = input.split('');\nvar maximal = 0;\nvar twogram = ''; \n\nfor(var j= 0; j< splitted.length; j++) {\n if(j+1 < splitted.length) {\n var current = splitted[j] + splitted[j+1];\n var numOcurr = input.match(new RegExp(current, 'g')).length;\n if(numOcurr > maximal)\n maximal = numOcurr;\n twogram = current;\n }\n}\n\nprint(twogram);\n"}, {"source_code": "var n = readline().split(\"\").map(function(elem) {\n\treturn parseInt(elem);\n});\nvar inputs = readline();\n\n// var n = 7, inputs = 'ABABCABA';\n\nfunction divide(n, inputs){\n\tvar arr = new Map();\n \tfor(var i = 0; i max_value){\n\t\t\tmax_value = value;\n\t\t}\n\t});\n\tprint(max_value);\n\t// console.log(max_value);\n}\ndivide(n,inputs);"}, {"source_code": "var n = readline();\nvar s = readline();\nvar d = {},tmp, max=0, v, out=s.substring(0,2);\n \nfor(var i=0;imax){\n max=v+1;\n out=tmp;\n }\n }\n}\n \nprint(out)"}, {"source_code": "// http://codeforces.com/contest/977/problem/B\n\nvar arg1 = readline();\nvar arg2 = readline();\n\nprint(arg1);\nprint(arg2);\n\n\n//let length = parseInt(arg1);\n//let string = arg2;\n\n//function main(length, string) {\n //let hash = {};\n\n //for (let i = 0; i < length - 1; i++) {\n //let substring = `${string[i]}${string[i + 1]}`;\n //if (hash[substring]) {\n //hash[substring] = hash[substring] + 1;\n //} else {\n //hash[substring] = 1;\n //}\n //}\n\n //let twogrammaList = Object.keys(hash);\n //let biggest = twogrammaList[0];\n\n //for (let i = 1; i < twogrammaList.length; i++) {\n //let tg = twogrammaList[i];\n\n //if (hash[tg] > hash[biggest]) {\n //biggest = twogrammaList[i];\n //}\n //}\n\n //return biggest;\n//}\n\n//print(main(length, string));\n"}, {"source_code": "let n, s;\n\nprocess.stdin.on('data', function(data) {\n if (!n) {\n n = parseInt(data.toString());\n } else {\n s = data.toString().trim();\n console.log(getTwoGrams(n, s));\n s = undefined;\n n = undefined;\n }\n});\n\nfunction getTwoGrams(n, s) {\n let max = 0;\n let pair;\n let i = 0;\n let sub = s.substring(i, i+2);\n\n while (sub.length === 2) {\n const regex = sub[0] == sub[1] ? `${sub}+` : `${sub}`;\n const matches = s.match(new RegExp(regex, 'g'));\n\n const occurances = matches.reduce((carry, match, index) => {\n carry = carry + (matches[index].length - 1);\n return carry;\n }, 0);\n\n if (max <= occurances) {\n max = occurances;\n pair = sub;\n }\n i++;\n sub = s.substring(i, i+2);\n }\n\n return pair;\n}\n"}, {"source_code": "let i = '';\n\nprocess.stdin.on('data', c => i += c);\nprocess.stdin.on('end', function(data) {\n const {EOL} = require('os')\n const [length, input] = i.split(EOL);\n const n = parseInt(length);\n const s = input.trim();\n console.log(getTwoGrams(n, s));\n})\n\nfunction getTwoGrams(n, s) {\n let max = 0;\n let pair;\n let i = 0;\n let sub = s.substring(i, i+2);\n \n const regex = sub[0] == sub[1] ? `${sub}+` : `${sub}`;\n const matches = s.match(new RegExp(regex, 'g'));\n const reducer = (carry, match, index) => {\n carry = carry + (matches[index].length - 1);\n return carry;\n };\n\n while (sub.length === 2) {\n const occurances = matches.reduce(reducer, 0);\n\n if (max <= occurances) {\n max = occurances;\n pair = sub;\n }\n i++;\n sub = s.substring(i, i+2);\n }\n\n return pair;\n}\n"}], "src_uid": "e78005d4be93dbaa518f3b40cca84ab1"} {"nl": {"description": "There are three points marked on the coordinate plane. The goal is to make a simple polyline, without self-intersections and self-touches, such that it passes through all these points. Also, the polyline must consist of only segments parallel to the coordinate axes. You are to find the minimum number of segments this polyline may consist of.", "input_spec": "Each of the three lines of the input contains two integers. The i-th line contains integers xi and yi ( - 109 ≤ xi, yi ≤ 109) — the coordinates of the i-th point. It is guaranteed that all points are distinct.", "output_spec": "Print a single number — the minimum possible number of segments of the polyline.", "sample_inputs": ["1 -1\n1 1\n1 2", "-1 -1\n-1 3\n4 3", "1 1\n2 3\n3 2"], "sample_outputs": ["1", "2", "3"], "notes": "NoteThe variant of the polyline in the first sample: The variant of the polyline in the second sample: The variant of the polyline in the third sample: "}, "positive_code": [{"source_code": "var dots = [];\nfor (var i = 0; i < 3; i++) {\n dots.push(readline().split(' ').map(Number));\n}\nif (dots[0][0] == dots[1][0] && dots[1][0] == dots[2][0] || \n dots[0][1] == dots[1][1] && dots[1][1] == dots[2][1]) {\n print(1);\n } else if (\n (\n dots[0][0] == dots[1][0] && \n (\n dots[2][1] >= Math.max(dots[1][1], dots[0][1]) || \n dots[2][1] <= Math.min(dots[1][1], dots[0][1])\n )\n ) ||\n (\n dots[0][1] == dots[1][1] &&\n (\n dots[2][0] >= Math.max(dots[0][0], dots[1][0]) ||\n dots[2][0] <= Math.min(dots[0][0], dots[1][0]) \n )\n ) || \n (\n dots[2][0] == dots[1][0] && \n (\n dots[0][1] >= Math.max(dots[1][1], dots[2][1]) || \n dots[0][1] <= Math.min(dots[1][1], dots[2][1])\n )\n ) ||\n (\n dots[2][1] == dots[1][1] &&\n (\n dots[0][0] >= Math.max(dots[2][0], dots[1][0]) ||\n dots[0][0] <= Math.min(dots[2][0], dots[1][0]) \n )\n ) ||\n (\n dots[0][0] == dots[2][0] && \n (\n dots[1][1] >= Math.max(dots[2][1], dots[0][1]) || \n dots[1][1] <= Math.min(dots[2][1], dots[0][1])\n )\n ) ||\n (\n dots[0][1] == dots[2][1] &&\n (\n dots[1][0] >= Math.max(dots[0][0], dots[2][0]) ||\n dots[1][0] <= Math.min(dots[0][0], dots[2][0]) \n )\n )\n ) {\n print(2);\n } else {\n print(3);\n }"}, {"source_code": "var readp = () => {\n var temp = readline().split(' ');\n return [parseFloat(temp[0]), parseFloat(temp[1])];\n};\nvar p = [readp(), readp(), readp()];\nvar memo = [];\nvar cp = (c) => (i, j) => {\n if (p[i][c] === p[j][c]) {\n memo.push({i:i, j:j, c:c});\n return 1;\n } else {\n return 0;\n }\n}\nvar cnt = (c) => cp(c)(0, 1) + cp(c)(0, 2) + cp(c)(1, 2);\nvar between = () => {\n var o = memo[0];\n var k = 3-o.i-o.j;\n var c = 1-o.c;\n return p[o.i][c]p[k][c] && p[k][c]>p[o.j][c];\n};\nif (cnt(0)===3 || cnt(1)===3) {\n print(1);\n} else if (cnt(0)===1 && cnt(1)===1) {\n print(2);\n} else if ((cnt(0)===1 || cnt(1)===1) && !between()){\n print(2);\n} else {\n print(3);\n}\n"}, {"source_code": "var points = new Array(3);\nfor (var i = 0; i < points.length; ++i) {\n points[i] = readline().split(\" \", 2);\n for (var j = 0; j < 2; ++j) {\n points[i][j] = Number(points[i][j]);\n }\n}\n\nfunction same(x, y, z) {\n return x === y && y === z;\n}\nfunction right(a, b, c) {\n return b[0] === c[0] && (a[1] >= Math.max(b[1], c[1]) || a[1] <= Math.min(b[1], c[1])) ||\n b[1] === c[1] && (a[0] >= Math.max(b[0], c[0]) || a[0] <= Math.min(b[0], c[0]));\n}\n\nif (same(points[0][0], points[1][0], points[2][0]) ||\n same(points[0][1], points[1][1], points[2][1])) {\n print(1);\n} else if (right(points[0], points[1], points[2]) ||\n right(points[1], points[0], points[2]) ||\n right(points[2], points[0], points[1])) {\n print(2);\n} else {\n print(3);\n}"}, {"source_code": "var points = new Array(3);\nfor (var i = 0; i < points.length; ++i) {\n points[i] = readline().split(\" \", 2);\n}\n\nfunction same(x, y, z) {\n return x === y && y === z;\n}\nfunction right(a, b, c) {\n return b[0] === c[0] && (a[1] >= Math.max(b[1], c[1]) || a[1] <= Math.min(b[1], c[1])) ||\n b[1] === c[1] && (a[0] >= Math.max(b[0], c[0]) || a[0] <= Math.min(b[0], c[0]));\n}\n\nif (same(points[0][0], points[1][0], points[2][0]) ||\n same(points[0][1], points[1][1], points[2][1])) {\n print(1);\n} else if (right(points[0], points[1], points[2]) ||\n right(points[1], points[0], points[2]) ||\n right(points[2], points[0], points[1])) {\n print(2);\n} else {\n print(3);\n}"}], "negative_code": [{"source_code": "var dots = [];\nfor (var i = 0; i < 3; i++) {\n dots.push(readline().split(' ').map(Number));\n}\nif (dots[0][0] == dots[1][0] && dots[1][0] == dots[2][0] || \n dots[0][1] == dots[1][1] && dots[1][1] == dots[2][1]) {\n print(1);\n } else if (\n (\n dots[0][0] == dots[1][0] && \n (\n dots[2,1] >= Math.max(dots[1][1], dots[0][1]) || \n dots[2,1] <= Math.min(dots[1][1], dots[0][1])\n )\n ) ||\n (\n dots[0][1] == dots[1][1] &&\n (\n dots[2][0] >= Math.max(dots[0][0], dots[1][0]) ||\n dots[2][0] <= Math.min(dots[0][0], dots[1][0]) \n )\n ) || \n (\n dots[2][0] == dots[1][0] && \n (\n dots[0,1] >= Math.max(dots[1][1], dots[2][1]) || \n dots[0,1] <= Math.min(dots[1][1], dots[2][1])\n )\n ) ||\n (\n dots[2][1] == dots[1][1] &&\n (\n dots[0][0] >= Math.max(dots[2][0], dots[1][0]) ||\n dots[0][0] <= Math.min(dots[2][0], dots[1][0]) \n )\n ) ||\n (\n dots[0][0] == dots[2][0] && \n (\n dots[1,1] >= Math.max(dots[2][1], dots[0][1]) || \n dots[1,1] <= Math.min(dots[2][1], dots[0][1])\n )\n ) ||\n (\n dots[0][1] == dots[2][1] &&\n (\n dots[1][0] >= Math.max(dots[0][0], dots[2][0]) ||\n dots[1][0] <= Math.min(dots[0][0], dots[2][0]) \n )\n )\n ) {\n print(2);\n } else {\n print(3);\n }"}, {"source_code": "var dots = [];\nfor (var i = 0; i < 3; i++) {\n dots.push(readline().split(' ').map(Number));\n}\n\nif (dots[0][0] == dots[1][0] == dots[2][0] || \n dots[0][1] == dots[1][1] == dots[2][1]) {\n print(1);\n } else if (\n (dots[0][0] == dots[1][0] && (\n dots[1][1] == dots[2][1] ||\n dots[0][1] == dots[2][1])\n ) ||\n (dots[0][1] == dots[1][1] && (\n dots[1][0] == dots[2][0] ||\n dots[0][0] == dots[2][0])\n ) ||\n (dots[0][1] == dots[2][1] && (\n dots[2][0] == dots[1][0] ||\n dots[0][0] == dots[1][0])\n ) ||\n (dots[0][0] == dots[2][0] && (\n dots[2][1] == dots[1][1] ||\n dots[0][1] == dots[1][1])\n )\n ) {\n print(2);\n } else {\n print(3);\n }"}, {"source_code": "var readp = () => {\n var temp = readline().split(' ');\n return [parseFloat(temp[0]), parseFloat(temp[1])];\n};\nvar p = [readp(), readp(), readp()];\nvar dis2 = (i, j) =>\n Math.pow(p[i][0]-p[j][0], 2) + Math.pow(p[i][1]-p[j][1], 2);\nvar cos = (i) => {\n var j = i-1 < 0 ? i+2 : i-1;\n var dj = dis2(i, j);\n var k = i+1 > 2 ? i-2 : i+1;\n var dk = dis2(i, k);\n var di = dis2(j, k);\n var cos = (dj+dk-di) / (2*Math.sqrt(dj*dk));\n return Math.round(1E6*cos) / 1E6;\n};\n(() => {\n for (var i = 0; i < 3; ++i) {\n switch (cos(i)) {\n case -1:\n case 1:\n print(1);\n return ;\n case 0:\n print(2);\n return ;\n }\n }\n print(3);\n})();\n"}, {"source_code": "var readp = () => {\n var temp = readline().split(' ');\n return [parseFloat(temp[0]), parseFloat(temp[1])];\n};\nvar p = [readp(), readp(), readp()];\nvar cp = (k) => (i, j) => p[i][k]===p[j][k] ? 1 : 0;\nvar cnt = (k) => cp(k)(0, 1) + cp(k)(0, 2) + cp(k)(1, 2);\nif (cnt(0)===3 || cnt(1)===3) {\n print(1);\n} else if (cnt(0)===1 && cnt(1)===1) {\n print(2);\n} else {\n print(3);\n}\n"}, {"source_code": "var points = new Array(3);\nfor (var i = 0; i < points.length; ++i) {\n points[i] = readline().split(\" \", 2);\n}\n\nfunction same(x, y, z) {\n return x === y && y === z;\n}\nfunction right(a, b, c) {\n return a[0] === b[0] && a[1] === c[1] ||\n a[1] === b[1] && a[0] === c[0];\n}\n\nif (same(points[0][0], points[1][0], points[2][0]) ||\n same(points[0][1], points[1][1], points[2][1])) {\n print(1);\n} else if (right(points[0], points[1], points[2]) ||\n right(points[1], points[0], points[2]) ||\n right(points[2], points[0], points[1])) {\n print(2);\n} else {\n print(3);\n}"}, {"source_code": "var points = new Array(3);\nfor (var i = 0; i < points.length; ++i) {\n points[i] = readline().split(\" \", 2);\n for (var j = 0; j < 2; ++j) {\n points[i][j] = Number(points[i][j]);\n }\n}\n\nfunction same(x, y, z) {\n return x === y && y === z;\n}\nfunction right(a, b, c) {\n return b[0] === c[0] && (a[1] > Math.max(b[1], c[1]) || a[1] < Math.min(b[1], c[1])) ||\n b[1] === c[1] && (a[0] > Math.max(b[0], c[0]) || a[0] < Math.min(b[0], c[0]));\n}\n\nif (same(points[0][0], points[1][0], points[2][0]) ||\n same(points[0][1], points[1][1], points[2][1])) {\n print(1);\n} else if (right(points[0], points[1], points[2]) ||\n right(points[1], points[0], points[2]) ||\n right(points[2], points[0], points[1])) {\n print(2);\n} else {\n print(3);\n}"}, {"source_code": "var points = new Array(3);\nfor (var i = 0; i < points.length; ++i) {\n points[i] = readline().split(\" \", 2);\n}\n\nfunction same(x, y, z) {\n return x === y && y === z;\n}\nfunction right(a, b, c) {\n return b[0] === c[0] && (a[1] > Math.max(b[1], c[1]) || a[1] < Math.min(b[1], c[1])) ||\n b[1] === c[1] && (a[0] > Math.max(b[0], c[0]) || a[0] < Math.min(b[0], c[0]));\n}\n\nif (same(points[0][0], points[1][0], points[2][0]) ||\n same(points[0][1], points[1][1], points[2][1])) {\n print(1);\n} else if (right(points[0], points[1], points[2]) ||\n right(points[1], points[0], points[2]) ||\n right(points[2], points[0], points[1])) {\n print(2);\n} else {\n print(3);\n}"}, {"source_code": "var dots = [];\nfor (var i = 0; i < 3; i++) {\n dots.push(readline().split(' ').map(Number));\n}\nif (dots[0][0] == dots[1][0] && dots[1][0] == dots[2][0] || \n dots[0][1] == dots[1][1] && dots[1][1] == dots[2][1]) {\n print(1);\n } else if (\n (\n dots[0][0] == dots[1][0] && \n (\n dots[2,1] >= Math.max(dots[1][1], dots[0][1]) || \n dots[2,1] <= Math.min(dots[1][1], dots[0][1])\n )\n ) ||\n (\n dots[0][1] == dots[1][1] &&\n (\n dots[2][0] >= Math.max(dots[0][0], dots[1][0]) ||\n dots[2][0] <= Math.min(dots[0][0], dots[1][0]) \n )\n ) || \n (\n dots[2][0] == dots[1][0] && \n (\n dots[0,1] >= Math.max(dots[1][1], dots[2][1]) || \n dots[0,1] <= Math.min(dots[1][1], dots[2][1])\n )\n ) ||\n (\n dots[2][1] == dots[1][1] &&\n (\n dots[0][0] >= Math.max(dots[2][0], dots[1][0]) ||\n dots[0][0] <= Math.min(dots[2][0], dots[1][0]) \n )\n ) ||\n (\n dots[0][0] == dots[2][0] && \n (\n dots[1,1] >= Math.max(dots[2][1], dots[0][1]) || \n dots[1,1] <= Math.min(dots[2][1], dots[0][1])\n )\n ) ||\n (\n dots[0][1] == dots[2][1] &&\n (\n dots[1][0] >= Math.max(dots[0][0], dots[1][0]) ||\n dots[1][0] <= Math.min(dots[0][0], dots[1][0]) \n )\n )\n ) {\n print(2);\n } else {\n print(3);\n }"}, {"source_code": "var dots = [];\nfor (var i = 0; i < 3; i++) {\n dots.push(readline().split(' ').map(Number));\n}\nif (dots[0][0] == dots[1][0] && dots[1][0] == dots[2][0] || \n dots[0][1] == dots[1][1] && dots[1][1] == dots[2][1]) {\n print(1);\n } else if (\n (dots[0][0] == dots[1][0] && (\n dots[1][1] == dots[2][1] ||\n dots[0][1] == dots[2][1])\n ) ||\n (dots[0][1] == dots[1][1] && (\n dots[1][0] == dots[2][0] ||\n dots[0][0] == dots[2][0])\n ) ||\n (dots[0][1] == dots[2][1] && (\n dots[2][0] == dots[1][0] ||\n dots[0][0] == dots[1][0])\n ) ||\n (dots[0][0] == dots[2][0] && (\n dots[2][1] == dots[1][1] ||\n dots[0][1] == dots[1][1])\n )\n ) {\n print(2);\n } else {\n print(3);\n }"}, {"source_code": "var dots = [];\nfor (var i = 0; i < 3; i++) {\n dots.push(readline().split(' ').map(Number));\n}\nif (dots[0][0] == dots[1][0] && dots[1][0] == dots[2][0] || \n dots[0][1] == dots[1][1] && dots[1][1] == dots[2][1]) {\n print(1);\n } else if (\n (dots[0][0] == dots[1][0]) ||\n (dots[0][1] == dots[1][1]) ||\n (dots[0][1] == dots[2][1]) ||\n (dots[0][0] == dots[2][0]) ||\n (dots[1][1] == dots[2][1]) ||\n (dots[1][0] == dots[2][0])\n ) {\n print(2);\n } else {\n print(3);\n }"}], "src_uid": "36fe960550e59b046202b5811343590d"} {"nl": {"description": "In Berland each high school student is characterized by academic performance — integer value between 1 and 5.In high school 0xFF there are two groups of pupils: the group A and the group B. Each group consists of exactly n students. An academic performance of each student is known — integer value between 1 and 5.The school director wants to redistribute students between groups so that each of the two groups has the same number of students whose academic performance is equal to 1, the same number of students whose academic performance is 2 and so on. In other words, the purpose of the school director is to change the composition of groups, so that for each value of academic performance the numbers of students in both groups are equal.To achieve this, there is a plan to produce a series of exchanges of students between groups. During the single exchange the director selects one student from the class A and one student of class B. After that, they both change their groups.Print the least number of exchanges, in order to achieve the desired equal numbers of students for each academic performance.", "input_spec": "The first line of the input contains integer number n (1 ≤ n ≤ 100) — number of students in both groups. The second line contains sequence of integer numbers a1, a2, ..., an (1 ≤ ai ≤ 5), where ai is academic performance of the i-th student of the group A. The third line contains sequence of integer numbers b1, b2, ..., bn (1 ≤ bi ≤ 5), where bi is academic performance of the i-th student of the group B.", "output_spec": "Print the required minimum number of exchanges or -1, if the desired distribution of students can not be obtained.", "sample_inputs": ["4\n5 4 4 4\n5 5 4 5", "6\n1 1 1 1 1 1\n5 5 5 5 5 5", "1\n5\n3", "9\n3 2 5 5 2 3 3 3 2\n4 1 4 1 1 2 4 4 1"], "sample_outputs": ["1", "3", "-1", "4"], "notes": null}, "positive_code": [{"source_code": "var n = readline();\nvar group_a = readline().split(' ');\nvar group_b = readline().split(' ');\n\nfunction solve(a, b) {\n var rlt = {};\n\n a.forEach(str => {rlt[str] = (rlt[str] || 0) +1;})\n b.forEach(str => {rlt[str] = (rlt[str] || 0) -1;})\n // print(JSON.stringify(rlt))\n var r = 0;\n for (var key in rlt) {\n if (rlt[key]%2)\n return -1\n r += Math.abs(rlt[key])/2\n }\n return r/2\n}\n\nprint(solve(group_a, group_b))"}, {"source_code": "function ansa(s,a,b){\n\n var cnt = [0,0,0,0,0,0]\n var all = 0;\n for(var i = 0 ; i < s ; i++){\n cnt[a[i]] += 1;\n // console.log(a[i],cnt[a[i]])\n }\n for(var i = 0 ; i < s ; i++){\n cnt[b[i]] -= 1;\n // console.log(b[i],cnt[a[i]])\n }\n for(var i = 1 ; i <= 5 ; i++){\n if(Math.abs(cnt[i]) % 2 !== 0){\n print(\"-1\");\n return;\n }\n }\n for(var i = 1 ; i <= 5 ; i++){\n//console.log(cnt[i])\n all += Math.abs(cnt[i]);\n }\n print(all/4);\n}\n\n\n//ansa(6,[1,1,1,1,1,1],[5,5,5,5,5,5])\n\n\nvar line = readline();\n\n\nvar a = readline().split(\" \");\nfor(var i = 0 ; i < a.length ; i++) a[i] = parseInt(a[i]);\nvar b = readline().split(' ');\nfor(var i = 0 ; i < b.length ; i++) b[i] = parseInt(b[i]);\n\nansa(parseInt(line),a,b);\n"}, {"source_code": "tmp1 = Array(0,0,0,0,0,0);\ntmp2 = Array(0,0,0,0,0,0);\nn = Number(readline());\nar1 = readline().split(' ').map(Number);\nar2 = readline().split(' ').map(Number);\nans = 0;\nfor(var i = 0;i{if(x < 0) {\n\t\treturn -x;\n\t}\n\telse {\n\t\treturn x;\n\t}})(tmp1[i]-tmp2[i])/4;\n}\nprint(ans);\n"}, {"source_code": "var сount = readline();\n\nvar class1 = readline().split(' ').sort().reverse();\nvar class2 = readline().split(' ').sort().reverse();\n\nvar deIntersection = deIntersect(class1, class2);\nclass1 = deIntersection.a;\nclass2 = deIntersection.b;\n\n\nvar fail = false;\nvar replaceCount = 0;\n\nvar index = 0;\n\nwhile (index < class1.length) {\n if (class1[index] !== class2[index]) {\n if (class2[index] > class1[index]) {\n if (class2.lastIndexOf(class2[index]) !== index\n \t&& class1.lastIndexOf(class1[index]) !== index) {\n\t\t\t\tvar class2Index = class2.lastIndexOf(class2[index]);\n\t\t\t\tclass2.splice(class2Index,1);\n\t\t\t\tclass1.splice(0,1);\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n }\n if (class2[index] < class1[index]) {\n if (class1.lastIndexOf(class1[index]) !== index\n \t&& class2.lastIndexOf(class2[index]) !== index) {\n\t\t\t\tvar class1Index = class1.lastIndexOf(class1[index])\n\t\t\t\tclass1.splice(class1Index,1);\n\t\t\t\tclass2.splice(index, 1);\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n } \n }\n index++;\n}\n\nif (!fail) {\n\tprint(replaceCount);\n} else {\n\tprint(-1);\n}\n\nfunction deIntersect (a,b) {\n\ta.forEach ((item, index) => {\n\t\tvar indexInB = b.indexOf(item);\n\t\tif (indexInB !== -1) {\n\t\t\tb[indexInB] = 'empty';\n\t\t\ta[index] = 'empty';\n\t\t}\n\t});\n\n\tvar newA = a.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\tvar newB = b.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\treturn {'a': newA, 'b': newB}\n}\n\n"}, {"source_code": "var n = parseInt(readline());\nvar ga = readline().split(' ').map(function(x) {\n return parseInt(x);\n});\nvar gb = readline().split(' ').map(function(x) {\n return parseInt(x);\n});\ntot = [];\ntota = [];\ntotb = [];\nfor(var i = 1; i <= 5; i += 1) {\n tot[i] = 0;\n tota[i] = 0;\n totb[i] = 0;\n}\nga.forEach(function(x) {\n tot[x] += 1;\n tota[x] += 1;\n});\ngb.forEach(function(x) {\n tot[x] += 1;\n totb[x] += 1;\n});\nvar s = true;\nvar r = 0;\nfor(var i = 1; i <= 5; i += 1) {\n if(tot[i] % 2 !== 0) {\n s = false;\n }\n r += Math.abs(tot[i] / 2 - tota[i]);\n}\nif(s) {\n print(r / 2);\n} else {\n print(-1);\n}\n"}], "negative_code": [{"source_code": "var n = readline();\nvar group_a = readline().split(' ');\nvar group_b = readline().split(' ');\n\n\nfunction solve(a, b) {\n var rlt = {};\n\n a.forEach(str => {rlt[str] ++;})\n b.forEach(str => {rlt[str] --;})\n \n var r = 0;\n for (var key in rlt) {\n if (rlt[key]%2)\n return -1\n r += Math.abs(rlt[key])/2\n }\n return r\n}\n\nprint(solve(group_a, group_b))"}, {"source_code": "var n = readline();\nvar group_a = readline().split(' ');\nvar group_b = readline().split(' ');\n\nfunction solve(a, b) {\n var rlt = {};\n\n a.forEach(str => {rlt[str] = (rlt[str] || 0) +1;})\n b.forEach(str => {rlt[str] = (rlt[str] || 0) -1;})\n print(JSON.stringify(rlt))\n var r = 0;\n for (var key in rlt) {\n if (rlt[key]%2)\n return -1\n r += Math.abs(rlt[key])/2\n }\n return r/2\n}\n\nprint(solve(group_a, group_b))"}, {"source_code": "function ansa(s,a,b){\n\n var cnt = []\n var all = 0;\n for(var i = 0 ; i < s ; i++)cnt[i] = 0;\n for(var i = 0 ; i < s ; i++)cnt[a[i] - 1] += 1;\n for(var i = 0 ; i < s ; i++)cnt[b[i] - 1] -= 1;\n for(var i = 0 ; i < s ; i++){\n if(Math.abs(cnt[i]) % 2 !== 0){\n print(\"-1\");\n return;\n }\n }\n for(var i = 0 ; i < s ; i++){\n all += Math.abs(cnt[i]);\n }\n print(all/4);\n}\n\n\n\nvar line = readline();\n\n\nvar a = readline().split(\" \");\nfor(var i = 0 ; i < a.length ; i++) a[i] = parseInt(a[i]);\nvar b = readline().split(' ');\nfor(var i = 0 ; i < b.length ; i++) b[i] = parseInt(b[i]);\n\nansa(parseInt(line),a,b);\n"}, {"source_code": "function ansa(s,a,b){\n\n var cnt = []\n var all = 0;\n for(var i = 0 ; i < s ; i++)cnt[i] = 0;\n for(var i = 0 ; i < s ; i++)cnt[a[i] - 1] += 1;\n for(var i = 0 ; i < s ; i++)cnt[b[i] - 1] -= 1;\n for(var i = 0 ; i < s ; i++){\n if(Math.abs(cnt[i]) % 2 !== 0){\n print(\"-1\");\n return;\n }\n }\n for(var i = 0 ; i < s ; i++){\n all += Math.abs(cnt[i]);\n }\n print(all/2);\n}\n\n\n\nvar line = readline();\n\n\nvar a = readline().split(\" \");\nfor(var i = 0 ; i < a.length ; i++) a[i] = parseInt(a[i]);\nvar b = readline().split(' ');\nfor(var i = 0 ; i < b.length ; i++) b[i] = parseInt(b[i]);\n\nansa(parseInt(line),a,b);\n"}, {"source_code": "function ansa(s,a,b){\n\n var cnt = [0,0,0,0,0,0]\n var all = 0;\n for(var i = 0 ; i < s ; i++){\n cnt[a[i]] += 1;\n // console.log(a[i],cnt[a[i]])\n }\n for(var i = 0 ; i < s ; i++){\n cnt[b[i]] -= 1;\n // console.log(b[i],cnt[a[i]])\n }\n for(var i = 0 ; i < s ; i++){\n if(Math.abs(cnt[i]) % 2 !== 0){\n print(\"-1\");\n return;\n }\n }\n for(var i = 1 ; i <= 5 ; i++){\n//console.log(cnt[i])\n all += Math.abs(cnt[i]);\n }\n print(all/4);\n}\n\n\n//ansa(6,[1,1,1,1,1,1],[5,5,5,5,5,5])\n\n\nvar line = readline();\n\n\nvar a = readline().split(\" \");\nfor(var i = 0 ; i < a.length ; i++) a[i] = parseInt(a[i]);\nvar b = readline().split(' ');\nfor(var i = 0 ; i < b.length ; i++) b[i] = parseInt(b[i]);\n\nansa(parseInt(line),a,b);\n"}, {"source_code": "var сount = readline();\n\nvar class1 = readline().split(' ').sort().reverse();\nvar class2 = readline().split(' ').sort().reverse();\n\nvar deIntersection = deIntersect(class1, class2);\nclass1 = deIntersection.a;\nclass2 = deIntersection.b;\n\n\nvar fail = false;\nvar replaceCount = 0;\n\nclass1.forEach((item, index) => {\n if (class1[index] !== class2[index]) {\n if (class2[index] > class1[index]) {\n if (class2.lastIndexOf(class2[index]) !== index) {\n\t\t\t\tvar class2Index = class2.lastIndexOf(class2[index])\n\t\t\t\tvar temp = class2[class2Index];\n\t\t\t\tclass2[class2Index] = class1[index];\n\t\t\t\tclass1[index] = temp;\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n }\n if (class2[index] < class1[index]) {\n if (class1.lastIndexOf(class1[index]) !== index) {\n\t\t\t\tvar class1Index = class1.lastIndexOf(class1[index])\n\t\t\t\tvar temp = class1[class1Index];\n\t\t\t\tclass1[class1Index] = class2[index];\n\t\t\t\tclass2[index] = temp;\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n } \n }\n});\n\nif (!fail) {\n\tprint(replaceCount);\n} else {\n\tprint(-1);\n}\n\nfunction deIntersect (a,b) {\n\ta.forEach ((item, index) => {\n\t\tvar indexInB = b.indexOf(item);\n\t\tif (indexInB !== -1) {\n\t\t\tb[indexInB] = 'empty';\n\t\t\ta[index] = 'empty';\n\t\t}\n\t});\n\n\tvar newA = a.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\tvar newB = b.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\treturn {'a': newA, 'b': newB}\n}\n\n"}, {"source_code": "var сount = readline();\n\nvar class1 = readline().split(' ').sort().reverse();\nvar class2 = readline().split(' ').sort().reverse();\n\nvar deIntersection = deIntersect(class1, class2);\nclass1 = deIntersection.a;\nclass2 = deIntersection.b;\n\nprint (class1);\nprint (class2);\n\n\nvar fail = false;\nvar replaceCount = 0;\n\nvar index = 0;\n\nwhile (index < class1.length) {\n if (class1[index] !== class2[index]) {\n if (class2[index] > class1[index]) {\n if (class2.lastIndexOf(class2[index]) !== index) {\n\t\t\t\tvar class2Index = class2.lastIndexOf(class2[index])\n\t\t\t\tclass2.splice(class2Index,1);\n\t\t\t\tclass1.splice(0,1);\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n }\n if (class2[index] < class1[index]) {\n if (class1.lastIndexOf(class1[index]) !== index) {\n\t\t\t\tvar class1Index = class1.lastIndexOf(class1[index])\n\t\t\t\tclass1.splice(class1Index,1);\n\t\t\t\tclass2.splice(index, 1);\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n } \n }\n index++;\n}\n\nif (!fail) {\n\tprint(replaceCount);\n} else {\n\tprint(-1);\n}\n\nfunction deIntersect (a,b) {\n\ta.forEach ((item, index) => {\n\t\tvar indexInB = b.indexOf(item);\n\t\tif (indexInB !== -1) {\n\t\t\tb[indexInB] = 'empty';\n\t\t\ta[index] = 'empty';\n\t\t}\n\t});\n\n\tvar newA = a.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\tvar newB = b.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\treturn {'a': newA, 'b': newB}\n}\n\n"}, {"source_code": "var сount = readline();\n\nvar class1 = readline().split(' ').sort().reverse();\nvar class2 = readline().split(' ').sort().reverse();\n\nvar deIntersection = deIntersect(class1, class2);\nclass1 = deIntersection.a;\nclass2 = deIntersection.b;\n\nprint(class1);\nprint(class2);\n\nvar fail = false;\nvar replaceCount = 0;\n\nclass1.forEach((item, index) => {\n if (class1[index] !== class2[index]) {\n if (class2[index] > class1[index]) {\n if (class2.lastIndexOf(class2[index]) !== index) {\n\t\t\t\tvar class2Index = class2.lastIndexOf(class2[index])\n\t\t\t\tvar temp = class2[class2Index];\n\t\t\t\tclass2[class2Index] = class1[index];\n\t\t\t\tclass1[index] = temp;\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n }\n if (class2[index] < class1[index]) {\n if (class1.lastIndexOf(class1[index]) !== index) {\n\t\t\t\tvar class1Index = class1.lastIndexOf(class1[index])\n\t\t\t\tvar temp = class1[class1Index];\n\t\t\t\tclass1[class1Index] = class2[index];\n\t\t\t\tclass2[index] = temp;\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n } \n }\n});\n\nif (!fail) {\n\tprint(replaceCount);\n} else {\n\tprint(-1);\n}\n\nfunction deIntersect (a,b) {\n\ta.forEach ((item, index) => {\n\t\tvar indexInB = b.indexOf(item);\n\t\tif (indexInB !== -1) {\n\t\t\tb[indexInB] = 'empty';\n\t\t\ta[index] = 'empty';\n\t\t}\n\t});\n\n\tvar newA = a.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\tvar newB = b.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\treturn {'a': newA, 'b': newB}\n}\n\n"}, {"source_code": "var сount = readline();\n\nvar class1 = readline().split(' ').sort().reverse();\nvar class2 = readline().split(' ').sort().reverse();\n\nvar deIntersection = deIntersect(class1, class2);\nclass1 = deIntersection.a;\nclass2 = deIntersection.b;\n\n\nvar fail = false;\nvar replaceCount = 0;\n\nvar index = 0;\n\nwhile (index < class1.length) {\n if (class1[index] !== class2[index]) {\n if (class2[index] > class1[index]) {\n if (class2.lastIndexOf(class2[index]) !== index) {\n\t\t\t\tvar class2Index = class2.lastIndexOf(class2[index])\n\t\t\t\tclass2.splice(class2Index,1);\n\t\t\t\tclass1.splice(0,1);\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n }\n if (class2[index] < class1[index]) {\n if (class1.lastIndexOf(class1[index]) !== index) {\n\t\t\t\tvar class1Index = class1.lastIndexOf(class1[index])\n\t\t\t\tclass1.splice(class1Index,1);\n\t\t\t\tclass2.splice(index, 1);\n\t\t\t\treplaceCount++;\n\t } else {\n\t \tfail = true;\n\t }\n } \n }\n index++;\n}\n\nif (!fail) {\n\tprint(replaceCount);\n} else {\n\tprint(-1);\n}\n\nfunction deIntersect (a,b) {\n\ta.forEach ((item, index) => {\n\t\tvar indexInB = b.indexOf(item);\n\t\tif (indexInB !== -1) {\n\t\t\tb[indexInB] = 'empty';\n\t\t\ta[index] = 'empty';\n\t\t}\n\t});\n\n\tvar newA = a.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\tvar newB = b.filter((item) => {\n\t\treturn item !== 'empty';\n\t});\n\n\treturn {'a': newA, 'b': newB}\n}\n\n"}], "src_uid": "47da1dd95cd015acb8c7fd6ae5ec22a3"} {"nl": {"description": "Recently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a table sized a × b squares, and each square is colored white or black. There are integers to the left of the rows and to the top of the columns, encrypting the corresponding row or column. The number of integers represents how many groups of black squares there are in corresponding row or column, and the integers themselves represents the number of consecutive black squares in corresponding group (you can find more detailed explanation in Wikipedia https://en.wikipedia.org/wiki/Japanese_crossword).Adaltik decided that the general case of japanese crossword is too complicated and drew a row consisting of n squares (e.g. japanese crossword sized 1 × n), which he wants to encrypt in the same way as in japanese crossword. The example of encrypting of a single row of japanese crossword. Help Adaltik find the numbers encrypting the row he drew.", "input_spec": "The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the length of the row. The second line of the input contains a single string consisting of n characters 'B' or 'W', ('B' corresponds to black square, 'W' — to white square in the row that Adaltik drew).", "output_spec": "The first line should contain a single integer k — the number of integers encrypting the row, e.g. the number of groups of black squares in the row. The second line should contain k integers, encrypting the row, e.g. corresponding to sizes of groups of consecutive black squares in the order from left to right.", "sample_inputs": ["3\nBBW", "5\nBWBWB", "4\nWWWW", "4\nBBBB", "13\nWBBBBWWBWBBBW"], "sample_outputs": ["1\n2", "3\n1 1 1", "0", "1\n4", "3\n4 1 3"], "notes": "NoteThe last sample case correspond to the picture in the statement."}, "positive_code": [{"source_code": "var a = parseInt(readline()),\n\tb = readline(),\n array = [],\n count = 0\n\n\tfor (var i = 0; i < b.length; i++) {\n\t\tif (b[i] == 'B') {\n\t\t\tcount++\n\t\t}\n\t\tif (b[i] == 'W') {\n\t\t\tif (count != 0)\n\t\t\t\tarray.push(count)\n\t\t\tcount = 0\n\t\t}\n\t}\n\tif (count != 0) {\n\t\tarray.push(count)\n\t}\n\tprint(array.length)\n\tif (array.length != 0) {\n\t\tprint(array.join(' '))\n\t}\n\n"}, {"source_code": "var a = readline().split(' ').map(Number);\nvar b = readline().toString() + \"W\";\nvar c = 0, d = 0,res = \"\";\n\nfor(var i = 0;i <= a;++i)\n if(b[i] === 'B')\n ++c;\n else if (c !== 0)\n res = res + c.toString() + \" \",c = 0,++d;\n\nprint(d)\nprint(res);\n"}, {"source_code": "var len = parseInt(readline());\n\tvar str = readline();\n\tvar ans = 0, sum = 0;\n\tvar s='', s1=[];\n\tvar a=[];\n\tif(str.indexOf('B') < 0){\n\t\tprint(0);\n\t}\n\telse if(str.indexOf('W') < 0){\n\t\tans = len;\n\t\tprint(1);\n\t\tprint(ans);\n\t}\n\telse{\n\t\tvar r = \"W\";\n\t\ts = str.replace(new RegExp(r, 'gm'),' ');\n\t\tvar r1 = /\\s+/g;\n\t\ts = s.replace(r1,' ');\n\t\ts1 = s.split(\" \");\n\t\tvar k = 0;\n\t\tfor(var i = 0; i < s1.length; i++){\n\t\t\tif(s1[i] !== \"\"){\n\t\t\t\ta[k++] = s1[i].length;\n\t\t\t}\n\t\t}\n\t\tprint(k);\n\t\tfor(var j = 0; j < k; j++){\n\t\t\tprint(a[j]+' ');\n\t\t}\n\t}\n"}, {"source_code": "var n = parseInt(readline()),\n tab = readline(),\n\tstate = 'W',\n\tcurlen = 0,\n\tres = []\n\nfor (var i = 0 ; i < tab.length ; i++) {\n if (tab[i] == 'B') curlen++\n else if (state == 'B') {\n\tres.push(curlen)\n\tcurlen = 0\n }\n state = tab[i]\n}\nif (state == 'B') res.push(curlen)\n\nprint(res.length)\nprint(res.join(' '))\n"}, {"source_code": "var n = parseInt(readline());\nvar row = readline();\n\nvar counters = [];\ncounters[0] = 0;\n\nvar current_counter = 0;\nvar k = 0;\n\nfor(var i = 0; i < n; i++) {\n \n if(i > 0 && row[i - 1] === 'W' && row[i] === 'B' && counters[current_counter] > 0) {\n current_counter++;\n counters[current_counter] = 0;\n }\n \n if(row[i] === 'B')\n counters[current_counter]++;\n}\n\nif(!(counters.length === 1 && counters[0] === 0))\n k = counters.length;\n\n// print result\nprint(k);\nif(k > 0)\n print(counters.join(' '));"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error('\\n↑入力 ↓出力');\n Main();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var N = nextInt();\n var s = next().split(\"W\");\n var output = [];\n for(var i = 0; i < s.length; i++){\n if(s[i] != \"\"){\n output.push(s[i].length);\n }\n }\n myout(output.length);\n myout(myconv(output, 8));\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (str) => {\n if (c === 0) {\n c++;\n return;\n }\n\n const ans = str.match(/[B]+/g) || [];\n console.log(ans.length);\n console.log(ans.map(x => x.length).join(' '));\n\n // let ans = 0;\n // const arr = [];\n // let inc = 0;\n\n // for (let i = 0; i < str.length - 1; i++) {\n // if (str[i] === 'B') {\n // inc++;\n\n // if (str[i + 1] === 'W') {\n // ans++;\n // arr.push(inc);\n // }\n // }\n // else {\n // inc = 0;\n // }\n // }\n\n // if (str[str.length - 1] === 'B') {\n // ans++;\n // inc++;\n // arr.push(inc);\n // }\n\n // console.log(ans);\n // console.log(arr.join(' '));\n\n c++;\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (str) => {\n if (c === 0) {\n c++;\n return;\n }\n\n let ans = 0;\n const arr = [];\n let inc = 0;\n\n for (let i = 0; i < str.length - 1; i++) {\n if (str[i] === 'B') {\n inc++;\n\n if (str[i + 1] === 'W') {\n ans++;\n arr.push(inc);\n }\n }\n else {\n inc = 0;\n }\n }\n\n if (str[str.length - 1] === 'B') {\n ans++;\n inc++;\n arr.push(inc);\n }\n\n console.log(ans);\n console.log(arr.join(' '));\n\n c++;\n});\n"}], "negative_code": [{"source_code": "var a = readline().split(' ').map(Number);\nvar b = readline().toString() + \"W\";\nvar c = 0, d = 0,res = \"\";\n\nfor(var i = 0;i <= a;++i)\n if(b[i] === 'B')\n ++c;\n else if (c !== 0)\n res = res + c.toString() + \" \",c = 0;\n \nprint(res);\n"}, {"source_code": "var len = parseInt(readline());\n\tvar str = readline();\n\tvar ans = 0, sum = 0;\n\tvar s='', s1=[];\n\tvar a=[];\n\tif(str.indexOf('B') === -1){\n\t\tsum = 0;\n\t\t//return sum;\n\t\tprint(sum);\n\t}\n\telse if(str.indexOf('W') === -1){\n\t\tsum = 1;\n\t\tans = len;\n\t\tprint(ans);\n\t}\n\telse{\n\t\t/*for(var i = 0; i < len; i++){\n\t\t\tif(str[i] === 'W'){\n\t\t\t\ts = str.replace('W',' ');\n\t\t\t}\n\t\t}\n\t\t}*/\n\t\tvar r = \"W\";\n\t\ts = str.replace(new RegExp(r, 'gm'),' ');\n\t\tvar r1 = /\\s+/g;\n\t\ts = s.replace(r1,' ');\n\t\ts1 = s.split(\" \");\n\t\tvar k = 0;\n\t\tfor(var i = 0; i < s1.length; i++){\n\t\t\tif(s1[i] !== \"\"){\n\t\t\t\ta[k++] = s1[i].length;\n\t\t\t}\n\t\t}\n\t}\n\t//return k +' ' +a;\n\tprint(k);\n\tfor(var j = 0; j < k; j++){\n\t\tprint(a[j]+' ');\n\t}\n\t"}, {"source_code": "var len = parseInt(readline());\n\tvar str = readline();\n\tvar ans = 0, sum = 0;\n\tvar s='', s1=[];\n\tvar a=[];\n\tif(str.indexOf('B') === -1){\n\t\tprint(0);\n\t}\n\telse if(str.indexOf('W') === -1){\n\t\tans = len;\n\t\tprint(ans);\n\t}\n\telse{\n\t\t/*for(var i = 0; i < len; i++){\n\t\t\tif(str[i] === 'W'){\n\t\t\t\ts = str.replace('W',' ');\n\t\t\t}\n\t\t}\n\t\t}*/\n\t\tvar r = \"W\";\n\t\ts = str.replace(new RegExp(r, 'gm'),' ');\n\t\tvar r1 = /\\s+/g;\n\t\ts = s.replace(r1,' ');\n\t\ts1 = s.split(\" \");\n\t\tvar k = 0;\n\t\tfor(var i = 0; i < s1.length; i++){\n\t\t\tif(s1[i] !== \"\"){\n\t\t\t\ta[k++] = s1[i].length;\n\t\t\t}\n\t\t}\n\t}\n\t//return k +' ' +a;\n\n\tprint(k);\n\tfor(var j = 0; j < k; j++){\n\t\tprint(a[j]+' ');\n\t}"}, {"source_code": "var len = parseInt(readline());\n\tvar str = readline();\n\tvar ans = 0, sum = 0;\n\tvar s='', s1=[];\n\tvar a=[];\n\tif(str.indexOf('B') < 0){\n\t\tprint(0);\n\t}\n\telse if(str.indexOf('W') < 0){\n\t\tans = len;\n\t\tprint(ans);\n\t}\n\telse{\n\t\tvar r = \"W\";\n\t\ts = str.replace(new RegExp(r, 'gm'),' ');\n\t\tvar r1 = /\\s+/g;\n\t\ts = s.replace(r1,' ');\n\t\ts1 = s.split(\" \");\n\t\tvar k = 0;\n\t\tfor(var i = 0; i < s1.length; i++){\n\t\t\tif(s1[i] !== \"\"){\n\t\t\t\ta[k++] = s1[i].length;\n\t\t\t}\n\t\t}\n\t\t\tprint(k);\n \tfor(var j = 0; j < k; j++){\n \t\tprint(a[j]+' ');\n \t}\n\t}\n"}], "src_uid": "e4b3a2707ba080b93a152f4e6e983973"} {"nl": {"description": "Yet another Armageddon is coming! This time the culprit is the Julya tribe calendar. The beavers in this tribe knew math very well. Smart Beaver, an archaeologist, got a sacred plate with a magic integer on it. The translation from Old Beaverish is as follows: \"May the Great Beaver bless you! May your chacres open and may your third eye never turn blind from beholding the Truth! Take the magic number, subtract a digit from it (the digit must occur in the number) and get a new magic number. Repeat this operation until a magic number equals zero. The Earth will stand on Three Beavers for the time, equal to the number of subtractions you perform!\"Distinct subtraction sequences can obviously get you different number of operations. But the Smart Beaver is ready to face the worst and is asking you to count the minimum number of operations he needs to reduce the magic number to zero.", "input_spec": "The single line contains the magic integer n, 0 ≤ n. to get 20 points, you need to solve the problem with constraints: n ≤ 106 (subproblem C1); to get 40 points, you need to solve the problem with constraints: n ≤ 1012 (subproblems C1+C2); to get 100 points, you need to solve the problem with constraints: n ≤ 1018 (subproblems C1+C2+C3). ", "output_spec": "Print a single integer — the minimum number of subtractions that turns the magic number to a zero.", "sample_inputs": ["24"], "sample_outputs": ["5"], "notes": "NoteIn the first test sample the minimum number of operations can be reached by the following sequence of subtractions: 24 → 20 → 18 → 10 → 9 → 0 "}, "positive_code": [{"source_code": "let store = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];\n\nfunction checkDigit(n, dig) {\n if (dig === 0 && n === 0) {\n return { count: 0, decrement: 0 };\n }\n return {\n count: 1,\n decrement: Math.max(n, dig) - n\n };\n}\n\nfunction splitNumber(n) {\n const digitsPow = 10 ** Math.floor(Math.log10(n));\n let first = Math.floor(n / digitsPow);\n let tail = n % digitsPow;\n return [first, tail];\n}\n\nfunction solveCore(n, dig = 0) {\n if (store[dig][n]) {\n return store[dig][n];\n }\n if (n < 10) {\n return (store[dig][n] = checkDigit(n, dig));\n }\n\n let rest = n;\n let [first, tail] = splitNumber(rest);\n let count = 0;\n\n while (rest > 0) {\n const r = solveCore(tail, Math.max(first, dig));\n count += r.count;\n rest -= tail + r.decrement;\n [first, tail] = splitNumber(rest);\n }\n\n return (store[dig][n] = { count, decrement: -rest });\n}\nfunction solve(n) {\n store = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];\n const r = solveCore(n, 0);\n return r.count;\n}\n\nfunction* main() {\n const n = parseInt(yield);\n const r = solve(n);\n console.log(r);\n process.exit(0);\n}\n\nif (!module.parent) {\n (() => {\n const q = main();\n q.next();\n require(\"readline\")\n .createInterface({\n input: process.stdin,\n output: null\n })\n .on(\"line\", line => q.next(line));\n })();\n}\n\nexports.solve = solve;\n"}, {"source_code": "let store = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];\n\nfunction checkDigit(n, dig) {\n if (dig == 0) {\n return { count: int(n == 0 ? 0 : 1), decrement: 0 };\n }\n if (dig > n) {\n return {\n count: int(1),\n decrement: dig - n\n };\n }\n return {\n count: int(2),\n decrement: dig\n };\n}\n\nfunction getNumString(arr) {\n const joined = arr.join(\"\");\n const trimmed = joined.replace(/0/g, \" \").trimLeft();\n return trimmed.replace(/\\s/g, \"0\") || \"0\";\n}\n\nfunction solveCore(n, dig = 0) {\n if (store[dig][n]) {\n return store[dig][n];\n }\n if (n.length === 1) {\n return (store[dig][n] = checkDigit(n, dig));\n }\n\n let first = n[0];\n let tailArr = n.substring(1).split(\"\");\n let total = int();\n\n while (first >= 0) {\n const r = solveCore(getNumString(tailArr), Math.max(first, dig));\n total = plus(total, r.count);\n first -= 1;\n tailArr = tailArr.map(() => \"9\");\n tailArr.pop();\n tailArr.push(`${(10 - r.decrement) % 10}`);\n }\n\n return (store[dig][n] = { count: total, decrement: 10 - tailArr.pop() });\n}\n\nfunction solve(n) {\n store = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];\n const r = solveCore(n, 0);\n return bintToString(r.count);\n}\n\nfunction* main() {\n const n = yield;\n const r = solve(n);\n console.log(r);\n process.exit(0);\n}\n\nif (!module.parent) {\n (() => {\n const q = main();\n q.next();\n require(\"readline\")\n .createInterface({\n input: process.stdin,\n output: null\n })\n .on(\"line\", line => q.next(line));\n })();\n}\n\nfunction int(n = 0) {\n return [\n n,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ];\n}\nfunction plus(int1, int2) {\n let z = 0;\n return int1.map((_, i) => {\n z = z + int1[i] + int2[i];\n const r = z % 10;\n z = Math.floor(z / 10);\n return r;\n });\n}\n\nfunction bintToString(i) {\n return getNumString(Array.from(i).reverse());\n}\n\nexports.solve = solve;\n"}, {"source_code": "function solve(n) {\n let rest = n;\n let count = 0;\n while (rest > 0) {\n rest -= Math.max(...rest.toString().split(\"\"));\n count += 1;\n }\n return count;\n}\n\nfunction* main() {\n const n = parseInt(yield);\n const r = solve(n);\n console.log(r);\n process.exit(0);\n}\n\nif (!module.parent) {\n (() => {\n const q = main();\n q.next();\n require(\"readline\")\n .createInterface({\n input: process.stdin,\n output: null\n })\n .on(\"line\", line => q.next(line));\n })();\n}\n\nexports.solve = solve;\n"}, {"source_code": "'use strict';\n\nfunction createReadLine() {\n process.stdin.resume();\n process.stdin.setEncoding('utf-8');\n\n let inputString = '';\n let currentLine = 0;\n\n process.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n });\n\n process.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n });\n\n function readline() {\n return inputString[currentLine++];\n }\n\n return readline;\n}\n\nconst readline = createReadLine();\n\nfunction readInts(){\n return readline().split(' ').map((value => Number.parseInt(value)));\n}\n\nfunction readFloats(){\n return readline().split(' ').map((value => Number.parseFloat(value)));\n}\n\nfunction readStr() {\n return readline();\n}\n\nfunction readInt(){\n return Number.parseInt(readline());\n}\n\nfunction readFloat(){\n return Number.parseFloat(readline());\n}\n\n\n\nfunction main() {\n const str = readStr();\n const result = solve(str);\n console.log(result);\n}\n\nfunction solve(str){\n const strArr = str.toString().split('')\n let number = Number.parseInt(str);\n let counter = 0;\n while (number > 0){\n number = number - Math.max(...number.toString().split(''))\n counter ++;\n }\n return counter;\n}\n\nmodule.exports.solve = solve;\n"}], "negative_code": [{"source_code": "function check9(n) {\n const ns = n.toString();\n const indexOf9 = ns.indexOf(\"9\");\n if (indexOf9 < 0) {\n return 0;\n }\n const rest = n % 10 ** (ns.length - indexOf9 - 1);\n const count = Math.floor(rest / 9);\n return count + 1;\n}\n\nfunction solve(n) {\n let rest = n;\n let count = 0;\n while (rest > 9) {\n const count9 = check9(rest);\n if (count9 > 0) {\n rest -= count9 * 9;\n count += count9;\n } else {\n rest -= Math.max(...rest.toString().split(\"\"));\n count += 1;\n }\n\n // console.log(rest, count, count9)\n }\n return count + 1;\n}\n\nfunction* main() {\n const n = parseInt(yield);\n const r = solve(n);\n console.log(r);\n process.exit(0);\n}\n\nif (!module.parent) {\n (() => {\n const q = main();\n q.next();\n require(\"readline\")\n .createInterface({\n input: process.stdin,\n output: null\n })\n .on(\"line\", line => q.next(line));\n })();\n}\n\nexports.solve = solve;\n"}, {"source_code": "let store = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];\n\nfunction checkDigit(n, dig) {\n if (dig == 0) {\n return { count: n == 0 ? 0 : 1, decrement: 0 };\n }\n if (dig > n) {\n return {\n count: 1,\n decrement: dig - n\n };\n }\n return {\n count: 2,\n decrement: dig\n };\n}\n\nfunction getNumString(arr) {\n const joined = arr.join(\"\");\n const trimmed = joined.replace(/0/g, \" \").trimLeft();\n return trimmed.replace(/\\s/g, \"0\") || \"0\";\n}\n\nfunction solveCore(n, dig = 0) {\n if (store[dig][n]) {\n return store[dig][n];\n }\n if (n.length === 1) {\n return (store[dig][n] = checkDigit(n, dig));\n }\n\n let first = n[0];\n let tailArr = n.substring(1).split(\"\");\n let total = 0;\n\n while (first >= 0) {\n const r = solveCore(getNumString(tailArr), Math.max(first, dig));\n total += r.count;\n first -= 1;\n tailArr = tailArr.map(() => \"9\");\n tailArr.pop();\n tailArr.push(`${(10 - r.decrement) % 10}`);\n }\n\n return (store[dig][n] = { count: total, decrement: 10 - tailArr.pop() });\n}\n\nfunction solve(n) {\n store = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];\n const r = solveCore(n, 0);\n return r.count;\n}\n\nfunction* main() {\n const n = yield;\n const r = solve(n);\n console.log(r);\n process.exit(0);\n}\n\nif (!module.parent) {\n (() => {\n const q = main();\n q.next();\n require(\"readline\")\n .createInterface({\n input: process.stdin,\n output: null\n })\n .on(\"line\", line => q.next(line));\n })();\n}\n\nexports.solve = solve;\n"}, {"source_code": "let store = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];\n\nfunction checkDigit(n, dig) {\n if (dig == 0) {\n return { count: int(n == 0 ? 0 : 1), decrement: 0 };\n }\n if (dig > n) {\n return {\n count: int(1),\n decrement: dig - n\n };\n }\n return {\n count: int(2),\n decrement: dig\n };\n}\n\nfunction getNumString(arr) {\n const joined = arr.join(\"\");\n const trimmed = joined.replace(/0/g, \" \").trimLeft();\n return trimmed.replace(/\\s/g, \"0\") || \"0\";\n}\n\nfunction solveCore(n, dig = 0) {\n if (store[dig][n]) {\n return store[dig][n];\n }\n if (n.length === 1) {\n return (store[dig][n] = checkDigit(n, dig));\n }\n\n let first = n[0];\n let tailArr = n.substring(1).split(\"\");\n let total = int();\n\n while (first >= 0) {\n const r = solveCore(getNumString(tailArr), Math.max(first, dig));\n total = plus(total, r.count);\n first -= 1;\n tailArr = tailArr.map(() => \"9\");\n tailArr.pop();\n tailArr.push(`${(10 - r.decrement) % 10}`);\n }\n\n return (store[dig][n] = { count: total, decrement: 10 - tailArr.pop() });\n}\n\nfunction solve(n) {\n store = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}];\n const r = solveCore(n, 0);\n console.log(\n n,\n store.map(o => Object.keys(o).length).reduce((acc, c) => acc + c)\n );\n return bintToString(r.count);\n}\n\nfunction* main() {\n const n = yield;\n const r = solve(n);\n console.log(r);\n process.exit(0);\n}\n\nif (!module.parent) {\n (() => {\n const q = main();\n q.next();\n require(\"readline\")\n .createInterface({\n input: process.stdin,\n output: null\n })\n .on(\"line\", line => q.next(line));\n })();\n}\n\nfunction int(n = 0) {\n return [\n n,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ];\n}\nfunction plus(int1, int2) {\n let z = 0;\n return int1.map((_, i) => {\n z = z + int1[i] + int2[i];\n const r = z % 10;\n z = Math.floor(z / 10);\n return r;\n });\n}\n\nfunction bintToString(i) {\n return getNumString(Array.from(i).reverse());\n}\n\nexports.solve = solve;\n"}], "src_uid": "fc5765b9bd18dc7555fa76e91530c036"} {"nl": {"description": "Array of integers is unimodal, if: it is strictly increasing in the beginning; after that it is constant; after that it is strictly decreasing. The first block (increasing) and the last block (decreasing) may be absent. It is allowed that both of this blocks are absent.For example, the following three arrays are unimodal: [5, 7, 11, 11, 2, 1], [4, 4, 2], [7], but the following three are not unimodal: [5, 5, 6, 6, 1], [1, 2, 1, 2], [4, 5, 5, 6].Write a program that checks if an array is unimodal.", "input_spec": "The first line contains integer n (1 ≤ n ≤ 100) — the number of elements in the array. The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 1 000) — the elements of the array.", "output_spec": "Print \"YES\" if the given array is unimodal. Otherwise, print \"NO\". You can output each letter in any case (upper or lower).", "sample_inputs": ["6\n1 5 5 5 4 2", "5\n10 20 30 20 10", "4\n1 2 1 2", "7\n3 3 3 3 3 3 3"], "sample_outputs": ["YES", "YES", "NO", "YES"], "notes": "NoteIn the first example the array is unimodal, because it is strictly increasing in the beginning (from position 1 to position 2, inclusively), that it is constant (from position 2 to position 4, inclusively) and then it is strictly decreasing (from position 4 to position 6, inclusively)."}, "positive_code": [{"source_code": "var n = readline()\nvar arr = readline().split(' ').map(x => parseInt(x))\nvar unimodal = 'YES'\nvar lastmov = null;\n\nfor(var i = 1; i < arr.length; i++){\t\n\tvar curmov = arr[i] == arr[i - 1] ? 1 : arr[i] < arr[i - 1] ? 2 : 0;\n\tif(lastmov == null) { lastmov = curmov; continue; } \n\tif(curmov < lastmov) { unimodal = 'NO'; break; }\n\tlastmov = curmov;\t\n}\n\nprint(unimodal)"}, {"source_code": "main();\nfunction main() {\n var size = parseInt(readline());\n var array = readline().split(' ');\n if ((size==1) || (size==2)) {\n return print(\"YES\");\n } else {\n for (var i=0; iarray[i]) state=\"down\";\n } else if (state==\"const\") {\n if (array[i-1]array[i]) state=\"down\";\n } else {\n if (array[i-1]<=array[i]) return print(\"NO\");\n }\n }\n } else {\n return print(\"NO\");\n }\n return print(\"YES\");\n }\n}"}, {"source_code": "var n = Number(readline());\nvar arr = readline().split(' ').map(Number);\nvar i = 1, prev = arr[0], cur = arr[1];\n\nwhile (prev < cur) {\n i++;\n prev = cur;\n cur = arr[i];\n}\n\nwhile (prev == cur) {\n i++;\n prev = cur;\n cur = arr[i];\n}\n\nwhile (prev > cur) {\n i++;\n prev = cur;\n cur = arr[i];\n}\n\nif (i == arr.length) {\n print('YES');\n}\nelse {print('NO');}\n \n \n \n \n \n "}, {"source_code": "var aLength = parseInt(readline()),\n arr = readline().split(' '),\n lastElem = null,\n action = -1,\n output = 'YES';\n \nif (aLength !== 1) {\n for (var i = 0; i < aLength; i++) {\n if (lastElem !== null) {\n if (lastElem > parseInt(arr[i])) {\n action = 2;\n \n } else if (lastElem === parseInt(arr[i])) {\n if(action === 2) {\n output = 'NO';\n break;\n }\n action = 1;\n \n } else {\n if(action === 1 || action === 2) {\n output = 'NO';\n break;\n }\n action = 0;\n }\n }\n \n lastElem = parseInt(arr[i]);\n }\n}\n\nprint(output);"}], "negative_code": [{"source_code": "var n = readline();\nvar arr = readline().split(' ').map(x => parseInt(x));\nvar unimodal = 'YES';\nvar getconst = false;\n\nfor(var i = 1; i < arr.length; i++){\n\t\n\tif(!getconst) getconst = arr[i] <= arr[i- 1] ;\n\n\tif(arr[i] == arr[i- 1]) continue;\n\t\n\tif(!getconst && arr[i] < arr[i - 1]){\n\t\tunimodal = 'NO';\n\t\tbreak;\n\t}\n\n\tif(getconst && arr[i] > arr[i - 1]){\n\t\tunimodal = 'NO';\n\t\tbreak;\n\t}\t\t\n}\n\nprint(unimodal);"}, {"source_code": "var n = readline()\nvar arr = readline().split(' ').map(x => parseInt(x))\nvar unimodal = 'YES'\nvar getconst = false;\n\nfor(var i = 1; i < arr.length; i++){\n\t\n\tif(!getconst) getconst = arr[i] == arr[i- 1]\n\n\tif(arr[i] == arr[i- 1]) continue;\n\t\n\tif(!getconst && arr[i] < arr[i - 1]){\n\t\tunimodal = 'NO'\n\t\tbreak;\n\t}\n\n\tif(getconst && arr[i] > arr[i - 1]){\n\t\tunimodal = 'NO'\n\t\tbreak;\n\t}\t\t\n}\n\nprint(unimodal)"}, {"source_code": "var arr = readline().split(' ').map(x => parseInt(x))\nvar unimodal = 'YES'\nvar getconst = false;\n\nfor(var i = 1; i < arr.length; i++){\n\t\n\tif(!getconst) getconst = arr[i] <= arr[i- 1] \n\n\tif(arr[i] == arr[i- 1]) continue;\n\t\n\tif(!getconst && arr[i] < arr[i - 1]){\n\t\tunimodal = 'NO'\n\t\tbreak;\n\t}\n\n\tif(getconst && arr[i] > arr[i - 1]){\n\t\tunimodal = 'NO'\n\t\tbreak;\n\t}\t\t\n}\n\nprint(unimodal)"}, {"source_code": "main();\nfunction main() {\n var size = parseInt(readline());\n var array = readline().split(' ');\n if ((size==1) || (size==2)) {\n return print(\"YES\");\n } else {\n for (var i=0; iarray[i]) state=\"down\";\n } else if (state==\"const\") {\n if (array[i-1]array[i]) state=\"down\";\n } else {\n if (array[i-1]<=array[i]) return print(\"NO\");\n }\n }\n } else {\n return print(\"NO\");\n }\n return print(\"YES\");\n }\n}"}, {"source_code": "main();\nfunction main() {\n var size = parseInt(readline());\n var array = readline().split(' ');\n if ((size==1) || (size==2)) {\n return print(\"YES\");\n } else {\n var state = (array[0]array[i]) state=\"down\";\n } else if (state==\"const\") {\n if (array[i-1]array[i]) state=\"down\";\n } else {\n if (array[i-1]<=array[i]) return print(\"NO\");\n }\n }\n } else {\n return print(\"NO\");\n }\n return print(\"YES\");\n }\n}"}, {"source_code": "var aLength = parseInt(readline()),\n arr = readline().split(' '),\n lastElem = null,\n action = -1,\n output = 'YES';\n \nif (aLength !== 1) {\n for (var i = 0; i < aLength; i++) {\n if (lastElem !== null) {\n if (lastElem > arr[i]) {\n if(action === -1) {\n output = 'NO';\n break;\n }\n action = 2;\n \n } else if (lastElem === arr[i]) {\n if(action === 2) {\n output = 'NO';\n break;\n }\n action = 1;\n \n } else {\n if(action === 1 || action === 2) {\n output = 'NO';\n break;\n }\n action = 0;\n }\n }\n \n lastElem = arr[i];\n }\n}\n\nprint(output);"}, {"source_code": "var aLength = parseInt(readline()),\n arr = readline().split(' '),\n lastElem = null,\n action = -1,\n output = 'YES';\n \nif (aLength !== 1) {\n for (var i = 0; i < aLength; i++) {\n if (lastElem !== null) {\n if (lastElem > parseInt(arr[i])) {\n if(action === -1) {\n output = 'NO';\n break;\n }\n action = 2;\n \n } else if (lastElem === parseInt(arr[i])) {\n if(action === 2) {\n output = 'NO';\n break;\n }\n action = 1;\n \n } else {\n if(action === 1 || action === 2) {\n output = 'NO';\n break;\n }\n action = 0;\n }\n }\n \n lastElem = parseInt(arr[i]);\n }\n}\n\nprint(output);"}], "src_uid": "5482ed8ad02ac32d28c3888299bf3658"} {"nl": {"description": "Vasily the bear has a favorite rectangle, it has one vertex at point (0, 0), and the opposite vertex at point (x, y). Of course, the sides of Vasya's favorite rectangle are parallel to the coordinate axes. Vasya also loves triangles, if the triangles have one vertex at point B = (0, 0). That's why today he asks you to find two points A = (x1, y1) and C = (x2, y2), such that the following conditions hold: the coordinates of points: x1, x2, y1, y2 are integers. Besides, the following inequation holds: x1 < x2; the triangle formed by point A, B and C is rectangular and isosceles ( is right); all points of the favorite rectangle are located inside or on the border of triangle ABC; the area of triangle ABC is as small as possible. Help the bear, find the required points. It is not so hard to proof that these points are unique.", "input_spec": "The first line contains two integers x, y ( - 109 ≤ x, y ≤ 109, x ≠ 0, y ≠ 0).", "output_spec": "Print in the single line four integers x1, y1, x2, y2 — the coordinates of the required points.", "sample_inputs": ["10 5", "-10 5"], "sample_outputs": ["0 15 15 0", "-15 0 0 15"], "notes": "NoteFigure to the first sample"}, "positive_code": [{"source_code": "print(function(x, y){\n\tvar dx = Math.abs(x);\n\tvar dy = Math.abs(y);\n\tvar d = dx+dy;\n\tvar a = [ d*x/dx, 0 ];\n\tvar b = [ 0, d*y/dy ];\n\treturn ( x<0 ? a.concat(b) : b.concat(a) ).join(' ');\n}.apply(0, readline().split(' ').map(Number)));"}, {"source_code": ";(function () {\n\tvar n = readline().split(' ').map(Number);\n\tvar t = Math.abs(n[0]) + Math.abs(n[1]);\n\n\tif (n[0] > 0 && n[1] > 0) print( [0, t, t, 0].join(' ') );\n\telse if (n[0] < 0 && n[1] > 0) print( [-t, 0, 0, t].join(' ') );\n\telse if (n[0] < 0 && n[1] < 0) print( [-t, 0, 0, -t].join(' ') );\n\telse if (n[0] > 0 && n[1] < 0) print( [0, -t, t, 0].join(' ') );\n\n}).call(this)"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar data = tokenizeIntegers(readline()),\n\t\ta = data[0], b = data[1],\n\t\tx = Math.abs(a) + Math.abs(b),\n\t\ty = x;\n\tx *= a/Math.abs(a);\n\ty *= b/Math.abs(b);\n\tif (x < 0) {\n\t\tprint(x, 0, 0, y);\n\t} else {\n\t\tprint(0, y, x, 0);\n\t}\n}\n\nmain();\n"}, {"source_code": "var n = readline().split(' ').map(Number);\nvar x1 = 0, y1 = 0, x2 = 0, y2 = 0;\nif (n[0] > 0) {\n x2 = n[0] + Math.abs(n[1]);\n if (n[1] > 0) y1 = x2;\n else y1 = -x2;\n} else {\n x1 = n[0] - Math.abs(n[1]);\n if (n[1] > 0) y2 = -x1;\n else y2 = x1;\n}\nprint(x1, y1, x2, y2);\n"}, {"source_code": "var xy = readline().split(' ').map(Number);\nvar x = xy[0], y = xy[1];\nvar x1 = 0, y1 = 0, x2 = 0, y2 = 0;\nif (x > 0) {\n x2 = x + Math.abs(y);\n if (y > 0) y1 = x2;\n else y1 = -x2;\n} else {\n x1 = x - Math.abs(y);\n if (y > 0) y2 = -x1;\n else y2 = x1;\n}\nprint(x1, y1, x2, y2);\n"}, {"source_code": "var n = readline().split(' ').map(Number)\nvar a = [0, 0, 0, 0]\nif (n[0] > 0) {\n a[2] = n[0] + Math.abs(n[1]);\n} else {\n a[0] = n[0] - Math.abs(n[1]);\n}\nif (n[1] > 0) {\n a[1] = a[2];\n a[3] = -a[0];\n} else {\n a[1] = -a[2];\n a[3] = a[0];\n}\nprint(a.join(' '));\n"}], "negative_code": [], "src_uid": "e2f15a9d9593eec2e19be3140a847712"} {"nl": {"description": "You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.", "input_spec": "The single line of the input contains a pair of integers m, s (1 ≤ m ≤ 100, 0 ≤ s ≤ 900) — the length and the sum of the digits of the required numbers.", "output_spec": "In the output print the pair of the required non-negative integer numbers — first the minimum possible number, then — the maximum possible number. If no numbers satisfying conditions required exist, print the pair of numbers \"-1 -1\" (without the quotes).", "sample_inputs": ["2 15", "3 0"], "sample_outputs": ["69 96", "-1 -1"], "notes": null}, "positive_code": [{"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\nvar m = inp[0];\nvar s = inp[1];\nvar sMin = s;\nvar sMax = s;\n\nvar numberMin = \"\";\nvar numberMax = \"\";\nvar sum = 0;\nvar min = -1;\nvar max = -1;\n\n\nif (s == 0){\n\tif (m == 1){\n\t\tprint(\"0 0\");\n\t}else{\n\t\tprint(\"-1 -1\");\n\t}\n} else {\n\tif (s > m * 9){\n\t\tprint(\"-1 -1\");\n\t} else\n\t{\n\t\tvar k = 1;\n\n\t\tfor(var i=m; i > 0; i--){\n\t\t\tfunction getMin(){\n\t\t\t\tif (i==m){\n\t\t\t\t\treturn Math.min(Math.max(1, sMin - (i-1) * 9), 9);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\treturn Math.min(Math.max(0, sMin - (i-1) * 9), 9);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction getMax(){\n\t\t\t\treturn Math.min(Math.max(sMax - (i-1) * 9, 9), sMax);\n\t\t\t}\n\n\t\t\tmin = getMin();\n\t\t\tnumberMin += min;\n\t\t\tsMin -= min;\n\n\t\t\tmax = getMax();\n\t\t\tnumberMax += max;\n\t\t\tsMax -= max;\n\t\t}\n\n\t\tprint(numberMin + \" \" + numberMax);\n\t}\n}\n"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\n\tvar m = inp[0];\n\tvar s = inp[1];\n\tvar maximum='',minimum=''; \n\tif(s === 0)\n\t{\n\t\tif(m === 1){\n\t\t\tmaximum = '0';\n\t\t\tminimum = '0';\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmaximum = '-1';\n\t\t\tminimum = '-1';\n\t\t}\n\t}else if(s > m*9){\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\telse if(m === 1){\n\t\tmaximum = s.toString();\n\t\tminimum = s.toString();\n\t}\n\telse{\n\t\t/*最大值*/\n\t\tif(s < 9){\n\t\t\tmaximum = s.toString();\n\t\t\tfor(var i = 2; i <= m; i++)\n\t\t\t{\n\t\t\t\tmaximum += '0';\n\t\t\t}\n\t\t}\n\t\telse if(s >= 9){\n\t\t\tvar ans = s;\n\t\t\tmaximum = '9';\n\t\t\tans = ans-9;\n\t\t\twhile(ans > 0){\n\t\t\t\tif(ans >= 9){\n\t\t\t\t\tmaximum = maximum+'9';\n\t\t\t\t\tans -= 9;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmaximum += ans.toString();\n\t\t\t\t\tans -= ans;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar len='';\n\t\t\tfor(var j = 1; j <= m-maximum.length; j++)\n\t\t\t{\n\t\t\t\tlen = len+ '0';\n\t\t\t}\n\t\t\tmaximum = maximum+len;\n\t\t}\n\t\t/*最小值*/\n\t\ts = s-1;\n\t\tif(s < 9){\n\t\t\tvar s1 = s;\n\t\t\tminimum = (s1).toString();\n\t\t\tvar len1='';\n\t\t\tfor(var k = 1; k <= m-2; k ++)\n\t\t\t{\n\t\t\t\tlen1 = len1+'0';\n\t\t\t}\n\t\t\tminimum = '1'+len1+minimum;\n\t\t}\n\t\telse {\n\t\t\tvar ans1 = s;\n\t\t\tvar flag = 0;\n\t\t\tvar temp=0;\n\t\t\tminimum = '9';\n\t\t\tans1 = ans1 - 9;\n\t\t\twhile(ans1 > 0){\n\t\t\t\tif(minimum.length === m-1)\n\t\t\t\t{\t\n\t\t\t\t\ttemp = ans1;\n\t\t\t\t\tans1 = 0;\n\t\t\t\t\tflag = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(ans1 >= 9){\n\t\t\t\t\t\tminimum = '9'+minimum;\n\t\t\t\t\t\tans1 -= 9;\n\t\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tminimum = ans1.toString()+minimum;\n\t\t\t\t\t\tans1 -= ans1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag === 1)\n\t\t\t{\n\t\t\t\tminimum = (temp+1).toString()+minimum;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar temp1 = '';\n\t\t\t\tfor(var l = 1; l < m-minimum.length; l ++)\n\t\t\t\t{\n\t\t\t\t\ttemp1 = temp1+'0';\n\t\t\t\t}\n\t\t\t\tminimum = '1'+temp1+minimum;\n\t\t\t}\n\t\t}\n\t}\n\tprint(minimum+\" \"+maximum);"}, {"source_code": "\nvar solution = function() {\n\t\n\t//Считываем данные\n\tvar input = readline().split(' ');\n\tvar count = input[0];\n\tvar sum = input[1];\n\t\n\t//Проверяем, что можно\n\tif (9*count < sum || sum == 0 && count > 1) {\n\t\tprint(-1, -1);\n\t\treturn;\n\t}\n\t\n\t\n\t//максимальное число\n\tvar mx = \"\";\n\tvar sumLeft = sum;\n\tvar countLeft = count;\n\twhile (countLeft) {\n\t\tmx += Math.min(9, sumLeft);\n\t\tsumLeft -= Math.min(9, sumLeft);\n\t\tcountLeft--;\n\t}\n\n\t\n\t//минимальное число\n\tvar mn = \"\";\n\tvar countLeft = count;\n\tvar sumLeft = sum;\n\twhile (countLeft) {\n\t\tvar cur = Math.max(sumLeft - (countLeft-1)*9, 0);\n\t\t\n\t\tif (!cur && countLeft == count && sumLeft > 0) {\n\t\t\tcur = 1;\n\t\t}\t\t\n\n\t\tmn += cur;\n\t\tsumLeft -= cur;\n\n\t\tcountLeft--;\n\t}\n\t\n\t\n\t//вывод\n\tprint(mn, mx);\n\n}\n\nsolution();"}, {"source_code": "function solve()\n{\nvar st=[],ss=[]; \nvar line = readline().split(\" \");\nvar m = parseInt(line[0]);\nvar s = parseInt(line[1]);\n\n\nif(m===1&&s===0)\n{\n print(0,0);\n return;\n}\nif(m>1&&s===0)\n{\n print(-1,-1);\n return;\n}\nfor(var i=0;i=9)\n {\n st.push(9);\n ss.push(9);\n s-=9;\n \n }\n else{\n st.push(s);\n ss.push(s);\n s=0;\n }\n}\nif(st.length!==m||s>0)\n{\nprint(-1,-1);\nreturn;\n}\n\nss.reverse();\nfor (var k = 0; k < ss.length; k++)\n {\n if (ss[k] !== 0)\n {\n ss[k]=ss[k]-1;\n ss[0]=ss[0]+1;\n break;\n }\n }\n\nprint(ss.join(\"\"));\nprint(st.join(\"\"));\n \n \n return;\n}\nsolve();"}, {"source_code": "'use strict'\n\nconst fn = (M, S) => {\n if (S === 0) return M === 1 ? '0 0' : '-1 -1'\n if (S > 9 * M) return '-1 -1'\n const s = (S - 1) % 9 + 1;\n let r = Array((S - s) / 9 + 1).join('9');\n if (M - 1 === r.length) return `${s}${r} ${r}${s}`;\n const zzz = Array(M - 1 - r.length).join('0');\n return `1${zzz}${s-1}${r} ${r}${s}${zzz}0`;\n}\nconst x = readline().split(' ');\nprint(fn(parseInt(x[0]), parseInt(x[1])));"}, {"source_code": "'use strict'\n \nconst x = readline().split(' ').map(Number);\nconst m = x[0];\nconst S = x[1];\n \nif (m === 1 && S === 0) print('0 0');\nelse {\n if (S === 0 || S > 9 * m) {\n print('-1 -1');\n } else {\n const s = (S - 1) % 9 + 1;\n let r = Array((S - s) / 9 + 1).join('9');\n if (r.length === m - 1) print(`${s}${r} ${r}${s}`);\n else {\n const zzz = Array(m - r.length - 1).join('0');\n print(`1${zzz}${s-1}${r} ${r}${s}${zzz}0`);\n }\n }\n}"}, {"source_code": "'use strict'\n \nconst fn = (M, S) => {\n if (S === 0) return M === 1 ? '0 0' : '-1 -1'\n if (S > 9 * M) return '-1 -1'\n const s = (S - 1) % 9 + 1;\n const len9 = (S - s) / 9;\n const r = '9'.repeat(len9);\n if (M - 1 === len9) return `${s}${r} ${r}${s}`;\n const z = '0'.repeat(M - 2 - len9);\n return `1${z}${s-1}${r} ${r}${s}${z}0`;\n}\nconst x = readline().split(' ');\nwrite(fn(parseInt(x[0]), parseInt(x[1])));\n\n "}, {"source_code": "var x = readline(),a=x.substring(0,x.indexOf(' ')), n = Number.parseInt(a),\n m =Number.parseInt(x.substring(x.indexOf(' ')+1,x.length)),h=m\n ,min = \"\", max = \"\"\n var ok = true,ok2=true\n if (n > 1 && m === 0) {\n print(\"-1 -1\")\n } else if (m > n * 9) {\n print(\"-1 -1\")\n } else {\n for (var i = 0; i < n; ++i) {\n if (h - 9 > 0) {\n min += \"9\"\n max += \"9\"\n h -= 9\n } else {\n if (ok) {\n max += h\n ok = false\n }\n else\n max += \"0\"\n if (ok2){\n if (i===n-1)min=h+min\n else min=(h-1)+min\n ok2=false\n }else{\n if(i===n-1)min=\"1\"+min\n else min=\"0\"+min \n }\n }\n }\n }\n print(min + \" \" + max)"}, {"source_code": "var inp = readline().split(' ');\nvar m = parseInt(inp[0]);\nvar s = parseInt(inp[1]);\n\nvar largestArr = [], smallestArr = [1];\nfor (var i = 0; i < m; i ++) {\n\tlargestArr.push(0);\n\tif (i !== 0) smallestArr.push(0);\n}\nif (s === 0) smallestArr[0] = 0;\n\nvar largestOn = 0, smallestOn = m - 1;\nfor (var i = 0; i < s; i ++) {\n\tif (largestOn < m) {\n\t\tlargestArr[largestOn] ++;\n\t\tif (largestArr[largestOn] === 9) largestOn ++;\n\t} else largestArr = [-1];\n\t\n\tif (smallestOn >= 0) {\n\t\tif (i >= 1) {\n\t\t\tsmallestArr[smallestOn] ++;\n\t\t\tif (smallestArr[smallestOn] === 9) smallestOn --;\n\t\t}\n\t} else smallestArr = largestArr[0] !== -1 ? largestArr : [-1];\n}\n\nprint(s === 0 && m !== 1 ? '-1 -1' : smallestArr.join('') + ' ' + largestArr.join(''));"}, {"source_code": "var enter = readline().split(' ');\nvar n = enter[0];\nvar s = enter[1];\nif(s <= n * 9 && s != 0 || s == 0 && n == 1) {\n\tvar get_max = function(n,s) {\n var max = '';\n \twhile(n--) {\n \t\tif( s >= 9) {\n max += 9;\n s -= 9;\n } else {\n max += s;\n\t\ts = 0;\n }\n }\n return max;\n };\n \tvar get_min = function(n,s) {\n \tvar first = true;\n \tvar min = '';\n \t\twhile(n--) {\n \t\tvar mn = first && n ? 1 : 0;\n\t\tvar cur = Math.max(mn, s-9*n);\n\t\ts -= cur;\n\t\tmin += cur; \n\t\tfirst = false;\n }\n return min;\n };\n print(get_min(n, s), get_max(n, s));\n} else {\n\tprint(-1, -1);\n}"}, {"source_code": "'use strict';\n\nString.prototype.getNumArray = function () {\n return String(this).split(' ').map(function (value) {\n return parseInt(value);\n });\n}\n\nlet input = readline().getNumArray();\nlet length = input[0];\nlet sum = input[1];\nlet arrayMax = [], max = -1;\nlet arrayMin = [], min = -1;\n\nfor (let i = 0; i=0; i--) {\n arrayMax[i] += ost;\n ost = 0;\n\n if (arrayMax[i] > 9) {\n ost = arrayMax[i] - 9;\n arrayMax[i] = 9;\n }\n}\n\nif (ost === 0 && (sum !== 0 || length === 1)) {\n max = arrayMax.reverse().join('');\n}\n\nost = 0;\n\n// МИНИМУМ\n\nif(length > 1) {\n arrayMin[length - 1] = sum - 1;\n arrayMin[0] = 1;\n} else {\n arrayMin[length - 1] = sum;\n}\n\n\nfor(let i = length -1; i>=0; i--) {\n arrayMin[i] += ost;\n ost = 0;\n\n if (arrayMin[i] > 9) {\n ost = arrayMin[i] - 9;\n arrayMin[i] = 9;\n }\n}\n\nif (ost === 0 && (sum !== 0 || length === 1)) {\n min = arrayMin.join('');\n}\n\nwrite(min + ' ' + max);"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [m, s] = input[0].split(' ').map(x => parseInt(x));\n if (s === 0 || m*9 < s) {\n if (m === 1 && s === 0)\n console.log(`0 0`);\n else\n console.log(`-1 -1`);\n } else {\n let bigAnswer = [];\n let smallAnswer = [1];\n let smallSumm = s - 1;\n \n if (s <= 9 && m === 1) {\n console.log(`${s} ${s}`); return;\n }\n\n if (s <= 9) {\n bigAnswer.push(s);\n bigAnswer = bigAnswer.concat(Array(m-1).fill(0));\n } else {\n while (s !== 0) {\n if (s - 9 < 0) {\n bigAnswer.push(s); break;\n }\n \n bigAnswer.push(9);\n s -= 9;\n }\n bigAnswer = bigAnswer.concat(Array(m - bigAnswer.length).fill(0));\n }\n\n let smallTmpNums = [];\n while (smallSumm !== 0) {\n if (smallSumm - 9 < 0) {\n smallTmpNums.push(smallSumm); break;\n }\n \n smallTmpNums.push(9);\n smallSumm -= 9;\n }\n\n if (smallTmpNums.length + 1 < m) {\n smallAnswer = smallAnswer.concat(Array( m - (smallTmpNums.length + 1) ).fill(0)).concat(smallTmpNums.reverse());\n } else {\n smallAnswer = smallAnswer.concat(smallTmpNums.reverse());\n }\n if (smallAnswer.length > bigAnswer.length) {\n smallAnswer = [...bigAnswer].reverse();\n }\n \n console.log(`${smallAnswer.join('')} ${bigAnswer.join('')}`)\n }\n}); "}, {"source_code": "// Lang: Node.js\n'use strict';\nlet x = '', y = 0;\nlet print = x => console.log(x);\n \nprocess.stdin.on('data', inputStdin => x += inputStdin);\nprocess.stdin.on('end', () => { x = x.split('\\n'); main(); });\nlet readline = () => x[y++];\n \n \n// ************************ Code Start ***************************\n \nfunction main() {\n\n var ar = readline().split(\" \");\n var n = ar[0], m = ar[1];\n\n if (9 * n < m || (m == 0 && n > 1)) print(-1 + \" \" + -1);\n else {\n var mx = \"\", mm = m, nn = n;\n while (nn) {\n mx += Math.min(9, mm);\n mm -= Math.min(9, mm);\n nn--;\n }\n var mn = \"\", nn = n, mm = m;\n while (nn) {\n var res = Math.max(mm - (nn - 1) * 9, 0);\n if (!res && nn == n && mm > 0) res = 1;\n mn += res;\n mm -= res;\n nn--;\n }\n print(mn + \" \" + mx);\n }\n}"}, {"source_code": "function foo(m, s) {\n if (m === 1 && s === 0) {\n return { min: 0, max: 0 }\n }\n\n if (m*9 < s || s === 0) {\n return { min: '-1', max: '-1' }\n }\n\n var maxArr = [];\n\n var i=0;\n while (i != m) {\n if (s/9 >= 1) {\n maxArr[i] = 9;\n s -= 9;\n } else {\n maxArr[i] = s;\n s -= s;\n }\n\n i++;\n }\n\n var max = '';\n for (var j=0; j 0) {\n minArray[l]--;\n break;\n }\n }\n }\n\n var min = '';\n for (var k=0; k m) {\n\t\tprint('-1 -1');\n\t}\n\telse {\n\t\t//there is a solution\n\t\tvar ansBig = [];\n\t\tvar ss = s;\n\t\tfor (var i = 0; i < m; i++) {\n\t\t\tif (s > 9) {\n\t\t\t\tansBig[i] = 9;\n\t\t\t\ts -= 9;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tansBig[i] = s;\n\t\t\t\ts = 0;\n\t\t\t}\n\t\t}\n\t\ts = ss;\n\t\tvar ansSmall = [];\n\t\tfor (var i = 0; i < m; i++) {\n\t\t\tif (s > 9) {\n\t\t\t\tansSmall[i] = 9;\n\t\t\t\ts -= 9;\n\t\t\t} else if (s > 0) {\n\t\t\t\tif (i + 1 < m) {\n\t\t\t\t\tansSmall[i] = s - 1;\n\t\t\t\t\ts = 1;\n\t\t\t\t} else {\n\t\t\t\t\tansSmall[i] = s;\n\t\t\t\t\ts = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tansBig = ansBig.join('');\n\t\tansSmall = ansSmall.reverse().join('');\n\t\tprint(ansSmall + ' ' + ansBig);\n\t}\n}\n"}, {"source_code": "var input = readline().split(' ').map(value => +value);\nvar m = input[0];\nvar s = input[1];\n\nif (s === 0) {\n write(m === 1 ? '0 0' : '-1 -1');\n quit();\n}\n\nif (m * 9 === s) {\n var result = (new Array(m).fill(9)).join('');\n write([result, result].join(' '));\n quit();\n}\n\nvar getMin = function () {\n var result = [1].concat(new Array(m - 1).fill(0));\n var cs = 1;\n\n for (var i = result.length - 1; i >= 0; --i) {\n while (result[i] < 9) {\n if (cs === s) {\n return result.join('');\n }\n\n ++result[i];\n ++cs;\n }\n }\n\n return '-1';\n};\n\nvar getMax = function () {\n var result = [1].concat(new Array(m - 1).fill(0));\n var cs = 1;\n\n for (var i = 0; i <= result.length; ++i) {\n while (result[i] < 9) {\n if (cs === s) {\n return result.join('');\n }\n\n ++result[i];\n ++cs;\n }\n }\n\n return '-1';\n};\n\nwrite([getMin(), getMax()].join(' '));\n"}, {"source_code": "var input = readline().split(' ').map(value => +value);\nvar m = input[0];\nvar s = input[1];\n\nvar printResult = function (arrayMin, arrayMax) {\n write([arrayMin.join(''), (arrayMax || arrayMin).join('')].join(' '));\n quit();\n};\n\nif (s === 0) {\n printResult(m === 1 ? [0] : [-1]);\n}\n\nif (m * 9 === s) {\n printResult(new Array(m).fill(9));\n}\n\nvar getMin = function () {\n var result = [1].concat(new Array(m - 1).fill(0));\n var cs = 1;\n\n for (var i = result.length - 1; i >= 0; --i) {\n while (result[i] < 9) {\n if (cs++ === s) {\n return result;\n }\n\n ++result[i];\n }\n }\n\n return [-1];\n};\n\nvar getMax = function () {\n var result = new Array(m).fill(0);\n var cs = 0;\n\n for (var i = 0; i <= result.length; ++i) {\n while (result[i] < 9) {\n if (cs++ === s) {\n return result;\n }\n\n ++result[i];\n }\n }\n\n return [-1];\n};\n\nprintResult(getMin(), getMax());\n"}, {"source_code": "var input = readline().split(' ').map(Number), m = input[0], s = input[1];\nif (s > 9 * m) write('-1 -1');\nelse if (m > 1 && s === 0) write('-1 -1');\nelse {\n var bigS = s;\n var smallS = s;\n var big = '';\n var small = '';\n while (m > 0) {\n \n if (bigS >= 9) { big = big + '9'; bigS -= 9; }\n else { big = big + bigS.toString(); bigS = 0; }\n \n \n var cur = Math.min('9', smallS - 1);\n if (m == 1) cur++;\n small = cur.toString() + small;\n smallS -= cur;\n m--;\n \n \n \n }\n write (small + ' ' + big);\n}\n\n"}, {"source_code": "if (!readline) {\n var _i = 0;\n\n var readline = function() {\n _i ++;\n\n switch (_i) {\n case 1: return '3 0';\n }\n }\n\n var write = console.log;\n}\n\nvar x = readline().split(' ');\n\nvar m = +x[0];\nvar s = +x[1];\n\nvar f = [];\n\nfor (var i = 0; i <= s; i ++) {\n f[i] = [];\n for (var j = 0; j <= m; j ++) {\n f[i][j] = false;\n }\n}\n\nfor (var j = 0; j <= m; j ++) {\n f[0][j] = true;\n\n}\n\nfor (var i = 1; i <= s; i ++) {\n for (var j = 1; j <= m; j ++) {\n for (var k = 0; k <= 9; k ++) {\n f[i][j] = f[i][j] || (i-k >= 0 ? f[i-k][j-1] : false);\n }\n }\n}\n\nif (f[s][m] && !(m > 1 && s == 0)) {\n var i = s;\n var j = m;\n var nmax = '';\n var nmin = '';\n\n while (j > 0) {\n for (var k = 9; k >= 1; k --) {\n if (i-k >= 0 && f[i-k][j-1]) {\n nmax += k;\n i -= k;\n break;\n }\n }\n j --;\n }\n\n while (nmax.length < m) {\n nmax += '0';\n }\n\n i = s;\n j = m;\n\n while (j > 0) {\n for (var k = (j == m ? 1 : 0); k <= 9; k ++) {\n if (i-k >= 0 && f[i-k][j-1]) {\n nmin += k;\n i -= k;\n break;\n }\n }\n j --;\n }\n\n while (nmin.length < m) {\n nmin += '0';\n }\n\n write(nmin + ' ' + nmax);\n} else {\n write('-1 -1');\n}\n"}], "negative_code": [{"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\nvar m = inp[0];\nvar s = inp[1];\nvar sMin = s;\nvar sMax = s;\n\nvar numberMin = \"\";\nvar numberMax = \"\";\nvar sum = 0;\nvar min = -1;\nvar max = -1;\n\n\nif (s == 0){\n\tif (m == 0){\n\t\tprint(0);\n\t\tprint(0);\n\t}else{\n\t\tprint(-1);\n\t\tprint(-1);\n\t}\n} else {\n\tif (s > m * 9){\n\t\tprint(-1);\n\t\tprint(-1);\n\t} else\n\t{\n\t\tvar k = 1;\n\n\t\tfor(var i=m; i > 0; i--){\n\t\t\tfunction getMin(){\n\t\t\t\tif (i==m){\n\t\t\t\t\treturn Math.min(Math.max(1, sMin - (i-1) * 9), 9);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\treturn Math.min(Math.max(0, sMin - (i-1) * 9), 9);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction getMax(){\n\t\t\t\treturn Math.min(Math.max(sMax - (i-1) * 9, 9), sMax);\n\t\t\t}\n\n\t\t\tmin = getMin();\n\t\t\tnumberMin += min;\n\t\t\tsMin -= min;\n\n\t\t\tmax = getMax();\n\t\t\tnumberMax += max;\n\t\t\tsMax -= max;\n\t\t}\n\n\t\tprint(numberMin);\n\t\tprint(numberMax);\n\t}\n}"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\nvar m = inp[0];\nvar s = inp[1];\nvar sMin = s;\nvar sMax = s;\n\nvar numberMin = \"\";\nvar numberMax = \"\";\nvar sum = 0;\nvar min = -1;\nvar max = -1;\n\n\nif (s == 0){\n\tif (m == 0){\n\t\tprint(\"0 0\");\n\t}else{\n\t\tprint(\"-1 -1\");\n\t}\n} else {\n\tif (s > m * 9){\n\t\tprint(\"-1 -1\");\n\t} else\n\t{\n\t\tvar k = 1;\n\n\t\tfor(var i=m; i > 0; i--){\n\t\t\tfunction getMin(){\n\t\t\t\tif (i==m){\n\t\t\t\t\treturn Math.min(Math.max(1, sMin - (i-1) * 9), 9);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\treturn Math.min(Math.max(0, sMin - (i-1) * 9), 9);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction getMax(){\n\t\t\t\treturn Math.min(Math.max(sMax - (i-1) * 9, 9), sMax);\n\t\t\t}\n\n\t\t\tmin = getMin();\n\t\t\tnumberMin += min;\n\t\t\tsMin -= min;\n\n\t\t\tmax = getMax();\n\t\t\tnumberMax += max;\n\t\t\tsMax -= max;\n\t\t}\n\n\t\tprint(numberMin + \" \" + numberMax);\n\t}\n}\n"}, {"source_code": "function calculate(m,s){\n\tvar maximum='',minimum=''; \n\tif(s === 0)\n\t{\n\t\tif(m === 1){\n\t\t\tmaximum = '0';\n\t\t\tminimum = '0';\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmaximum = '-1';\n\t\t\tminimum = '-1';\n\t\t}\n\t}else if(s > m*9){\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\telse if(m === 1){\n\t\tmaximum = s.toString();\n\t\tminimum = '0';\n\t}\n\telse{\n\t\t/*最大值*/\n\t\tif(s < 9){\n\t\t\tmaximum = s.toString();\n\t\t\tfor(var i = 2; i <= m; i++)\n\t\t\t{\n\t\t\t\tmaximum += '0';\n\t\t\t}\n\t\t}\n\t\telse if(s >= 9){\n\t\t\tvar ans = s;\n\t\t\tmaximum = '9';\n\t\t\tans = ans-9;\n\t\t\twhile(ans > 0){\n\t\t\t\tif(ans >= 9){\n\t\t\t\t\tmaximum = maximum+'9';\n\t\t\t\t\tans -= 9;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmaximum += ans.toString();\n\t\t\t\t\tans -= ans;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar len='';\n\t\t\tfor(var j = 1; j <= m-maximum.length; j++)\n\t\t\t{\n\t\t\t\tlen = len+ '0';\n\t\t\t}\n\t\t\tmaximum = maximum+len;\n\t\t}\n\t\t/*最小值*/\n\t\ts = s-1;\n\t\tif(s < 9){\n\t\t\tvar s1 = s;\n\t\t\tminimum = (s1).toString();\n\t\t\tvar len1='';\n\t\t\tfor(var k = 1; k <= m-2; k ++)\n\t\t\t{\n\t\t\t\tlen1 = len1+'0';\n\t\t\t}\n\t\t\tminimum = '1'+len1+minimum;\n\t\t}\n\t\telse {\n\t\t\tvar ans1 = s;\n\t\t\tvar flag = 0;\n\t\t\tvar temp=0;\n\t\t\tminimum = '9';\n\t\t\tans1 = ans1 - 9;\n\t\t\twhile(ans1 > 0){\n\t\t\t\tif(minimum.length === m-1)\n\t\t\t\t{\t\n\t\t\t\t\ttemp = ans1;\n\t\t\t\t\tans1 = 0;\n\t\t\t\t\tflag = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(ans1 >= 9){\n\t\t\t\t\tminimum = '9'+minimum;\n\t\t\t\t\tans1 -= 9;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tminimum = ans1.toString()+minimum;\n\t\t\t\t\t\tans1 -= ans1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag === 1)\n\t\t\t{\n\t\t\t\tminimum = (temp+1).toString()+minimum;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar temp1 = '';\n\t\t\t\tfor(var l = 2; l <= m-2; l ++)\n\t\t\t\t{\n\t\t\t\t\ttemp1 = temp1+'0';\n\t\t\t\t}\n\t\t\t\tminimum = '1'+temp1+minimum;\n\t\t\t}\n\t\t}\n\t}\n\treturn minimum+\" \"+maximum;\n}\nfunction main(){\n\tvar m = Number(readline().split(\" \")[0]);\n\tvar s = Number(readline().split(\" \")[1]);\n\tprint(calculate(m,s));\n\t/*\n\tvar m = Number(str.split(\" \")[0]);\n\tvar s = Number(str.split(\" \")[1]);\n\treturn calculate(m,s);*/\n}"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\n\tvar m = inp[0];\n\tvar s = inp[1];\n\tvar maximum='',minimum=''; \n\tif(s === 0)\n\t{\n\t\tif(m === 1){\n\t\t\tmaximum = '0';\n\t\t\tminimum = '0';\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmaximum = '-1';\n\t\t\tminimum = '-1';\n\t\t}\n\t}else if(s > m*9){\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\telse if(m === 1){\n\t\tmaximum = s.toString();\n\t\tminimum = '0';\n\t}\n\telse{\n\t\t/*最大值*/\n\t\tif(s < 9){\n\t\t\tmaximum = s.toString();\n\t\t\tfor(var i = 2; i <= m; i++)\n\t\t\t{\n\t\t\t\tmaximum += '0';\n\t\t\t}\n\t\t}\n\t\telse if(s >= 9){\n\t\t\tvar ans = s;\n\t\t\tmaximum = '9';\n\t\t\tans = ans-9;\n\t\t\twhile(ans > 0){\n\t\t\t\tif(ans >= 9){\n\t\t\t\t\tmaximum = maximum+'9';\n\t\t\t\t\tans -= 9;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmaximum += ans.toString();\n\t\t\t\t\tans -= ans;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar len='';\n\t\t\tfor(var j = 1; j <= m-maximum.length; j++)\n\t\t\t{\n\t\t\t\tlen = len+ '0';\n\t\t\t}\n\t\t\tmaximum = maximum+len;\n\t\t}\n\t\t/*最小值*/\n\t\ts = s-1;\n\t\tif(s < 9){\n\t\t\tvar s1 = s;\n\t\t\tminimum = (s1).toString();\n\t\t\tvar len1='';\n\t\t\tfor(var k = 1; k <= m-2; k ++)\n\t\t\t{\n\t\t\t\tlen1 = len1+'0';\n\t\t\t}\n\t\t\tminimum = '1'+len1+minimum;\n\t\t}\n\t\telse {\n\t\t\tvar ans1 = s;\n\t\t\tvar flag = 0;\n\t\t\tvar temp=0;\n\t\t\tminimum = '9';\n\t\t\tans1 = ans1 - 9;\n\t\t\twhile(ans1 > 0){\n\t\t\t\tif(minimum.length === m-1)\n\t\t\t\t{\t\n\t\t\t\t\ttemp = ans1;\n\t\t\t\t\tans1 = 0;\n\t\t\t\t\tflag = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(ans1 >= 9){\n\t\t\t\t\tminimum = '9'+minimum;\n\t\t\t\t\tans1 -= 9;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tminimum = ans1.toString()+minimum;\n\t\t\t\t\t\tans1 -= ans1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag === 1)\n\t\t\t{\n\t\t\t\tminimum = (temp+1).toString()+minimum;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar temp1 = '';\n\t\t\t\tfor(var l = 2; l <= m-2; l ++)\n\t\t\t\t{\n\t\t\t\t\ttemp1 = temp1+'0';\n\t\t\t\t}\n\t\t\t\tminimum = '1'+temp1+minimum;\n\t\t\t}\n\t\t}\n\t}\n\tprint(minimum+\" \"+maximum);"}, {"source_code": "function calculate(m, s){\n\tvar maximum, minimum;\n\tif(m === 1)\n\t{\n\t\tmaximum = m.toString();\n\t\tminimum = '0';\n\t}\n\telse if(s <= m*9 && s >= (m-1)*9){\n\t\tmaximum = '9';\n\t\tfor(var i = 1; i <= m-2; i++)\n\t\t{\n\t\t\tmaximum += '9';\n\t\t}\n\t\tmaximum += (s - (m-1)*9).toString();\n\t\tvar str = maximum.split(\"\");\n\t\tvar sign = str[str.length-1];\n\t\tif(sign === '0'){\n\t\t\tvar str1 = str.reverse();\n\t\t\tvar temp = str1[0];\n\t\t\tstr1[0] = str1[1];\n\t\t\tstr1[1] = temp;\n\t\t\tminimum = str1.join(\"\");\n\t\t}\n\t\telse{\n\t\t\tminimum = str.reverse().join(\"\");\n\t\t}\n\t}\n\telse\n\t{\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\treturn minimum+maximum;\n\n}\nfunction main(){\n\tvar m = Number(readline().split(\" \")[0]);\n\tvar s = Number(readline().split(\" \")[1]);\n\tprint(calculate(m,s));\n}"}, {"source_code": "function calculate(m, s){\n\tvar maximum, minimum;\n\tif(m === 1)\n\t{\n\t\tmaximum = m.toString();\n\t\tminimum = '0';\n\t}\n\telse if(s <= m*9 && s >= (m-1)*9){\n\t\tmaximum = '9';\n\t\tfor(var i = 1; i <= m-2; i++)\n\t\t{\n\t\t\tmaximum += '9';\n\t\t}\n\t\tmaximum += (s - (m-1)*9).toString();\n\t\tvar str = maximum.split(\"\");\n\t\tvar sign = str[str.length-1];\n\t\tif(sign === '0'){\n\t\t\tvar str1 = str.reverse();\n\t\t\tvar temp = str1[0];\n\t\t\tstr1[0] = str1[1];\n\t\t\tstr1[1] = temp;\n\t\t\tminimum = str1.join(\"\");\n\t\t}\n\t\telse{\n\t\t\tminimum = str.reverse().join(\"\");\n\t\t}\n\t}\n\telse\n\t{\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\treturn minimum+' '+maximum;\n\n}\nfunction main(){\n\tvar m = Number(readline().split(\" \")[0]);\n\tvar s = Number(readline().split(\" \")[1]);\n\tprint(calculate(m,s));\n}"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\n\tvar m = inp[0];\n\tvar s = inp[1];\n\tvar maximum='',minimum=''; \n\tif(s === 0)\n\t{\n\t\tif(m === 1){\n\t\t\tmaximum = '0';\n\t\t\tminimum = '0';\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmaximum = '-1';\n\t\t\tminimum = '-1';\n\t\t}\n\t}else if(s > m*9){\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\telse if(m === 1){\n\t\tmaximum = s.toString();\n\t\tminimum = '0';\n\t}\n\telse{\n\t\t/*最大值*/\n\t\tif(s < 9){\n\t\t\tmaximum = s.toString();\n\t\t\tfor(var i = 2; i <= m; i++)\n\t\t\t{\n\t\t\t\tmaximum += '0';\n\t\t\t}\n\t\t}\n\t\telse if(s >= 9){\n\t\t\tvar ans = s;\n\t\t\tmaximum = '9';\n\t\t\tans = ans-9;\n\t\t\twhile(ans > 0){\n\t\t\t\tif(ans >= 9){\n\t\t\t\t\tmaximum = maximum+'9';\n\t\t\t\t\tans -= 9;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmaximum += ans.toString();\n\t\t\t\t\tans -= ans;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar len='';\n\t\t\tfor(var j = 1; j <= m-maximum.length; j++)\n\t\t\t{\n\t\t\t\tlen = len+ '0';\n\t\t\t}\n\t\t\tmaximum = maximum+len;\n\t\t}\n\t\t/*最小值*/\n\t\ts = s-1;\n\t\tif(s < 9){\n\t\t\tvar s1 = s;\n\t\t\tminimum = (s1).toString();\n\t\t\tvar len1='';\n\t\t\tfor(var k = 1; k <= m-2; k ++)\n\t\t\t{\n\t\t\t\tlen1 = len1+'0';\n\t\t\t}\n\t\t\tminimum = '1'+len1+minimum;\n\t\t}\n\t\telse {\n\t\t\tvar ans1 = s;\n\t\t\tvar flag = 0;\n\t\t\tvar temp=0;\n\t\t\tminimum = '9';\n\t\t\tans1 = ans1 - 9;\n\t\t\twhile(ans1 > 0){\n\t\t\t\tif(minimum.length === m-1)\n\t\t\t\t{\t\n\t\t\t\t\ttemp = ans1;\n\t\t\t\t\tans1 = 0;\n\t\t\t\t\tflag = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(ans1 >= 9){\n\t\t\t\t\tminimum = '9'+minimum;\n\t\t\t\t\tans1 -= 9;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tminimum = ans1.toString()+minimum;\n\t\t\t\t\t\tans1 -= ans1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag === 1)\n\t\t\t{\n\t\t\t\tminimum = (temp+1).toString()+minimum;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar temp1 = '';\n\t\t\t\tfor(var l = 1; l < m-1; l ++)\n\t\t\t\t{\n\t\t\t\t\ttemp1 = temp1+'0';\n\t\t\t\t}\n\t\t\t\tminimum = '1'+temp1+minimum;\n\t\t\t}\n\t\t}\n\t}\n\tprint(minimum+\" \"+maximum);"}, {"source_code": "function calculate(m, s){\n\tvar maximum='', minimum='';\n\tif(m === 1)\n\t{\n\t\tmaximum = m.toString();\n\t\tminimum = '0';\n\t}\n\telse if(s <= m*9 && s >= (m-1)*9)\n\t{\n\t\tmaximum = '9';\n\t\tfor(var i = 1; i <= m-2; i++)\n\t\t{\n\t\t\tmaximum += '9';\n\t\t}\n\t\tmaximum += (s - (m-1)*9).toString();\n\t\tvar str = maximum.split(\"\");\n\t\tvar sign = str[str.length-1];\n\t\tif(sign === '0'){\n\t\t\tvar str1 = str.reverse();\n\t\t\tvar temp = str1[0];\n\t\t\tstr1[0] = str1[1];\n\t\t\tstr1[1] = temp;\n\t\t\tminimum = str1.join(\"\");\n\t\t}\n\t\telse{\n\t\t\tminimum = str.reverse().join(\"\");\n\t\t}\n\t}\n\telse\n\t{\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\treturn minimum+' '+maximum;\n}\nfunction main(str){\n\tvar m = Number(readline().split(\" \")[0]);\n\tvar s = Number(readline().split(\" \")[1]);\n\tprint(calculate(m,s));\n}"}, {"source_code": "function calculate(m, s){\n\tvar maximum, minimum;\n\tif(m === 1)\n\t{\n\t\tmaximum = m.toString();\n\t\tminimum = '0';\n\t}\n\telse if(s <= m*9 && s >= (m-1)*9){\n\t\tmaximum = '9';\n\t\tfor(var i = 1; i <= m-2; i++)\n\t\t{\n\t\t\tmaximum += '9';\n\t\t}\n\t\tmaximum += (s - (m-1)*9).toString();\n\t\tvar str = maximum.split(\"\");\n\t\tvar sign = str[str.length-1];\n\t\tif(sign === '0'){\n\t\t\tvar str1 = str.reverse();\n\t\t\tvar temp = str1[0];\n\t\t\tstr1[0] = str1[1];\n\t\t\tstr1[1] = temp;\n\t\t\tminimum = str1.join(\"\");\n\t\t}\n\t\telse{\n\t\t\tminimum = str.reverse().join(\"\");\n\t\t}\n\t}\n\telse\n\t{\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\treturn minimum+\" \"+maximum;\n\n}\nfunction main(){\n\tvar m = Number(readline().split(\" \")[0]);\n\tvar s = Number(readline().split(\" \")[1]);\n\tprint(calculate(m,s));\n}"}, {"source_code": "function calculate(m, s){\n\tvar maximum, minimum;\n\tif(m === 1)\n\t{\n\t\tmaximum = m.toString();\n\t\tminimum = '0';\n\t}\n\telse if(s <= m*9 && s >= (m-1)*9){\n\t\tmaximum = '9';\n\t\tfor(var i = 1; i <= m-2; i++)\n\t\t{\n\t\t\tmaximum += '9';\n\t\t}\n\t\tmaximum += (s - (m-1)*9).toString();\n\t\tvar str = maximum.split(\"\");\n\t\tvar sign = str[str.length-1];\n\t\tif(sign === '0'){\n\t\t\tvar str1 = str.reverse();\n\t\t\tvar temp = str1[0];\n\t\t\tstr1[0] = str1[1];\n\t\t\tstr1[1] = temp;\n\t\t\tminimum = str1.join(\"\");\n\t\t}\n\t\telse{\n\t\t\tminimum = str.reverse().join(\"\");\n\t\t}\n\t}\n\telse\n\t{\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\tvar a=[];\n\ta[0] = Number(minimum);\n\ta[1] = Number(maximum);\n\treturn a;\n\n}\nfunction main(){\n\tvar m = Number(readline().split(\" \")[0]);\n\tvar s = Number(readline().split(\" \")[1]);\n\tprint(calculate(m,s));\n}"}, {"source_code": "var inp = readline().split(\" \").map(function(x){return parseInt(x);});\n\tvar m = inp[0];\n\tvar s = inp[1];\n\tvar maximum='',minimum=''; \n\tif(s === 0)\n\t{\n\t\tif(m === 1){\n\t\t\tmaximum = '0';\n\t\t\tminimum = '0';\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmaximum = '-1';\n\t\t\tminimum = '-1';\n\t\t}\n\t}else if(s > m*9){\n\t\tmaximum = '-1';\n\t\tminimum = '-1';\n\t}\n\telse if(m === 1){\n\t\tmaximum = s.toString();\n\t\tminimum = '0';\n\t}\n\telse{\n\t\t/*最大值*/\n\t\tif(s < 9){\n\t\t\tmaximum = s.toString();\n\t\t\tfor(var i = 2; i <= m; i++)\n\t\t\t{\n\t\t\t\tmaximum += '0';\n\t\t\t}\n\t\t}\n\t\telse if(s >= 9){\n\t\t\tvar ans = s;\n\t\t\tmaximum = '9';\n\t\t\tans = ans-9;\n\t\t\twhile(ans > 0){\n\t\t\t\tif(ans >= 9){\n\t\t\t\t\tmaximum = maximum+'9';\n\t\t\t\t\tans -= 9;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmaximum += ans.toString();\n\t\t\t\t\tans -= ans;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar len='';\n\t\t\tfor(var j = 1; j <= m-maximum.length; j++)\n\t\t\t{\n\t\t\t\tlen = len+ '0';\n\t\t\t}\n\t\t\tmaximum = maximum+len;\n\t\t}\n\t\t/*最小值*/\n\t\ts = s-1;\n\t\tif(s < 9){\n\t\t\tvar s1 = s;\n\t\t\tminimum = (s1).toString();\n\t\t\tvar len1='';\n\t\t\tfor(var k = 1; k <= m-2; k ++)\n\t\t\t{\n\t\t\t\tlen1 = len1+'0';\n\t\t\t}\n\t\t\tminimum = '1'+len1+minimum;\n\t\t}\n\t\telse {\n\t\t\tvar ans1 = s;\n\t\t\tvar flag = 0;\n\t\t\tvar temp=0;\n\t\t\tminimum = '9';\n\t\t\tans1 = ans1 - 9;\n\t\t\twhile(ans1 > 0){\n\t\t\t\tif(minimum.length === m-1)\n\t\t\t\t{\t\n\t\t\t\t\ttemp = ans1;\n\t\t\t\t\tans1 = 0;\n\t\t\t\t\tflag = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(ans1 >= 9){\n\t\t\t\t\t\tminimum = '9'+minimum;\n\t\t\t\t\t\tans1 -= 9;\n\t\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tminimum = ans1.toString()+minimum;\n\t\t\t\t\t\tans1 -= ans1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag === 1)\n\t\t\t{\n\t\t\t\tminimum = (temp+1).toString()+minimum;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar temp1 = '';\n\t\t\t\tfor(var l = 1; l < m-minimum.length; l ++)\n\t\t\t\t{\n\t\t\t\t\ttemp1 = temp1+'0';\n\t\t\t\t}\n\t\t\t\tminimum = '1'+temp1+minimum;\n\t\t\t}\n\t\t}\n\t}\n\tprint(minimum+\" \"+maximum);"}, {"source_code": "var solution = function() {\n\t\n\t//Считываем данные\n\tvar input = readline().split(' ');\n\tvar count = input[0];\n\tvar sum = input[1];\n\t\n\t//Проверяем, что можно\n\tif (9*count < sum || sum === 0 && count > 1) {\n\t\tprint(-1, -1);\n\t\treturn;\n\t}\n\t\n\t\n\t//максимальное число\n\tvar mx = \"\";\n\tvar sumLeft = sum;\n\tvar countLeft = count;\n\twhile (countLeft) {\n\t\tmx += Math.min(9, sumLeft);\n\t\tsumLeft -= Math.min(9, sumLeft);\n\t\tcountLeft--;\n\t}\n\n\t\n\t//минимальное число\n\tvar mn = \"\";\n\tvar countLeft = count;\n\tvar sumLeft = sum;\n\twhile (countLeft) {\n\t\tvar cur = Math.max(sumLeft - (countLeft-1)*9, 0);\n\t\t\n\t\tif (!cur && countLeft == count) {\n\t\t\tcur = 1;\n\t\t}\t\t\n\n\t\tmn += cur;\n\t\tsumLeft -= cur;\n\n\t\tcountLeft--;\n\t}\n\t\n\t\n\t//вывод\n\tprint(mn, mx);\n\n}\n\nsolution();"}, {"source_code": "\nvar solution = function() {\n\t\n\t//Считываем данные\n\tvar input = readline().split(' ');\n\tvar count = input[0];\n\tvar sum = input[1];\n\t\n\t//Проверяем, что можно\n\tif (9*count < sum || sum == 0 && count > 1) {\n\t\tprint(-1, -1);\n\t\treturn;\n\t}\n\t\n\t\n\t//максимальное число\n\tvar mx = \"\";\n\tvar sumLeft = sum;\n\tvar countLeft = count;\n\twhile (countLeft) {\n\t\tmx += Math.min(9, sumLeft);\n\t\tsumLeft -= Math.min(9, sumLeft);\n\t\tcountLeft--;\n\t}\n\n\t\n\t//минимальное число\n\tvar mn = \"\";\n\tvar countLeft = count;\n\tvar sumLeft = sum;\n\twhile (countLeft) {\n\t\tvar cur = Math.max(sumLeft - (countLeft-1)*9, 0);\n\t\t\n\t\tif (!cur && countLeft == count && sumLeft) {\n\t\t\tcur = 1;\n\t\t}\t\t\n\n\t\tmn += cur;\n\t\tsumLeft -= cur;\n\n\t\tcountLeft--;\n\t}\n\t\n\t\n\t//вывод\n\tprint(mn, mx);\n\n}\n\nsolution();"}, {"source_code": "var solution = function() {\n\t\n\t//Считываем данные\n\tvar input = readline().split(' ');\n\tvar count = input[0];\n\tvar sum = input[1];\n\t\n\t//Проверяем, что можно\n\tif (9*count < sum || sum === 0 && count > 1) {\n\t\tprint(-1, -1);\n\t\treturn;\n\t}\n\t\n\t\n\t//максимальное число\n\tvar mx = \"\";\n\tvar sumLeft = sum;\n\tvar countLeft = count;\n\twhile (countLeft) {\n\t\tmx += Math.min(9, sumLeft);\n\t\tsumLeft -= Math.min(9, sumLeft);\n\t\tcountLeft--;\n\t}\n\n\t\n\t//минимальное число\n\tvar mn = \"\";\n\tvar countLeft = count;\n\tvar sumLeft = sum;\n\twhile (countLeft) {\n\t\tvar cur = Math.max(sumLeft - (countLeft-1)*9, 0);\n\t\t\n\t\tif (!cur && countLeft == count) {\n\t\t\tcur = 1;\n\t\t}\t\t\n\n\t\tmn += cur;\n\t\tsumLeft -= cur;\n\n\t\tcountLeft--;\n\t}\n\t\n\t\n\t//вывод\n\tprint(mx, mn);\n\n}\n\nsolution();"}, {"source_code": "\nvar solution = function() {\n\t\n\t//Считываем данные\n\tvar input = readline().split(' ');\n\tvar count = input[0];\n\tvar sum = input[1];\n\t\n\t//Проверяем, что можно\n\tif (9*count < sum || sum == 0 && count > 1) {\n\t\tprint(-1, -1);\n\t\treturn;\n\t}\n\t\n\t\n\t//максимальное число\n\tvar mx = \"\";\n\tvar sumLeft = sum;\n\tvar countLeft = count;\n\twhile (countLeft) {\n\t\tmx += Math.min(9, sumLeft);\n\t\tsumLeft -= Math.min(9, sumLeft);\n\t\tcountLeft--;\n\t}\n\n\t\n\t//минимальное число\n\tvar mn = \"\";\n\tvar countLeft = count;\n\tvar sumLeft = sum;\n\twhile (countLeft) {\n\t\tvar cur = Math.max(sumLeft - (countLeft-1)*9, 0);\n\t\t\n\t\tif (!cur && countLeft == count) {\n\t\t\tcur = 1;\n\t\t}\t\t\n\n\t\tmn += cur;\n\t\tsumLeft -= cur;\n\n\t\tcountLeft--;\n\t}\n\t\n\t\n\t//вывод\n\tprint(mx, mn);\n\n}\n\nsolution();"}, {"source_code": "\nvar solution = function() {\n\t\n\t//Считываем данные\n\tvar input = readline().split(' ');\n\tvar count = input[0];\n\tvar sum = input[1];\n\t\n\t//Проверяем, что можно\n\tif (9*count < sum || sum == 0 && count > 1) {\n\t\tprint(-1, -1);\n\t\treturn;\n\t}\n\t\n\t\n\t//максимальное число\n\tvar mx = \"\";\n\tvar sumLeft = sum;\n\tvar countLeft = count;\n\twhile (countLeft) {\n\t\tmx += Math.min(9, sumLeft);\n\t\tsumLeft -= Math.min(9, sumLeft);\n\t\tcountLeft--;\n\t}\n\n\t\n\t//минимальное число\n\tvar mn = \"\";\n\tvar countLeft = count;\n\tvar sumLeft = sum;\n\twhile (countLeft) {\n\t\tvar cur = Math.max(sumLeft - (countLeft-1)*9, 0);\n\t\t\n\t\tif (!cur && countLeft == count) {\n\t\t\tcur = 1;\n\t\t}\t\t\n\n\t\tmn += cur;\n\t\tsumLeft -= cur;\n\n\t\tcountLeft--;\n\t}\n\t\n\t\n\t//вывод\n\tprint(mn, mx);\n\n}\n\nsolution();"}, {"source_code": "function solve()\n{\nvar st=[],ss=[]; \nvar line = readline().split(\" \");\nvar m = parseInt(line[0]);\nvar s = parseInt(line[1]);\n\n\nif(m===1&&s===2)\n{\n print(0,0);\n return;\n}\nif(m>1&&s===0)\n{\n print(-1,-1);\n return;\n}\nfor(var i=0;i=9)\n {\n st.push(9);\n ss.push(9);\n s=s-9;\n \n }\n else{\n st.push(s);\n ss.push(s);\n s=0;\n }\n}\n\nss.reverse();\nfor (var k = 0; k < ss.length; k++)\n {\n if (ss[k] !== 0)\n {\n ss[k]=ss[k]-1;\n ss[0]=ss[0]+1;\n break;\n }\n }\n\nprint(ss.join(\"\"));\nprint(st.join(\"\"));\n \n \n return;\n}\nsolve();"}, {"source_code": "function solve()\n{\nvar st=[],ss=[]; \nvar line = readline().split(\" \");\nvar m = parseInt(line[0]);\nvar s = parseInt(line[1]);\n\n\nif(m===1&&s===2)\n{\n print(0,0);\n return;\n}\nif(m>1&&s===0)\n{\n print(-1,-1);\n return;\n}\nfor(var i=0;i=9)\n {\n st.push(9);\n ss.push(9);\n s=s-9;\n print(s);\n }\n else{\n st.push(s);\n ss.push(s);\n s=0;\n }\n}\n\nss.reverse();\nfor (var k = 0; k < ss.length; k++)\n {\n if (ss[k] !== 0)\n {\n ss[k]--;\n ss[0]++;\n break;\n }\n }\n\nprint(ss.join(\"\"));\nprint(st.join(\"\"));\n \n \n return;\n}\nsolve();"}, {"source_code": "'use strict'\n \nconst q = [];\nconst r = [];\nconst input = readline().split(' ').map(Number);\nlet x = { m: input[0], s: input[1], h: '' };\nfor(let i = 1; i < Math.min(10, x.s + 1); i++) q.push({ m: x.m - 1, s: x.s - i, h: `${i}` });\nwhile(q.length) {\n x = q.pop();\n if (x.m === 0 && x.s === 0) r.push(x.h);\n if (x.m === 0 || x.s === 0) continue;\n\tfor(let i = 0; i < Math.min(10, x.s + 1); i++)\n q.push({ m: x.m - 1, s: x.s - i, h: `${x.h}${i}` });\n}\nif (!r.length) print('-1 -1');\nprint(Math.min(...r) + ' ' + Math.max(...r))"}, {"source_code": "'use strict'\n\nconst fn = (S, M) => {\n if (S === 0) return M === 1 ? '0 0' : '-1 -1'\n if (S > 9 * M) return '-1 -1'\n const s = (S - 1) % 9 + 1;\n let r = Array((S - s) / 9 + 1).join('9');\n if (M - 1 === r.length) return `${s}${r} ${r}${s}`;\n const zzz = Array(M - 1 - r.length).join('0');\n return `1${zzz}${s-1}${r} ${r}${s}${zzz}0`;\n}\nconst x = readline().split(' ');\nprint(fn(parseInt(x[0]), parseInt(x[1])));"}, {"source_code": "'use strict'\n\nconst x = readline().split(' ').map(Number);\nconst m = x[0];\nconst S = x[1];\n \nif (S === 0 || S > 9 * m) {\n print('-1 -1');\n} else {\n const s = (S - 1) % 9 + 1;\n let r = Array((S - s) / 9 + 1).join('9');\n if (r.length === m - 1) print(`${s}${r} ${r}${s}`);\n else {\n const zzz = Array(m - r.length - 1).join('0');\n print(`1${zzz}${s-1}${r} ${r}${s}${zzz}0`);\n }\n}"}, {"source_code": "'use strict'\n\nconst q = [];\nconst r = [];\nlet x = { m: parseInt(readline()), s: parseInt(readline()), h: '' };\nfor(let i = 1; i < Math.min(10, x.s + 1); i++) q.push({ m: x.m - 1, s: x.s - i, h: `${i}` });\nwhile(q.length) {\n x = q.pop();\n if (x.m === 0 && x.s === 0) r.push(x.h);\n if (x.m === 0 || x.s === 0) continue;\n\tfor(let i = 0; i < Math.min(10, x.s + 1); i++)\n q.push({ m: x.m - 1, s: x.s - i, h: `${x.h}${i}` });\n}\nif (!r.length) print('-1 -1');\nprint(Math.min(...r) + ' ' + Math.max(...r))\n"}, {"source_code": "'use strict'\n \nconst q = [];\nconst r = [];\nconst input = readline().split(' ').map(Number);\nlet x = { m: input[0], s: input[1], h: '' };\nfor(let i = 1; i < Math.min(10, x.s + 1); i++) q.push({ m: x.m - 1, s: x.s - i, h: `${i}` });\nwhile(q.length) {\n x = q.pop();\n if (x.m === 0 && x.s === 0) r.push(x.h);\n if (x.m === 0 || x.s === 0) continue;\n\tfor(let i = 0; i < Math.min(10, x.s + 1); i++)\n q.push({ m: x.m - 1, s: x.s - i, h: `${x.h}${i}` });\n}\nif (!r.length) print('-1 -1');\nelse print(Math.min(...r) + ' ' + Math.max(...r))"}, {"source_code": "'use strict'\n\nconst fn = (m, s) => {\n const q = [ { m, s, h: '' } ];\n const r = []\n while(q.length) {\n const x = q.pop();\n if (x.m === 0 && x.s === 0) r.push(x.h);\n if (x.m === 0 || x.s === 0) continue;\n\t\tfor(let i = 1; i < Math.min(10, x.s + 1); i++)\n q.push({ m: x.m - 1, s: x.s - i, h: `${x.h}${i}` });\n }\n if (!r.length) print('-1 -1');\n print(Math.min(...r) + ' ' + Math.max(...r))\n}"}, {"source_code": "var n = readline(), m = readline(), h = m\n var min = \"\", max = \"\"\n var ok = true,ok2=true\n if (n > 1 && m === 0) {\n print.log(\"-1 -1\")\n } else if (m > n * 9) {\n print.log(\"-1 -1\")\n } else {\n for (var i = 0; i < n; ++i) {\n if (h - 9 > 0) {\n min += \"9\"\n max += \"9\"\n h -= 9\n } else {\n if (ok) {\n max += h\n ok = false\n }\n else\n max += \"0\"\n if (ok2){\n if (i===n-1)min=h+min\n else min=(h-1)+min\n ok2=false\n }else{\n if(i===n-1)min=\"1\"+min\n else min=\"0\"+min \n }\n }\n }\n }\n print(min + \" \" + max)"}, {"source_code": "var inp = readline().split(' ');\nvar m = parseInt(inp[0]);\nvar s = parseInt(inp[1]);\n\nvar largestArr = [], smallestArr = [];\nfor (var i = 0; i < m; i ++) {\n\tlargestArr.push(0);\n\tsmallestArr.push(1);\n}\n\nvar largestOn = 0, smallestOn = m - 1;\nfor (var i = 0; i < s; i ++) {\n\tif (largestOn < m) {\n\t\tlargestArr[largestOn] ++;\n\t\tif (largestArr[largestOn] === 9) largestOn ++;\n\t} else largestArr = [-1];\n\t\n\tif (smallestOn >= 0 && m <= s) {\n\t\tif (i >= m) {\n\t\t\tsmallestArr[smallestOn] ++;\n\t\t\tif (smallestArr[smallestOn] === 9) smallestOn --;\n\t\t}\n\t} else smallestArr = largestArr[0] !== -1 ? largestArr : [-1];\n}\n\nprint(s === 0 ? '-1 -1' : smallestArr.join('') + ' ' + largestArr.join(''));"}, {"source_code": "var inp = readline().split(' ');\nvar m = parseInt(inp[0]);\nvar s = parseInt(inp[1]);\n\nvar largestArr = [], smallestArr = [1];\nfor (var i = 0; i < m; i ++) {\n\tlargestArr.push(0);\n\tif (i !== 0) smallestArr.push(0);\n}\n\nvar largestOn = 0, smallestOn = m - 1;\nfor (var i = 0; i < s; i ++) {\n\tif (largestOn < m) {\n\t\tlargestArr[largestOn] ++;\n\t\tif (largestArr[largestOn] === 9) largestOn ++;\n\t} else largestArr = [-1];\n\t\n\tif (smallestOn >= 0) {\n\t\tif (i >= 1) {\n\t\t\tsmallestArr[smallestOn] ++;\n\t\t\tif (smallestArr[smallestOn] === 9) smallestOn --;\n\t\t}\n\t} else smallestArr = largestArr[0] !== -1 ? largestArr : [-1];\n}\n\nprint(s === 0 ? '-1 -1' : smallestArr.join('') + ' ' + largestArr.join(''));"}, {"source_code": "var inp = readline().split(' ');\nvar m = parseInt(inp[0]);\nvar s = parseInt(inp[1]);\n\nvar largestArr = [], smallestArr = [];\nfor (var i = 0; i < m; i ++) {\n\tlargestArr.push(0);\n\tsmallestArr.push(1);\n}\n\nvar largestOn = 0, smallestOn = m - 1;\nfor (var i = 0; i < s; i ++) {\n\tif (largestOn < m) {\n\t\tlargestArr[largestOn] ++;\n\t\tif (largestArr[largestOn] === 9) largestOn ++;\n\t} else largestArr = [-1];\n\t\n\tif (smallestOn >= 0 && m <= s) {\n\t\tif (i >= m) {\n\t\t\tsmallestArr[smallestOn] ++;\n\t\t\tif (smallestArr[smallestOn] === 9) smallestOn --;\n\t\t}\n\t} else smallestArr = [-1];\n}\n\nprint(s === 0 ? '-1 -1' : smallestArr.join('') + ' ' + largestArr.join(''));"}, {"source_code": "var inp = readline().split(' ');\nvar m = parseInt(inp[0]);\nvar s = parseInt(inp[1]);\n\nvar largestArr = [], smallestArr = [];\nfor (var i = 0; i < m; i ++) {\n\tlargestArr.push(0);\n\tsmallestArr.push(1);\n}\n\nvar largestOn = 0, smallestOn = m - 1;\nfor (var i = 0; i < s; i ++) {\n\tif (largestOn < m) {\n\t\tlargestArr[largestOn] ++;\n\t\tif (largestArr[largestOn] === 9) largestOn ++;\n\t} else largestArr = [-1];\n\t\n\tif (smallestOn >= 0 && m <= s) {\n\t\tif (i >= m) {\n\t\t\tsmallestArr[smallestOn] ++;\n\t\t\tif (smallestArr[smallestOn] === 9) smallestOn --;\n\t\t}\n\t} else smallestArr = [-1];\n}\n\nprint(s === 0 ? '-1 -1' : largestArr.join('') + ' ' + smallestArr.join(''));"}, {"source_code": "var enter = readline().split(' ');\nvar n = enter[0];\nvar s = enter[1];\nif(s <= n * 9 && s != 0 || s == 0 && n == 1) {\n\tvar get_max = function(n,s) {\n var max = '';\n \twhile(n--) {\n \t\tif( s >= 9) {\n max += 9;\n s -= 9;\n } else {\n max += s;\n\t\ts = 0;\n }\n }\n return max;\n };\n \tvar get_min = function(n,s) {\n \tvar first = true;\n \tvar min = '';\n \t\twhile(n--) {\n \t\tvar mn = first && n ? 1 : 0;\n\t\tvar cur = Math.max(mn, s-9*n);\n\t\ts -= cur;\n\t\tmin += cur; \n\t\tfirst = false;\n }\n return min;\n };\n print(get_min(n, s), get_max(n, s));\n} else {\n\tprint(1, -1);\n}"}, {"source_code": "var enter = readline().split(' ');\nvar n = enter[0];\nvar s = enter[1];\nif(s <= n * 9 && s != 0 || s == 0 && n == 1) {\n\tvar get_max = function(n,s) {\n var max = '';\n \twhile(n--) {\n \t\tif( s >= 9) {\n max += 9;\n s -= 9;\n } else {\n max += s;\n\t\ts = 0;\n }\n }\n return max;\n };\n \tvar get_min = function(n,s) {\n \tvar first = true;\n \tvar min = '';\n \t\twhile(n--) {\n \t\tvar mn = first && n ? 1 : 0;\n\t\tvar cur = Math.min(mn, s-9*n);\n\t\ts -= cur;\n\t\tmin += cur; \n\t\tfirst = false;\n }\n return min;\n };\n print(get_min(n, s), get_max(n, s));\n} else {\n\tprint(1, -1);\n}"}, {"source_code": "'use strict';\n\nString.prototype.getNumArray = function () {\n return String(this).split(' ').map(function (value) {\n return parseInt(value);\n });\n}\n\nlet input = readline().getNumArray();\nlet length = input[0];\nlet sum = input[1];\nlet arrayMax = [], max = -1;\nlet arrayMin = [], min = -1;\n\nfor (let i = 0; i=0; i--) {\n arrayMax[i] += ost;\n ost = 0;\n\n if (arrayMax[i] > 9) {\n ost = arrayMax[i] - 9;\n arrayMax[i] = 9;\n }\n}\n\nif (ost === 0 && sum !== 0) {\n max = parseInt(arrayMax.reverse().join(''));\n}\n\nost = 0;\n\n// МИНИМУМ\narrayMin[length - 1] = sum - 1;\narrayMin[0] = 1;\n\nfor(let i = length -1; i>=0; i--) {\n arrayMin[i] += ost;\n ost = 0;\n\n if (arrayMin[i] > 9) {\n ost = arrayMin[i] - 9;\n arrayMin[i] = 9;\n }\n}\n\nif (ost === 0 && sum !== 0) {\n min = parseInt(arrayMin.join(''));\n}\n\nwrite(min + ' ' + max);\n"}, {"source_code": "'use strict';\n\nString.prototype.getNumArray = function () {\n return String(this).split(' ').map(function (value) {\n return parseInt(value);\n });\n}\n\nlet input = readline().getNumArray();\nlet length = input[0];\nlet sum = input[1];\nlet arrayMax = [], max = -1;\nlet arrayMin = [], min = -1;\n\nfor (let i = 0; i=0; i--) {\n arrayMax[i] += ost;\n ost = 0;\n\n if (arrayMax[i] > 9) {\n ost = arrayMax[i] - 9;\n arrayMax[i] = 9;\n }\n}\n\nif (ost === 0 && sum !== 0) {\n max = arrayMax.reverse().join('');\n}\n\nost = 0;\n\n// МИНИМУМ\n\nif(length > 1) {\n arrayMin[length - 1] = sum - 1;\n arrayMin[0] = 1;\n} else {\n arrayMin[length - 1] = sum;\n}\n\n\nfor(let i = length -1; i>=0; i--) {\n arrayMin[i] += ost;\n ost = 0;\n\n if (arrayMin[i] > 9) {\n ost = arrayMin[i] - 9;\n arrayMin[i] = 9;\n }\n}\n\nif (ost === 0 && sum !== 0) {\n min = arrayMin.join('');\n}\n\nwrite(min + ' ' + max);\n\n\n"}, {"source_code": "'use strict';\n\nString.prototype.getNumArray = function () {\n return String(this).split(' ').map(function (value) {\n return parseInt(value);\n });\n}\n\nlet input = readline().getNumArray();\nlet length = input[0];\nlet sum = input[1];\nlet arrayMax = [], max = -1;\nlet arrayMin = [], min = -1;\n\nfor (let i = 0; i=0; i--) {\n arrayMax[i] += ost;\n ost = 0;\n\n if (arrayMax[i] > 9) {\n ost = arrayMax[i] - 9;\n arrayMax[i] = 9;\n }\n}\n\nif (ost === 0 && sum !== 0) {\n max = arrayMax.reverse().join('');\n}\n\nost = 0;\n\n// МИНИМУМ\narrayMin[length - 1] = sum - 1;\narrayMin[0] = 1;\n\nfor(let i = length -1; i>=0; i--) {\n arrayMin[i] += ost;\n ost = 0;\n\n if (arrayMin[i] > 9) {\n ost = arrayMin[i] - 9;\n arrayMin[i] = 9;\n }\n}\n\nif (ost === 0 && sum !== 0) {\n min = arrayMin.join('');\n}\n\nwrite(min + ' ' + max);"}, {"source_code": "function foo(m, ss) {\n if (m*9 < ss || ss === 0) {\n return { min: '-1', max: '-1' }\n }\n\n var maxArr = [];\n\n var s = ss;\n var i=0;\n while (i != m) {\n if (s/9 >= 1) {\n maxArr[i] = 9;\n s -= 9;\n } else {\n maxArr[i] = s;\n s -= s;\n }\n\n i++;\n }\n\n var max = '';\n for (var j=0; j input.push(line));\n\nreadLine.on('close', () => {\n let [m, s] = input[0].split(' ').map(x => parseInt(x));\n if (s === 0 || m*9 < s) {\n if (m === 1 && s === 0)\n console.log(`0 0`);\n else\n console.log(`-1 -1`);\n } else {\n let bigAnswer = [];\n let smallAnswer = [1];\n let smallSumm = s - 1;\n \n if (s <= 9 && m === 1) {\n console.log(`${s} ${s}`); return;\n }\n\n if (s <= 9) {\n bigAnswer.push(s);\n bigAnswer = bigAnswer.concat(Array(m-1).fill(0));\n } else {\n while (s !== 0) {\n if (s - 9 < 0) {\n bigAnswer.push(s); break;\n }\n \n bigAnswer.push(9);\n s -= 9;\n }\n bigAnswer = bigAnswer.concat(Array(m - bigAnswer.length).fill(0));\n }\n\n let smallTmpNums = [];\n while (smallSumm !== 0) {\n if (smallSumm - 9 < 0) {\n smallTmpNums.push(smallSumm); break;\n }\n \n smallTmpNums.push(9);\n smallSumm -= 9;\n }\n\n if (smallTmpNums.length + 1 < m) {\n smallAnswer = smallAnswer.concat(Array( m - (smallTmpNums.length + 1) ).fill(0)).concat(smallTmpNums.reverse());\n } else {\n smallAnswer = smallAnswer.concat(smallTmpNums.reverse());\n }\n \n console.log(`${smallAnswer.join('')} ${bigAnswer.join('')}`)\n }\n}); "}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [m, s] = input[0].split(' ').map(x => parseInt(x));\n if (s === 0 || m*9 < s) {\n console.log(`-1 -1`);\n } else {\n let answer = [];\n if (s <= 9) {\n answer.push(s);\n answer = answer.concat(Array(m-1).fill(0));\n \n console.log(`${answer.join('')} ${answer.join('')}`);\n return;\n }\n\n let len = 0;\n while (s !== 0) {\n len += 1;\n if (s - 9 < 0) {\n answer.push(s); break;\n }\n\n answer.push(9);\n s -= 9;\n }\n\n answer = answer.concat(Array(m - len).fill(0));\n let reverse = [...answer].reverse();\n\n if (reverse[0] === 0)\n for (let i = 0; i < reverse.length; i += 1) {\n if (reverse[i] !== 0) {\n reverse[0] = reverse[i];\n reverse[i] = 0; break;\n }\n }\n\n console.log(`${reverse.join('')} ${answer.join('')}`);\n }\n}); "}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [m, s] = input[0].split(' ').map(x => parseInt(x));\n if (s === 0 || m*9 < s) {\n console.log(`-1 -1`);\n } else {\n let answer = [];\n if (s <= 9) {\n answer.push(s);\n answer = answer.concat(Array(m-1).fill(0));\n \n console.log(`${answer.join('')} ${answer.join('')}`);\n return;\n }\n\n let len = 0;\n while (s !== 0) {\n len += 1;\n if (s - 9 < 0) {\n answer.push(s); break;\n }\n\n answer.push(9);\n s -= 9;\n }\n\n answer = answer.concat(Array(m - len).fill(0));\n console.log(`${[...answer].reverse().join('')} ${answer.join('')}`);\n }\n}); "}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [m, s] = input[0].split(' ').map(x => parseInt(x));\n if (s === 0 || m*9 < s) {\n if (m === 1 && s === 0)\n console.log(`0 0`);\n else\n console.log(`-1 -1`);\n } else {\n let answer = [];\n if (s <= 9) {\n answer.push(s);\n answer = answer.concat(Array(m-1).fill(0));\n \n console.log(`${answer.join('')} ${answer.join('')}`);\n return;\n }\n\n let len = 0;\n while (s !== 0) {\n len += 1;\n if (s - 9 < 0) {\n answer.push(s); break;\n }\n\n answer.push(9);\n s -= 9;\n }\n\n answer = answer.concat(Array(m - len).fill(0));\n let reverse = [...answer].reverse();\n\n if (reverse[0] === 0)\n for (let i = 0; i < reverse.length; i += 1) {\n if (reverse[i] !== 0) {\n reverse[0] = reverse[i];\n reverse[i] = 0; break;\n }\n }\n\n console.log(`${reverse.join('')} ${answer.join('')}`);\n }\n}); "}, {"source_code": "function foo(m, s) {\n if (m*9 < s || s === 0) {\n return { min: '-1', max: '-1' };\n }\n\n var maxArr = [];\n\n var i=0;\n while (i != m) {\n if (s/9 >= 1) {\n maxArr[i] = 9;\n s -= 9;\n } else {\n maxArr[i] = s;\n s -= s;\n }\n\n i++;\n }\n\n var max = '';\n for (var j=0; j= 1) {\n maxArr[i] = 9;\n s -= 9;\n } else {\n maxArr[i] = s;\n s -= s;\n }\n\n i++;\n }\n\n var max = '';\n for (var j=0; j 0) {\n minArray[l]--;\n break\n }\n }\n }\n\n var min = '';\n for (var k=0; k m) {\n\t\tprint('-1 -1');\n\t}\n\telse {\n\t\t//there is a solution\n\t\tvar ansBig = [];\n\t\tvar ss = s;\n\t\tfor (var i = 0; i < m; i++) {\n\t\t\tif (s > 9) {\n\t\t\t\tansBig[i] = 9;\n\t\t\t\ts -= 9;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tansBig[i] = s;\n\t\t\t\ts = 0;\n\t\t\t}\n\t\t}\n\t\ts = ss;\n\t\tvar ansSmall = [];\n\t\tfor (var i = 0; i < m; i++) {\n\t\t\tif (s > 9) {\n\t\t\t\tansSmall[i] = 9;\n\t\t\t\ts -= 9;\n\t\t\t} else if (s > 0) {\n\t\t\t\tif (i + 1 < m) {\n\t\t\t\t\tansSmall[i] = s - 1;\n\t\t\t\t\ts = 1;\n\t\t\t\t} else {\n\t\t\t\t\tansSmall[i] = s;\n\t\t\t\t\ts = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tansBig = ansBig.join('');\n\t\tansSmall = ansSmall.reverse().join('');\n\t\tprint(ansSmall + ' ' + ansBig);\n\t}\n}\n"}, {"source_code": "var input = readline().split(' ').map(value => +value);\nvar m = input[0];\nvar s = input[1];\n\nvar printResults = function (arrayMin, arrayMax) {\n write([arrayMin.join(''), (arrayMax || arrayMin).join('')].join(' '));\n quit();\n};\n\nif (s === 0) {\n write(m === 1 ? '0 0' : '-1 -1');\n quit();\n}\n\nif (m * 9 === s) {\n printResults(new Array(m).fill(9));\n}\n\nvar result = [1].concat(new Array(m - 1).fill(0));\n\nif (s === 1) {\n printResults(result);\n}\n\nvar cs = 1;\n\nfor (var i = result.length - 1; i >= 0; --i) {\n while (true) {\n if (cs === s) {\n printResults(\n result.join('').split(''),\n result.splice(0, i).reverse().concat(result).reverse()\n );\n }\n\n if (result[i] === 9) {\n break;\n }\n \n ++result[i];\n ++cs;\n }\n}\n\nwrite('-1 -1');\n"}, {"source_code": "var input = readline().split(' ').map(value => +value);\nvar m = input[0];\nvar s = input[1];\n\nvar printResults = function (arrayMin, arrayMax) {\n write([arrayMin.join(''), (arrayMax || arrayMin).join('')].join(' '));\n quit();\n};\n\nif (s === 0) {\n write(m === 1 ? '0 0' : '-1 -1');\n quit();\n}\n\nif (m * 9 === s) {\n printResults(new Array(m).fill(9));\n}\n\nvar result = [1].concat(new Array(m - 1).fill(0));\n\nif (s === 1) {\n printResults(result);\n}\n\nvar cs = 1;\n\nfor (var i = result.length - 1; i >= 0; --i) {\n while (true) {\n if (cs++ === s) {\n printResults(\n result.join('').split(''),\n result.splice(0, i).reverse().concat(result).reverse()\n );\n }\n\n if (result[i]++ === 9) {\n break;\n }\n }\n}\n\nwrite('-1 -1');\n"}, {"source_code": "var input = readline().split(' ').map(value => +value);\nvar m = input[0];\nvar s = input[1];\n\nif (s === 0) {\n write(m === 1 ? '0 0' : '-1 -1');\n quit();\n}\n\nvar result = [1].concat(new Array(m - 1).fill(0));\n\nif (s === 1) {\n result = result.join('');\n write([result, result].join(' '));\n quit();\n}\n\nvar cs = 1;\n\nfor (var i = result.length - 1; i >= 0; --i) {\n do {\n if (cs++ === s) {\n write([result.join(''), result.splice(0, i).reverse().concat(result).reverse().join('')].join(' '));\n quit();\n }\n } while (++result[i] < 9)\n}\n\nwrite('-1 -1');\n"}, {"source_code": "var input = readline().split(' ').map(value => +value);\nvar m = input[0];\nvar s = input[1];\n\nif (s === 0) {\n write(m === 1 ? '0 0' : '-1 -1');\n quit();\n}\n\nvar result = [1].concat(new Array(m - 1).fill(0));\n\nif (s === 1) {\n result = result.join('');\n write([result, result].join(' '));\n quit();\n}\n\nvar cs = 1;\n\nfor (var i = result.length - 1; i >= 0; --i) {\n while (result[i] < 9) {\n ++result[i];\n\n if (++cs === s) {\n write([result.join(''), result.splice(0, i).reverse().concat(result).reverse().join('')].join(' '));\n quit();\n }\n }\n}\n\nwrite('-1 -1');\n"}, {"source_code": "var input = readline().split(' ').map(value => +value);\nvar m = input[0];\nvar s = input[1];\n\nvar printResults = function (arrayMin, arrayMax) {\n write([arrayMin.join(''), (arrayMax || arrayMin).join('')].join(' '));\n quit();\n};\n\nif (s === 0) {\n write(m === 1 ? '0 0' : '-1 -1');\n quit();\n}\n\nif (m * 9 === s) {\n printResults(new Array(m).fill(9));\n}\n\nvar result = [1].concat(new Array(m - 1).fill(0));\n\nif (s === 1) {\n printResults(result);\n}\n\nvar cs = 1;\n\nfor (var i = result.length - 1; i >= 0; --i) {\n while (result[i] < 9) {\n if (cs === s) {\n printResults(\n result.join('').split(''),\n result.splice(0, i).reverse().concat(result).reverse()\n );\n }\n \n ++result[i];\n ++cs;\n }\n}\n\nwrite('-1 -1');\n"}, {"source_code": "var input = readline().split(' ').map(value => +value);\nvar m = input[0];\nvar s = input[1];\n\nif (s === 0) {\n write(m === 1 ? '0 0' : '-1 -1');\n quit();\n}\n\nvar result = [1].concat(new Array(m - 1).fill(0));\nvar cs = 1;\n\nfor (var i = result.length - 1; i >= 0; --i) {\n while (result[i] < 9) {\n ++result[i];\n\n if (++cs === s) {\n write([result.join(''),result.splice(0, i).reverse().concat(result).reverse().join('')].join(' '));\n quit();\n }\n }\n}\n\nwrite('-1 -1');\n"}, {"source_code": "var input = readline().split(' ').map(Number), m = input[0], s = input[1];\n\nif ((s < m - 1)|| (s > 9 * m)) write('-1 -1')\nelse {\n var bigS = s;\n var smallS = s;\n var big = '';\n var small = '';\n while (m > 0) {\n \n if (bigS >= 9) { big = big + '9'; bigS -= 9; }\n else { big = big + bigS.toString(); bigS = 0; }\n \n \n var cur = Math.min('9', smallS - 1);\n if (m == 1) cur++;\n small = cur.toString() + small;\n smallS -= cur;\n m--;\n \n \n \n }\n write (small + ' ' + big);\n}\n\n"}, {"source_code": "var input = readline().split(' ').map(Number), m = input[0], s = input[1];\n\nif ((s < 1)|| (s > 9 * m)) write('-1 -1')\nelse {\n var bigS = s;\n var smallS = s;\n var big = '';\n var small = '';\n while (m > 0) {\n \n if (bigS >= 9) { big = big + '9'; bigS -= 9; }\n else { big = big + bigS.toString(); bigS = 0; }\n \n \n var cur = Math.min('9', smallS - 1);\n if (m == 1) cur++;\n small = cur.toString() + small;\n smallS -= cur;\n m--;\n \n \n \n }\n write (small + ' ' + big);\n}\n\n"}, {"source_code": "var input = readline().split(' ').map(Number), m = input[0], s = input[1];\n\nif ((s < m - 1)|| (s > 9 * m)) write('-1 -1')\nelse {\n var bigS = s;\n var smallS = s;\n var big = '';\n var small = '';\n while (m > 0) {\n \n if (bigS >= 9) { big = big + '9'; bigS -= 9; }\n else { big = big + bigS.toString(); bigS = 0; }\n \n \n var cur = Math.min('9', smallS - (m - 1)); \n small = cur.toString() + small;\n smallS -= cur;\n m--;\n \n \n \n }\n}\nwrite (small + ' ' + big);\n"}, {"source_code": "var input = readline().split(' ').map(Number), m = input[0], s = input[1];\n\nif ((s < m - 1)|| (s > 9 * m)) write('-1 -1')\nelse {\n var bigS = s;\n var smallS = s;\n var big = '';\n var small = '';\n while (m > 0) {\n \n if (bigS >= 9) { big = big + '9'; bigS -= 9; }\n else { big = big + bigS.toString(); bigS = 0; }\n \n \n var cur = Math.min('9', smallS - (m - 1)); \n small = cur.toString() + small;\n smallS -= cur;\n m--;\n \n \n \n }\n}\nwrite (big + ' ' + small);\n"}, {"source_code": "var input = readline().split(' ').map(Number), m = input[0], s = input[1];\n\nif ((s < m - 1)|| (s > 9 * m)) write('-1 -1')\nelse {\n var bigS = s;\n var smallS = s;\n var big = '';\n var small = '';\n while (m > 0) {\n \n if (bigS >= 9) { big = big + '9'; bigS -= 9; }\n else { big = big + bigS.toString(); bigS = 0; }\n \n \n var cur = Math.min('9', smallS - (m - 1)); \n small = cur.toString() + small;\n smallS -= cur;\n m--;\n \n write (big + ' ' + small + '\\n');\n \n }\n}\n"}, {"source_code": "var input = readline().split(' ').map(Number), m = input[0], s = input[1];\n\nif ((s < m - 1)|| (s > 9 * m)) write('-1 -1')\nelse {\n var bigS = s;\n var smallS = s;\n var big = '';\n var small = '';\n while (m > 0) {\n \n if (bigS >= 9) { big = big + '9'; bigS -= 9; }\n else { big = big + bigS.toString(); bigS = 0; }\n \n \n var cur = Math.min('9', smallS - (m - 1)); \n small = cur.toString() + small;\n smallS -= cur;\n m--;\n \n \n \n }\n write (small + ' ' + big);\n}\n\n"}], "src_uid": "75d062cece5a2402920d6706c655cad7"} {"nl": {"description": "Alice and Bob begin their day with a quick game. They first choose a starting number X0 ≥ 3 and try to reach one million by the process described below. Alice goes first and then they take alternating turns. In the i-th turn, the player whose turn it is selects a prime number smaller than the current number, and announces the smallest multiple of this prime number that is not smaller than the current number.Formally, he or she selects a prime p < Xi - 1 and then finds the minimum Xi ≥ Xi - 1 such that p divides Xi. Note that if the selected prime p already divides Xi - 1, then the number does not change.Eve has witnessed the state of the game after two turns. Given X2, help her determine what is the smallest possible starting number X0. Note that the players don't necessarily play optimally. You should consider all possible game evolutions.", "input_spec": "The input contains a single integer X2 (4 ≤ X2 ≤ 106). It is guaranteed that the integer X2 is composite, that is, is not prime.", "output_spec": "Output a single integer — the minimum possible X0.", "sample_inputs": ["14", "20", "8192"], "sample_outputs": ["6", "15", "8191"], "notes": "NoteIn the first test, the smallest possible starting number is X0 = 6. One possible course of the game is as follows: Alice picks prime 5 and announces X1 = 10 Bob picks prime 7 and announces X2 = 14. In the second case, let X0 = 15. Alice picks prime 2 and announces X1 = 16 Bob picks prime 5 and announces X2 = 20. "}, "positive_code": [{"source_code": "var primes = [];\n\nfunction decompose(n) {\n var res = [];\n var p = 2;\n while (true) {\n if (n >= p * p) {\n if (n % p === 0) {\n res.push(p);\n n /= p;\n } else {\n p++;\n }\n } else {\n res.push(n);\n break;\n }\n }\n return res;\n}\n\nfunction resolve(n) {\n var d1 = decompose(n);\n var px1 = (n / d1[d1.length - 1] - 1) * d1[d1.length - 1] + 1;\n var min = Infinity;\n var d2;\n var px2;\n for (var i = px1; i < n; i++) {\n d2 = decompose(i);\n px2 = (i / d2[d2.length - 1] - 1) * d2[d2.length - 1] + 1;\n if (px2 < min && px2 >= 3) {\n min = px2;\n }\n }\n if (min === Infinity) {\n return px1;\n }\n return min;\n}\n\nconst k = parseInt(readline(), 10);\n\nconst result = resolve(k);\n\nprint(result + '\\n');\n"}, {"source_code": "var primes = [];\n\nfunction decompose(n) {\n var res = [];\n var p = 2;\n while (true) {\n if (n >= p * p) {\n if (n % p === 0) {\n res.push(p);\n n /= p;\n } else {\n p++;\n }\n } else {\n res.push(n);\n break;\n }\n }\n return res;\n}\n\nfunction resolve(n) {\n var d1 = decompose(n);\n var px1 = (n / d1[d1.length - 1] - 1) * d1[d1.length - 1] + 1;\n var min = Infinity;\n var d2;\n var px2;\n for (var i = px1; i < n; i++) {\n d2 = decompose(i);\n px2 = (i / d2[d2.length - 1] - 1) * d2[d2.length - 1] + 1;\n if (px2 < min && px2 >= 3) {\n min = px2;\n }\n }\n if (min === Infinity) {\n return px1;\n }\n return min;\n}\n\nconst k = parseInt(readline(), 10);\n\nconst result = resolve(k);\n\nprint(result + '\\n');"}, {"source_code": "var primes = [];\n\nfunction decompose(n) {\n var res = [];\n var p = 2;\n while (true) {\n if (n >= p * p) {\n if (n % p === 0) {\n res.push(p);\n n /= p;\n } else {\n p++;\n }\n } else {\n res.push(n);\n break;\n }\n }\n return res;\n}\n\n\nfunction resolve(n) {\n var d1 = decompose(n);\n var px1 = (n / d1[d1.length - 1] - 1) * d1[d1.length - 1] + 1;\n var min = Infinity;\n var d2;\n var px2;\n for (var i = px1; i < n; i++) {\n d2 = decompose(i);\n px2 = (i / d2[d2.length - 1] - 1) * d2[d2.length - 1] + 1;\n if (px2 < min && px2 >= 3) {\n min = px2;\n }\n }\n if (min === Infinity) {\n return px1;\n }\n return min;\n}\n\nconst k = parseInt(readline(), 10);\n\nconst result = resolve(k);\n\nprint(result + '\\n');"}], "negative_code": [], "src_uid": "43ff6a223c68551eff793ba170110438"} {"nl": {"description": "There is a beautiful garden of stones in Innopolis.Its most beautiful place is the $$$n$$$ piles with stones numbered from $$$1$$$ to $$$n$$$.EJOI participants have visited this place twice. When they first visited it, the number of stones in piles was $$$x_1, x_2, \\ldots, x_n$$$, correspondingly. One of the participants wrote down this sequence in a notebook. They visited it again the following day, and the number of stones in piles was equal to $$$y_1, y_2, \\ldots, y_n$$$. One of the participants also wrote it down in a notebook.It is well known that every member of the EJOI jury during the night either sits in the room $$$108$$$ or comes to the place with stones. Each jury member who comes there either takes one stone for himself or moves one stone from one pile to another. We can assume that there is an unlimited number of jury members. No one except the jury goes to the place with stones at night.Participants want to know whether their notes can be correct or they are sure to have made a mistake.", "input_spec": "The first line of the input file contains a single integer $$$n$$$, the number of piles with stones in the garden ($$$1 \\leq n \\leq 50$$$). The second line contains $$$n$$$ integers separated by spaces $$$x_1, x_2, \\ldots, x_n$$$, the number of stones in piles recorded in the notebook when the participants came to the place with stones for the first time ($$$0 \\leq x_i \\leq 1000$$$). The third line contains $$$n$$$ integers separated by spaces $$$y_1, y_2, \\ldots, y_n$$$, the number of stones in piles recorded in the notebook when the participants came to the place with stones for the second time ($$$0 \\leq y_i \\leq 1000$$$).", "output_spec": "If the records can be consistent output \"Yes\", otherwise output \"No\" (quotes for clarity).", "sample_inputs": ["5\n1 2 3 4 5\n2 1 4 3 5", "5\n1 1 1 1 1\n1 0 1 0 1", "3\n2 3 9\n1 7 9"], "sample_outputs": ["Yes", "Yes", "No"], "notes": "NoteIn the first example, the following could have happened during the night: one of the jury members moved one stone from the second pile to the first pile, and the other jury member moved one stone from the fourth pile to the third pile.In the second example, the jury took stones from the second and fourth piles.It can be proved that it is impossible for the jury members to move and took stones to convert the first array into the second array."}, "positive_code": [{"source_code": "var n = readline();\nvar firstNote = readline().split(' ');\nvar secondNote = readline().split(' ');\nvar first = 0; \nvar second = 0;\nfor(var i = 0; i < n; i++){\n first += parseInt(firstNote[i]);\n second += parseInt(secondNote[i]);\n}\nif(second > first){\n print('NO');\n}else{\n print('YES');\n}\n"}, {"source_code": "var n= readline('n');\nvar x = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar y = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar sumX = x.reduce((total, x)=>{\n return total + x;\n});\nvar sumY = y.reduce((total, x)=>{\n return total+ x;\n}, 0);\nif(sumX >= sumY && n>=1 && n <= 50 && n == x.length && n == y.length){\n print('Yes');\n}else{\n print('No');\n}"}, {"source_code": "n = readline();\nvar sum1 = parseInt(readline().split(' ').reduce((a, b) => parseInt(a) + parseInt(b)));\nvar sum2 = parseInt(readline().split(' ').reduce((a, b) => parseInt(a) + parseInt(b)));\nif(sum2 > sum1){print(\"NO\")}\nelse{print(\"YES\")}"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n\tvar N = nextInt();\n\tvar alist = nextIntArray();\n\tvar blist = nextIntArray();\n\tvar asum = 0;\n\tvar bsum = 0;\n\tfor(var i = 0; i < N; i++){\n\t\tasum += alist[i];\n\t\tbsum += blist[i];\n\t}\n\tif(asum >= bsum){\n\t\tmyout(\"Yes\");\n\t}else{\n\t\tmyout(\"No\");\n\t}\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet arr1, arr2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n if (c === 1) {\n c++;\n arr1 = d.split(' ').map(Number);\n return;\n }\n\n arr2 = d.split(' ').map(Number);\n let ans = 0;\n\n for (let i = 0; i < arr1.length; i++) {\n ans += arr1[i];\n }\n\n for (let i = 0; i < arr2.length; i++) {\n ans -= arr2[i];\n }\n\n if (ans >= 0) {\n console.log('YES');\n }\n else {\n console.log('NO');\n }\n\n c++;\n});\n"}], "negative_code": [{"source_code": "var n= readline();\nvar x = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar y = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar sumX = x.reduce((total, x)=>{\n if(x >=0 && x<=1000)\n return total;\n});\nvar sumY = y.reduce((total, x)=>{\n if(x >= 0 && x <= 1000)\n return total;\n});\nif(sumX <= sumY && n>=1 && n <= 50){\n print('Yes');\n}else{\n print('No');\n}"}, {"source_code": "var n= readline('n');\nvar x = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar y = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar sumX = x.reduce((total, x)=>{\n if(x >=0 && x<=1000)\n return total;\n});\nvar sumY = y.reduce((total, x)=>{\n if(x >= 0 && x <= 1000)\n return total;\n});\nif(sumX <= sumY && n>=1 && n <= 50 && n == x.length && n == y.length){\n print('Yes');\n}else{\n print('No');\n}"}, {"source_code": "var n= readline('n');\nvar x = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar y = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar sumX = x.reduce((total, x)=>{\n if(x >=0 && x<=1000)\n return total;\n});\nvar sumY = y.reduce((total, x)=>{\n if(x >=0 && x<=1000)\n return total;\n});\nif(sumX <= sumY && n>=1 && n <= 50){\n print('Yes');\n}else{\n print('No');\n}"}, {"source_code": "var n= readline('n');\nvar x = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar y = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar sumX = x.reduce((total, x)=>{\n return total;\n});\nvar sumY = y.reduce((total, x)=>{\n return total;\n});\nif(sumX <= sumY){\n print('Yes');\n}else{\n print('No');\n}"}, {"source_code": "var n= readline('n');\nvar x = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar y = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar sumX = x.reduce((total, x)=>{\n if(x >=0 && x<=1000)\n return total;\n});\nvar sumY = y.reduce((total, x)=>{\n if(x >= 0 && x <= 1000)\n return total;\n});\nif(sumX <= sumY && n>=1 && n <= 50){\n print('Yes');\n}else{\n print('No');\n}"}, {"source_code": "var n= readline('n');\nvar x = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar y = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar sumX = x.reduce((total, x)=>{\n return total;\n});\nvar sumY = y.reduce((total, x)=>{\n return total;\n});\nif(sumX <= sumY && n>=1 && n <= 50){\n print('Yes');\n}else{\n print('No');\n}"}, {"source_code": "var n= readline('n');\nvar x = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar y = readline().split(\" \").map(function(x) { return parseInt(x); });;\nvar sumX = x.reduce((total, x)=>{\n if(x >=0 && x<=1000)\n return total;\n});\nvar sumY = y.reduce((total, x)=>{\n if(x >= 0 && x <= 1000)\n return total;\n});\nif(sumX >= sumY && n>=1 && n <= 50){\n print('Yes');\n}else{\n print('No');\n}"}, {"source_code": " var n = readline();\nvar sum1 = readline().split(' ').reduce((a, b) => a + b);\nvar sum2 = readline().split(' ').reduce((a, b) => a + b);\nif(sum1 >= sum2){print(\"YES\")}\nelse{print(\"NO\")}"}, {"source_code": "n = readline();\nvar sum1 = readline().split(' ').reduce((a, b) => parseInt(a) + parseInt(b));\nvar sum2 = readline().split(' ').reduce((a, b) => parseInt(a) + parseInt(b));\nif(sum2 > sum1){print(\"NO\")}\nelse{print(\"YES\")}"}, {"source_code": "n = readline();\nvar sum1 = readline().split(' ').reduce((a, b) => a + b);\nvar sum2 = readline().split(' ').reduce((a, b) => a + b);\nif(sum2 > sum1){print(\"NO\")}\nelse{print(\"YES\")}"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet arr1, arr2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n if (c === 1) {\n c++;\n arr1 = d.split(' ').map(Number);\n return;\n }\n\n arr2 = d.split(' ').map(Number);\n const sum = arr1.reduce((a, b) => a + b, 0) + arr2.reduce((a, b) => a + b, 0);\n\n if (sum % 2 === 0) {\n console.log('YES');\n }\n else {\n console.log('NO');\n }\n\n c++;\n});\n"}], "src_uid": "e0ddac5c6d3671070860dda10d50c28a"} {"nl": {"description": "You are given two integers n and k. Find k-th smallest divisor of n, or report that it doesn't exist.Divisor of n is any such natural number, that n can be divided by it without remainder.", "input_spec": "The first line contains two integers n and k (1 ≤ n ≤ 1015, 1 ≤ k ≤ 109).", "output_spec": "If n has less than k divisors, output -1. Otherwise, output the k-th smallest divisor of n.", "sample_inputs": ["4 2", "5 3", "12 5"], "sample_outputs": ["2", "-1", "6"], "notes": "NoteIn the first example, number 4 has three divisors: 1, 2 and 4. The second one is 2.In the second example, number 5 has only two divisors: 1 and 5. The third divisor doesn't exist, so the answer is -1."}, "positive_code": [{"source_code": "function main(){\n\tvar numbers = readline().split(\" \").map(Number);\n\t\n\tvar num = numbers[0];\n\tvar kthdiv = numbers[1];\n\tvar divs = [];\n\n\tif(numbers[1] === 1)\n\t\treturn 1;\n\n\tif(numbers[0] === 1 && numbers[1] !== 1)\n return -1;\n\n\tdivs.push(1);\n\n\tvar numDiv = 1;\n\n\tfor(var i = 2; i <= Math.sqrt(num); i++)\n\t\tif(num % i === 0 && ++numDiv === kthdiv)\n\t\t\treturn i;\n\t\telse if(num % i === 0)\n\t\t\tdivs.push(i);\n\n\n\tfor(i = divs.length-1; i >= 0; i--)\n if(num / divs[i] !== divs[i])\n divs.push(num/divs[i]);\n \n\tif(kthdiv <= divs.length)\n\t\treturn divs[kthdiv-1];\n\n\treturn -1;\n}\n\nprint(main());"}, {"source_code": "function main() {\n var data = readline().split(' ').map(Number);\n var n = data[0];\n var k= data[1];\n \n var endDivisors = [];\n var startDivisors = [];\n var num = n;\n var square_root = Math.floor(Math.sqrt(num)) + 1;\n for (var i = 1; i < square_root; i++) {\n if (num % i == 0&&i*i!=num){\n startDivisors.push(i);\n endDivisors.push(num/i)\n }\n if (num % i == 0&&i*i==num){\n startDivisors.push(i)\n }\n }\n var res = -1;\n if(startDivisors[k-1]){\n res = startDivisors[k-1];\n } else if (endDivisors[endDivisors.length - (k-startDivisors.length) ]){\n res = endDivisors[endDivisors.length - (k-startDivisors.length) ]\n }\n print(res);\n}\n\n\nmain()"}], "negative_code": [{"source_code": "function main(){\n\tvar numbers = readline().split(\" \").map(Number);\n\t\n\tvar num = numbers[0];\n\tvar kthdiv = numbers[1];\n\tvar divs = [];\n\n\tif(numbers[1] === 1)\n\t\treturn 1;\n\n\tdivs.push(1);\n\n\tvar numDiv = 1;\n\n\tfor(var i = 2; i <= Math.sqrt(num); i++)\n\t\tif(num % i === 0 && ++numDiv === kthdiv)\n\t\t\treturn i;\n\t\telse if(num % i === 0)\n\t\t\tdivs.push(i);\n\n\n\tif(kthdiv <= divs.length*2)\n\t\treturn num/divs[divs.length*2-kthdiv];\n\n\treturn -1;\n}\n\nprint(main());"}], "src_uid": "6ba39b428a2d47b7d199879185797ffb"} {"nl": {"description": "You are given two strings $$$s$$$ and $$$t$$$ consisting of lowercase Latin letters. The length of $$$t$$$ is $$$2$$$ (i.e. this string consists only of two characters).In one move, you can choose any character of $$$s$$$ and replace it with any lowercase Latin letter. More formally, you choose some $$$i$$$ and replace $$$s_i$$$ (the character at the position $$$i$$$) with some character from 'a' to 'z'.You want to do no more than $$$k$$$ replacements in such a way that maximizes the number of occurrences of $$$t$$$ in $$$s$$$ as a subsequence.Recall that a subsequence is a sequence that can be derived from the given sequence by deleting zero or more elements without changing the order of the remaining elements.", "input_spec": "The first line of the input contains two integers $$$n$$$ and $$$k$$$ ($$$2 \\le n \\le 200$$$; $$$0 \\le k \\le n$$$) — the length of $$$s$$$ and the maximum number of moves you can make. The second line of the input contains the string $$$s$$$ consisting of $$$n$$$ lowercase Latin letters. The third line of the input contains the string $$$t$$$ consisting of two lowercase Latin letters.", "output_spec": "Print one integer — the maximum possible number of occurrences of $$$t$$$ in $$$s$$$ as a subsequence if you replace no more than $$$k$$$ characters in $$$s$$$ optimally.", "sample_inputs": ["4 2\nbbaa\nab", "7 3\nasddsaf\nsd", "15 6\nqwertyhgfdsazxc\nqa", "7 2\nabacaba\naa"], "sample_outputs": ["3", "10", "16", "15"], "notes": "NoteIn the first example, you can obtain the string \"abab\" replacing $$$s_1$$$ with 'a' and $$$s_4$$$ with 'b'. Then the answer is $$$3$$$.In the second example, you can obtain the string \"ssddsdd\" and get the answer $$$10$$$.In the fourth example, you can obtain the string \"aaacaaa\" and get the answer $$$15$$$."}, "positive_code": [{"source_code": "let input = '';\nlet inputResolve;\nlet inputPromise = new Promise(resolve => inputResolve = resolve);\nprocess.stdin.on('data', c => input += c);\nprocess.stdin.on('end', () => inputResolve());\n\nfunction For(a, b, fn) {\n let res;\n if (a < b) {\n for (let i = a; i <= b; i++) {\n if ((res = fn(i)) !== undefined) return res;\n }\n } else {\n for (let i = a; i >= b; i--) {\n if ((res = fn(i)) !== undefined) return res;\n }\n }\n}\n\nfunction Arr(a, b, fn, prev) {\n let p = prev || 0;\n if (a < b) return Array(b - a + 1).fill(0).map((v, i) => fn ? (p = fn(a + i, p)) : a + i);\n return Array(a - b + 1).fill(0).map((v, i) => fn ? (p = fn(a - i, p)) : a - i);\n}\n\nObject.defineProperty(Object.prototype, '$k', {\n value: function () { return Object.keys(this) }\n});\nObject.defineProperty(Object.prototype, '$v', {\n value: function () { return Object.values(this) }\n});\nObject.defineProperty(Object.prototype, '$kv', {\n value: function () { return Object.entries(this) }\n});\nArray.prototype.sum = function (fn) { return this.reduce((p, v) => p + (fn ? fn(v) : v), 0) }\nArray.prototype.uniq = function (fn) {\n var set = new Set();\n return this.filter(v => {\n var newValue = !set.has(fn ? fn(v) : v);\n set.add(fn ? fn(v) : v);\n return newValue;\n });\n}\nArray.prototype.toObj = function (fn) {\n return this.map(v => fn(v)).reduce((p, v) => {\n p[v[0]] = v[1];\n return p;\n }, {})\n}\nArray.prototype.min = function (fn) {\n let min = Math.min(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == min : v == min);\n return [this[i], i, min];\n}\nArray.prototype.max = function (fn) {\n let max = Math.max(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == max : v == max);\n return [this[i], i, max];\n}\n\nfunction gcd(a, b) {\n if (!b) return a;\n return gcd(b, a % b);\n}\nfunction mod(a, n, m) {\n if (n == 0n) return 1n;\n if (n % 2n == 0n) return mod(a * a % m, n / 2n, m);\n return a * mod(a, n - 1n, m) % m;\n}\nfunction extendedEuclid(a, b) {\n if (!b) return [1, 0];\n else {\n let [x, y] = extendedEuclid(b, a % b);\n return [y, x - (a / b | 0) * y];\n }\n}\n// [m] = extendedEuclid(a, 998244353);\n\n(async () => {\n await inputPromise;\n let inp = input.split(/\\s+/); r = 0;\n let [n, k, s, t] = inp;\n n = +n;\n k = +k;\n if (t[0] == t[1]) {\n let x = Math.min([...s].filter(c => c == t[0]).length + k, n);\n console.log(x * (x - 1) / 2);\n return;\n }\n let f = Arr(0, n + 1, i => Arr(0, n + 1, i => Arr(0, n + 1, i => -1e5)));\n f[0][0][0] = 0;\n For(0, n, i => {\n For(0, k, j => {\n For(0, i, cnt0 => {\n if (f[i][j][cnt0] < 0) return;\n let e0 = s[i] == t[0];\n let e1 = s[i] == t[1];\n f[i + 1][j][cnt0 + e0] = Math.max(f[i + 1][j][cnt0 + e0], f[i][j][cnt0] + e1 * cnt0);\n f[i + 1][j + 1][cnt0 + 1] = Math.max(f[i + 1][j + 1][cnt0 + 1], f[i][j][cnt0]);\n f[i + 1][j + 1][cnt0] = Math.max(f[i + 1][j][cnt0], f[i][j][cnt0] + cnt0);\n })\n })\n })\n // console.log(f);\n console.log(Arr(0, k, i => Arr(0, n, j => f[n][i][j]).max()[0]).max()[0]);\n})();"}], "negative_code": [{"source_code": "let input = '';\nlet inputResolve;\nlet inputPromise = new Promise(resolve => inputResolve = resolve);\nprocess.stdin.on('data', c => input += c);\nprocess.stdin.on('end', () => inputResolve());\n\nfunction For(a, b, fn) {\n let res;\n if (a < b) {\n for (let i = a; i <= b; i++) {\n if ((res = fn(i)) !== undefined) return res;\n }\n } else {\n for (let i = a; i >= b; i--) {\n if ((res = fn(i)) !== undefined) return res;\n }\n }\n}\n\nfunction Arr(a, b, fn, prev) {\n let p = prev || 0;\n if (a < b) return Array(b - a + 1).fill(0).map((v, i) => fn ? (p = fn(a + i, p)) : a + i);\n return Array(a - b + 1).fill(0).map((v, i) => fn ? (p = fn(a - i, p)) : a - i);\n}\n\nObject.defineProperty(Object.prototype, '$k', {\n value: function () { return Object.keys(this) }\n});\nObject.defineProperty(Object.prototype, '$v', {\n value: function () { return Object.values(this) }\n});\nObject.defineProperty(Object.prototype, '$kv', {\n value: function () { return Object.entries(this) }\n});\nArray.prototype.sum = function (fn) { return this.reduce((p, v) => p + (fn ? fn(v) : v), 0) }\nArray.prototype.uniq = function (fn) {\n var set = new Set();\n return this.filter(v => {\n var newValue = !set.has(fn ? fn(v) : v);\n set.add(fn ? fn(v) : v);\n return newValue;\n });\n}\nArray.prototype.toObj = function (fn) {\n return this.map(v => fn(v)).reduce((p, v) => {\n p[v[0]] = v[1];\n return p;\n }, {})\n}\nArray.prototype.min = function (fn) {\n let min = Math.min(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == min : v == min);\n return [this[i], i, min];\n}\nArray.prototype.max = function (fn) {\n let max = Math.max(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == max : v == max);\n return [this[i], i, max];\n}\n\nfunction gcd(a, b) {\n if (!b) return a;\n return gcd(b, a % b);\n}\nfunction mod(a, n, m) {\n if (n == 0n) return 1n;\n if (n % 2n == 0n) return mod(a * a % m, n / 2n, m);\n return a * mod(a, n - 1n, m) % m;\n}\nfunction extendedEuclid(a, b) {\n if (!b) return [1, 0];\n else {\n let [x, y] = extendedEuclid(b, a % b);\n return [y, x - (a / b | 0) * y];\n }\n}\n// [m] = extendedEuclid(a, 998244353);\n\n(async () => {\n await inputPromise;\n let inp = input.split(/\\s+/); r = 0;\n let [n, k, s, t] = inp;\n n = +n;\n k = +k;\n let f = [];\n let c = (i, j, z) => {\n let x = ((f[i] || [])[j] || [])[z]\n return x === undefined ? -1e5 : x;\n }\n let f0 = Arr(0, n, (i, p) => i ? p + (s[i - 1] == t[0]) : 0);\n if (t[0] == t[1]) {\n let m = Math.min(f0[n] + k, n);\n console.log(m * (m - 1) / 2)\n return;\n }\n if (k == 0) {\n let res = 0;\n for (let i = 0; i < n - 1; i++) {\n for (let j = i + 1; j < n; j++) {\n if (s[i] == t[0] && s[j] == t[1]) res++;\n }\n }\n console.log(res);\n return;\n }\n for (let i = 2; i <= n; i++) {\n f[i] = Array(n + 1);\n for (let j = 0; j <= k; j++) {\n f[i][j] = Array(n + 1);\n for (let z = 1; z <= i; z++) {\n if (i == 2) {\n if (z == 1) {\n let dif = (s[0] != t[0]) + (s[1] != t[1]);\n if (j >= dif) f[i][j][z] = 1;\n else {\n let same = (s[0] == t[0]) + (s[1] == t[0]);\n if (same == 1 || j > 0) f[i][j][z] = 0;\n }\n } else {\n let same = (s[0] == t[0]) + (s[1] == t[0]);\n if (j >= 2 - same) f[i][j][z] = 0;\n }\n // console.log(i, j, z, c(i, j, z));\n continue;\n }\n // if (j == 0) {\n // if (s[i - 1] == t[1]) {\n // if (z == f0[i]) f[i][j][z] = 1;\n // } else {\n // f[i][j][z] = c(i - 1, j, z - (s[i - 1] == t[0]));\n // }\n // console.log(i, j, z, c(i, j, z));\n // continue;\n // }\n if (s[i - 1] == t[1]) {\n f[i][j][z] = Math.max(c(i, j - 1, z), c(i - 1, j, z) + z);\n } else if (s[i - 1] != t[0]) {\n f[i][j][z] = Math.max(c(i - 1, j, z), c(i, j - 1, z), c(i - 1, j - 1, z) + z, c(i - 1, j - 1, z - 1))\n } else {\n f[i][j][z] = Math.max(c(i - 1, j, z - 1), c(i, j - 1, z), c(i - 1, j - 1, z) + z)\n }\n // console.log(i, j, z, f[i][j][z]);\n }\n }\n }\n console.log(Math.max(...f[n][k].filter(v => v)));\n})();"}, {"source_code": "let input = '';\nlet inputResolve;\nlet inputPromise = new Promise(resolve => inputResolve = resolve);\nprocess.stdin.on('data', c => input += c);\nprocess.stdin.on('end', () => inputResolve());\n\nfunction For(a, b, fn) {\n let res;\n if (a < b) {\n for (let i = a; i <= b; i++) {\n if ((res = fn(i)) !== undefined) return res;\n }\n } else {\n for (let i = a; i >= b; i--) {\n if ((res = fn(i)) !== undefined) return res;\n }\n }\n}\n\nfunction Arr(a, b, fn, prev) {\n let p = prev || 0;\n if (a < b) return Array(b - a + 1).fill(0).map((v, i) => fn ? (p = fn(a + i, p)) : a + i);\n return Array(a - b + 1).fill(0).map((v, i) => fn ? (p = fn(a - i, p)) : a - i);\n}\n\nObject.defineProperty(Object.prototype, '$k', {\n value: function () { return Object.keys(this) }\n});\nObject.defineProperty(Object.prototype, '$v', {\n value: function () { return Object.values(this) }\n});\nObject.defineProperty(Object.prototype, '$kv', {\n value: function () { return Object.entries(this) }\n});\nArray.prototype.sum = function (fn) { return this.reduce((p, v) => p + (fn ? fn(v) : v), 0) }\nArray.prototype.uniq = function (fn) {\n var set = new Set();\n return this.filter(v => {\n var newValue = !set.has(fn ? fn(v) : v);\n set.add(fn ? fn(v) : v);\n return newValue;\n });\n}\nArray.prototype.toObj = function (fn) {\n return this.map(v => fn(v)).reduce((p, v) => {\n p[v[0]] = v[1];\n return p;\n }, {})\n}\nArray.prototype.min = function (fn) {\n let min = Math.min(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == min : v == min);\n return [this[i], i, min];\n}\nArray.prototype.max = function (fn) {\n let max = Math.max(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == max : v == max);\n return [this[i], i, max];\n}\n\nfunction gcd(a, b) {\n if (!b) return a;\n return gcd(b, a % b);\n}\nfunction mod(a, n, m) {\n if (n == 0n) return 1n;\n if (n % 2n == 0n) return mod(a * a % m, n / 2n, m);\n return a * mod(a, n - 1n, m) % m;\n}\nfunction extendedEuclid(a, b) {\n if (!b) return [1, 0];\n else {\n let [x, y] = extendedEuclid(b, a % b);\n return [y, x - (a / b | 0) * y];\n }\n}\n// [m] = extendedEuclid(a, 998244353);\n\n(async () => {\n await inputPromise;\n let inp = input.split(/\\s+/); r = 0;\n let [n, k, s, t] = inp;\n n = +n;\n k = +k;\n let f = [];\n let c = (i, j, z) => {\n let x = ((f[i] || [])[j] || [])[z]\n return x === undefined ? -1e5 : x;\n }\n let f0 = Arr(0, n, (i, p) => i ? p + (s[i - 1] == t[0]) : 0);\n if (t[0] == t[1]) {\n let m = Math.min(f0[n] + k, n);\n console.log(m * (m - 1) / 2)\n return;\n }\n for (let i = 2; i <= n; i++) {\n f[i] = Array(n + 1);\n for (let j = 0; j <= k; j++) {\n f[i][j] = Array(n + 1);\n for (let z = 1; z <= i; z++) {\n if (i == 2) {\n if (z == 1) {\n let dif = (s[0] != t[0]) + (s[1] != t[1]);\n if (j >= dif) f[i][j][z] = 1;\n else {\n let same = (s[0] == t[0]) + (s[1] == t[0]);\n if (same == 1 || j > 0) f[i][j][z] = 0;\n }\n } else {\n let same = (s[0] == t[0]) + (s[1] == t[0]);\n if (j >= 2 - same) f[i][j][z] = 0;\n }\n // console.log(i, j, z, c(i, j, z));\n continue;\n }\n // if (j == 0) {\n // if (s[i - 1] == t[1]) {\n // if (z == f0[i]) f[i][j][z] = 1;\n // } else {\n // f[i][j][z] = c(i - 1, j, z - (s[i - 1] == t[0]));\n // }\n // console.log(i, j, z, c(i, j, z));\n // continue;\n // }\n if (s[i - 1] == t[1]) {\n f[i][j][z] = Math.max(c(i, j - 1, z), c(i - 1, j, z) + z);\n } else if (s[i - 1] != t[0]) {\n f[i][j][z] = Math.max(c(i - 1, j, z), c(i, j - 1, z), c(i - 1, j - 1, z) + z, c(i - 1, j - 1, z - 1))\n } else {\n f[i][j][z] = Math.max(c(i - 1, j, z - 1), c(i, j - 1, z), c(i - 1, j - 1, z) + z)\n }\n // console.log(i, j, z, f[i][j][z]);\n }\n }\n }\n console.log(Math.max(...f[n][k].filter(v => v)));\n})();"}, {"source_code": "let input = '';\nlet inputResolve;\nlet inputPromise = new Promise(resolve => inputResolve = resolve);\nprocess.stdin.on('data', c => input += c);\nprocess.stdin.on('end', () => inputResolve());\n\nfunction For(a, b, fn) {\n let res;\n if (a < b) {\n for (let i = a; i <= b; i++) {\n if ((res = fn(i)) !== undefined) return res;\n }\n } else {\n for (let i = a; i >= b; i--) {\n if ((res = fn(i)) !== undefined) return res;\n }\n }\n}\n\nfunction Arr(a, b, fn, prev) {\n let p = prev || 0;\n if (a < b) return Array(b - a + 1).fill(0).map((v, i) => fn ? (p = fn(a + i, p)) : a + i);\n return Array(a - b + 1).fill(0).map((v, i) => fn ? (p = fn(a - i, p)) : a - i);\n}\n\nObject.defineProperty(Object.prototype, '$k', {\n value: function () { return Object.keys(this) }\n});\nObject.defineProperty(Object.prototype, '$v', {\n value: function () { return Object.values(this) }\n});\nObject.defineProperty(Object.prototype, '$kv', {\n value: function () { return Object.entries(this) }\n});\nArray.prototype.sum = function (fn) { return this.reduce((p, v) => p + (fn ? fn(v) : v), 0) }\nArray.prototype.uniq = function (fn) {\n var set = new Set();\n return this.filter(v => {\n var newValue = !set.has(fn ? fn(v) : v);\n set.add(fn ? fn(v) : v);\n return newValue;\n });\n}\nArray.prototype.toObj = function (fn) {\n return this.map(v => fn(v)).reduce((p, v) => {\n p[v[0]] = v[1];\n return p;\n }, {})\n}\nArray.prototype.min = function (fn) {\n let min = Math.min(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == min : v == min);\n return [this[i], i, min];\n}\nArray.prototype.max = function (fn) {\n let max = Math.max(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == max : v == max);\n return [this[i], i, max];\n}\n\nfunction gcd(a, b) {\n if (!b) return a;\n return gcd(b, a % b);\n}\nfunction mod(a, n, m) {\n if (n == 0n) return 1n;\n if (n % 2n == 0n) return mod(a * a % m, n / 2n, m);\n return a * mod(a, n - 1n, m) % m;\n}\nfunction extendedEuclid(a, b) {\n if (!b) return [1, 0];\n else {\n let [x, y] = extendedEuclid(b, a % b);\n return [y, x - (a / b | 0) * y];\n }\n}\n// [m] = extendedEuclid(a, 998244353);\n\n(async () => {\n await inputPromise;\n let inp = input.split(/\\s+/); r = 0;\n let [n, k, s, t] = inp;\n n = +n;\n k = +k;\n let count = s => Arr(0, n - 2, i => Arr(i + 1, n - 1, j => s[i] == t[0] && s[j] == t[1]).sum()).sum();\n let max = count(s);\n For(0, k, i => {\n let s0 = [...s];\n let remain = i;\n For(0, n - 1, j => {\n if (remain <= 0) return 1;\n if (s0[j] != t[0]) {\n s0[j] = t[0];\n remain--;\n }\n });\n remain = k - i;\n For(n -1, 0, j => {\n if (remain <= 0) return 1;\n if (s0[j] != t[1]) {\n s0[j] = t[1];\n remain--;\n }\n })\n max = Math.max(max, count(s0));\n });\n console.log(max);\n})();"}, {"source_code": "let input = '';\nlet inputResolve;\nlet inputPromise = new Promise(resolve => inputResolve = resolve);\nprocess.stdin.on('data', c => input += c);\nprocess.stdin.on('end', () => inputResolve());\n\nfunction For(a, b, fn) {\n let res;\n if (a < b) {\n for (let i = a; i <= b; i++) {\n if ((res = fn(i)) !== undefined) return res;\n }\n } else {\n for (let i = a; i >= b; i--) {\n if ((res = fn(i)) !== undefined) return res;\n }\n }\n}\n\nfunction Arr(a, b, fn, prev) {\n let p = prev || 0;\n if (a < b) return Array(b - a + 1).fill(0).map((v, i) => fn ? (p = fn(a + i, p)) : a + i);\n return Array(a - b + 1).fill(0).map((v, i) => fn ? (p = fn(a - i, p)) : a - i);\n}\n\nObject.defineProperty(Object.prototype, '$k', {\n value: function () { return Object.keys(this) }\n});\nObject.defineProperty(Object.prototype, '$v', {\n value: function () { return Object.values(this) }\n});\nObject.defineProperty(Object.prototype, '$kv', {\n value: function () { return Object.entries(this) }\n});\nArray.prototype.sum = function (fn) { return this.reduce((p, v) => p + (fn ? fn(v) : v), 0) }\nArray.prototype.uniq = function (fn) {\n var set = new Set();\n return this.filter(v => {\n var newValue = !set.has(fn ? fn(v) : v);\n set.add(fn ? fn(v) : v);\n return newValue;\n });\n}\nArray.prototype.toObj = function (fn) {\n return this.map(v => fn(v)).reduce((p, v) => {\n p[v[0]] = v[1];\n return p;\n }, {})\n}\nArray.prototype.min = function (fn) {\n let min = Math.min(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == min : v == min);\n return [this[i], i, min];\n}\nArray.prototype.max = function (fn) {\n let max = Math.max(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == max : v == max);\n return [this[i], i, max];\n}\n\nfunction gcd(a, b) {\n if (!b) return a;\n return gcd(b, a % b);\n}\nfunction mod(a, n, m) {\n if (n == 0n) return 1n;\n if (n % 2n == 0n) return mod(a * a % m, n / 2n, m);\n return a * mod(a, n - 1n, m) % m;\n}\nfunction extendedEuclid(a, b) {\n if (!b) return [1, 0];\n else {\n let [x, y] = extendedEuclid(b, a % b);\n return [y, x - (a / b | 0) * y];\n }\n}\n// [m] = extendedEuclid(a, 998244353);\n\n(async () => {\n await inputPromise;\n let inp = input.split(/\\s+/); r = 0;\n let [n, k, s, t] = inp;\n n = +n;\n k = +k;\n if (t[0] == t[1]) {\n let x = Math.min([...s].filter(c => c == t[0]).length + k, n);\n console.log(x * (x - 1) / 2);\n return;\n }\n let t0 = Arr(0, n - 1, (i, p) => p + (s[i] == t[0]));\n let t1 = Arr(0, n - 1, (i, p) => p + (s[n - 1 - i] == t[1])).reverse();\n let max = Arr(0, n - 2, i => s[i] == t[0] ? t1[i + 1] : 0).sum();\n\n For(0, Math.min(k, n - t0[n - 1] - t1[0]), i => {\n let ss = [...s];\n let remain = i;\n For(0, n - 1, i => {\n if (remain <= 0) return 0;\n if (ss[i] != t[0] && ss[i] != t[1]) { ss[i] = t[0]; remain-- }\n })\n For(0, Math.min(k - i, t1[0]), j => {\n let s0 = [...ss];\n let remain = j;\n For(0, n - 1, i => {\n if (remain <= 0) return 0;\n if (s0[i] == t[1]) { s0[i] = t[0]; remain-- }\n })\n\n if (k < 50) {\n For(0, Math.min(k - i - j, n - t0[n - 1] - t1[0]), z => {\n let s1 = [...s0];\n let remain = z;\n For(n - 1, 0, i => {\n if (remain <= 0) return 0;\n if (s1[i] != t[1] && s1[i] != t[0]) { s1[i] = t[1]; remain-- }\n });\n remain = k - i - j - z;\n For(n - 1, 0, i => {\n if (remain <= 0) return 0;\n if (s1[i] == t[0]) { s1[i] = t[1]; remain-- }\n });\n let tt = Arr(0, n - 1, (i, p) => p + (s1[i] == t[0]));\n max = Math.max(max, Arr(1, n - 1, i => s1[i] == t[1] ? tt[i - 1] : 0).sum())\n });\n return;\n }\n\n // console.log(i, j, s0.join(''));\n remain = k - i - j;\n let t00 = Arr(0, n - 1, (i, p) => p + (s0[i] == t[0]));\n let j1 = n - 1;\n let j2 = n - 1;\n let sum2 = 0;\n while (remain > 0 && (j1 >= 0 || j2 >= 0)) {\n while (j1 >= 0 && (s0[j1] == t[0] || s0[j1] == t[1])) j1--;\n while (j2 >= 0 && s0[j2] != t[0]) {\n if (s0[j2] == t[1]) sum2++;\n j2--;\n }\n if ((t00[j1 - 1] || 0) > (t00[j2 - 1] || 0) - sum2) {\n s0[j1--] = t[1];\n remain--;\n } else if ((t00[j2 - 1] || 0) - sum2 >= 0) {\n s0[j2--] = t[1];\n sum2++;\n remain--;\n } else break;\n }\n t00 = Arr(0, n - 1, (i, p) => p + (s0[i] == t[0]));\n // console.log(i, j, k - i - j, s0.join(''), Arr(1, n - 1, i => s0[i] == t[1] ? t00[i - 1] : 0).sum());\n max = Math.max(max, Arr(1, n - 1, i => s0[i] == t[1] ? t00[i - 1] : 0).sum())\n })\n })\n console.log(max);\n})();"}, {"source_code": "let input = '';\nlet inputResolve;\nlet inputPromise = new Promise(resolve => inputResolve = resolve);\nprocess.stdin.on('data', c => input += c);\nprocess.stdin.on('end', () => inputResolve());\n\nfunction For(a, b, fn) {\n let res;\n if (a < b) {\n for (let i = a; i <= b; i++) {\n if ((res = fn(i)) !== undefined) return res;\n }\n } else {\n for (let i = a; i >= b; i--) {\n if ((res = fn(i)) !== undefined) return res;\n }\n }\n}\n\nfunction Arr(a, b, fn, prev) {\n let p = prev || 0;\n if (a < b) return Array(b - a + 1).fill(0).map((v, i) => fn ? (p = fn(a + i, p)) : a + i);\n return Array(a - b + 1).fill(0).map((v, i) => fn ? (p = fn(a - i, p)) : a - i);\n}\n\nObject.defineProperty(Object.prototype, '$k', {\n value: function () { return Object.keys(this) }\n});\nObject.defineProperty(Object.prototype, '$v', {\n value: function () { return Object.values(this) }\n});\nObject.defineProperty(Object.prototype, '$kv', {\n value: function () { return Object.entries(this) }\n});\nArray.prototype.sum = function (fn) { return this.reduce((p, v) => p + (fn ? fn(v) : v), 0) }\nArray.prototype.uniq = function (fn) {\n var set = new Set();\n return this.filter(v => {\n var newValue = !set.has(fn ? fn(v) : v);\n set.add(fn ? fn(v) : v);\n return newValue;\n });\n}\nArray.prototype.toObj = function (fn) {\n return this.map(v => fn(v)).reduce((p, v) => {\n p[v[0]] = v[1];\n return p;\n }, {})\n}\nArray.prototype.min = function (fn) {\n let min = Math.min(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == min : v == min);\n return [this[i], i, min];\n}\nArray.prototype.max = function (fn) {\n let max = Math.max(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == max : v == max);\n return [this[i], i, max];\n}\n\nfunction gcd(a, b) {\n if (!b) return a;\n return gcd(b, a % b);\n}\nfunction mod(a, n, m) {\n if (n == 0n) return 1n;\n if (n % 2n == 0n) return mod(a * a % m, n / 2n, m);\n return a * mod(a, n - 1n, m) % m;\n}\nfunction extendedEuclid(a, b) {\n if (!b) return [1, 0];\n else {\n let [x, y] = extendedEuclid(b, a % b);\n return [y, x - (a / b | 0) * y];\n }\n}\n// [m] = extendedEuclid(a, 998244353);\n\n(async () => {\n await inputPromise;\n let inp = input.split(/\\s+/); r = 0;\n let [n, k, s, t] = inp;\n n = +n;\n k = +k;\n if (t[0] == t[1]) {\n let x = Math.min([...s].filter(c => c == t[0]).length + k, n);\n console.log(x * (x - 1) / 2);\n return;\n }\n let t0 = Arr(0, n - 1, (i, p) => p + (s[i] == t[0]));\n let t1 = Arr(0, n - 1, (i, p) => p + (s[n - 1 - i] == t[1])).reverse();\n let max = Arr(0, n - 2, i => s[i] == t[0] ? t1[i + 1] : 0).sum();\n\n For(0, Math.min(k, n - t0[n - 1] - t1[0]), i => {\n let ss = [...s];\n let remain = i;\n For(0, n - 1, i => {\n if (remain <= 0) return 0;\n if (ss[i] != t[0] && ss[i] != t[1]) { ss[i] = t[0]; remain-- }\n })\n For(0, Math.min(k - i, t1[0]), j => {\n let s0 = [...ss];\n let remain = j;\n For(0, n - 1, i => {\n if (remain <= 0) return 0;\n if (s0[i] == t[1]) { s0[i] = t[0]; remain-- }\n })\n\n if (k < 50) {\n For(0, Math.min(k - i - j, n - t0[n - 1] - t1[0]), z => {\n let s1 = [...s0];\n let remain = z;\n For(n - 1, 0, i => {\n if (remain <= 0) return 0;\n if (s1[i] != t[1] && s1[i] != t[0]) { s1[i] = t[1]; remain-- }\n });\n remain = k - i - j - z;\n For(n - 1, 0, i => {\n if (remain <= 0) return 0;\n if (s1[i] == t[0]) { s1[i] = t[1]; remain-- }\n });\n let tt = Arr(0, n - 1, (i, p) => p + (s1[i] == t[0]));\n max = Math.max(max, Arr(1, n - 1, i => s1[i] == t[1] ? tt[i - 1] : 0).sum())\n });\n return 0;\n }\n\n // console.log(i, j, s0.join(''));\n remain = k - i - j;\n let t00 = Arr(0, n - 1, (i, p) => p + (s0[i] == t[0]));\n let j1 = n - 1;\n let j2 = n - 1;\n let sum2 = 0;\n while (remain > 0 && (j1 >= 0 || j2 >= 0)) {\n while (j1 >= 0 && (s0[j1] == t[0] || s0[j1] == t[1])) j1--;\n while (j2 >= 0 && s0[j2] != t[0]) {\n if (s0[j2] == t[1]) sum2++;\n j2--;\n }\n if ((t00[j1 - 1] || 0) > (t00[j2 - 1] || 0) - sum2) {\n s0[j1--] = t[1];\n remain--;\n } else if ((t00[j2 - 1] || 0) - sum2 >= 0) {\n s0[j2--] = t[1];\n sum2++;\n remain--;\n } else break;\n }\n t00 = Arr(0, n - 1, (i, p) => p + (s0[i] == t[0]));\n // console.log(i, j, k - i - j, s0.join(''), Arr(1, n - 1, i => s0[i] == t[1] ? t00[i - 1] : 0).sum());\n max = Math.max(max, Arr(1, n - 1, i => s0[i] == t[1] ? t00[i - 1] : 0).sum())\n })\n })\n console.log(max);\n})();"}, {"source_code": "let input = '';\nlet inputResolve;\nlet inputPromise = new Promise(resolve => inputResolve = resolve);\nprocess.stdin.on('data', c => input += c);\nprocess.stdin.on('end', () => inputResolve());\n\nfunction For(a, b, fn) {\n let res;\n if (a < b) {\n for (let i = a; i <= b; i++) {\n if ((res = fn(i)) !== undefined) return res;\n }\n } else {\n for (let i = a; i >= b; i--) {\n if ((res = fn(i)) !== undefined) return res;\n }\n }\n}\n\nfunction Arr(a, b, fn, prev) {\n let p = prev || 0;\n if (a < b) return Array(b - a + 1).fill(0).map((v, i) => fn ? (p = fn(a + i, p)) : a + i);\n return Array(a - b + 1).fill(0).map((v, i) => fn ? (p = fn(a - i, p)) : a - i);\n}\n\nObject.defineProperty(Object.prototype, '$k', {\n value: function () { return Object.keys(this) }\n});\nObject.defineProperty(Object.prototype, '$v', {\n value: function () { return Object.values(this) }\n});\nObject.defineProperty(Object.prototype, '$kv', {\n value: function () { return Object.entries(this) }\n});\nArray.prototype.sum = function (fn) { return this.reduce((p, v) => p + (fn ? fn(v) : v), 0) }\nArray.prototype.uniq = function (fn) {\n var set = new Set();\n return this.filter(v => {\n var newValue = !set.has(fn ? fn(v) : v);\n set.add(fn ? fn(v) : v);\n return newValue;\n });\n}\nArray.prototype.toObj = function (fn) {\n return this.map(v => fn(v)).reduce((p, v) => {\n p[v[0]] = v[1];\n return p;\n }, {})\n}\nArray.prototype.min = function (fn) {\n let min = Math.min(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == min : v == min);\n return [this[i], i, min];\n}\nArray.prototype.max = function (fn) {\n let max = Math.max(...this.map((v, i) => fn ? fn(v, i) : v));\n let i = this.findIndex((v, i) => fn ? fn(v, i) == max : v == max);\n return [this[i], i, max];\n}\n\nfunction gcd(a, b) {\n if (!b) return a;\n return gcd(b, a % b);\n}\nfunction mod(a, n, m) {\n if (n == 0n) return 1n;\n if (n % 2n == 0n) return mod(a * a % m, n / 2n, m);\n return a * mod(a, n - 1n, m) % m;\n}\nfunction extendedEuclid(a, b) {\n if (!b) return [1, 0];\n else {\n let [x, y] = extendedEuclid(b, a % b);\n return [y, x - (a / b | 0) * y];\n }\n}\n// [m] = extendedEuclid(a, 998244353);\n\n(async () => {\n await inputPromise;\n let inp = input.split(/\\s+/); r = 0;\n let [n, k, s, t] = inp;\n n = +n;\n k = +k;\n if (t[0] == t[1]) {\n let x = Math.min([...s].filter(c => c == t[0]).length + k, n);\n console.log(x * (x - 1) / 2);\n return;\n }\n let t0 = Arr(0, n - 1, (i, p) => p + (s[i] == t[0]));\n let t1 = Arr(0, n - 1, (i, p) => p + (s[n - 1 - i] == t[1])).reverse();\n let max = Arr(0, n - 2, i => s[i] == t[0] ? t1[i + 1] : 0).sum();\n\n For(0, Math.min(k, n - t0[n - 1] - t1[0]), i => {\n let ss = [...s];\n let remain = i;\n For(0, n - 1, i => {\n if (remain <= 0) return 0;\n if (ss[i] != t[0] && ss[i] != t[1]) { ss[i] = t[0]; remain-- }\n })\n For(0, Math.min(k - i, t1[0]), j => {\n let s0 = [...ss];\n let remain = j;\n For(0, n - 1, i => {\n if (remain <= 0) return 0;\n if (s0[i] == t[1]) { s0[i] = t[0]; remain-- }\n })\n // console.log(i, j, s0.join(''));\n remain = k - i - j;\n let t00 = Arr(0, n - 1, (i, p) => p + (s0[i] == t[0]));\n let j1 = n - 1;\n let j2 = n - 1;\n let sum2 = 0;\n while (remain > 0 && (j1 >= 0 || j2 >= 0)) {\n while (j1 >= 0 && (s0[j1] == t[0] || s0[j1] == t[1])) j1--;\n while (j2 >= 0 && s0[j2] != t[0]) {\n if (s0[j2] == t[1]) sum2++;\n j2--;\n }\n if ((t00[j1 - 1] || 0) > (t00[j2 - 1] || 0) - sum2) {\n s0[j1--] = t[1];\n remain--;\n } else if ((t00[j2 - 1] || 0) - sum2 >= 0) {\n s0[j2--] = t[1];\n sum2++;\n remain--;\n } else break;\n }\n t00 = Arr(0, n - 1, (i, p) => p + (s0[i] == t[0]));\n // console.log(i, j, k - i - j, s0.join(''), Arr(1, n - 1, i => s0[i] == t[1] ? t00[i - 1] : 0).sum());\n max = Math.max(max, Arr(1, n - 1, i => s0[i] == t[1] ? t00[i - 1] : 0).sum())\n })\n })\n console.log(max);\n})();"}], "src_uid": "9c700390ac13942cbde7c3428965b18a"} {"nl": {"description": "Pasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive integer length and the sum of these lengths will obviously be n. Pasha likes rectangles but hates squares, so he wonders, how many ways are there to split a stick into four parts so that it's possible to form a rectangle using these parts, but is impossible to form a square.Your task is to help Pasha and count the number of such ways. Two ways to cut the stick are considered distinct if there exists some integer x, such that the number of parts of length x in the first way differ from the number of parts of length x in the second way.", "input_spec": "The first line of the input contains a positive integer n (1 ≤ n ≤ 2·109) — the length of Pasha's stick.", "output_spec": "The output should contain a single integer — the number of ways to split Pasha's stick into four parts of positive integer length so that it's possible to make a rectangle by connecting the ends of these parts, but is impossible to form a square. ", "sample_inputs": ["6", "20"], "sample_outputs": ["1", "4"], "notes": "NoteThere is only one way to divide the stick in the first sample {1, 1, 2, 2}.Four ways to divide the stick in the second sample are {1, 1, 9, 9}, {2, 2, 8, 8}, {3, 3, 7, 7} and {4, 4, 6, 6}. Note that {5, 5, 5, 5} doesn't work."}, "positive_code": [{"source_code": "var n = +readline();\n\nif(n%2 == 1){\n write(0);\n}else{\n n = n/2;\n if(n%2 == 1){\n write(Math.floor(n/2));\n }else{\n write(n/2 - 1);\n }\n}\n"}, {"source_code": "function main(n){\n\n if(n % 2 !== 0){\n print(0);\n return;\n }\n else if(n % 4 !== 0){\n print(Math.floor(n/4));\n }\n else{\n print((n/4) - 1);\n }\n}\n\n\nvar n = parseInt(readline());\n\n// var arr = readline().split(' ');\n// for(var i = 0 ; i < arr.length ; i++)arr[i] = parseInt(arr[i]);\n\n\nmain(n);\n"}, {"source_code": "var n=~~readline();\nvar count=0;\nif(n%2!=0) print(\"0\");\nelse{\n var a=n/2;\n print (Math.ceil(a/2)-1);\n}"}, {"source_code": "w = ~~readline()\n c= 0\nif(w%2==0) {\nw /= 2\nc =Math.ceil(w/2) -1\n \n}\nprint(c)"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet stickLength;\nlet lines=0;\nrl.on('line', (input,index) => {\n let res=input.split(\" \");\n\n stickLength=Number(res[0]);\n\n lines++;\n}).on('close', () => {\n getRectangleStick(stickLength);\n});\n\n\n\nfunction getRectangleStick(stickLength) {\n if(stickLength<=2000000000 && stickLength%2 === 0){\n if(stickLength%4===0){\n console.log(Math.trunc((stickLength-1)/4));\n }else{\n console.log(Math.trunc(stickLength/4));\n }\n }else{\n console.log(0);\n }\n}"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet stickLength;\nlet lines=0;\nrl.on('line', (input,index) => {\n let res=input.split(\" \");\n\n stickLength=Number(res[0]);\n\n lines++;\n}).on('close', () => {\n getRectangleStick(stickLength);\n});\n\n\n\nfunction getRectangleStick(stickLength) {\n if(stickLength<=2000000000 && stickLength%2 === 0){\n if(stickLength%4===0){\n console.log(Math.trunc((stickLength-1)/4));\n }else{\n console.log(Math.trunc(stickLength/4));\n }\n }else{\n console.log(0);\n }\n}"}], "negative_code": [{"source_code": "var n = +readline();\nif(n%2 == 1) write(0);\n\nn = n/2;\nif(n%2 == 1){\n write(Math.floor(n/2));\n}else{\n write(n/2 - 1);\n}"}, {"source_code": "function main(n){\n\n if(n % 2 !== 0){\n print(-1);\n return;\n }\n else if(n % 4 !== 0){\n print(Math.floor(n/2));\n }\n else{\n print((n/2) - 1);\n }\n}\n\n\nvar n = parseInt(readline());\n\n// var arr = readline().split(' ');\n// for(var i = 0 ; i < arr.length ; i++)arr[i] = parseInt(arr[i]);\n\n\nmain(n);\n"}, {"source_code": "function main(n){\n\n if(n % 2 !== 0){\n print(-1);\n return;\n }\n else if(n % 4 !== 0){\n print(Math.floor(n/4));\n }\n else{\n print((n/4) - 1);\n }\n}\n\n\nvar n = parseInt(readline());\n\n// var arr = readline().split(' ');\n// for(var i = 0 ; i < arr.length ; i++)arr[i] = parseInt(arr[i]);\n\n\nmain(n);\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet stickLength;\nlet lines=0;\nrl.on('line', (input,index) => {\n let res=input.split(\" \");\n\n stickLength=Number(res[0]);\n\n lines++;\n}).on('close', () => {\n getRectangleStick(stickLength);\n});\n\n\n\nfunction getRectangleStick(stickLength) {\n if(stickLength<=2000000000){\n if(stickLength%4===0){\n console.log(Math.trunc((stickLength-1)/4));\n }else{\n console.log(Math.trunc(stickLength/4));\n }\n }else{\n console.log(0);\n }\n}"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet stickLength;\nlet lines=0;\nrl.on('line', (input,index) => {\n let res=input.split(\" \");\n\n stickLength=Number(res[0]);\n\n lines++;\n}).on('close', () => {\n getRectangleStick(stickLength);\n});\n\n\n\nfunction getRectangleStick(stickLength) {\n if(stickLength%4===0){\n console.log(Math.trunc((stickLength-1)/4));\n }else{\n console.log(Math.trunc(stickLength/4));\n }\n}"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet stickLength;\nlet lines=0;\nrl.on('line', (input,index) => {\n let res=input.split(\" \");\n\n stickLength=Number(res[0]);\n\n lines++;\n}).on('close', () => {\n getRectangleStick(stickLength);\n});\n\n\n\nfunction getRectangleStick(stickLength) {\n if(stickLength<1000000){\n if(stickLength%4===0){\n console.log(Math.trunc((stickLength-1)/4));\n }else{\n console.log(Math.trunc(stickLength/4));\n }\n }else{\n console.log(0);\n }\n}"}], "src_uid": "32b59d23f71800bc29da74a3fe2e2b37"} {"nl": {"description": "Two chess pieces, a rook and a knight, stand on a standard chessboard 8 × 8 in size. The positions in which they are situated are known. It is guaranteed that none of them beats the other one.Your task is to find the number of ways to place another knight on the board so that none of the three pieces on the board beat another one. A new piece can only be placed on an empty square.", "input_spec": "The first input line contains the description of the rook's position on the board. This description is a line which is 2 in length. Its first symbol is a lower-case Latin letter from a to h, and its second symbol is a number from 1 to 8. The second line contains the description of the knight's position in a similar way. It is guaranteed that their positions do not coincide.", "output_spec": "Print a single number which is the required number of ways.", "sample_inputs": ["a1\nb2", "a8\nd4"], "sample_outputs": ["44", "38"], "notes": null}, "positive_code": [{"source_code": "'use strict'\n\nlet L = readline()\nL = {x: ltd(L[0]), y: +L[1]}\nlet K = readline()\nK = {x: ltd(K[0]), y: +K[1]}\n\nlet ps = 0\nlet d = []\n\nfor (let x = 1; x <= 8; x++) {\n for (let y = 1; y <= 8; y++) {\n if (!d[x]) d[x] = []\n d[x][y] = is(x, y) ? 1 : 0\n if (is(x, y)) {\n ps++\n }\n }\n}\nprint(ps)\n\nfunction is (x, y) {\n if (x == K.x && y == K.y || x == L.x && y == L.y) return false\n if (x == L.x || y == L.y) return false\n if (x == K.x + 1 && y == K.y + 2\n || x == K.x + 2 && y == K.y - 1\n || x == K.x + 2 && y == K.y + 1\n || x == K.x + 1 && y == K.y - 2\n || x == K.x - 1 && y == K.y - 2\n || x == K.x - 2 && y == K.y - 1\n || x == K.x - 2 && y == K.y + 1\n || x == K.x - 1 && y == K.y + 2\n ) return false\n if (x == L.x + 1 && y == L.y + 2\n || x == L.x + 2 && y == L.y - 1\n || x == L.x + 2 && y == L.y + 1\n || x == L.x + 1 && y == L.y - 2\n || x == L.x - 1 && y == L.y - 2\n || x == L.x - 2 && y == L.y - 1\n || x == L.x - 2 && y == L.y + 1\n || x == L.x - 1 && y == L.y + 2\n ) return false\n return true\n}\n\nfunction ltd (l) {\n switch (l) {\n case 'a': return 1\n case 'b': return 2\n case 'c': return 3\n case 'd': return 4\n case 'e': return 5\n case 'f': return 6\n case 'g': return 7\n case 'h': return 8\n }\n}"}], "negative_code": [{"source_code": "'use strict'\n\nlet L = readline()\nL = {x: ltd(L[0]), y: +L[1]}\nlet K = readline()\nK = {x: ltd(K[0]), y: +K[1]}\n\n\nlet ps = 0\nlet d = []\n\nfor (let x = 1; x <= 8; x++) {\n for (let y = 1; y <= 8; y++) {\n if (!d[x]) d[x] = []\n d[x][y] = is(x, y) ? 1 : 0\n if (is(x, y)) {\n ps++\n }\n }\n}\nprint(ps - 2)\n\nfunction is (x, y) {\n if (x == K.x && y == K.y || x == L.x && y == L.y) return false\n if (x == L.x || y == L.y) return false\n if (x == K.x + 1 && y == K.y + 2\n || x == K.x + 2 && y == K.y - 1\n || x == K.x + 2 && y == K.y + 1\n || x == K.x + 1 && y == K.y - 2\n || x == K.x - 1 && y == K.y - 2\n || x == K.x - 2 && y == K.y - 1\n || x == K.x - 2 && y == K.y + 1\n || x == K.x - 1 && y == K.y + 2\n ) return false\n return true\n}\n\nfunction ltd (l) {\n switch (l) {\n case 'a': return 1\n case 'b': return 2\n case 'c': return 3\n case 'd': return 4\n case 'e': return 5\n case 'f': return 6\n case 'g': return 7\n case 'h': return 8\n }\n}"}], "src_uid": "073023c6b72ce923df2afd6130719cfc"} {"nl": {"description": "There are $$$n$$$ students in a university. The number of students is even. The $$$i$$$-th student has programming skill equal to $$$a_i$$$. The coach wants to form $$$\\frac{n}{2}$$$ teams. Each team should consist of exactly two students, and each student should belong to exactly one team. Two students can form a team only if their skills are equal (otherwise they cannot understand each other and cannot form a team).Students can solve problems to increase their skill. One solved problem increases the skill by one.The coach wants to know the minimum total number of problems students should solve to form exactly $$$\\frac{n}{2}$$$ teams (i.e. each pair of students should form a team). Your task is to find this number.", "input_spec": "The first line of the input contains one integer $$$n$$$ ($$$2 \\le n \\le 100$$$) — the number of students. It is guaranteed that $$$n$$$ is even. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \\dots, a_n$$$ ($$$1 \\le a_i \\le 100$$$), where $$$a_i$$$ is the skill of the $$$i$$$-th student.", "output_spec": "Print one number — the minimum total number of problems students should solve to form exactly $$$\\frac{n}{2}$$$ teams.", "sample_inputs": ["6\n5 10 2 3 14 5", "2\n1 100"], "sample_outputs": ["5", "99"], "notes": "NoteIn the first example the optimal teams will be: $$$(3, 4)$$$, $$$(1, 6)$$$ and $$$(2, 5)$$$, where numbers in brackets are indices of students. Then, to form the first team the third student should solve $$$1$$$ problem, to form the second team nobody needs to solve problems and to form the third team the second student should solve $$$4$$$ problems so the answer is $$$1 + 4 = 5$$$.In the second example the first student should solve $$$99$$$ problems to form a team with the second one."}, "positive_code": [{"source_code": "let stdin = process.stdin;\nstdin.setEncoding('utf8');\nstdin.on('data', function (data) {\n let input = data.split('\\n');\n let n = input[0].split(' ').map(function (a) { return parseInt(a); });\n let k = input[1].split(' ').map(function (a) { return parseInt(a); });\n let result = solution(n, k);\n console.log(result);\n});\n\n// End of interface\n\nconst solution = (n, studentsArray) => {\n\tlet res = 0;\n\tstudentsArray.sort(function(a, b){return a-b});\n\tfor (let i = 0; i {\n if (l == 0) { l++ }\n else {\n rl.close();\n let strArray = input.split(\" \")\n let s = strArray.map(function (item) {\n return parseInt(item, 10);\n });\n s = s.sort(function sortNumber(a, b) {\n return a - b;\n })\n let res = 0;\n for (let i = 0; i < input.length; i += 2) {\n let d = s[i + 1] - s[i]\n if (d > 0) {\n res += d\n }\n }\n console.log(res)\n return 0;\n }\n});\n"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error('\\n');\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr('time : ' + end + 'ms');\n myerr('memory : ' + Math.round(process.memoryUsage().heapTotal / 1024) + 'KB');\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var N = nextInt();\n var list = nextIntArray();\n list.sort(function(a,b){\n \treturn a - b;\n });\n var output = 0;\n for(var i = 0; i < N; i += 2){\n output += list[i + 1] - list[i];\n }\n myout(output);\n}\n"}, {"source_code": "let input ='';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data',(data)=>input+=data)\nprocess.stdin.on('end',()=>{\n let count = 0;\n let tmp = input.split('\\n');\n let arr = tmp[1].split(' ').map((val)=>+val).sort((a,b)=>a-b);\n \n for(let i = 0; i < arr.length; i+=2){\n count+=Math.abs(arr[i]-arr[i+1])\n }\n console.log(count)\n})\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n const arr = d.split(' ').map(Number).sort((a, b) => a - b);\n let ans = 0;\n\n for (let i = 0; i < arr.length; i++) {\n if (i % 2) {\n ans += arr[i];\n }\n else {\n ans -= arr[i];\n }\n }\n\n console.log(Math.abs(ans));\n\n c++;\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n let l=0;\n rl.on('line', (input) => {\n if (l==0) {l++}\n else {\n rl.close(); \n let strArray = input.split(\" \")\n let s = strArray.map(function(item) {\n return parseInt(item, 10);\n });\n s = s.sort(function sortNumber(a,b) {\n return a - b;\n })\n let res=0;\n for(let i=0;i0) {\n res+=d\n }\n }\n console.log(res)\n return 0;\n}\n});\n"}, {"source_code": "let input = [];\n \nconst RL = require('readline').createInterface({\n input : process.stdin,\n output : process.stdout\n});\n\nRL.on('line', (line) => {\n input.push(line);\n});\n\nRL.on('close', () => {\n let n = parseInt(input[0]);\n let num = []; input[1].split(' ').forEach(i => num.push(parseInt(i)));\n num.sort((a, b) => a-b);\n let answer = 0;\n for(let i = 1; i < n; i+=2){\n answer += num[i]-num[i-1];\n }\n console.log(answer);\n});\n\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", (inputStdin) => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .replace(/\\s*$/, \"\")\n .split(\"\\n\")\n .map((str) => str.replace(/\\s*$/, \"\"));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n const nd = readLine().split(\" \");\n const length = parseInt(nd[0], 10);\n const array = readLine()\n .split(\" \")\n .map((aTemp) => parseInt(aTemp, 10));\n\n let count = 0;\n for (let i = 0; i < length - 1; i++) {\n for (let j = 1; j < length; j++) {\n if (array[j - 1] > array[j]) {\n [array[j - 1], array[j]] = [array[j], array[j - 1]];\n }\n }\n }\n for (let g = 0; g < array.length; g += 2) {\n if (array[g + 1] > array[g]) {\n count += array[g + 1] - array[g];\n }\n }\n console.log(count);\n}\n\n// sortTeams(length, students);\n\n// const input = prompt(\"Friends\");\n\n// const meetFriends = () => {\n// let friends = input.split(\" \");\n// let distance = 0;\n\n// for (let i = 1; i < friends.length; i++) {\n// let current = friends[i];\n\n// let index = i;\n\n// while (index >= 0 && current < friends[index - 1]) {\n// friends[index] = friends[index - 1];\n// index--;\n// }\n// friends[index] = current;\n// }\n// distance = friends[2] - friends[0];\n// console.log(distance);\n// };\n\n// meetFriends(input);\n\n// const input1 = parseInt(prompt(\"First length\"))\n// const input2 = prompt(\"First text\")\n// const input3 = parseInt(prompt(\"Second length\"))\n// const input4 = prompt(\"Second text\")\n\n// const chooseTwoNumbers = () => {\n// let first = input2.split(\" \");\n// let second = input4.split(\" \");\n\n// for (let i = 1; i < input1; i++) {\n// let current = first[i];\n\n// let index = i;\n\n// while (index >= 0 && current < first[index - 1]) {\n// first[index] = first[index - 1];\n// index--;\n// }\n// first[index] = current;\n// }\n// for (let i = 1; i < input3; i++) {\n// let current = second[i];\n\n// let index = i;\n\n// while (index >= 0 && current < second[index - 1]) {\n// second[index] = second[index - 1];\n// index--;\n// }\n// second[index] = current;\n// }\n\n// if (\n// first[input1 - 1] >= second[input3 - 1] &&\n// first[0] >= second[input3 - 1]\n// ) {\n// console.log(\"YES\");\n// } else if (first[input1 - 1] <= second[0] && first[0] <= second[0]) {\n// console.log(\"YES\");\n// } else {\n// console.log(\"NO\");\n// }\n// };\n\n// chooseTwoNumbers();\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n\n const input = lines[1];\n const vector = input.split(' ').map(\n n => parseInt(n)\n );\n\n const insertionSort = (vector) => {\n let res = 0;\n\n for (let i = 0; i < vector.length; i++) {\n let minIndex = i;\n\n for (let j = i + 1; j < vector.length; j++) {\n if (vector[j] < vector[minIndex]) {\n minIndex = j;\n }\n }\n\n let temp = vector[i];\n vector[i] = vector[minIndex];\n vector[minIndex] = temp;\n\n if (i !== 0 && i % 2 === 1) {\n res += vector[i] - vector[i -1]\n }\n }\n\n console.log(res);\n };\n\n insertionSort(vector);\n});\n\n//////\n\n\n"}, {"source_code": "var n = +readline(), k = 0;\nvar arr = readline().split(' ').map(a => +a).sort((a,b) => a - b);\nfor(var i = 0; i < n - 1; i+=2) {\n k += arr[i + 1] - arr[i];\n}\nprint(k);"}, {"source_code": "var n = readline(),\n a = readline().split(' ').map(v => +v);\na.sort((a,b) => a - b);\nvar s = 0;\nwhile(n) {\n var m = 100,\n mi = 1;\n for(var i = 1; i < n; i++) {\n var lm = Math.abs(a[0] - a[i]);\n if(lm < m) {\n m = lm;\n mi = i;\n }\n }\n s += m;\n a.splice(mi, 1);\n a.splice(0, 1);\n n -= 2;\n}\nwrite(s);"}, {"source_code": "var n = readline();\nvar ni = readline().split(' ');\nvar output = 0;\n\nfor(var i=0; i b) return 1;\n if (a < b) return -1;\n}\n\nfor(var i=0; i { return a - b })\n//print(n)\n//print(n[0]+' '+n[1])\nvar a = 0, b = 0\nfor(var i=0; i (a - b))\n\nvar a = 0, b = 0\nfor(var i=0; iinput+=data)\nprocess.stdin.on('end',()=>{\n let count = 0;\n let tmp = input.split('\\n');\n let arr = tmp[1].split(' ').map((val)=>+val).sort();\n \n for(let i = 0; i < arr.length; i+=2){\n count+=Math.abs(arr[i]-arr[i+1])\n }\n console.log(count)\n})\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n let l=0;\n rl.on('line', (input) => {\n if (l==0) {l++}\n else {\n rl.close(); \n let s = input.split(\" \")\n s.sort()\n let res=0;\n for(let i=0;i0) {\n res+=d\n }\n }\n console.log(res)\n return 0;\n}\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n\n const input = lines[1];\n const vector = input.split(' ').map(\n n => parseInt(n)\n );\n\n const insertionSort = (vector) => {\n let res = 0;\n\n for (let i = 0; i < vector.length; i++) {\n let minIndex = i;\n\n for (let j = i + 1; j < vector.length; j++) {\n if (vector[j] < vector[minIndex]) {\n minIndex = j;\n }\n }\n\n let temp = vector[i];\n vector[i] = vector[minIndex];\n vector[minIndex] = temp;\n\n if (i !== 0 && i % 2 === 1) {\n res += vector[i] - vector[i -1]\n }\n }\n\n console.log(res);\n };\n})\n\n\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n\n const input = lines[1];\n const vector = input.split(' ').map(\n n => parseInt(n)\n );\n\n const insertionSort = (vector) => {\n let res = 0;\n\n for (let i = 0; i < vector.length; i++) {\n let minIndex = i;\n\n for (let j = i + 1; j < vector.length; j++) {\n if (vector[j] < vector[minIndex]) {\n minIndex = j;\n }\n }\n\n let temp = vector[i];\n vector[i] = vector[minIndex];\n vector[minIndex] = temp;\n\n if (i !== 0 && i % 2 === 1) {\n res += vector[i] - vector[i -1]\n }\n }\n\n console.log(res);\n };\n});\n\n\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n\n const input = lines[1];\n const vector = input.split(' ').map(\n n => parseInt(n)\n );\n\n const insertionSort = (vector) => {\n let res = 0;\n\n for (let i = 0; i < vector.length; i++) {\n let minIndex = i;\n\n for (let j = i + 1; j < vector.length; j++) {\n if (vector[j] < vector[minIndex]) {\n minIndex = j;\n }\n }\n\n let temp = vector[i];\n vector[i] = vector[minIndex];\n vector[minIndex] = temp;\n\n if (i !== 0 && i % 2 === 1) {\n res += vector[i] - vector[i -1]\n }\n }\n\n console.log(res);\n };\n});\n\n//////\n\n\n"}, {"source_code": "var n = readline(),\n a = readline().split(' ').map(v => +v);\nvar s = 0;\nwhile(a.length) {\n var l = a.length,\n m = Infinity,\n mi = 1;\n for(var i = 1; i < l; i++) {\n var lm = Math.abs(a[0] - a[i]);\n if(lm < m) {\n m = lm;\n mi = i;\n }\n }\n s += m;\n a.splice(mi, 1);\n a.splice(0, 1);\n}\nwrite(s);"}], "src_uid": "55485fe203a114374f0aae93006278d3"} {"nl": {"description": "As technologies develop, manufacturers are making the process of unlocking a phone as user-friendly as possible. To unlock its new phone, Arkady's pet dog Mu-mu has to bark the password once. The phone represents a password as a string of two lowercase English letters.Mu-mu's enemy Kashtanka wants to unlock Mu-mu's phone to steal some sensible information, but it can only bark n distinct words, each of which can be represented as a string of two lowercase English letters. Kashtanka wants to bark several words (not necessarily distinct) one after another to pronounce a string containing the password as a substring. Tell if it's possible to unlock the phone in this way, or not.", "input_spec": "The first line contains two lowercase English letters — the password on the phone. The second line contains single integer n (1 ≤ n ≤ 100) — the number of words Kashtanka knows. The next n lines contain two lowercase English letters each, representing the words Kashtanka knows. The words are guaranteed to be distinct.", "output_spec": "Print \"YES\" if Kashtanka can bark several words in a line forming a string containing the password, and \"NO\" otherwise. You can print each letter in arbitrary case (upper or lower).", "sample_inputs": ["ya\n4\nah\noy\nto\nha", "hp\n2\nht\ntp", "ah\n1\nha"], "sample_outputs": ["YES", "NO", "YES"], "notes": "NoteIn the first example the password is \"ya\", and Kashtanka can bark \"oy\" and then \"ah\", and then \"ha\" to form the string \"oyahha\" which contains the password. So, the answer is \"YES\".In the second example Kashtanka can't produce a string containing password as a substring. Note that it can bark \"ht\" and then \"tp\" producing \"http\", but it doesn't contain the password \"hp\" as a substring.In the third example the string \"hahahaha\" contains \"ah\" as a substring."}, "positive_code": [{"source_code": "\nlet _inputLines;\nlet _lineNumber = 0;\nlet inputReader = _inputReader ();\n\nfunction _main() {\n\t\n\t_inputLines = _inputData.trim().split('\\n').map((string) => {\n\t\treturn string.trim();\n\t});;\n\tlet str = inputReader.readLine();\n\tlet n = inputReader.readNumber();\n\tlet arr = [];\n\t\n\tlet bool = false;\n\tfor (let i = 0; i < n; i++) {\n\t\tarr[i] = inputReader.readLine();\n\t\tif (arr[i] === str) {\n\t\t\tbool = true;\n\t\t}\n\t}\n\t\n\tif (n === 1) {\n\t\tlet str1 = \"\" + arr[0] + arr[0];\n\t\tif (str[0] == str1[1] && str[1] == str1[2]) {\n\t\t\tbool = true;\n\t\t}\n\t\t//console.log(str1,str1[1],str[0]);\n\t} else if (!bool) {\n\t\tfor (let i = 0; i < n; i++) {\n\t\t\tfor (let j = 0; j < n; j++) {\n\t\t\t\tlet res = arr[i] + arr[j];\n\t\t\t\tif (str[0] == res[1] && str[1] == res[2]) {\n\t\t\t\t\tbool = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bool) break;\n\t\t}\n\t}\n\tif (bool) {\n\t\tconsole.log(\"YES\");\n\t} else {\n\t\tconsole.log(\"NO\");\n\t}\n\n}\n\nvar _inputData = '';\nfunction cacheInput(data) {\n\t_inputData += data;\n}\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf8');\nprocess.stdin.on('data', cacheInput).on('end', _main);\n\nfunction _inputReader () {\n\tfunction readNumber(){\n\t\treturn Number(_inputLines[_lineNumber++]);\n\t}\n\t\t\n\tfunction readLine(){\n\t\treturn _inputLines[_lineNumber++];\n\t}\n\t\t\n\t\n\treturn {\n\t\treadNumber,\n\t\treadLine,\n\t}\n}"}], "negative_code": [], "src_uid": "cad8283914da16bc41680857bd20fe9f"} {"nl": {"description": "The main street of Berland is a straight line with n houses built along it (n is an even number). The houses are located at both sides of the street. The houses with odd numbers are at one side of the street and are numbered from 1 to n - 1 in the order from the beginning of the street to the end (in the picture: from left to right). The houses with even numbers are at the other side of the street and are numbered from 2 to n in the order from the end of the street to its beginning (in the picture: from right to left). The corresponding houses with even and odd numbers are strictly opposite each other, that is, house 1 is opposite house n, house 3 is opposite house n - 2, house 5 is opposite house n - 4 and so on. Vasya needs to get to house number a as quickly as possible. He starts driving from the beginning of the street and drives his car to house a. To get from the beginning of the street to houses number 1 and n, he spends exactly 1 second. He also spends exactly one second to drive the distance between two neighbouring houses. Vasya can park at any side of the road, so the distance between the beginning of the street at the houses that stand opposite one another should be considered the same.Your task is: find the minimum time Vasya needs to reach house a.", "input_spec": "The first line of the input contains two integers, n and a (1 ≤ a ≤ n ≤ 100 000) — the number of houses on the street and the number of the house that Vasya needs to reach, correspondingly. It is guaranteed that number n is even.", "output_spec": "Print a single integer — the minimum time Vasya needs to get from the beginning of the street to house a.", "sample_inputs": ["4 2", "8 5"], "sample_outputs": ["2", "3"], "notes": "NoteIn the first sample there are only four houses on the street, two houses at each side. House 2 will be the last at Vasya's right.The second sample corresponds to picture with n = 8. House 5 is the one before last at Vasya's left."}, "positive_code": [{"source_code": "\t\t var line = readline().split(' ');\n\t\t\tvar n = line[0] ;\n\t\t\tvar a = line[1] ;\n\t\t\tvar result = 0 ;\n\n\t\t\tif (a%2 === 0) {\n\t\t\t\tresult = -a/2+n/2+1 ;\n\t\t\t} else {\n\t\t\t\tresult = a/2-0.5+1 ;\n\t\t\t}\n\t\t\tprint(result) ;"}, {"source_code": "var l = readline().split(' ');\nvar compute = function(n, a) {\n return (a % 2 === 0) ? (n - a) / 2 + 1 : (a + 1) / 2;\n};\nprint(compute(+l[0],+l[1]));"}, {"source_code": "var input = readline().split(\" \"),\n\n count = +input[0],\n target = +input[1],\n\n isEven = target % 2 == 0,\n\n time = isEven ? count / 2 - Math.floor(target / 2) + 1 : Math.floor(target / 2) + 1;\n\nprint(time);"}, {"source_code": "var data = readline().split(\" \"),\nn = data[0],\na = data[1];\n\nvar homes = {\n\todd: [],\n\teven: [],\n};\n\nfor(var i=0;i parseInt(readline())\nvar readIntArray = () => readline().split(' ').map(item => parseInt(item))\nfunction range(a, b) {\n var res = []\n for (var i = a; i <= b; i++) {\n res.push(i)\n }\n return res\n}\n\nvar inputData = readIntArray()\nvar n = inputData[0]\nvar a = inputData[1]\nif (a % 2 !== 0) {\n print(Math.floor(a / 2) + 1)\n} else {\n print(Math.floor((n-a) / 2) + 1)\n}"}], "negative_code": [{"source_code": "\t\t\tvar n = 80000;\n\t\t\tvar a = 5000;\n\t\t\tvar result = 0;\n\n\t\t\tif (a%2 === 0) {\n\t\t\t\tresult = -a/2+n/2+1;\n\t\t\t} else {\n\t\t\t\tresult = a/2-0.5+1;\n\t\t\t}\n\t\t\tprint(result);"}, {"source_code": "var input = readline().split(\" \"),\n\n count = +input[0],\n target = +input[1],\n\n isEven = target % 2 == 0,\n\n time = isEven ? count - Math.floor(target / 2) - 1 : Math.floor(target / 2) + 1;\n\nprint(time);"}, {"source_code": "var data = readline().split(\" \"),\n\tn = data[0],\n\ta = data[1];\n\nvar homes = [];\n\nfor(var i=0;i(v%2==0));\n\n\tfor( var i=0; i(v%2!=0)).reverse();\n\n\tfor( var i=0; i=0)\n{ \n p=n-i;\n var t=p;\n while(p)\n{\n t+=(p%10);\n p=Math.floor(p/10);\n}\nif(t==n)\n{\nm.push(n-i);\nk++;\n}\ni--;\n}\nprint(k);\nfor(var e of m)\nprint(e);"}, {"source_code": "function main() {\n var num = +readline();\n var Array = [];\n var min = num - num.toString().length * 9;\n min = min > 0 ? min : 0;\n for (var i = min; i < num; i++) {\n var sum = i;\n var iStr = i.toString();\n for (var j = 0; j < iStr.length; j++) {\n sum += +iStr[j];\n }\n if (sum === num) Array.push(i);\n }\n print(Array.length);\n for (var k = 0; k < Array.length; k++) {\n print(Array[k]);\n }\n}\n\nmain();\n\n"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar rezult = findMagicNumbers(+firstLine.split(' ')[0]);\n\nprint(rezult.length);\nrezult.forEach(function(num) {\n print(num);\n})\n\nfunction findMagicNumbers(inputValue) {\n\n function findSumOfDigits(num) {\n var digits = String(num)\n .split('')\n .map(function(digit) {\n return Number(digit);\n });\n\n var sumOfDigits = digits.reduce(function(sum, digit) {\n return sum + digit;\n }, 0);\n\n return sumOfDigits;\n }\n\n var numbers = [];\n \n for (var i = 1; i < 82; i++) {\n var current = inputValue - i;\n\n if (current <= 0) {\n continue;\n }\n\n var sum = findSumOfDigits(current);\n\n if (sum + current === inputValue) {\n numbers.push(current);\n }\n }\n\n return numbers.reverse();\n}"}, {"source_code": "'use strict';\nvar n = parseInt(readline());\nvar res = new Array;\nvar nLength = parseInt(n.toString().length);\nvar x = n - 9*nLength;\nx = x > 0 ? x : 0;\n for (var i = x; i < n; i++) {\n var sum = 0, t = i;\n while (t) {\n sum += t % 10;\n t = Math.floor(t / 10);\n }\n if (sum + i === n) \n res.push(i);\n }\n print(res.length);\n for (var i = 0; i < res.length; i++) \n print(res[i]);\n "}, {"source_code": "function res(x){\n var i;\n\tvar n = JSON.parse(x);\n var k = 0;\n var s = [];\n var m = [];\n s = n.toString().split('');\n n < 18 ? i = n : i = 9 * s.length;\n var p;\n while(i >= 0){ \n var p = n - i;\n var t = p;\n while(p){\n t += (p % 10);\n p = Math.floor(p / 10);\n }\n if(t === n){\n m.push(n - i);\n k++;\n }\n i--;\n }\n print(k);\n for(var e of m)\n print(e);\n}\nres(readline());"}, {"source_code": "var readline = readline();\n//prompt(\"Enter Digit\");\nvar n = +readline;\nvar resultToArray = [];\nvar j = 0;\n\nif (n <= 101) {\n j = Math.floor(n / 1.7);\n} else if (n <= 1001) {\n j = Math.floor(n / 1.4);\n} else if (n <= 10001) {\n j = Math.floor(n / 1.3);\n} else if (n <= 100001) {\n j = Math.floor(n / 1.2);\n} else if (n <= 1000001) {\n j = Math.floor(n / 1.05);\n} else if (n <= 10000001) {\n j = Math.floor(n / 1.025);\n} else if (n <= 100000001) {\n j = Math.floor(n / 1.012);\n} else if (n <= 1000000001) {\n j = Math.floor(n / 1.006);\n}\n\nfor (var i = j; i < n; i++) {\n var tempVal = i,\n sumOfDigits = 0;\n while (tempVal) {\n sumOfDigits += tempVal % 10;\n tempVal = Math.floor(tempVal / 10);\n }\n var resultSum = i + sumOfDigits;\n if (resultSum === n) {\n resultToArray.push(i);\n }\n}\n\nprint(resultToArray.length);\nprint(resultToArray.toString().replace(',', ' '));\n //console.log(resultToArray.length);\n //console.log(resultToArray.toString().replace(',', ' '));\n"}, {"source_code": "var readline = readline();\n//prompt(\"Enter Digit\");\nvar n = +readline;\nvar resultToArray = [];\nvar j = 0;\n\nif (n <= 101) {\n j = Math.floor(n / 1.7);\n} else if (n <= 1001) {\n j = Math.floor(n / 1.4);\n} else if (n <= 10001) {\n j = Math.floor(n / 1.3);\n} else if (n <= 100001) {\n j = Math.floor(n / 1.2);\n} else if (n <= 1000001) {\n j = Math.floor(n / 1.05);\n} else if (n <= 10000001) {\n j = Math.floor(n / 1.025);\n} else if (n <= 100000001) {\n j = Math.floor(n / 1.012);\n} else if (n <= 1000000001) {\n j = Math.floor(n / 1.006);\n}\n\nfor (var i = j; i < n; i++) {\n var tempVal = i,\n sumOfDigits = 0;\n while (tempVal) {\n sumOfDigits += tempVal % 10;\n tempVal = Math.floor(tempVal / 10);\n }\n var resultSum = i + sumOfDigits;\n if (resultSum === n) {\n resultToArray.push(i);\n }\n}\n\nprint(resultToArray.length);\nprint(resultToArray.toString().replace(',', ' '));\n //console.log(resultToArrayay.length);\n //console.log(resultToArrayay.toString().replace(',', ' '));\n"}, {"source_code": "var nStr = readline();\nvar n = +nStr;\nvar resultArr = [];\nvar j = 0;\n\nif (n <= 101) {\n j = Math.floor(n / 1.7);\n} else if (n <= 1001) {\n j = Math.floor(n / 1.4);\n} else if (n <= 10001) {\n j = Math.floor(n / 1.3);\n} else if (n <= 100001) {\n j = Math.floor(n / 1.2);\n} else if (n <= 1000001) {\n j = Math.floor(n / 1.05);\n} else if (n <= 10000001) {\n j = Math.floor(n / 1.025);\n} else if (n <= 100000001) {\n j = Math.floor(n / 1.012);\n} else if (n <= 1000000001) {\n j = Math.floor(n / 1.006);\n}\n\nfor (var i = j; i < n; i++) {\n var tempI = i,\n sumOfDigits = 0;\n while (tempI) {\n sumOfDigits += tempI % 10;\n tempI = Math.floor(tempI / 10);\n }\n var resultSum = i + sumOfDigits;\n if (resultSum === n) {\n resultArr.push(i);\n }\n}\n\nprint(resultArr.length);\nprint(resultArr.toString().replace(',', ' '));\n"}, {"source_code": "var n = readline();\nvar len = n.toString().length;\nfunction main(){\n var i = n;\n var numCounter = 0;\n var flag = n - len * 9;\n var numArr = [];\n for(i; i >= flag; i--){\n var subSum = 0;\n var numbers = i.toString().split('');\n numbers.forEach(element => {\n subSum += Number(element);\n });\n \n if(i+subSum == n){\n numCounter++\n numArr.unshift(i);\n }\n }\n print(numCounter);\n numArr.forEach(element => {\n print(element);\n });\n}\n\nmain();"}, {"source_code": "var number = parseInt(readline());\nvar res = new Array;\n\nfor (var i = number - 1; i > number - 9*number.toString().length && i > 0; i--) {\n var temp = i\n var sum = 0;\n while (temp) {\n sum += temp % 10;\n temp = Math.floor(temp / 10);\n }\n \n if (sum + i === number) res.unshift(i);\n}\n\nprint(res.length);\nfor (var i = 0; i < res.length; i++ ) print(res[i]);"}, {"source_code": "const\n num = readline()\n\nvar matches = 0,\n matchesValues = [];\n maxCharsSum = num.toString().length * 9,\n startValue = num - maxCharsSum < 0 ? 0 : num - maxCharsSum;\nfor (var i = startValue; i <= num; i++) {\n var tmpNum = i, sum = 0, tmp;\n \n while (tmpNum) {\n tmp = tmpNum % 10;\n tmpNum = (tmpNum - tmp) / 10;\n sum += tmp;\n }\n \n result = i + sum;\n if (result == num) {\n matches++;\n matchesValues.push(i);\n }\n}\n\nprint(matches);\nif (matches) {\n for (var j = 0; j < matchesValues.length; j++) {\n print(matchesValues[j]);\n } \n}\n"}, {"source_code": "function main() {\n var num = +readline();\n var numArray = [];\n var min = num - num.toString().length * 9;\n min = min > 0 ? min : 0;\n for (var i = min; i < num; i++) {\n var sum = i;\n var iStr = i.toString();\n for (var y = 0; y < iStr.length; y++) {\n sum += +iStr[y];\n }\n if (sum === num) numArray.push(i);\n }\n print(numArray.length);\n for (var j = 0; j < numArray.length; j++) {\n print(numArray[j]);\n }\n}\n\nmain();\n\n// http://codeforces.com/contest/875/submission/35182257\n"}, {"source_code": "function main() {\n var num = +readline();\n var numArray = [];\n var min = num - num.toString().length * 9;\n min = min > 0 ? min : 0;\n for (var i = min; i < num; i++) {\n var sum = i;\n var iStr = i.toString();\n for (var y = 0; y < iStr.length; y++) {\n sum += +iStr[y];\n }\n if (sum === num) numArray.push(i);\n }\n print(numArray.length);\n for (var j = 0; j < numArray.length; j++) {\n print(numArray[j]);\n }\n}\n\nmain();\n"}, {"source_code": "var n = parseInt(readline());\nvar minNumber = n - n.toString().length * 9;\nvar result = [];\nfor (var i = n; i > minNumber; i--) {\n if (i + getDigitsSum(i.toString()) === n) {\n result.unshift(i);\n }\n}\n\nprint(result.length);\nprint(result.join(' '));\n\nfunction getDigitsSum(num) {\n var result = 0;\n for (var i = 0; i < num.length; i++) {\n result += parseInt(num[i]);\n }\n return result;\n}"}], "negative_code": [{"source_code": "var n=(readline());\nvar i,k=0;\nvar s=[],m=[];\nif(n==1)\n{\n m.push(n);\n k++;\n}\ns=n.split('');\ns<9?i=n:i=9*s.length;\nvar p;\nwhile(i>=0)\n{ \n p=n-i;\n var t=p;\n while(p)\n{\n t+=(p%10);\n p=Math.floor(p/10);\n}\nif(t==n)\n{\nm.push(n-i);\nk++;\n}\ni--;\n}\nprint(k);\nfor(var e of m)\nprint(e);"}, {"source_code": "function main() {\n var num = +readline();\n print('\\n');\n var Array = [];\n var min = num - num.toString().length * 9;\n\n min = min > 0 ? min : 0;\n\n for (var i = min; i < num; i++) {\n var sum = i;\n var iStr = i.toString();\n for (var j = 0; j < iStr.length; j++) {\n sum += +iStr[j];\n }\n if (sum === num) Array.push(i);\n }\n\n print(Array.length);\n for (var k = 0; k < Array.length; k++) {\n print(Array[j]);\n }\n}\n\nmain();\n\n"}, {"source_code": "var n = parseInt(readline());\n\nfunction getSum(number) {\n var sDigits = String(number).split('');\n var digits = sDigits.map(function(item) {\n return parseInt(item);\n })\n\n var result = digits.reduce(function(sum, current) {\n return sum + current;\n }, 0);\n\n return result;\n}\n\nfunction getRes() {\n var count = 0;\n for(var i = 10; i <=100; i++) {\n if((getSum(i) + i) == n) {\n count++;\n print(count);\n print(i);\n }\n\n else if(i==100 && count == 0) {\n print(0);\n }\n }\n}\n\ngetRes();"}, {"source_code": "var n = parseInt(readline());\nprint('\\n');\n\nfunction getSum(number) {\n var sDigits = String(number).split('');\n var digits = sDigits.map(function(item) {\n return parseInt(item);\n })\n\n var result = digits.reduce(function(sum, current) {\n return sum + current;\n }, 0);\n\n return result;\n}\n\nfunction getRes() {\n var count = 0;\n for(var i = 10; i <=100; i++) {\n if((getSum(i) + i) == n) {\n count++;\n print(count);\n print(i);\n }\n\n else if(i==100 && count == 0) {\n print(0);\n }\n }\n}\n\ngetRes();"}, {"source_code": "function main() {\n var num = +readline();\n print('\\n');\n var Array = [];\n var min = num - num.toString().length * 9;\n\n min = min > 0 ? min : 0;\n\n for (var i = min; i < num; i++) {\n var sum = i;\n var iStr = i.toString();\n for (var j = 0; j < iStr.length; j++) {\n sum += +iStr[j];\n }\n if (sum === num) Array.push(i);\n }\n\n print(Array.length);\n for (var k = 0; k < Array.length; k++) {\n print(Array[j]);\n }\n}\n\n"}, {"source_code": "var n = parseInt(readline());\nprint('\\n');\n\nfunction getSum(number) {\n var sDigits = String(number).split('');\n var digits = sDigits.map(function(item) {\n return parseInt(item);\n })\n\n var result = digits.reduce(function(sum, current) {\n return sum + current;\n }, 0);\n\n return result;\n}\n\nfunction getRes() {\n var count = 0;\n for(var i = 0; i <=100; i++) {\n if((getSum(i) + i) == n) {\n count++;\n print(count);\n print(i);\n }\n\n else if(i==100 && count == 0) {\n print(0);\n }\n }\n}\n\ngetRes();"}, {"source_code": "function main() {\n var num = parseInt(readline());\n print('\\n');\n var Array = [];\n var min = num - num.toString().length * 9;\n\n min = min > 0 ? min : 0;\n\n for (var i = min; i < num; i++) {\n var sum = i;\n var iStr = i.toString();\n for (var j = 0; j < iStr.length; j++) {\n sum += +iStr[j];\n }\n if (sum === num) Array.push(i);\n }\n\n print(Array.length);\n for (var k = 0; k < Array.length; k++) {\n print(Array[j]);\n }\n}\n\nmain();"}, {"source_code": "\n\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\n\nprint(getRezult(numRez));\nprint(0);\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\nconst rezult = getRezult(numRez)\n\nprint(rezult.length);\nprint(rezult);\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\nvar rezult = getRezult(numRez)\n\nprint(rezult.length >= 0 ? rezult.length : '');\nprint(rezult);\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n return getRezult(--input);\n\n return res;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar rezult = findMagicNumbers(+firstLine.split(' ')[0]);\n\nprint(rezult.length);\nprint(rezult.join(' '));\n\nfunction findMagicNumbers(inputValue) {\n var numbers = [];\n \n for (var i = 1; i < 82; i++) {\n var current = inputValue - i;\n var sum = ('' + current).split('').reduce((sumTemp, num) => sumTemp + num, 0);\n\n if (sum + current === inputValue) {\n number.push(sum);\n }\n }\n\n return numbers;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar rezult = findMagicNumbers(+firstLine.split(' ')[0]);\n\nprint(rezult.length);\nprint(rezult.join(' '));\n\nfunction findMagicNumbers(inputValue) {\n\n function findSumOfDigits(num) {\n var digits = String(num)\n .split('')\n .map(function(digit) {\n return Number(digit);\n });\n\n var sumOfDigits = digits.reduce(function(sum, digit) {\n return sum + digit;\n }, 0);\n\n return sumOfDigits;\n }\n\n var numbers = [];\n \n for (var i = 1; i < 82; i++) {\n var current = inputValue - i;\n\n if (current <= 0) {\n continue;\n }\n\n var sum = findSumOfDigits(current);\n\n if (sum + current === inputValue) {\n numbers.push(current);\n }\n }\n\n return numbers;\n}"}, {"source_code": "\n\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\n\nprint(res.legth, getRezult(numRez));\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.round(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForFirst);\n\n return pathOfFirst < pathOfSecond ? pathOfFirst : pathOfSecond;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\n\nprint(getRezult(numRez));\nprint(0);\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\nvar rezult = getRezult(numRez)\n\nprint(rezult.length || '');\nprint(rezult);\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar rezult = findMagicNumbers(+firstLine.split(' ')[0]);\n\nprint(rezult.length);\nprint(rezult.join(' '));\n\nfunction findMagicNumbers(inputValue) {\n var numbers = [];\n \n for (var i = 1; i < 82; i++) {\n var current = inputValue - i;\n var sum = ('' + current).split('').reduce((sumTemp, num) => sumTemp + num, 0);\n\n if (sum === current) {\n number.push(sum);\n }\n }\n\n return numbers;\n}"}, {"source_code": "\n\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\n\nprint(res.length, getRezult(numRez));\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\n\nvar inside = readline();\n\nprint('\\n');\nvar num = +inside.split(' ')[0]\n\nprint(getRezult(num))\nvar count = 0;\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n var res = [];\n parse.push(+input);\n\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum === num) {\n res.push(input);\n } else {\n count++;\n\n if (count === num) {\n return 0;\n }\n getRezult(--input);\n }\n\n return res;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\nvar rezult = getRezult(numRez)\n\nprint(rezult.length);\nprint(rezult);\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\n\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\n\nprint(getRezult(numRez));\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar rezult = findMagicNumbers(+firstLine.split(' ')[0]);\n\nprint(rezult.length);\nrezult.forEach(function(num) {\n print(num);\n})\n\nfunction findMagicNumbers(inputValue) {\n\n function findSumOfDigits(num) {\n var digits = String(num)\n .split('')\n .map(function(digit) {\n return Number(digit);\n });\n\n var sumOfDigits = digits.reduce(function(sum, digit) {\n return sum + digit;\n }, 0);\n\n return sumOfDigits;\n }\n\n var numbers = [];\n \n for (var i = 1; i < 82; i++) {\n var current = inputValue - i;\n\n if (current <= 0) {\n continue;\n }\n\n var sum = findSumOfDigits(current);\n\n if (sum + current === inputValue) {\n numbers.push(current);\n }\n }\n\n return numbers;\n}"}, {"source_code": "\n\nvar firstLine = readline();\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\nvar rezult = getRezult(numRez)\nprint(rezult.length);\nprint(rezult);\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nprint(tort(firstLine.split(' ')[0], firstLine.split(' ')[1], firstLine.split(' ')[2]));\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n var curr = Math.min(Math.floor(x / i), Math.floor(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n"}, {"source_code": "\n\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nvar count = 0;\nvar numRez = firstLine.split(' ')[0];\nvar res = [];\n\nprint(0 ,getRezult(numRez));\n\nfunction getRezult (num) {\n var input = `${num}`;\n var parse = [];\n var sum = 0;\n parse.push(+input);\n debugger;\n for (var i =0; i < input.length; i++) {\n parse.push(+input[i]);\n }\n\n for (var j =0; j < parse.length; j++) {\n sum += parse[j];\n }\n\n if(sum == numRez) {\n res.push(input);\n } else {\n count++;\n }\n\n if (count == numRez) {\n return 0;\n }\n getRezult(--input);\n\n return res;\n}"}, {"source_code": "'use strict';\nvar n = parseInt(readline());\nvar res = new Array;\nvar nLength = n.toString().length;\n for (var i = n - 9*nLength; i <(n - 1) && i > 0; i++) {\n var sum = 0, t = i;\n while (t) {\n sum += t % 10;\n t = Math.floor(t / 10);\n }\n if (sum + i === n) \n res.push(i);\n }\n print(res.length);\n for (var i = 0; i < res.length; i++) \n print(res[i]);\n"}, {"source_code": "'use strict';\nvar n = parseInt(readline());\nvar res = new Array;\nvar nLength = n.toString().length;\nif (n === 1) {\n res.length = 1;\n print(res.length);\n res[0] = 1;\n print(res[0]);\n} \nelse \n if (n > 1) {\n for (var i = n - 9*nLength; i = 0){ \n var p = n - i;\n var t = p;\n while(p){\n t += (p % 10);\n p = Math.floor(p / 10);\n }\n if(t === n){\n m.push(n - i);\n k++;\n }\n i--;\n }\n print(k);\n for(var e of m)\n print(e);\n}\ntes(readline());"}, {"source_code": "var firstEnteredDigit = readline();\n//prompt(\"Enter digit\");\nvar n = firstEnteredDigit;\nvar resultArray = [];\nvar j = 0;\n\nif (n <= 101) {\n j = Math.floor(n / 1.7);\n} else if (n <= 1001) {\n j = Math.floor(n / 1.4);\n} else if (n <= 10001) {\n j = Math.floor(n / 1.3);\n} else if (n <= 100001) {\n j = Math.floor(n / 1.2);\n} else if (n <= 1000001) {\n j = Math.floor(n / 1.05);\n} else if (n <= 10000001) {\n j = Math.floor(n / 1.025);\n} else if (n <= 100000001) {\n j = Math.floor(n / 1.012);\n} else if (n <= 1000000001) {\n j = Math.floor(n / 1.006);\n}\n\nfor (var i = j; i < n; i++) {\n var tempVal = i,\n sumOfDigits = 0;\n while (tempVal) {\n sumOfDigits += tempVal % 10;\n tempVal = Math.floor(tempVal / 10);\n }\n var resultSum = i + sumOfDigits;\n if (resultSum === n) {\n resultArray.push(i);\n }\n}\n\nprint(resultArray.length);\nprint(resultArray.toString().replace(',', ' '));\n //console.log(resultArray.length);\n //console.log(resultArray.toString().replace(',', ' '));\n"}, {"source_code": "var nStr = readline()\nvar n = +nStr;\nvar resultArr = [];\n\nfor (var i = Math.floor(n / 2); i < n; i++) {\n var sumOfDigits = 0;\n while (tempI) {\n\tvar tempI = i\n sumOfDigits += tempI % 10;\n tempI = Math.floor(tempI / 10);\n}\n var resultSum = i + sumOfDigits;\n if (resultSum === n) {\n resultArr.push(i);\n }\n}\n\nprint(resultArr.length);\nprint(resultArr.toString().replace(',', ' '));"}, {"source_code": "var nStr = readline();\nvar n = +nStr;\nvar resultArr = [];\nvar j = 0;\n\nif (n <= 101) {\n j = Math.floor(n / 1.5);\n} else if (n <= 1001) {\n j = Math.floor(n / 1.4);\n} else if (n <= 10001) {\n j = Math.floor(n / 1.3);\n} else if (n <= 100001) {\n j = Math.floor(n / 1.2);\n} else if (n <= 1000001) {\n j = Math.floor(n / 1.05);\n} else if (n <= 10000001) {\n j = Math.floor(n / 1.025);\n} else if (n <= 100000001) {\n j = Math.floor(n / 1.012);\n} else if (n <= 1000000001) {\n j = Math.floor(n / 1.006);\n}\n\nfor (var i = j; i < n; i++) {\n var tempI = i,\n sumOfDigits = 0;\n while (tempI) {\n sumOfDigits += tempI % 10;\n tempI = Math.floor(tempI / 10);\n }\n var resultSum = i + sumOfDigits;\n if (resultSum === n) {\n resultArr.push(i);\n }\n}\n\nprint(resultArr.length);\nprint(resultArr.toString().replace(',', ' '));\n"}, {"source_code": "var nStr = readline();\nvar n = +nStr;\nvar resultArr = [];\nvar j = 0;\n\nif(n <= 101) j = Math.floor(n / 1.5);\nif(n <= 1001) j = Math.floor(n / 1.4);\nif(n <= 10001) j = Math.floor(n / 1.3);\nif(n <= 100001) j = Math.floor(n / 1.2);\nif(n > 100001) j = Math.floor(n / 1.1);\n\nfor (var i = j; i < n; i++) {\n var tempI = i, sumOfDigits = 0;\n while (tempI) {\n sumOfDigits += tempI % 10;\n tempI = Math.floor(tempI / 10);\n }\n var resultSum = i + sumOfDigits;\n if (resultSum === n) {\n resultArr.push(i);\n }\n}\n\nprint(resultArr.length);\nprint(resultArr.toString().replace(',', ' '));\n"}, {"source_code": "var n = readline();\nvar len = n.toString().length;\nfunction main(){\n var i = n;\n var flag = n - len * 9;\n for(i; i >= flag; i--){\n var subSum = 0;\n var numbers = i.toString().split('');\n numbers.forEach(element => {\n subSum += Number(element);\n });\n \n if(i+subSum == n){\n print(i+subSum);\n }\n }\n}\n\nmain();"}, {"source_code": "var n = readline();\nvar len = n.toString().length;\nfunction main(){\n var i = n;\n var numCounter = 0;\n var flag = n - len * 9;\n var numArr = [];\n for(i; i >= flag; i--){\n var subSum = 0;\n var numbers = i.toString().split('');\n numbers.forEach(element => {\n subSum += Number(element);\n });\n \n if(i+subSum == n){\n numCounter++\n numArr.unshift(subSum);\n }\n }\n print(numCounter);\n numArr.forEach(element => {\n print(element);\n });\n}\n\nmain();"}, {"source_code": "var number = parseInt(readline());\nvar res = new Array;\n\nfor (var i = number - 1; i > number - 9*number.toString().length && i > 0; i--) {\n var temp = i\n var sum = 0;\n while (temp) {\n sum += temp % 10;\n temp = Math.floor(temp / 10);\n }\n \n if (sum + i === number) res.push(i);\n}\n\nprint(res.length);\nprint(res);"}, {"source_code": "var number = parseInt(readline());\nvar res = new Array;\n\nfor (var i = number - 1; i > number - 9*number.toString().length && i > 0; i--) {\n var temp = i\n var sum = 0;\n while (temp) {\n sum += temp % 10;\n temp = Math.floor(temp / 10);\n }\n \n if (sum + i === number) res.push(i);\n}\n\nprint(res.length);\nfor (var i = 0; i < res.length; i++ ) print(res[i]);"}, {"source_code": "const\n controlNum = readline()\n\nvar matches = 0,\n matchesValues = [],\n num = controlNum;\nwhile (num) {\n var tmpNum = num, sum = 0, tmp;\n \n while (tmpNum) {\n tmp = tmpNum % 10;\n tmpNum = (tmpNum - tmp) / 10;\n sum += tmp;\n }\n \n result = num + sum;\n if (result == controlNum) {\n matches++;\n matchesValues.push(num);\n break;\n } \n num--\n}\n\nprint(matches);\nif (matches) {\n for (var j = 0; j < matchesValues.length; j++) {\n print(matchesValues[j]);\n } \n}\n"}], "src_uid": "ae20ae2a16273a0d379932d6e973f878"} {"nl": {"description": "Vanya got n cubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of the pyramid must consist of 1 cube, the second level must consist of 1 + 2 = 3 cubes, the third level must have 1 + 2 + 3 = 6 cubes, and so on. Thus, the i-th level of the pyramid must have 1 + 2 + ... + (i - 1) + i cubes.Vanya wants to know what is the maximum height of the pyramid that he can make using the given cubes.", "input_spec": "The first line contains integer n (1 ≤ n ≤ 104) — the number of cubes given to Vanya.", "output_spec": "Print the maximum possible height of the pyramid in the single line.", "sample_inputs": ["1", "25"], "sample_outputs": ["1", "4"], "notes": "NoteIllustration to the second sample: "}, "positive_code": [{"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw \"ArrayIndexOutOfBoundsException ‚There is no more input\";}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var N = nextInt();\n var sum = 0;\n for(var i = 1; i < 100000; i++){\n sum += i;\n if(N >= sum){\n N -= sum;\n }else{\n myout(i - 1);\n return;\n }\n }\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n const n = +d;\n let sum = 0;\n let ans = 0;\n let c = 1;\n\n while (sum < n) {\n let s = 0;\n for (let j = 1; j <= c; j++) {\n s += j;\n }\n\n sum += s;\n c++;\n\n if (sum > n) {\n break;\n }\n else {\n ans++;\n }\n }\n\n console.log(ans);\n\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n let n = +d;\n\n let curr = 1;\n let x = 1;\n\n while (n >= curr) {\n n -= curr;\n x++;\n curr += x;\n }\n\n console.log(x - 1);\n\n // let sum = 0;\n // let ans = 0;\n // let c = 1;\n\n // while (sum < n) {\n // let s = 0;\n // for (let j = 1; j <= c; j++) {\n // s += j;\n // }\n\n // sum += s;\n // c++;\n\n // if (sum > n) {\n // break;\n // }\n // else {\n // ans++;\n // }\n // }\n\n // console.log(ans);\n\n});\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [n] = input[0].split(' ').map(x => parseInt(x));\n let prev = 0;\n\n if (n === 1) { console.log(1); return; }\n\n for (let i = 1; i < 1000; i += 1) {\n let sum = (i*(i+1))/2;\n prev += sum;\n\n if (prev > n) {\n console.log(i-1); return;\n }\n }\n}); \n"}, {"source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\n/**\n * \n * @param {*} str \n * @param {*} seperator \n */\nfunction splitter(str, seperator = '') {\n return str.trim().split(seperator);\n}\n\n/**\n * \n * @param {*} arr \n */\nfunction strToNumArr(arr = []) {\n return arr.map(num => Number(num));\n}\n\n/**\n * \n * @param {*} num1 \n * @param {*} num2 \n */\nfunction matrixArray(num1, num2) {\n return Array(num1).fill(Array(num2));\n}\n\nlet log = function () {\n return Function.prototype.bind.call(console.log, console, '');\n}();\n\nfunction removeEmptyItem(arr, index) {\n return arr.slice(0, index).concat(arr.slice(index + 1, arr.length));\n}\n\nfunction range(min, max) {\n\n let arr = [];\n for (let index = min; index < max; index++) {\n arr.push(index);\n\n }\n return arr;\n}\n\nfunction main(input) {\n let output = nameLookUp(input);\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n// Write your code here\nfunction nameLookUp(str) {\n\n let n = +str.trim();\n let count = 0;\n let inc = 0;\n while (count <= n) {\n inc++;\n count += (inc * (inc + 1)) / 2;\n }\n return (inc - 1).toString();\n}\n\n\n\n\n\n\n\n\n\n"}, {"source_code": "var n = +readline();\n\nfor(i = 1; ; i++){\n\tn -= ((i*(i+1))/2);\n\tif(n == 0){\n\t\twrite(i);\n\t\tbreak;\n\t}\n\tif(n < 0){\n\t\twrite(i-1);\n\t\tbreak;\n\t}\n}"}, {"source_code": "var n = parseInt(readline());\nvar it = 0;\nvar level = 0;\nfor(;;){\n\tif ((n - (it + level + 1)) > -1){\n\t\tlevel++;\n\t\tit += level;\n\t\tn-=it;\n\t}else{break;}\n}\nprint(level);"}, {"source_code": "///////////////////////////////////////////////////////////////////////////////\nfunction readNumber () { return Number(readline()); }\nfunction readNumbersArray () { return readline().split(' ').map(Number); }\nfunction algebraicSum (startValue, finishValue, size) { return (startValue + finishValue) * size / 2; }\n///////////////////////////////////////////////////////////////////////////////\n\nvar n = readNumber();\nvar level = 0;\nvar levelLength = 1;\n\nwhile (n > 0) {\n\tlevel++;\n\tlevelLength = algebraicSum(1, level, level);\n\tn -= levelLength;\n}\n\nprint(level - (n !== 0));"}, {"source_code": "var n =Number(readline());\nvar level = 0;\nvar levelUsedCount = 0;\nvar usedCount = 0;\ndo{\n level++;\n levelUsedCount+=level;\n usedCount+=levelUsedCount;\n} while(usedCount+levelUsedCount+level < n)\nprint(level);"}, {"source_code": "var n =Number(readline());\nvar level = 0;\nvar levelUsedCount = 0;\nvar usedCount = 0;\ndo{\n level++;\n levelUsedCount+=level;\n usedCount+=levelUsedCount;\n} while(usedCount+levelUsedCount+level+1 <= n)\nprint(level);"}, {"source_code": "var n = readline();\nvar height = 0;\nvar requiredCubes = 0;\nvar tmpHeight = 1;\n\nwhile(n >= 0) {\n\trequiredCubes += tmpHeight;\n\tn -= requiredCubes;\n\n\tif(n < 0)\n\t\tbreak;\n\n\theight++;\n\ttmpHeight++;\n}\n\nprint(height);"}, {"source_code": "var n = readline();\nvar height = 0;\nvar requiredCubes = 0;\nvar tmpHeight = 0;\n\nwhile(n >= 0) {\n\ttmpHeight++;\n\trequiredCubes += tmpHeight;\n\tn -= requiredCubes;\n\n\tif(n < 0)\n\t\tbreak;\n\n\theight++;\n}\n\nprint(height);"}, {"source_code": "var n = parseInt(readline());\nvar height = 0;\nvar requiredCubes = 0;\nvar tmpHeight = 0;\n\nwhile(n >= 0) {\n\ttmpHeight++;\n\trequiredCubes += tmpHeight;\n\tn -= requiredCubes;\n\n\tif(n < 0)\n\t\tbreak;\n\n\theight++;\n}\n\nprint(height);"}, {"source_code": "var n = parseInt(readline());\nvar height = 0;\nvar requiredCubes = 0;\nvar tmpHeight = 0;\n\nwhile(n >= requiredCubes) {\n\ttmpHeight++;\n\trequiredCubes += tmpHeight;\n\n\tif(n >= requiredCubes) {\n\t\theight++;\n\t\tn -= requiredCubes;\n\t} \n}\n\nprint(height);"}, {"source_code": "var n = readline();\nheight = 0;\nsum = 0;\ni = 1;\nwhile(n > 0){\n sum += i;\n n -= sum;\n if(n < 0){\n break;\n }\n height++;\n i++;\n}\nprint(height);"}, {"source_code": "var n = parseInt(readline());\nvar height = 0;\nvar requiredCubes = 0;\nvar tmpHeight = 1;\n\nwhile(n >= 0) {\n\trequiredCubes += tmpHeight;\n\tn -= requiredCubes;\n\n\tif(n < 0)\n\t\tbreak;\n\n\theight++;\n\ttmpHeight++;\n}\n\nprint(height);"}, {"source_code": "var number=readline();\nvar num=0;\nvar collect=0\nvar i=0;\n// for(i=0;i1){\n while(collect<=number){\n i++\n // console.log(\"i \"+i);\n num=(i*(i+1))/2;\n // console.log(num);\n collect=collect+num;\n }\n // console.log(collect);\n // }\n // console.log(i-1);\n print(i-1);\n }\n else{\n // console.log(1);\n print(1); \n }"}, {"source_code": "var n = readline();\nheight = 0;\nsum = 0;\ni = 1;\nwhile(n > 0){\n sum += i;\n n -= sum;\n if(n < 0){\n break;\n }\n height++;\n i++;\n}\nprint(height);"}, {"source_code": "var n = readline();\nvar res = 0;\nvar coub = 0;\n\tfor (var i=1; i<+n; i++){\n\t\t\n\t\tres += i;\n\t\tcoub += res;\n\t\tif (coub+res+i>=n)\n\t\tbreak;\n\t}\nprint(i);\n"}, {"source_code": "var n = parseInt(readline());\nvar spent = 0, i = 0, stack = 0;\nwhile(spent <= n){\n i+=1;\n stack += i;\n spent += stack;\n}\nprint(i - 1);"}, {"source_code": "var ans = 0;\nvar n = parseInt(readline());\nvar tmp = 0;\nvar sum = 0;\nfor (var i=1;sum<=n;i++){\n\ttmp = tmp + i;\n\tsum = sum + tmp;\n\tans ++;\n}\nprint(ans-1);"}, {"source_code": "function main(){\n\n var line = readline();\n var n = parseInt(line);\n \n var row_count = 0;\n var total_cubes = 0;\n var previous_total = 0;\n \n for(i=1;i= nthSum(rowIndex)) {\n cubes -= nthSum(rowIndex);\n rows++;\n rowIndex++;\n }\n\n print(rows);\n}\n\nmain();"}, {"source_code": "var n = parseInt(readline());\n\n\nvar x=0;\nvar y=0;\nvar i=0;\nwhile(n>=y){\n i=i+1;\n x+=i;\n y+=x;\n}\nprint(i-1);"}, {"source_code": "/////////////////////\n// 11th August 2019.\n////////////////////\n\n\n/////////////////////////////////////////////////////////\n// Getting Cubes Available from Codeforces.\nvar cubeCount = parseInt(readline());\n// Setting Initial Conditions.\nvar requiredCubes = 1,height = 0,cubeInc = 2;\n//Algorithm.\nwhile(cubeCount>=requiredCubes){\n // Removing Used Cubes.\n cubeCount-=requiredCubes;\n requiredCubes+=cubeInc;\n // Updating.\n height++;cubeInc++;\n}\n//Verdict.\nprint(height);\n/////////////////////////////////////////////////////////\n\n /////////////////////////////////////////\n // Programming-Credits atifcppprogrammer.\n /////////////////////////////////////////"}], "negative_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n const n = +d;\n let sum = 0;\n let ans = 0;\n\n if (n <= 2) {\n console.log(1);\n return;\n }\n\n for(let i = 1; i <= n; i++) {\n sum += sum + i;\n\n if (sum >= n) {\n ans = i;\n break;\n }\n }\n\n console.log(ans);\n\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n const n = +d;\n let sum = 0;\n let ans = 0;\n\n for(let i = 1; i <= n; i++) {\n sum += sum + i;\n\n if (sum >= n) {\n ans = i;\n break;\n }\n }\n\n console.log(ans);\n\n});\n"}, {"source_code": "var n = parseInt(readline());\nvar it = 0;\nvar level = 0;\nwhile(n >= it){\n\tlevel++;\n\tit += level;\n n-=it;\n\tprint(it);\n}\nprint(level);"}, {"source_code": "var n = parseInt(readline());\nvar it = 0;\nvar level = 0;\nwhile(n >= it){\n\tlevel++;\n\tit += level;\n n-=it;\n}\nprint(level);"}, {"source_code": "var n =Number(readline());\nvar level = 0;\nvar levelUsedCount = 0;\nvar usedCount = 0;\ndo{\n level++;\n levelUsedCount+=level;\n usedCount+=levelUsedCount;\n} while(usedCount+levelUsedCount+level+1 < n)\nprint(level);"}, {"source_code": "var n = readline();\nvar res = 0;\nvar coub = 0;\n\tfor (var i=1; i<+n; i++){\n\t\t\n\t\tres += i;\n\t\tcoub += res;\n\t\tif (coub+res>=+n)\n\t\tbreak;\n\t}\nprint(i);\n"}, {"source_code": "var n = parseInt(readline());\nvar i;\nvar sum = 1;\nfor (i=0;n>0;i++){\n\tn = n - sum;\n\tsum = sum + 2;\n}\nprint(i);"}, {"source_code": "var n = parseInt(readline());\nvar i;\nvar sum = 1;\nfor (i=1;n>0;i++){\n\tn = n - sum;\n\tsum = sum + 2;\n}\nprint(i);"}, {"source_code": "var n = parseInt(readline());\nvar ans = 0;\nvar sum = 0;\nfor (var i=1;i<=n;i++){\n\tsum = sum + i;\n\tans = ans + sum;\n}\nprint(ans);"}, {"source_code": "var n = parseInt(readline());\nvar i;\nvar sum = 1;\nfor (i=0;n-sum>=0;i++){\n\tn = n - sum;\n\tsum = sum + i + 1;\n}\nprint(i);"}, {"source_code": "var n = parseInt(readline());\nvar ans = 0;\nvar sum = 1;\nfor (var i=1;i<=n;i++){\n\tans = ans + sum;\n\tsum = sum + 2;\n}\nprint(ans);"}, {"source_code": "var ans = 0;\nvar n = parseInt(readline());\nvar tmp = 0;\nvar sum = 0;\nfor (var i=1;sum<=n;i++){\n\ttmp = tmp + i;\n\tsum = sum + tmp;\n\tans ++;\n}\nprint(ans);"}, {"source_code": "\"use strict\";\n\nvar n = +readline();\n\nvar result = 0;\nfor (let i = 1, s = 0; s < n; ++i, s += i) {\n n -= s;\n ++result;\n}\n\nwrite(result);\n"}, {"source_code": "\"use strict\";\n\nvar n = +readline();\n\nvar result = 0;\nfor (let i = 1, s = 0; s < n; ++i, s += i) {\n n -= s;\n ++result;\n}\n\nwrite(result);\n\"use strict\";\n\nvar n = +readline();\n\nvar result = 0;\nfor (let i = 1, s = 1; s <= n; ++i, s += i) {\n n -= s;\n ++result;\n}\n\nwrite(result);\n"}, {"source_code": "function nthSum(index) {\n return (index * (index + 1)) / 2;\n}\n\nfunction main() {\n var cubes = parseInt(readline(), 10);\n var rows = 0;\n var rowIndex = 1;\n\n while (cubes >= nthSum(rowIndex)) {\n cubes -= nthSum(rowIndex);\n rows++;\n rowIndex++;\n }\n\n print(rows);\n}"}, {"source_code": "var n = readline();\nvar result;\nvar x=0;\nfor(var i=1;i process.stdout.write(x + \"\\n\");\nvar write = (x) => process.stdout.write(x);\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf8\");\nprocess.stdin.on(\"data\", (chunk) => input += chunk);\nprocess.stdin.on(\"end\", () => {\n input = input.trim().split(/\\s+/);\n read = () => input.shift();\n process.exit(main() || 0);\n});\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\nreadline.question(\"\", (a) => {\n readline.question(\"\", (b) => {\n readline.question(\"\", (c) => {\n a=parseInt(a)\n b=parseInt(b)\n c=parseInt(c)\n console.log(Math.max(a + b + c, a + b * c, (a + b) * c, a * b + c, a * (b + c), a * b * c))\n readline.close();\n })\n })\n})"}, {"source_code": "var a = +readline(), b = +readline(), c = +readline(), max = 0;\n\nmax = ( (a+b+c) > max ) ? (a+b+c) : max;\nmax = ( (a*b*c) > max ) ? (a*b*c) : max;\nmax = ( ((a*b)+c) > max ) ? ((a*b)+c) : max;\nmax = ( (a+(b*c)) > max ) ? (a+(b*c)) : max;\nmax = ( ((a+b)*c) > max ) ? ((a+b)*c) : max;\nmax = ( (a*(b+c)) > max ) ? (a*(b+c)) : max;\nwrite(max);"}, {"source_code": "a=+readline();b=+readline();c=+readline();\nfunction x(l,r) { return (function (lb) { return r === 1 ? lb + 1 : lb * r })((l === 1 || b === 1) ? l + b : l * b); }\nprint(a < c ? x(a, c) : x(c, a))\n"}, {"source_code": "a=+readline();b=+readline();c=+readline();\n\nif (a > c) { x = c; c = a; a = x; }\nprint((function (ab) { return c === 1 ? ab + 1 : ab * c })((a === 1 || b === 1) ? a + b : a * b))\n"}, {"source_code": "var inp = [];\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\nvar M = Math;\nvar sortF = function(a,b){return a > b;};\n\nvar res = M.max(inp[0]*inp[1]*inp[2], inp[2]*(inp[0]+inp[1]), inp[0] + inp[1] + inp[2], inp[0] * (inp[2] + inp[1]));\n\n\n\nprint(res);\n"}, {"source_code": "\nfunction expression(a, b,c) {\n const ab = a+b;\n const bc = b+c;\n const abc = a+b+c;\n return Math.max(ab*c,a*bc,abc,a*b*c);\n}\n\nconst a = parseInt(readline());\nconst b = parseInt(readline());\nconst c = parseInt(readline());\n\nprint(expression(a,b,c));"}, {"source_code": "var n1 = parseInt(readline());\nvar n2 = parseInt(readline());\nvar n3 = parseInt(readline());\n\nvar sort = function(a,b){\n return b - a;\n}\n\nvar array = [];\n\narray.push(n1+(n2*n3));\narray.push(n1+n2+n3);\narray.push(n1*(n2+n3))\narray.push(n1*n2*n3);\narray.push((n1+n2)*n3);\n\narray = array.sort(sort);\n\nprint(array[0]);"}, {"source_code": "//var inputs = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar iPreNum = Number(readline().split(\" \").map(function(x) { return parseInt(x); }));\nvar iMidNum = Number(readline().split(\" \").map(function(x) { return parseInt(x); }));\nvar iFrontNum = Number(readline().split(\" \").map(function(x) { return parseInt(x); }));\n\nvar iSum = [];\niSum[0] = iPreNum + iMidNum + iFrontNum;\niSum[1] = (iPreNum + iMidNum) * iFrontNum;\niSum[2] = iPreNum * (iMidNum + iFrontNum);\niSum[3] = iPreNum * iMidNum * iFrontNum;\n\nvar iFinalAns = iSum[0];\n\nfor (var i = 1; i <= 3; i++) {\n\tif (iFinalAns < iSum[i])\n\t\tiFinalAns = iSum[i];\n}\n\nprint(iFinalAns + \"\\n\");\n"}, {"source_code": "(function () {\n\n\tprint(function (a, b, c) {\n\n\t\treturn Math.max(\n\t\t\ta * b * c,\n\t\t\t(a + b) * c,\n\t\t\ta * (b + c),\n\t\t\ta + b + c\n\t\t);\n\n\t}(+readline(), +readline(), +readline()));\n\n}.call(this))"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\n\nmax = a+b+c;\n\nif((a+b*c)>max){\n max = a+b*c;\n}\nif(((a+b)*c)>max){\n max = (a+b)*c;\n}\nif((a*b+c)>max){\n max = a*b+c;\n}\nif((a*(b+c))>max){\n max = a * (b+c);\n}\nif((a*b*c)>max){\n max = a*b*c;\n}\nprint(max);"}, {"source_code": "var a = +readline();\nvar b = +readline();\nvar c = +readline();\nvar list = [\n\ta + ( b * c ),\n\ta * ( b + c ),\n\ta * b * c,\n\ta + b + c,\n\t( a + b ) * c,\n];\n\nprint(Math.max.apply(Math,list));"}, {"source_code": "var a = Number(readline());\nvar b = Number(readline());\nvar c = Number(readline());\n\nres = Math.max(\n a+b+c,\n (a+b)*c,\n a*(b+c),\n a*b*c\n );\n\nprint(res);"}, {"source_code": "var a=Number.parseInt(readline()),b=Number.parseInt(readline()),c=Number.parseInt(readline())\nvar ok=a+b+c\nok=Math.max(ok,a*b+c)\nok=Math.max(ok,a+b*c)\nok=Math.max(ok,(a+b)*c)\nok=Math.max(ok,a*(b+c))\nok=Math.max(ok,a*b*c)\nprint(ok)"}, {"source_code": "(function () {\n var a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n if ((a !== 1) && (b !== 1) && (c !== 1)) {\n print(a * b * c);\n } else if ((a === 1) && (b === 1) && (c === 1)) {\n print(a + b + c);\n } else if ((a === 1) && (c === 1)) {\n print(a + b + c);\n } else if (a === 1) {\n print((a + b) * c);\n } else if (c === 1) {\n print(a * (b + c));\n } else {\n if (a > c) {\n print(a * (b + c));\n } else {\n print((a + b) * c);\n }\n }\n})();"}, {"source_code": "(function () {\n var a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n if ((a !== 1) && (b !== 1) && (c !== 1)) {\n print(a * b * c);\n } else if ((a === 1) && (c === 1)) {\n print(a + b + c);\n } else if (a === 1) {\n print((a + b) * c);\n } else if (c === 1) {\n print(a * (b + c));\n } else {\n if (a > c) {\n print(a * (b + c));\n } else {\n print((a + b) * c);\n }\n }\n})();"}, {"source_code": "//var myArray = readline().split(\" \");\n//for(var i=0; i= totalEx2 && totalEx1 >= totalEx3 && totalEx1 >= totalEx4 && totalEx1 >= totalEx5) {\n return totalEx1;\n }else if (totalEx2 >= totalEx1 && totalEx2 >= totalEx3 && totalEx2 >= totalEx4 && totalEx2 >= totalEx5) {\n return totalEx2;\n }else if (totalEx3 >= totalEx1 && totalEx3 >= totalEx2 && totalEx3 >= totalEx4 && totalEx3 >= totalEx5) {\n return totalEx3;\n }else if (totalEx4 >= totalEx1 && totalEx4 >= totalEx2 && totalEx4 >= totalEx3 && totalEx4 >= totalEx5) {\n return totalEx4;\n }else if (totalEx5 >= totalEx1 && totalEx5 >= totalEx2 && totalEx5 >= totalEx3 && totalEx5 >= totalEx4) {\n return totalEx5;\n }\n\n}\na = readline()\nb = readline()\nc = readline()\nprint(expression(parseInt(a),parseInt(b),parseInt(c)));\n"}, {"source_code": "var a = parseInt(readline()),\nb = parseInt(readline()),\nc = parseInt(readline()),\nfirstExp = a + b * c,\nsecondExp = a * (b +c),\nthirdExp = a * b * c,\nfourthExp = (a + b) * c,\nfifthExp = a + b + c,\nmax = 0;\nif(max < firstExp){\n max = firstExp;\n}\n\nif(max < secondExp){\n max = secondExp;\n}\n\nif(max < thirdExp){\n max = thirdExp;\n}\n\nif(max < fourthExp){\n max = fourthExp;\n}\n\nif(max < fifthExp){\n max = fifthExp;\n}\n\nprint(max);"}, {"source_code": "'use strict';\n\n(function() {\n let a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n \n function calculateMax(a, b){\n if(a + b > a * b) {\n return a + b;\n } \n\n return a * b;\n }\n\n function getMax(a, b) {\n if ( a > b) {\n return a;\n }\n\n return b;\n }\n \n let l = calculateMax(a, b);\n let r = calculateMax(b, c);\n\n let lc = calculateMax(l, c);\n let ra = calculateMax(r, a); \n\n\n write(getMax(lc, ra));\n \n})();"}, {"source_code": "var dato1 =parseInt(readline());\nvar dato2=parseInt(readline());\nvar dato3=parseInt(readline());\n\nvar resultado=[];\nvar operacion1= dato3 * (dato1 + dato2);\nresultado.push(operacion1);\nvar operacion2= dato1 * (dato2 + dato3);\nresultado.push(operacion2);\nvar operacion3= dato1+dato2+dato3;\nresultado.push(operacion3);\nvar operacion4= dato1*dato2*dato3;\nresultado.push(operacion4);\n\n\n\nresultado.sort(function(a, b){return b-a});\n\nprint(resultado[0]);\n"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar max = 0;\nvar max1=0;\nvar x = 0;\nvar abc = [a,b,c];\nfor (i in abc){\n\tabc[i]=parseInt(abc[i]);\n}\nif((abc[0] + abc[1])>=(abc[1] * abc[0])) max = abc[0] + abc[1];\nelse max = abc[0] * abc[1];\nif((abc[2] + max)>=(abc[2] * max)) max = abc[2] + max;\nelse max = abc[2] * max;\nif((abc[2] + abc[1])>=(abc[1] * abc[2])) max1 = abc[2] + abc[1];\nelse max1 = abc[2] * abc[1];\nif((abc[0] + max1)>=(abc[0] * max1)) max1 = abc[0] + max1;\nelse max1 = abc[0] * max1;\nif(max1>max) max = max1;\nprint(max);"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\nprint(Math.max(a*b*c,a*b+c,a+b+c,a+b*c,(a+b)*c,a*(b+c)));"}, {"source_code": "\t var a = 0; var b = 0; var c =0;\n\t for (var i=0; i<3; i++){\n\t\t\tvar x = +readline();\n\t\t\tif(i==0) a = x;\n\t\t\telse if (i==1) b =x;\n\t\t\telse c = x;\n\t }\n\t var arr = [];\n\t arr[0] = a+b*c;\n\t arr[1] = a*(b+c);\n\t arr[2] = a*b*c;\n\t arr[3] = (a+b)*c;\n\t arr[4] = a+b+c;\n\tprint(Math.max.apply(this, arr));"}, {"source_code": "const start=(main, readlineFun, printFun) => {\n if (readlineFun && printFun) {\n main(readlineFun, printFun);\n return;\n }\n\n process.stdin.resume();\n process.stdin.setEncoding('utf8');\n\n let input = '',\n readline,\n print;\n\n process.stdin.on('data', function(chunk) {\n input += chunk;\n });\n\n process.stdin.on('end', function() {\n input = input.split('\\n');\n print = function(data) {\n process.stdout.write(data + '\\n');\n };\n let inputLineIndex = 0;\n readline = function() {\n return inputLineIndex >= input.length ? undefined : input[inputLineIndex++];\n };\n process.exit(main(readline, print) || 0);\n });\n} \n function main(readline, print) {\n const a = parseInt(readline());\n const b = parseInt(readline());\n const c = parseInt(readline());\n\n let max = Math.max(a + b + c, (a + b) * c, a + b * c, a * b + c, a * (b + c), a * b * c);\n\n print(max);\n} \n start(main);"}, {"source_code": "let readline = require('readline');\nlet rl = readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout\n});\n\nlet input = [];\n\nrl.on('line', function(line) {\n\tinput.push(line);\n\tif (input.length === 3) {\n\t\texpression(input);\n\t\trl.close();\n\t}\n});\n\nlet expression = (input) => {\n\t//1+2+3 _ 1*2*3 _ (1+2)*3 _ 1*(2+3) _ 1*2+3 _ 1+2*3\n\tinput = input.map((el) => {\n\t\treturn el * 1;\n\t});\n\n\tlet val = [\n\t\tinput[0] + input[1] + input[2],\n\t\tinput[0] * input[1] * input[2],\n\t\t(input[0] + input[1]) * input[2],\n\t\tinput[0] * (input[1] + input[2]),\n\t\tinput[0] * input[1] + input[2],\n\t\tinput[0] + input[1] * input[2]\n\t];\n\n\tvar max = val.reduce(function(a, b) {\n\t\treturn Math.max(a, b);\n\t});\n\n\tconsole.log(max);\n};\n"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n const nums = inputs.map(num => parseInt(num));\n\n let maxValue = nums[0] * (nums[1] + nums[2]);\n\n maxValue = Math.max(maxValue, (nums[0] * nums[1]) * nums[2])\n maxValue = Math.max(maxValue, (nums[0] + nums[1]) + nums[2])\n maxValue = Math.max(maxValue, (nums[0] + nums[1]) * nums[2])\n \n console.log(maxValue)\n})"}, {"source_code": "const input = [];\n\nfunction splitAndParseInt(line) {\n return line.split(\" \").map((x) => parseInt(x));\n}\n\nconst readLine = require(\"readline\").createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nreadLine.on(\"line\", (line) => {\n input.push(line);\n});\n\nreadLine.on(\"close\", () => {\n const a = parseInt(input[0]);\n const b = parseInt(input[1]);\n const c = parseInt(input[2]);\n\n console.log(\n Math.max(\n a + b + c,\n a * b * c,\n a * (b + c),\n (a + b) * c,\n a * (c + b),\n (a + b) * c\n )\n );\n});\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n const a = parseInt(input[0]);\n const b = parseInt(input[1]);\n const c = parseInt(input[2]);\n\n let max = a + b + c;\n if (a * b * c > max) max = a * b * c;\n if ( (a + b) * c > max) max = (a + b) * c;\n if ( a * (b + c) > max) max = a * (b + c);\n\n console.log(max);\n});"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction main() {\n\tconst a = readLine() >> 0;\n\tconst b = readLine() >> 0;\n\tconst c = readLine() >> 0;\n\n\tlet values = [];\n\tvalues.push(a + b + c);\n\tvalues.push(a * (b + c));\n\tvalues.push(a * b + c);\n\tvalues.push((a + b) * c);\n\tvalues.push(a + b * c);\n\tvalues.push(a * b * c);\n\n\tconsole.log(Math.max(...values));\n}\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadline.on('line', line => input.push(line));\n\nreadline.on('close', () => {\n const [a, b, c] = input.map(v => parseInt(v));\n let abc = a * b * c, apbpc = a + b + c, apbc = (a + b) * c, abpc = a * (b + c);\n if (abc > apbpc && abc > apbc && abc > abpc) console.log(abc);\n else if (apbpc > abc && apbpc > apbc && apbpc > abpc) console.log(apbpc);\n else if (apbc > abc && apbc > apbpc && apbc > abpc) console.log(apbc);\n else console.log(abpc);\n});"}, {"source_code": "let fs = require(\"fs\");\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0;\n});\nfor (let i = 0; i < txt.length; i += 3) {\n doit(txt[i] * 1, txt[i + 1] * 1, txt[i + 2] * 1)\n\n}\n\nfunction doit(n1, n2, n3) {\n let prob = [n1 + n2 + n3,\n n1 * n2 * n3,\n n1 + n2 * n3,\n n1 * n2 + n3,\n (n1 + n2) * n3,\n n1 * (n2 + n3)\n ]\n console.log(Math.max(...prob));\n}"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const a = parseInt(readLine());\n const b = parseInt(readLine());\n const c = parseInt(readLine());\n const maxN = Math.max(Math.max(a+b+c, a + (b * c), (a * b) + c), Math.max(a * b * c, a * ( b + c), (a + b) * c));\n console.log(maxN);\n}\n"}, {"source_code": "a = +readline();\nb = +readline();\nc = +readline();\nways = [\n a+b+c,\n a+b*c,\n a*b+c,\n a*b*c,\n (a+b)*c,\n a*(b+c)\n];\nprint(Math.max.apply(this, ways));\n"}, {"source_code": "var n = Number(readline()), m = Number(readline()), k = Number(readline());\nprint(Math.max(n*(m+k), n*m*k, (n+m)*k, (n+m+k)));"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\nvar s = [];\nArray.prototype.max = function() {\n return Math.max.apply(null, this);\n};\ns.push(a*b*c);\ns.push(a+b+c);\ns.push(a+b*c);\ns.push(a*b+c);\ns.push((a+b)*c);\ns.push(a*(b+c));\nprint (s.max());"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\nvar r = [];\nArray.prototype.max = function() {\n return Math.max.apply(null, this);\n};\nr.push(a*b*c);\nr.push(a+b+c);\nr.push(a*(b+c));\nr.push((a+b)*c);\nprint(r.max());"}, {"source_code": "var computeMax = function(arr)\n {\n var decrease = function(a, b)\n {\n return b - a;\n }\n var arrRes = [];\n arrRes.push((arr[0] + arr[1]) * arr[2]);\n arrRes.push(arr[0] * (arr[1] + arr[2]));\n arrRes.push(arr[0] * arr[1] * arr[2]);\n arrRes.push(arr[0] + arr[1] + arr[2]);\n arrRes.push(arr[0] * arr[1] + arr[2]);\n arrRes.push(arr[0] + arr[1] * arr[2]);\n arrRes = arrRes.sort(decrease);\n return arrRes[0];\n }\nvar arr = [];\nfor (var i = 1; i <= 3; i++)\n {\n input = +readline();\n arr.push(input);\n }\nprint(computeMax(arr));"}, {"source_code": "var a = readline()*1;\nvar b = readline()*1;\nvar c = readline()*1;\n\nvar e1 = a+b*c,\n\te2 = a*(b+c),\n\te3 = (a+b)*c,\n\te4 = a*b*c,\n\te5 = a+b+c,\n\te6 = a*b+c;\nvar arr = [e1,e2,e3,e4,e5,e6];\nprint(Math.max.apply(null,arr) );\n\t"}, {"source_code": "var a = parseInt(readline(), 10),\n b = parseInt(readline(), 10),\n c = parseInt(readline(), 10),\n result = [];\n\nresult.push( (a+b)*c );\nresult.push( (a*b)+c );\nresult.push( a+(b*c) );\nresult.push( a*(b+c) );\nresult.push( a*b*c );\nresult.push( a+b+c );\n\nprint(result.sort((a,b) => a-b).pop());"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\n\nprint(Math.max(a + b + c, (a + b) * c, a * (b + c), a * b * c));\n"}, {"source_code": "var v1= parseInt(readline());\nvar v2 = parseInt(readline());\nvar v3 =parseInt(readline());\n\nvar sumSum = v1+v2+v3;\nvar sumTimes = v1+(v2*v3);\nvar sumTimes01 = (v1+v2)*v3;\nvar timesTimes = v1*v2*v3;\nvar timesSum = (v1*v2)+v3;\nvar timesSum01 = v1*(v2+v3);\n\nvar list= [sumSum, sumTimes, sumTimes01, timesTimes, timesSum, timesSum01];\n\nprint(list.sort(function(a,b){return b-a;})[0]);"}, {"source_code": "(function main() {\n \n var num1 = parseInt(readline());\n var num2 = parseInt(readline());\n var num3 = parseInt(readline());\n\n var res1 = num1 + num2 + num3;\n var res2 = num1 * num2 + num3;\n var res3 = num1 + num2 * num3;\n var res4 = num1 * num2 * num3;\n var res5 = (num1 + num2) * num3;\n var res6 = num1 * (num2 + num3);\n\n print(Math.max(res1, res2, res3, res4, res5, res6));\n\n return 0;\n})();"}, {"source_code": "Array.prototype.nextPermutation = function() {\n for (var i = this.length - 1; i > 0 && this[i - 1] >= this[i]; --i);\n if (i === 0) return false;\n for (var j = this.length - 1; this[i - 1] >= this[j]; --j);\n this[j] = [this[i - 1], this[i - 1] = this[j]][0];\n for (j = this.length - 1; i < j; ++i, --j) this[j] = [this[i], this[i] = this[j]][0];\n return true;\n};\n\nvar values = [];\nfor (var i = 0; i < 3; ++i) {\n values.push(+readline());\n}\n\nvar operations = ['+', '+', '*', '*'].sort();\nvar result = 0;\n\nvar perform = function(value1, value2, operation) {\n if (operation === '+') {\n return value1 + value2;\n } else {\n return value1 * value2;\n }\n};\n\ndo {\n result = Math.max(\n result,\n perform(\n perform(values[0], values[1], operations[0]),\n values[2],\n operations[1]\n ),\n perform(\n values[0],\n perform(values[1], values[2], operations[1]),\n operations[0]\n )\n );\n} while (operations.nextPermutation());\n\nwrite(result);\n"}, {"source_code": "Array.prototype.nextPermutation = function() {\n for (var i = this.length - 1; i > 0 && this[i - 1] >= this[i]; --i);\n if (i === 0) return false;\n for (var j = this.length - 1; this[i - 1] >= this[j]; --j);\n this[j] = [this[i - 1], this[i - 1] = this[j]][0];\n for (j = this.length - 1; i < j; ++i, --j) this[j] = [this[i], this[i] = this[j]][0];\n return true;\n};\n\nvar values = [];\nfor (var i = 0; i < 3; ++i) {\n values.push(+readline());\n}\n\nvar operations = ['+', '+', '*', '*'].sort();\nvar result = 0;\n\nvar perform = function(value1, value2, operation) {\n return operation === '+' ? value1 + value2 : value1 * value2;\n};\n\ndo {\n result = Math.max(\n result,\n perform(\n perform(values[0], values[1], operations[0]),\n values[2],\n operations[1]\n ),\n perform(\n values[0],\n perform(values[1], values[2], operations[1]),\n operations[0]\n )\n );\n} while (operations.nextPermutation());\n\nwrite(result);"}, {"source_code": " var a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n if ((a !== 1) && (b !== 1) && (c !== 1)) {\n print(a * b * c);\n } else if ((a === 1) && (b === 1) && (c === 1)) {\n print(a + b + c);\n } else if ((a === 1) && (c === 1)) {\n print(a + b + c);\n } else if (a === 1) {\n print((a + b) * c);\n } else if (c === 1) {\n print(a * (b + c));\n } else {\n if (a > c) {\n print(a * (b + c));\n } else {\n print((a + b) * c);\n }\n }"}, {"source_code": "print.call(undefined, (function() {\n var expression = [ 'a+b+c', 'a*b*c', 'a+b*c', '(a+b)*c', 'a*b+c', 'a*(b+c)' ];\n \n var a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n \n if(a == b == c == 1) {\n return 3;\n } else {\n var result = 0;\n \n expression.forEach(function(s) {\n result < eval(s) ? result = eval(s) : false;\n });\n \n return result;\n }\n})());"}, {"source_code": "var a = parseInt(readline());var b = parseInt(readline());var c = parseInt(readline()) ;\n\nvar gar = [];\ngar.push(a+(b*c));\ngar.push(a*(b+c));\ngar.push(a*b*c);\ngar.push((a+b)*c);\ngar.push((a*b)+c);\ngar.push(a+b+c);\n\n\tprint(Math.max(...gar))"}, {"source_code": "//x=readline();\nvar a = [];\na.push(readline());\n a.push(readline());\n a.push(readline());\n/*a = a.sort(function(a,b){\n return a-b;\n});*/\nvar max_stack = [];\n//(a+b)*c\nmax_stack.push(parseInt((parseInt(a[0])+parseInt(a[1]))*parseInt(a[2])));\n//a*(b+c)\nmax_stack.push(parseInt(parseInt(a[0])*((parseInt(a[1])+parseInt(a[2])))));\n//a*b*c\nmax_stack.push(parseInt(parseInt(a[0])*parseInt(a[1])*parseInt(a[2])));\n\n//a*b+c\n\nmax_stack.push(parseInt(parseInt(a[0])*parseInt(a[1])+parseInt(a[2])));\n//a+b*c\nmax_stack.push(parseInt(parseInt(a[0])+parseInt(a[1])*parseInt(a[2])));\n//a+b+c\nmax_stack.push(parseInt(parseInt(a[0])+parseInt(a[1])+parseInt(a[2])));\n\n \nvar maximus=-999;\nfor(i=0;i=0,j= 2) {\n write(a+b+c);\n return;\n }\n \n let indexOfOne = array.indexOf(1);\n \n if(indexOfOne === -1){\n write(a*b*c);\n } else if(indexOfOne === 0) {\n write((array[0] + array[1])*array[2]);\n } else if (indexOfOne === 2) {\n write((array[2] + array[1])*array[0]);\n } else {\n array.sort((a, b) => a - b);\n \n write((a[0] + a[1])*a[2]);\n }\n \n return;\n\n})();"}, {"source_code": "var n = readline();\nvar res = 0; \nfor (var i=0; i=abc[1]*abc[0]){\n\tmax = abc[2]*(abc[1]+abc[0]);}\nelse max = abc[2]*(abc[1]*abc[0]);\n}\nelse max = abc[0]+abc[1]+abc[2];\nprint(max);\nfunction mySort(a, b){return a-b;}\n}"}, {"source_code": "var res = 0; \nfor (var i=0; i<3; i++){\n\tvar n = readline();\n\tif (n==0||n==1)\n \tres+=Number(n);\n\telse if (res==1)\n\tres+=Number(n);\n else {res = 1;\n\t\tres*=1*Number(n);\n\t\t}\n}\nprint(res);"}, {"source_code": "var n = readline();\nvar res = 0; \nfor (var i=0; i= e2 && e1 >= e3 && e1 >= e4)\n\tprint(e1);\nelse if(e2 >= e1 && e2 >= e3 && e2 >= e4)\n\tprint(e2);\nelse if(e3 >= e1 && e3 >= e2 && e3 >= e4)\n\tprint(e3);\nelse \n\tprint(e4);"}, {"source_code": "let fs = require(\"fs\");\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0;\n});\nfor (let i = 0; i < txt.length; i++) {\n let info = txt[i].split(\" \")\n doit(info[0] * 1, info[1] * 1,info[2]*1);\n\n}\n\nfunction doit(n1, n2,n3) {\n if(n1>n3){\n console.log(n1*(n2+n3));\n }else{\n console.log((n1+n2)*n3); \n }\n}"}, {"source_code": "var n1 = parseInt(readline());\nvar n2 = parseInt(readline());\nvar n3 = parseInt(readline());\n\nvar sort = function(a,b){\n return b - a;\n}\n\nvar array = [];\n\narray.push(n1+(n2*n3));\narray.push(n1*(n2+n3))\narray.push(n1*n2*n3);\narray.push((n1+n2)*n3);\n\narray = array.sort(sort);\n\nprint(array[0]);"}, {"source_code": "var m = Number(readline()), n = Number(readline()), k = Number(readline());\nprint(Math.max(n+m*k, n*(m+k), n*m*k, (n+m)*k, (n+m+k)));"}, {"source_code": "print.call(undefined, (function(a) {\n var expression = [ 'a+b+c', 'a*b*c', 'a+b*c', '(a+b)*c', 'a*b+c', 'a*(b+c)' ];\n \n var b = parseInt(readline()),\n c = parseInt(readline()),\n array = [ a, b, c ];\n \n if(a == b == c == 1) {\n return 3;\n } else {\n var result = 0;\n \n expression.forEach(function(s) {\n result < eval(s) ? result = eval(s) : false;\n });\n \n return result;\n }\n}).apply(undefined, readline().split('').map(Number)));"}, {"source_code": "var res = 0;\nvar x =0;\t\t ////580A\nfor (var i=0; i<3; i++){\n\tvar n = readline();\n\tn==0||n==1? x+=Number(n):res*=Number(n)\n}\n print(res+x);"}, {"source_code": "'use strict';\n\n(function() {\n let a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n \n let array = [a,b,c];\n \n let str = array.join('').replace(new RegExp('1', 'g'), '');\n\n if(3 - str.length >= 2) {\n write(a+b+c);\n return;\n }\n \n let indexOfOne = array.indexOf(1);\n \n if(indexOfOne === -1){\n write(a*b*c);\n } else if(indexOfOne === 0) {\n write((array[0] + array[1])*array[2]);\n } else if (indexOfOne === 2) {\n write((array[2] + array[1])*array[0]);\n } else {\n array.sort((a, b) => a - b);\n \n write((array[0] + array[1])*array[2]);\n }\n \n return;\n\n})();\n"}, {"source_code": "(function () {\n var a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n if ((a !== 1) && (b !== 1) && (c !== 1)) {\n print(a * b * c);\n } else if ((a === 1) && (b === 1) && (c === 1)) {\n print(a + b + c);\n } else if (a === 1) {\n print((a + b) * c);\n } else if (c === 1) {\n print(a * (b * c));\n } else {\n if (a > c) {\n print(a * (b * c));\n } else {\n print((a * b) * c);\n }\n }\n})();"}, {"source_code": "'use strict';\n\n(function() {\n let a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n \n let array = [a,b,c];\n \n let str = array.join('').replace(new RegExp('1', 'g'), '');\n\n if(3 - str.length >= 2) {\n write(a+b+c);\n return;\n }\n \n let indexOfOne = array.indexOf(1);\n \n if(indexOfOne === -1){\n write(a*b*c);\n } else if(indexOfOne === 0) {\n write((array[0] + array[1])*array[2]);\n } else if (indexOfOne === 2) {\n write((array[2] + array[1])*array[0]);\n } else {\n array.sort((a, b) => a - b);\n \n write((a[0] + a[1])*a[2]);\n }\n \n return;\n\n})();"}, {"source_code": "var inputs = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar n = inputs[0], m = inputs[1], a = inputs[2];\n\nprint(n + \" \" + m + \" \" + a);\n"}, {"source_code": "\t var a = 0; var b = 0; var c =0;\n\t for (var i=0; i<3; i++){\n\t\t\tvar x = +readline();\n\t\t\tif(i==0) a = x;\n\t\t\telse if (i==2) b =x;\n\t\t\telse c = x;\n\t }\n\t var arr = [];\n\t arr[0] = a+b*c;\n\t arr[1] = a*(b+c);\n\t arr[2] = a*b*c;\n\t arr[3] = (a+b)*c;\n\tprint(Math.max.apply(this, arr));"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\n\nvar max = a;\n\nif(a==0 || b==0 || a==1 || b==1){\n max = max + b;\n if(max==0 || c==0 || max==1 || c==1){\n max = max + c;\n } else {\n max = max * c;\n }\n} else{\n max = max * b;\n if(max==0 || c==0 || max==1 || c==1){\n max = max + c\n } else {\n max = max * c;\n }\n}\n\nprint(max);"}, {"source_code": "'use strict';\n\n(function() {\n let a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n \n if(a === 1 && b === 1 && c === 1) {\n write(3);\n return;\n }\n \n let array = [a,b,c];\n \n let indexOfOne = array.indexOf(1);\n \n if(indexOfOne === -1){\n write(a*b*c);\n } else if(indexOfOne === 0 || indexOfOne === 2) { \n write((a[0] + a[1])*a[2]);\n } else {\n array.sort((a, b) => a - b);\n \n write((a[0] + a[1])*a[2]);\n }\n \n return;\n\n})();\n"}, {"source_code": "var computeMax = function(arr)\n {\n var decrease = function(a, b)\n {\n return b - a;\n }\n var arrRes = [];\n arrRes.push((arr[0] + arr[1]) * arr[2]);\n arrRes.push(arr[0] * (arr[1] + arr[2]));\n arrRes.push(arr[0] * arr[1] * arr[2]);\n arrRes.push(arr[0] + arr[1] + arr[2]);\n arrRes.push(arr[0] * arr[1] + arr[2]);\n arrRes.push(arr[0] + arr[1] * arr[2]);\n arrRes = arrRes.sort(decrease);\n return arr[0];\n }\nvar arr = [];\nfor (var i = 1; i <= 3; i++)\n {\n input = +readline();\n arr.push(input);\n }\nprint(computeMax(arr));"}, {"source_code": "var a = parseInt(readline()),\nb = parseInt(readline()),\nc = parseInt(readline()),\nfirstExp = a + b * c,\nsecondExp = a * (b +c),\nthirdExp = a * b * c,\nfourthExp = (a + b) * c,\nmax = 0;\nif(max < firstExp){\n max = firstExp;\n}\n\nif(max < secondExp){\n max = secondExp;\n}\n\nif(max < thirdExp){\n max = thirdExp;\n}\n\nif(max < fourthExp){\n max = fourthExp;\n}\n\nprint(max);"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadline.on('line', line => input.push(line));\n\nreadline.on('close', () => {\n const ints = input.map(v => parseInt(v));\n if (ints[0] === 1 && ints[1] === 1 && ints[2] === 1) console.log(ints[0] + ints[1] + ints[2]);\n else if (ints.every(v => v > 1)) console.log(ints[0] * ints[1] * ints[2]);\n else if ((ints[0] + ints[1]) >= ints[2]) console.log((ints[0] + ints[1]) * ints[2]);\n else console.log(ints[0] * (ints[1] + ints[2]));\n});"}, {"source_code": "var res = 0; \nfor (var i=0; i<3; i++){\n\tvar n = readline();\n\tif (n==0||n==1)\n \tres+=Number(n);\n\telse if (res==1)\n\tres+=Number(n);\n else {res = 1;\n\t\tres*=1*Number(n);\n\t\t}\n}\nprint(res);"}, {"source_code": "var n1 = parseInt(readline());\nvar n2 = parseInt(readline());\nvar n3 = parseInt(readline());\n\nvar sort = function(a,b){\n return b - a;\n}\n\nvar array = [];\n\narray.push(n1+(n2*n3));\narray.push(n1*(n2+n3))\narray.push(n1*n2*n3);\narray.push((n1+n2)*n3);\n\narray = array.sort(sort);\n\nprint(array[0]);"}, {"source_code": "var res =0; \nfor (var i=0; i<3; i++){\n\tvar n = readline();\n if (res==0)\n\tres+=Number(n);\n\telse if (res==1)\n\t\tres+=Number(n);\n\t\telse if (n==1) res+=Number(n);\n\telse res*=Number(n);\n}\nprint(res);\n"}, {"source_code": "let fs = require(\"fs\");\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0;\n});\nfor (let i = 0; i < txt.length; i+=3) {\n doit(txt[i]*1, txt[i+1] * 1,txt[i+2]*1);\n\n}\n\nfunction doit(n1, n2,n3) {\n if(n1>n3){\n console.log(n1*(n2+n3));\n }else{\n console.log((n1+n2)*n3); \n }\n}"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\n\nvar max = a;\n\nif(a==0 || b==0 || a==1 || b==1){\n max = max + b;\n if(max==0 || c==0 || max==1 || c==1){\n max = max + c;\n } else {\n max = max * c;\n }\n} else{\n max = max * b;\n if(max==0 || c==0 || max==1 || c==1){\n max = max + c\n } else {\n max = max * c;\n }\n}\n\nprint(max);"}, {"source_code": "//var inputs = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar iPreNum = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar iMidNum = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar iFrontNum = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nvar iSum = [];\niSum[0] = iPreNum + iMidNum + iFrontNum;\niSum[1] = (iPreNum + iMidNum) * iFrontNum;\niSum[2] = iPreNum * (iMidNum + iFrontNum);\niSum[3] = iPreNum * iMidNum * iFrontNum;\n\nvar iFinalAns = iSum[0];\n\nfor (var i = 1; i <= 3; i++) {\n\tif (iFinalAns < iSum[i])\n\t\tiFinalAns = iSum[i];\n}\n\nprint(iFinalAns + \"\\n\");\n"}, {"source_code": "var res =0; \nfor (var i=0; i<3; i++){\n\tvar n = readline();\n if (res==0)\n\tres+=Number(n);\n\telse if (res==1)\n\t\tres+=Number(n);\n\t\telse if (n==1) res+=Number(n);\n\telse res*=Number(n);\n}\nprint(res);\n"}, {"source_code": "\t var res = 0;\n\t for (var i=0; i<3; i++){\n\t\tvar c = +readline();\n\t\tif (res+c>res*c)\n\t\t\tres+=c;\n\t\telse res*=c;\n\t }\n\t print(res);"}, {"source_code": "var res = 0;\n\tfor (var i=0; i<3; i++){\n\t\tvar str = Number(readline());\n\t\tif (str==1||i==0||str==1)\n\t\t\tres+=str;\n\t\telse res*= str;\n\t\t\n\t}\nprint(res);"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const a = parseInt(readLine());\n const b = parseInt(readLine());\n const c = parseInt(readLine());\n const maxN = Math.max(Math.max(a + (b * c), (a * b) + c), Math.max(a * b * c, (a + b) * c));\n console.log(maxN);\n}\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadline.on('line', line => input.push(line));\n\nreadline.on('close', () => {\n const ints = input.map(v => parseInt(v));\n if (ints[0] === 1 && ints[1] === 1 && ints[2] === 1) console.log(ints[0] + ints[1] + ints[2]);\n else if (ints.every(v => v > 2)) console.log(ints[0] * ints[1] * ints[2]);\n else if ((ints[0] + ints[1]) >= ints[2]) console.log((ints[0] + ints[1]) * ints[2]);\n else console.log(ints[0] * (ints[1] + ints[2]));\n});"}, {"source_code": "Array.prototype.nextPermutation = function() {\n for (var i = this.length - 1; i > 0 && this[i - 1] >= this[i]; --i);\n if (i === 0) return false;\n for (var j = this.length - 1; this[i - 1] >= this[j]; --j);\n this[j] = [this[i - 1], this[i - 1] = this[j]][0];\n for (j = this.length - 1; i < j; ++i, --j) this[j] = [this[i], this[i] = this[j]][0];\n return true;\n};\n\nvar values = [];\nfor (var i = 0; i < 3; ++i) {\n values.push(+readline());\n}\n\nvar operations = ['+', '+', '*', '*'].sort();\nvar result = 0;\n\nvar perform = function(value1, value2, operation) {\n if (operations[0] === '+') {\n return value1 + value2;\n } else {\n return value1 * value2;\n }\n};\n\ndo {\n result = Math.max(\n result,\n perform(\n perform(values[0], values[1], operations[0]),\n values[2],\n operations[1]\n )\n );\n} while (operations.nextPermutation());\n\nwrite(result);\n"}, {"source_code": "var computeMax = function(arr)\n {\n var decrease = function(a, b)\n {\n return b - a;\n }\n var arrRes = [];\n arrRes.push((arr[0] + arr[1]) * arr[2]);\n arrRes.push(arr[0] * (arr[1] + arr[2]));\n arrRes.push(arr[0] * arr[1] * arr[2]);\n arrRes.push(arr[0] + arr[1] + arr[2]);\n arrRes.push(arr[0] * arr[1] + arr[2]);\n arrRes.push(arr[0] + arr[1] * arr[2]);\n arrRes = arrRes.sort(decrease);\n return arr[0];\n }\nvar arr = [];\nfor (var i = 1; i <= 3; i++)\n {\n input = +readline();\n arr.push(input);\n }\nprint(computeMax(arr));"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n const nums = inputs.map(num => parseInt(num));\n const minimum = Math.min(...nums);\n const maximum = Math.max(...nums);\n let maxValue = 0;\n\n // If first number == 0\n if (minimum == 0) {\n if ((nums[1] * nums[2]) == 1) {\n maxValue = nums[1] + nums[2]\n return console.log(maxValue)\n } else {\n maxValue = nums[1] * nums[2]\n return console.log(maxValue)\n }\n } else if (minimum == 1) {\n const others = nums.filter(num => num != maximum).reduce((prev, curr) => prev += curr, 0)\n maxValue = maximum * others;\n return console.log(maxValue)\n } else {\n maxValue = nums.reduce((prev, curr) => prev *= curr);\n return console.log(maxValue)\n }\n\n})"}, {"source_code": "let fs = require(\"fs\");\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0;\n});\nfor (let i = 0; i < txt.length; i+=3) {\n doit([txt[i]*1, txt[i+1] * 1,txt[i+2]*1].sort((a,b)=>{return a-b}));\n\n}\n\nfunction doit(tab) {\n for (let i = 0; i < 2; i++) {\n if(tab[i]==1){\n tab[i+1]+=tab[i]\n }\n \n }\n if(tab[tab.length-1]==1){\n tab[tab.length-2]+=tab[tab.length-1];\n }\n console.log(tab[0]*tab[1]*tab[2]);\n \n \n}"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n const nums = inputs.map(num => parseInt(num));\n const minimum = Math.min(...nums);\n const maximum = Math.max(...nums);\n const othersValue = nums.filter(num => num != maximum).reduce((prev, curr) => prev += curr, 0)\n let maxValue = 0;\n\n // If first number == 0\n if (minimum == 0) {\n if (nums.includes(1)) {\n maxValue = nums.reduce((prev, curr) => prev += curr, 0)\n }\n else\n maxValue = nums.filter(num => num != 0).reduce((prev, curr) => prev *= curr)\n return console.log(maxValue)\n } else if (minimum == 1) {\n const onesSum = nums.filter(num => num == 1).reduce((prev, curr) => prev += curr, 0);\n let othersMulti = nums.filter(num => num != 1);\n\n if (othersMulti.length) {\n othersMulti = othersMulti.reduce((prev, curr) => prev *= curr);\n maxValue = onesSum + othersMulti;\n }\n else {\n maxValue = onesSum;\n }\n\n return console.log(maxValue)\n } else {\n maxValue = nums.reduce((prev, curr) => prev *= curr);\n return console.log(maxValue)\n }\n\n})"}, {"source_code": "Array.prototype.nextPermutation = function() {\n for (var i = this.length - 1; i > 0 && this[i - 1] >= this[i]; --i);\n if (i === 0) return false;\n for (var j = this.length - 1; this[i - 1] >= this[j]; --j);\n this[j] = [this[i - 1], this[i - 1] = this[j]][0];\n for (j = this.length - 1; i < j; ++i, --j) this[j] = [this[i], this[i] = this[j]][0];\n return true;\n};\n\nvar values = [];\nfor (var i = 0; i < 3; ++i) {\n values.push(+readline());\n}\n\nvar operations = ['+', '+', '*', '*'].sort();\nvar result = 0;\n\nvar perform = function(value1, value2, operation) {\n if (operations[0] === '+') {\n return value1 + value2;\n } else {\n return value1 * value2;\n }\n};\n\ndo {\n result = Math.max(\n result,\n perform(\n perform(values[0], values[1], operations[0]),\n values[2],\n operations[1]\n )\n );\n} while (operations.nextPermutation());\n\nwrite(result);\n"}, {"source_code": "var dato1 =parseInt(readline());\nvar dato2=parseInt(readline());\nvar dato3=parseInt(readline());\n\n\n\nvar operacion1= dato3 * (dato1 + dato2);\n\nvar operacion2= dato1 * (dato2 + dato3);\n\nvar operacion3=(dato1+dato3)*dato2;\n\nvar resultado=0;\n\nif(dato1>1 && dato2>1 && dato3>1){\n print(dato1*dato2*dato3);\n}else if(dato1==1 && dato2==1 && dato3==1){\n print(dato1+dato2+dato3)\n}\n else if(operacion1>operacion2 && operacion1>operacion3){\n print(operacion1);\n }\n else if(operacion2>operacion1 && operacion2>operacion3){\n print(operacion2);\n } else{print(operacion3);}"}, {"source_code": "var n = readline();\nvar res = 0; \nfor (var i=0; i {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n const nums = inputs.map(num => parseInt(num));\n const minimum = Math.min(...nums);\n const maximum = Math.max(...nums);\n const othersValue = nums.filter(num => num != maximum).reduce((prev, curr) => prev += curr, 0)\n let maxValue = 0;\n\n // If first number == 0\n if (minimum == 0) {\n if (nums.includes(1)) {\n maxValue = nums.reduce((prev, curr) => prev += curr, 0)\n }\n else\n maxValue = nums.filter(num => num != 0).reduce((prev, curr) => prev *= curr)\n return console.log(maxValue)\n } else if (minimum == 1) {\n const onesSum = nums.filter(num => num == 1).reduce((prev, curr) => prev += curr, 0);\n let othersMulti = nums.filter(num => num != 1);\n\n if (othersMulti.length) {\n othersMulti = othersMulti.reduce((prev, curr) => prev *= curr);\n maxValue = onesSum + othersMulti;\n }\n else\n maxValue = onesSum;\n\n return console.log(maxValue)\n } else {\n maxValue = nums.reduce((prev, curr) => prev *= curr);\n return console.log(maxValue)\n }\n\n})"}, {"source_code": "'use strict';\n\n(function() {\n let a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n \n let array = [a,b,c];\n \n let str = array.join();\n str = str.split('1');\n \n if(3 - str.length >= 2) {\n write(a+b+c);\n return;\n }\n \n let indexOfOne = array.indexOf(1);\n \n if(indexOfOne === -1){\n write(a*b*c);\n } else if(indexOfOne === 0) {\n write((array[0] + array[1])*array[2]);\n } else if (indexOfOne === 2) {\n write((array[2] + array[1])*array[0]);\n } else {\n array.sort((a, b) => a - b);\n \n write((a[0] + a[1])*a[2]);\n }\n \n return;\n\n})();"}, {"source_code": "var a=readline(),b=readline(),c=readline()\nif (a==b && b==c && c==1){\n print(\"3\")\n}else if (a==b && a==1){\n print((a+b)*c)\n}else if (a==c && a==1){\n print((a+c)*b)\n}else if (b==c && b==1){\n print((b+c)*a)\n}\nelse if(a==1){\n print((a+Math.min(b,c))*Math.max(b,c))\n}else if(b==1){\n print((b+Math.min(a,c))*Math.max(a,c))\n \n}else if (c==1){\n print((c+Math.min(a,b))*Math.max(a,b))\n}else{\n print(a*b*c)\n}"}, {"source_code": "var inp = [];\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\nvar M = Math;\nvar sortF = function(a,b){return a > b;};\n\ninp.sort(sortF);\n\nvar res = M.max(inp[0]*inp[1]*inp[2], inp[2]*(inp[0]+inp[1]), inp[0] + inp[1] + inp[2], inp[0] * (inp[2] + inp[1]));\n\n\n\nprint(res);\n"}, {"source_code": "var res = 1;\nvar x =0;\t\t ////580A\nfor (var i=0; i<3; i++){\n\tvar n = readline();\n\tn==0||n==1? x+=Number(n):res*=Number(n)\n}\n print(res+x);\n"}, {"source_code": "print.call(undefined, (function(a) {\n var expression = [ 'a+b+c', 'a*b*c', 'a+b*c', '(a+b)*c', 'a*b+c', 'a*(b+c)' ];\n \n var b = parseInt(readline()),\n c = parseInt(readline()),\n array = [ a, b, c ];\n \n if(a == b == c == 1) {\n return 3;\n } else {\n var result = 0;\n \n expression.forEach(function(s) {\n result < eval(s) ? result = eval(s) : false;\n });\n \n return result;\n }\n}).apply(undefined, readline().split('').map(Number)));"}, {"source_code": "var a = parseInt(readline()),\nb = parseInt(readline()),\nc = parseInt(readline()),\nfirstExp = a + b * c,\nsecondExp = a * (b +c),\nthirdExp = a * b * c,\nfourthExp = (a + b) * c,\nmax = 0;\nif(max < firstExp){\n max = firstExp;\n}\n\nif(max < secondExp){\n max = secondExp;\n}\n\nif(max < thirdExp){\n max = thirdExp;\n}\n\nif(max < fourthExp){\n max = fourthExp;\n}\n\nprint(max);"}, {"source_code": "\t var a = 0; var b = 0; var c =0;\n\t for (var i=0; i<3; i++){\n\t\t\tif(i==0) a = +readline();\n\t\t\telse if (i==2) b = +readline();\n\t\t\telse c = +readline();\n\t }\n\t var arr = [];\n\t arr[0] = a+b*c;\n\t arr[1] = a*(b+c);\n\t arr[2] = a*b*c;\n\t arr[3] = (a+b)*c;\n\tprint(Math.max.apply(this, arr));"}, {"source_code": "var str = \"\";\nfor (var i=0; i<3; i++){\n\t\tstr += readline();\n}\nstr.split(\" \");\nvar res = +str[0];\t\n\t\n\tif(+str[1]+res<+str[1]+Number(str[2])){\n\t\tres+= +str[1];\n\t\tres*= +str[2];\n\t}\t\n\telse {\n\t res*=+str[1]+Number(str[2]);\n\t}\t\nprint(res);\n"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\n\nvar max = a;\n\nif(a==0 || b==0 || a==1 || b==1){\n max = max + b;\n if(max==0 || c==0 || max==1 || c==1){\n max = max + c;\n } else {\n max = max * c;\n }\n} else{\n max = max * b;\n if(max==0 || c==0 || max==1 || c==1){\n max = max + c\n } else {\n max = max * c;\n }\n}\n\nprint(max);"}, {"source_code": "//x=readline();\nvar a = [];\na.push(readline());\n a.push(readline());\n a.push(readline());\na = a.sort(function(a,b){\n return a-b;\n});\nvar max_stack = [];\n//(a+b)*c\nmax_stack.push(parseInt((parseInt(a[0])+parseInt(a[1]))*parseInt(a[2])));\n//a*(b+c)\nmax_stack.push(parseInt(parseInt(a[0])*(parseInt(a[1])+parseInt(a[2]))));\n//a*b*c\nmax_stack.push(parseInt(parseInt(a[0])*parseInt(a[1])*parseInt(a[2])));\n\n//a*b+c\n\nmax_stack.push(parseInt(parseInt(a[0])*parseInt(a[1])+parseInt(a[2])));\n//a+b*c\nmax_stack.push(parseInt(parseInt(a[0])+parseInt(a[1])*parseInt(a[2])));\n//a+b+c\nmax_stack.push(parseInt(parseInt(a[0])+parseInt(a[1])+parseInt(a[2])));\n\n \nvar maximus=-999;\nfor(i=0;i=0,j=abc[1]*abc[0]){\n\tmax = abc[2]*(abc[1]+abc[0]);}\nelse max = abc[2]*(abc[1]*abc[0]);\n}\nelse max = abc[0]+abc[1]+abc[2];\nprint(max);\nfunction mySort(a, b){return a-b;}"}, {"source_code": "var res = readline();\t \nfor (var i=0; i<3; i++){\n\tvar n = readline();\n\tif (n==0||n==1)\n \tres+=Number(n);\n\telse if (res==1)\n\tres+=Number(n);\n else res*=Number(n);\n}\nprint(res);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar max = 0;\nvar abc = [a,b,c];\nfor (i in abc){\nabc[i]=parseInt(abc[i]);}\nabc.sort(mySort);\nif (abc[2]!==1){\nif(abc[1]+abc[0]>=abc[1]*abc[0]){\n\tmax = abc[2]*(abc[1]+abc[0]);}\nelse max = abc[2]*(abc[1]*abc[0]);\n}\nelse max = abc[0]+abc[1]+abc[2];\nprint(max);\nfunction mySort(a, b){return a-b;}"}, {"source_code": "var a =parseInt(readline()) ; var b = parseInt(readline()) ; var c = parseInt(readline()) ;\nvar max = [a,b,c].filter(x => x===1).length\nvar umax = Math.max(a,b,c);\n\n\n\nif(max == 2){\n\tif((a == b)||(b==c)){print(umax*2)}else{print(a+b+c)}\n}\n\t\n\n\nif(max == 1){\n\n\tif(a == 1){print((1+b)*c);}\n if(c == 1){print((1+b)*a)}\n if(b == 1){\n \tif(a>c){print((a+1)*c)}else{print((c+1)*b)}}\n \n}\n\nif(max == 3){print(3)}\nif(max == 0){print(a*b*c)}\n"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar max = 0;\nvar abc = [a,b,c];\nfor (i in abc){\nabc[i]=parseInt(abc[i]);\n}\nabc.sort(mySort);\nif(abc[1]+abc[0]>abc[1]*abc[0])\nmax = abc[2]*(abc[1]+abc[0]);\nelse max = abc[2]*(abc[1]*abc[0]);\nprint(max);\nfunction mySort(a, b){return a-b;}"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar max = 0;\nvar abc = [a,b,c];\nabc.sort(mySort);\nif (abc[2]!==1){\nif(abc[1]+abc[0]>abc[1]*abc[0]){\n\tmax = abc[2]*(abc[1]+abc[0]);}\nelse max = abc[2]*(abc[1]*abc[0]);\n}\nelse max = abc[0]+abc[1]+abc[2];\nprint(max);\nfunction mySort(a, b){return a-b;}"}, {"source_code": "var res = 0;\n\n var one = Number(readline());\n res+=one; //5\n \n var two = Number(readline()); \n var three = Number(readline());\n\n if (res==1)\n\t res+= two;\n\t else if(str==1) {\n\t one>three? res*=three+two: res*=one+two;\n\t}\n\tres*=two; \n\tres *= three;\n print(res);"}, {"source_code": "var res = readline();\t \nfor (var i=0; i<3; i++){\n\tvar n = readline();\n\tif (n==0||n==1)\n \tres+=Number(n);\n\telse if (res==1)\n\tres+=Number(n);\n else res*=Number(n);\n}\nprint(res);"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadline.on('line', line => input.push(line));\n\nreadline.on('close', () => {\n const ints = input.map(v => parseInt(v));\n if (ints[0] === 1 && ints[1] === 1 && ints[2] === 1) console.log(ints[0] + ints[1] + ints[2]);\n else if (ints.every(v => v > 2)) console.log(ints[0] * ints[1] * ints[2]);\n else if ((ints[0] + ints[1]) >= ints[2]) console.log((ints[0] + ints[1]) * ints[2]);\n else console.log(ints[0] * (ints[1] + ints[2]));\n});"}, {"source_code": "\n'use strict';\n\n(function() {\n let a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n \n if(a === 1 && b === 1 && c === 1) {\n write(3);\n return;\n }\n \n let array = [a,b,c];\n \n let indexOfOne = array.indexOf(1);\n \n if(indexOfOne === -1){\n write(a*b*c);\n } else if(indexOfOne === 0) {\n write((array[0] + array[1])*array[2]);\n } else if (indexOfOne === 2) {\n write((array[2] + array[1])*array[0]);\n } else {\n array.sort((a, b) => a - b);\n \n write((a[0] + a[1])*a[2]);\n }\n \n return;\n\n})();"}, {"source_code": "var a = Number(readline());\nvar b = Number(readline());\nvar c = Number(readline());\nvar res;\nif (a != 1 && b != 1 && c!=1) {\n res = a*b*c;\n}\nelse {\n if (a+b+c - Math.max(a, b, c) == 2) {\n res = a+b+c;\n }\n else if (a == 1) {\n res = (a+b)*c\n }\n else if (b == 1) {\n res = (Math.min(a, c) + 1) * Math.max(a, c);\n }\n else if (c == 1) {\n res = a*(b+c);\n }\n}\n\nprint(res);"}, {"source_code": "var inp = [];\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\nvar M = Math;\nvar sortF = function(a,b){return a > b;};\n\ninp.sort(sortF);\n\nvar res = M.max(inp[0]*inp[1]*inp[2], inp[2]*(inp[0]+inp[1]), inp[0] + inp[1] + inp[2], inp[0] * (inp[2] + inp[1]));\n\n\n\nprint(res);\n"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n const nums = inputs.map(num => parseInt(num));\n const minimum = Math.min(...nums);\n const maximum = Math.max(...nums);\n const othersValue = nums.filter(num => num != maximum).reduce((prev, curr) => prev += curr, 0)\n let maxValue = 0;\n\n // If first number == 0\n if (minimum == 0) {\n if (nums.includes(1)) {\n maxValue = nums.reduce((prev, curr) => prev += curr, 0)\n }\n else\n maxValue = nums.filter(num => num != 0).reduce((prev, curr) => prev *= curr)\n return console.log(maxValue)\n } else if (minimum == 1) {\n const onesSum = nums.filter(num => num == 1).reduce((prev, curr) => prev += curr, 0);\n let othersMulti = nums.filter(num => num != 1);\n\n if (othersMulti.length) {\n othersMulti = othersMulti.reduce((prev, curr) => prev *= curr);\n maxValue = onesSum + othersMulti;\n }\n else\n maxValue = onesSum;\n\n return console.log(maxValue)\n } else {\n maxValue = nums.reduce((prev, curr) => prev *= curr);\n return console.log(maxValue)\n }\n\n})"}, {"source_code": "'use strict';\n\n(function() {\n let a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n \n if(a === 1 && b === 1 && c === 1) {\n write(3);\n return;\n }\n \n let array = [a,b,c];\n \n let indexOfOne = array.indexOf(1);\n \n if(indexOfOne === -1){\n write(a*b*c);\n } else if(indexOfOne === 0 || indexOfOne === 2) { \n write((a[0] + a[1])*a[2]);\n } else {\n array.sort((a, b) => a - b);\n \n write((a[0] + a[1])*a[2]);\n }\n \n return;\n\n})();\n"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const a = parseInt(readLine());\n const b = parseInt(readLine());\n const c = parseInt(readLine());\n const maxN = Math.max(Math.max(a + (b * c), (a * b) + c), Math.max(a * b * c, (a + b) * c));\n console.log(maxN);\n}\n"}, {"source_code": "(function () {\n var a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n if ((a !== 1) && (b !== 1) && (c !== 1)) {\n print(a * b * c);\n } else if ((a === 1) && (b === 1) && (c === 1)) {\n print(a + b + c);\n } else if (a === 1) {\n print((a + b) * c);\n } else if (c === 1) {\n print(a * (b * c));\n } else {\n if (a > c) {\n print(a * (b * c));\n } else {\n print((a * b) * c);\n }\n }\n})();"}, {"source_code": "var res =0; \nfor (var i=0; i<3; i++){\n\tvar n = readline();\n if (res==0);\n\tres+=Number(n);\n\tif (res==1)\n\t\tres+=Number(n);\n\telse res*=Number(n);\n}\nprint(res);\n"}, {"source_code": "var a = +readline();\nvar b = +readline();\nvar c = +readline();\n\nvar max = list = [\n\ta + ( b * c ),\n\ta * ( b + c ),\n\ta * b * c,\n\ta + b + c,\n\t( a + b ) * c,\n].sort().reverse().pop();\n\nprint(max);"}, {"source_code": "(function () {\n var a = parseInt(readline()),\n b = parseInt(readline()),\n c = parseInt(readline());\n if ((a !== 1) && (b !== 1) && (c !== 1)) {\n print(a * b * c);\n } else if ((a === 1) && (b === 1) && (c === 1)) {\n print(a + b + c);\n } else if ((a === 1) && (b === 2) && (c === 1)) {\n print(a + b + c);\n } else if (a === 1) {\n print((a + b) * c);\n } else if (c === 1) {\n print(a * (b + c));\n } else {\n if (a > c) {\n print(a * (b + c));\n } else {\n print((a + b) * c);\n }\n }\n})();"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const a = parseInt(readLine());\n const b = parseInt(readLine());\n const c = parseInt(readLine());\n const maxN = Math.max(Math.max(a + b * c, a * b + c), Math.max(a * b * c, a + b * c));\n console.log(maxN);\n}\n"}, {"source_code": "var res = readline();\t \nfor (var i=0; i<3; i++){\n\tvar n = readline();\n\tif (n==0||n==1)\n \tres+=Number(n);\n\telse if (res==1)\n\tres+=Number(n);\n else res*=Number(n);\n}\nprint(res);"}, {"source_code": "var str = readline().split(\" \");\nvar res = +str[0];\t\n\t\n\tif(+str[1]+res<+str[1]+Number(str[2])){\n\t\tres+= +str[1];\n\t\tres*= +str[2];\n\t}\t\n\telse {\n\t res*=+str[1]+Number(str[2]);\n\t}\n\t\nprint(res);"}, {"source_code": "var inp = [];\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\nvar M = Math;\nvar sortF = function(a,b){return a > b;};\n\ninp.sort(sortF);\n\nvar res = M.max(inp[0]*inp[1]*inp[2], inp[2]*(inp[0]+inp[1]), inp[0] + inp[1] + inp[2], inp[0] * (inp[2] + inp[3]));\n\n\n\nprint(res);"}, {"source_code": "var a=Number.parseInt(readline()),b=Number.parseInt(readline()),c=Number.parseInt(readline())\nif (a===b && b===c && c===1){\n print(\"3\")\n}else if (a===b && a===1){\n print((a+b)*c)\n}else if (a===c && a===1){\n print((a+c)*b)\n}else if (b===c && b===1){\n print((b+c)*a)\n}\nelse if(a===1){\n print((a+Math.min(b,c))*Math.max(b,c))\n}else if(b===1){\n print((b+Math.min(a,c))*Math.max(a,c))\n \n}else if (c===1){\n print((c+Math.min(a,b))*Math.max(a,b))\n}else{\n print(a*b*c)\n}"}, {"source_code": "var inputs = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar n = inputs[0], m = inputs[1], a = inputs[2];\n\nprint(n + \" \" + m + \" \" + a);\n"}, {"source_code": "var inp = [];\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\nvar M = Math;\nvar sortF = function(a,b){return a > b;};\n\ninp.sort(sortF);\n\nvar res = M.max(inp[0]*inp[1]*inp[2], inp[2]*(inp[0]+inp[1]), inp[0] + inp[1] + inp[2], inp[0] * (inp[2] + inp[1]));\n\n\n\nprint(res);\n"}, {"source_code": "\t var a = 0; var b = 0; var c =0;\n\t for (var i=0; i<3; i++){\n\t\t\tif(i==0) a = +readline();\n\t\t\telse if (i==2) b = +readline();\n\t\t\telse c = +readline();\n\t }\n\t var arr = [];\n\t arr[0] = a+b*c;\n\t arr[1] = a*(b+c);\n\t arr[2] = a*b*c;\n\t arr[3] = (a+b)*c;\n\tprint(Math.max.apply(this, arr));"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar max = 0;\nvar abc = [a,b,c];\nfor (i in abc){\nabc[i]=parseInt(abc[i]);}\nabc.sort(mySort);\nif (abc[2]!==1){\nif(abc[1]+abc[0]>=abc[1]*abc[0]){\n\tmax = abc[2]*(abc[1]+abc[0]);}\nelse max = abc[2]*(abc[1]*abc[0]);\n}\nelse max = abc[0]+abc[1]+abc[2];\nprint(max);\nfunction mySort(a, b){return a-b;}"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const a = parseInt(readLine());\n const b = parseInt(readLine());\n const c = parseInt(readLine());\n const maxN = Math.max(Math.max(a + (b * c), (a * b) + c), Math.max(a * b * c, (a + b) * c));\n console.log(maxN);\n}\n"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar max = 0;\nvar abc = [a,b,c];\nfor (i in abc){\nabc[i]=parseInt(abc[i]);\nabc.sort(mySort);}\nif (abc[2]!==1){\nif(abc[1]+abc[0]>=abc[1]*abc[0]){\n\tmax = abc[2]*(abc[1]+abc[0]);}\nelse max = abc[2]*(abc[1]*abc[0]);\n}\nelse max = abc[0]+abc[1]+abc[2];\nprint(max);\nfunction mySort(a, b){return a-b;}"}, {"source_code": "print.call(undefined, (function(a) {\n var expression = [ 'a+b+c', 'a*b*c', 'a+b*c', '(a+b)*c', 'a*b+c', 'a*(b+c)' ];\n \n var b = parseInt(readline()),\n c = parseInt(readline()),\n array = [ a, b, c ];\n \n if(a == b == c == 1) {\n return 3;\n } else {\n var result = 0;\n \n expression.forEach(function(s) {\n result < eval(s) ? result = eval(s) : false;\n });\n \n return result;\n }\n}).apply(undefined, readline().split('').map(Number)));"}, {"source_code": "let fs = require(\"fs\");\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0;\n});\nfor (let i = 0; i < txt.length; i+=3) {\n doit(txt[i]*1, txt[i+1] * 1,txt[i+2]*1);\n\n}\n\nfunction doit(n1, n2,n3) {\n if(n1>n3){\n console.log(n1*(n2+n3));\n }else{\n console.log((n1+n2)*n3); \n }\n}"}, {"source_code": "//var inputs = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar iPreNum = Number(readline().split(\" \").map(function(x) { return parseInt(x); }));\nvar iMidNum = Number(readline().split(\" \").map(function(x) { return parseInt(x); }));\nvar iFrontNum = Number(readline().split(\" \").map(function(x) { return parseInt(x); }));\nprint(typeof iPreNum);\nvar iSum = [];\niSum[0] = iPreNum + iMidNum + iFrontNum;\niSum[1] = (iPreNum + iMidNum) * iFrontNum;\niSum[2] = iPreNum * (iMidNum + iFrontNum);\niSum[3] = iPreNum * iMidNum * iFrontNum;\n\nvar iFinalAns = iSum[0];\n\nfor (var i = 1; i <= 3; i++) {\n\tif (iFinalAns < iSum[i])\n\t\tiFinalAns = iSum[i];\n}\n\nprint(iFinalAns + \"\\n\");\n"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const a = parseInt(readLine());\n const b = parseInt(readLine());\n const c = parseInt(readLine());\n const maxN = Math.max(Math.max(a + b * c, a * b + c), Math.max(a * b * c, a + b * c));\n console.log(maxN);\n}\n"}, {"source_code": "var a = readline() ; var b = readline() ; var c = readline() ;\nvar max = [a,b,c].filter(x => x===1).length\nvar umax = Math.max(a,b,c);\n\n\n\nif(max == 2){\n\tif((a == b)||(b==c)){print(umax*2)}else{print(a+b+c)}\n}\n\t\n\n\nif(max == 1){\n\n\tif(a == 1){print((1+b)*c);}\n if(c == 1){print((1+b)*a)}\n if(b == 1){\n \tif(a>c){print((a+1)*c)}else{print((c+1)*b)}}\n \n}\n\nif(max == 3){print(3)}\nif(max == 0){print(a*b*c)}\n"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const a = parseInt(readLine());\n const b = parseInt(readLine());\n const c = parseInt(readLine());\n const maxN = Math.max(Math.max(a+b+c, a + (b * c), (a * b) + c), Math.max(a * b * c, (a + b) * c));\n console.log(maxN);\n}\n"}, {"source_code": "var computeMax = function(arr)\n {\n var increase = function(a, b)\n {\n return a - b;\n }\n arr = arr.sort(increase);\n return (arr[0] + arr[1]) * arr[2];\n }\nvar arr = [];\nfor (var i = 1; i <= 3; i++)\n {\n var input = +readline();\n arr.push(input);\n }\nprint(computeMax(arr));"}, {"source_code": "var res = 0;\nvar x =0;\t\t ////580A\nfor (var i=0; i<3; i++){\n\tvar n = readline();\n\tn==0||n==1? x+=Number(n):res*=Number(n)\n}\n print(res+x);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar max = 0;\nvar abc = [a,b,c];\nfor (i in abc){\nabc[i]=parseInt(abc[i]);\nabc.sort(mySort);\nif (abc[2]!==1){\nif(abc[1]+abc[0]>=abc[1]*abc[0]){\n\tmax = abc[2]*(abc[1]+abc[0]);}\nelse max = abc[2]*(abc[1]*abc[0]);\n}\nelse max = abc[0]+abc[1]+abc[2];}\nprint(max);\nfunction mySort(a, b){return a-b;}"}, {"source_code": "\t var a = 0; var b = 0; var c =0;\n\t for (var i=0; i<3; i++){\n\t\t\tif(i==0) a = +readline();\n\t\t\telse if (i==2) b = +readline();\n\t\t\telse c = +readline();\n\t }\n\t var arr = [];\n\t arr[0] = a+b*c;\n\t arr[1] = a*(b+c);\n\t arr[2] = a*b*c;\n\t arr[3] = (a+b)*c;\n\tprint(Math.max.apply(this, arr));"}, {"source_code": "var inp = [];\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\ninp.push(parseInt(readline()));\nvar M = Math;\nvar sortF = function(a,b){return a > b;};\n\ninp.sort(sortF);\n\nvar res = M.max(inp[0]*inp[1]*inp[2], inp[2]*(inp[0]+inp[1]));\n\n\n\nprint(res);\n"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n const nums = inputs.map(num => parseInt(num));\n const minimum = Math.min(...nums);\n const maximum = Math.max(...nums);\n let maxValue = 0;\n\n // If first number == 0\n if (minimum == 0) {\n if ((nums[1] * nums[2]) == 1) {\n maxValue = nums[1] + nums[2]\n return console.log(maxValue)\n } else {\n maxValue = nums[1] * nums[2]\n return console.log(maxValue)\n }\n } else if (minimum == 1) {\n const others = nums.filter(num => num != maximum).reduce((prev, curr) => prev += curr, 0)\n maxValue = maximum * others;\n return console.log(maxValue)\n } else {\n maxValue = nums.reduce((prev, curr) => prev *= curr);\n return console.log(maxValue)\n }\n\n})"}], "src_uid": "1cad9e4797ca2d80a12276b5a790ef27"} {"nl": {"description": "Have you ever played Hanabi? If not, then you've got to try it out! This problem deals with a simplified version of the game.Overall, the game has 25 types of cards (5 distinct colors and 5 distinct values). Borya is holding n cards. The game is somewhat complicated by the fact that everybody sees Borya's cards except for Borya himself. Borya knows which cards he has but he knows nothing about the order they lie in. Note that Borya can have multiple identical cards (and for each of the 25 types of cards he knows exactly how many cards of this type he has).The aim of the other players is to achieve the state when Borya knows the color and number value of each of his cards. For that, other players can give him hints. The hints can be of two types: color hints and value hints. A color hint goes like that: a player names some color and points at all the cards of this color. Similarly goes the value hint. A player names some value and points at all the cards that contain the value.Determine what minimum number of hints the other players should make for Borya to be certain about each card's color and value.", "input_spec": "The first line contains integer n (1 ≤ n ≤ 100) — the number of Borya's cards. The next line contains the descriptions of n cards. The description of each card consists of exactly two characters. The first character shows the color (overall this position can contain five distinct letters — R, G, B, Y, W). The second character shows the card's value (a digit from 1 to 5). Borya doesn't know exact order of the cards they lie in.", "output_spec": "Print a single integer — the minimum number of hints that the other players should make.", "sample_inputs": ["2\nG3 G3", "4\nG4 R4 R3 B3", "5\nB1 Y1 W1 G1 R1"], "sample_outputs": ["0", "2", "4"], "notes": "NoteIn the first sample Borya already knows for each card that it is a green three.In the second sample we can show all fours and all red cards.In the third sample you need to make hints about any four colors."}, "positive_code": [{"source_code": "var main = function () {\n var n = parseInt(readline());\n var cards = readline().split(/\\s+/);\n var actions = [];\n cards = cards.filter(function (value, index, self) {\n return self.indexOf(value) == index;\n });\n\n if (cards.length <= 1) {\n print(0);\n return;\n }\n\n cards.forEach(function (card) {\n actions.push({type: 0, value: card[0]});\n\n actions.push({type: 1, value: card[1]});\n });\n\n actions.sort(function (a, b) {\n return (a.type === b.type) ? a.value.localeCompare(b.value) : (a.type - b.type);\n });\n actions = actions.filter(function (value, index, self) {\n return index === 0 || \n self[index - 1].type !== value.type || \n self[index - 1].value !== value.value;\n });\n \n var vars = [], ca = [];\n cards.forEach(function (value) {\n vars.push(cards.slice());\n ca.push(value);\n });\n\n var ans = actions.length;\n var cur = 0;\n var brute = function brute(idx) {\n if (idx >= actions.length)\n return;\n if (cur + 1 >= ans)\n return;\n\n cur++;\n\n var type = actions[idx].type;\n var value = actions[idx].value;\n\n var history = [];\n var good = true;\n for (var i = 0; i < ca.length; ++i) {\n if (vars[i].length > 1) { \n var oldHistory = history.length;\n vars[i].forEach(function (card) {\n if ((ca[i][type] === value) !== (card[type] === value))\n history.push([i, card]);\n });\n\n for (var j = oldHistory; j < history.length; ++j) {\n vars[i].splice(vars[i].indexOf(history[j][1]), 1);\n }\n\n if (vars[i].length > 1) {\n good = false;\n }\n }\n }\n\n /*\n print(vars[0]);\n print(vars[1]);\n print(vars[2]);\n print(cur);\n print(good);\n */\n\n if (good) {\n ans = Math.min(ans, cur);\n } else {\n brute(idx + 1);\n }\n\n for (var j = 0; j < history.length; ++j) {\n vars[history[j][0]].push(history[j][1]);\n }\n\n cur--;\n\n if (!good) {\n brute(idx + 1);\n }\n }\n\n brute(0);\n\n print(ans);\n};\n\nmain();\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction main() {\n\tvar n = parseInt(readline()), cards = tokenize(readline()),\n\t\tcolors = ['R', 'G', 'B', 'Y', 'W'], ranks = ['1', '2', '3', '4', '5'],\n\t\tsuits = {};\n\tfor (var i = 0; i < 5; ++i) {\n\t\tvar color = colors[i], rank = ranks[i];\n\t\tsuits[color] = [];\n\t\tsuits[rank] = [];\n\t\tfor (var j = 0; j < 5; ++j) {\n\t\t\tsuits[color].push(color+ranks[j]);\n\t\t\tsuits[rank].push(colors[j]+rank);\n\t\t}\n\t}\n\tfunction makeSet() {\n\t\tvar set = { hash: {}, count: 0 };\n\t\tset.add = function (x) {\n\t\t\tif (!set.hash[x]) {\n\t\t\t\tset.hash[x] = true;\n\t\t\t\t++set.count;\n\t\t\t}\n\t\t};\n\t\tset.remove = function (x) {\n\t\t\tif (set.hash[x]) {\n\t\t\t\tset.hash[x] = false;\n\t\t\t\t--set.count;\n\t\t\t}\n\t\t};\n\t\treturn set;\n\t}\n\tfunction removeSuit(set, suit) {\n\t\tfor (var i = 0; i < 5; ++i) {\n\t\t\tset.remove(suit[i]);\n\t\t}\n\t}\n\tvar best = 10;\n\tfor (var mask = 0; mask < 1024; ++mask) {\n\t\tvar hints = [];\n\t\tfor (var i = 0; i < 10; ++i) {\n\t\t\tif ((mask & (1 << i)) != 0) {\n\t\t\t\thints.push(i < 5 ? colors[i] : ranks[i-5]);\n\t\t\t}\n\t\t}\n\t\t//print(hints.join(' '));\n\t\tfor (var i = 0; i < n; ++i) {\n\t\t\tvar color = cards[i].charAt(0), rank = cards[i].charAt(1),\n\t\t\t\tset = makeSet();\n\t\t\tfor (var j = 0; j < n; ++j) {\n\t\t\t\tset.add(cards[j]);\n\t\t\t}\n\t\t\tfor (var j = 0; j < hints.length; ++j) {\n\t\t\t\tvar hint = hints[j],\n\t\t\t\t\tattribute = hint.match(/\\d/) ? rank : color;\n\t\t\t\t//print('hint = '+hint+', attribute = '+attribute);\n\t\t\t\tif (hint != attribute) {\n\t\t\t\t\tremoveSuit(set, suits[hint]);\n\t\t\t\t} else {\n\t\t\t\t\tvar attributes = hint.match(/\\d/) ? ranks : colors;\n\t\t\t\t\tfor (var k = 0; k < 5; ++k) {\n\t\t\t\t\t\tif (attributes[k] != hint) {\n\t\t\t\t\t\t\tremoveSuit(set, suits[attributes[k]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (set.count != 1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (i == n) {\n\t\t\tbest = Math.min(best, hints.length);\n\t\t}\n\t}\n\tprint(best);\n}\n\nmain();\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction main() {\n\tvar n = parseInt(readline()), cards = tokenize(readline()),\n\t\tcolors = ['R', 'G', 'B', 'Y', 'W'], ranks = ['1', '2', '3', '4', '5'],\n\t\tsuits = {}, hash = {}, unique = [];\n\tfor (var i = 0; i < n; ++i) {\n\t\tif (hash[cards[i]] === undefined) {\n\t\t\thash[cards[i]] = true;\n\t\t\tunique.push(cards[i]);\n\t\t}\n\t}\n\tcards = unique;\n\tn = cards.length;\n\tfor (var i = 0; i < 5; ++i) {\n\t\tvar color = colors[i], rank = ranks[i];\n\t\tsuits[color] = [];\n\t\tsuits[rank] = [];\n\t\tfor (var j = 0; j < 5; ++j) {\n\t\t\tsuits[color].push(color+ranks[j]);\n\t\t\tsuits[rank].push(colors[j]+rank);\n\t\t}\n\t}\n\tfunction makeSet() {\n\t\tvar set = { hash: {}, count: 0 };\n\t\tset.add = function (x) {\n\t\t\tif (!set.hash[x]) {\n\t\t\t\tset.hash[x] = true;\n\t\t\t\t++set.count;\n\t\t\t}\n\t\t};\n\t\tset.remove = function (x) {\n\t\t\tif (set.hash[x]) {\n\t\t\t\tset.hash[x] = false;\n\t\t\t\t--set.count;\n\t\t\t}\n\t\t};\n\t\treturn set;\n\t}\n\tfunction removeSuit(set, suit) {\n\t\tfor (var i = 0; i < 5; ++i) {\n\t\t\tset.remove(suit[i]);\n\t\t}\n\t}\n\tvar best = 10;\n\tfor (var mask = 0; mask < 1024; ++mask) {\n\t\tvar hints = [];\n\t\tfor (var i = 0; i < 10; ++i) {\n\t\t\tif ((mask & (1 << i)) != 0) {\n\t\t\t\thints.push(i < 5 ? colors[i] : ranks[i-5]);\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < n; ++i) {\n\t\t\tvar color = cards[i].charAt(0), rank = cards[i].charAt(1),\n\t\t\t\tset = makeSet();\n\t\t\tfor (var j = 0; j < n; ++j) {\n\t\t\t\tset.add(cards[j]);\n\t\t\t}\n\t\t\tfor (var j = 0; j < hints.length; ++j) {\n\t\t\t\tvar hint = hints[j],\n\t\t\t\t\tattribute = hint.match(/\\d/) ? rank : color;\n\t\t\t\tif (hint != attribute) {\n\t\t\t\t\tremoveSuit(set, suits[hint]);\n\t\t\t\t} else {\n\t\t\t\t\tvar attributes = hint.match(/\\d/) ? ranks : colors;\n\t\t\t\t\tfor (var k = 0; k < 5; ++k) {\n\t\t\t\t\t\tif (attributes[k] != hint) {\n\t\t\t\t\t\t\tremoveSuit(set, suits[attributes[k]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (set.count != 1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (i == n) {\n\t\t\tbest = Math.min(best, hints.length);\n\t\t}\n\t}\n\tprint(best);\n}\n\nmain();\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction main() {\n\tvar n = parseInt(readline()), cards = tokenize(readline()),\n\t\tcolors = ['R', 'G', 'B', 'Y', 'W'], ranks = ['1', '2', '3', '4', '5'],\n\t\tmaybe = new Array(n), color2cards = {}, rank2cards = {};\n\tvar unique = [], hash = {};\n\tfor (var i = 0; i < n; ++i) {\n\t\tif (hash[cards[i]] === undefined) {\n\t\t\tunique.push(cards[i]);\n\t\t\thash[cards[i]] = true;\n\t\t}\n\t}\n\tcards = unique;\n\tn = cards.length;\n\tfor (var i = 0; i < 5; ++i) {\n\t\tvar color = colors[i], rank = ranks[i];\n\t\tcolor2cards[color] = [];\n\t\trank2cards[rank] = [];\n\t\tfor (var j = 0; j < 5; ++j) {\n\t\t\tcolor2cards[color].push(color+ranks[j]);\n\t\t\trank2cards[rank].push(colors[j]+rank);\n\t\t}\n\t}\n\tfunction makeSet() {\n\t\tvar set = { hash: {}, count: 0 };\n\t\tset.add = function (x) {\n\t\t\tif (!set.hash[x]) {\n\t\t\t\tset.hash[x] = true;\n\t\t\t\t++set.count;\n\t\t\t}\n\t\t};\n\t\tset.remove = function (x) {\n\t\t\tif (set.hash[x]) {\n\t\t\t\tset.hash[x] = false;\n\t\t\t\t--set.count;\n\t\t\t}\n\t\t};\n\t\treturn set;\n\t}\n\tvar best = 10, removed = new Array(n);\n\tfor (var mask = 0; mask < 1024; ++mask) {\n\t\tfor (var i = 0; i < n; ++i) {\n\t\t\tvar set = maybe[i] = makeSet();\n\t\t\tfor (var j = 0; j < n; ++j) {\n\t\t\t\tset.add(cards[j]);\n\t\t\t}\n\t\t\tremoved[i] = {};\n\t\t}\n\t\tvar hints = 0;\n\t\tfor (var i = 0; i < 10; ++i) {\n\t\t\tif ((mask & (1 << i)) != 0) {\n\t\t\t\t++hints;\n\t\t\t}\n\t\t}\n\t\tif (hints > best) {\n\t\t\tcontinue;\n\t\t}\n\t\tfor (var colorIx = 0; colorIx < 5; ++colorIx) {\n\t\t\tif ((mask & (1 << colorIx)) == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar color = colors[colorIx];\n\t\t\tfor (var i = 0; i < n; ++i) {\n\t\t\t\tif (maybe[i].count == 1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (cards[i].charAt(0) != color) {\n\t\t\t\t\tif (removed[i][colors]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tremoved[i][color] = true;\n\t\t\t\t\tvar suit = color2cards[color];\n\t\t\t\t\tfor (var j = 0; j < 5; ++j) {\n\t\t\t\t\t\tmaybe[i].remove(suit[j]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (var j = 0; j < 5; ++j) {\n\t\t\t\t\t\tif (colors[j] != color) {\n\t\t\t\t\t\t\tif (removed[i][colors[j]]) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoved[i][colors[j]] = true;\n\t\t\t\t\t\t\tvar suit = color2cards[colors[j]];\n\t\t\t\t\t\t\tfor (var k = 0; k < 5; ++k) {\n\t\t\t\t\t\t\t\tmaybe[i].remove(suit[k]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (var rankIx = 5; rankIx < 10; ++rankIx) {\n\t\t\tif ((mask & (1 << rankIx)) == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar rank = ranks[rankIx-5];\n\t\t\tfor (var i = 0; i < n; ++i) {\n\t\t\t\tif (maybe[i].count == 1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (cards[i].charAt(1) != rank) {\n\t\t\t\t\tif (removed[i][rank]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tremoved[i][rank] = true;\n\t\t\t\t\tvar suit = rank2cards[rank];\n\t\t\t\t\tfor (var j = 0; j < 5; ++j) {\n\t\t\t\t\t\tmaybe[i].remove(suit[j]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (var j = 0; j < 5; ++j) {\n\t\t\t\t\t\tif (ranks[j] != rank) {\n\t\t\t\t\t\t\tif (removed[i][ranks[j]]) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoved[i][ranks[j]] = true;\n\t\t\t\t\t\t\tvar suit = rank2cards[ranks[j]];\n\t\t\t\t\t\t\tfor (var k = 0; k < 5; ++k) {\n\t\t\t\t\t\t\t\tmaybe[i].remove(suit[k]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar okay = true;\n\t\tfor (var i = 0; i < n; ++i) {\n\t\t\tvar set = maybe[i];\n\t\t\tif (set.count != 1) {\n\t\t\t\tokay = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (okay) {\n\t\t\tbest = Math.min(best, hints);\n\t\t}\n\t}\n\tprint(best);\n}\n\nmain();\n"}], "negative_code": [], "src_uid": "3b12863997b377b47bae43566ec1a63b"} {"nl": {"description": "Not so long ago as a result of combat operations the main Berland place of interest — the magic clock — was damaged. The cannon's balls made several holes in the clock, that's why the residents are concerned about the repair. The magic clock can be represented as an infinite Cartesian plane, where the origin corresponds to the clock center. The clock was painted two colors as is shown in the picture: The picture shows only the central part of the clock. This coloring naturally extends to infinity.The balls can be taken to be points on the plane. Your task is to find the color of the area, damaged by the given ball.All the points located on the border of one of the areas have to be considered painted black.", "input_spec": "The first and single line contains two integers x and y — the coordinates of the hole made in the clock by the ball. Each of the numbers x and y has an absolute value that does not exceed 1000.", "output_spec": "Find the required color. All the points between which and the origin of coordinates the distance is integral-value are painted black.", "sample_inputs": ["-2 1", "2 1", "4 3"], "sample_outputs": ["white", "black", "black"], "notes": null}, "positive_code": [{"source_code": "'use strict'\n\nlet lll = readline().split(' ').map(v => parseInt(v))\nlet X = lll[0]\nlet Y = lll[1]\n\nlet r = Math.sqrt(X * X + Y * Y)\n\nlet r0 = r | 0\nlet even = !(r0 % 2)\nlet q\nif (X > 0 && Y > 0) {q = 1}\nif (X > 0 && Y < 0) {q = 2}\nif (X < 0 && Y < 0) {q = 1}\nif (X < 0 && Y > 0) {q = 2}\n\n;(function () {\n if (r == r0 || X == 0 || Y == 0) return print('black')\n if (q == 1 && even || q == 2 && !even) return print('black')\n if (q == 1 && !even || q == 2 && even) return print('white')\n})()"}], "negative_code": [], "src_uid": "8c92aac1bef5822848a136a1328346c6"} {"nl": {"description": "You've got a 5 × 5 matrix, consisting of 24 zeroes and a single number one. Let's index the matrix rows by numbers from 1 to 5 from top to bottom, let's index the matrix columns by numbers from 1 to 5 from left to right. In one move, you are allowed to apply one of the two following transformations to the matrix: Swap two neighboring matrix rows, that is, rows with indexes i and i + 1 for some integer i (1 ≤ i < 5). Swap two neighboring matrix columns, that is, columns with indexes j and j + 1 for some integer j (1 ≤ j < 5). You think that a matrix looks beautiful, if the single number one of the matrix is located in its middle (in the cell that is on the intersection of the third row and the third column). Count the minimum number of moves needed to make the matrix beautiful.", "input_spec": "The input consists of five lines, each line contains five integers: the j-th integer in the i-th line of the input represents the element of the matrix that is located on the intersection of the i-th row and the j-th column. It is guaranteed that the matrix consists of 24 zeroes and a single number one.", "output_spec": "Print a single integer — the minimum number of moves needed to make the matrix beautiful.", "sample_inputs": ["0 0 0 0 0\n0 0 0 0 1\n0 0 0 0 0\n0 0 0 0 0\n0 0 0 0 0", "0 0 0 0 0\n0 0 0 0 0\n0 1 0 0 0\n0 0 0 0 0\n0 0 0 0 0"], "sample_outputs": ["3", "1"], "notes": null}, "positive_code": [{"source_code": "var coordinates = {\n row: -1,\n col: -1\n};\nfor (var i = 0; i < 5; i++) {\n var line = readline();\n var unitIndex = -1;\n for (var j = 0; j < line.length; j += 2) {\n if (line[j] === \"1\") {\n unitIndex = Math.floor(j/2);\n break;\n }\n } \n\n if (unitIndex !== -1) {\n coordinates.row = i;\n coordinates.col = unitIndex; \n break;\n }\n}\n\nprint(Math.abs(coordinates.row - 2) + Math.abs(coordinates.col - 2));"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n var T = 5;\n var arr = [];\n var ans = 0;\n while (T--) {\n var row = readLine().split(\" \").map(Number);\n arr.push(row);\n }\n for (let row = 0; row < 5; row++) {\n for (let col = 0; col < 5; col++) {\n if (arr[row][col] === 1) {\n ans = Math.abs(2 - row) + Math.abs(2 - col);\n }\n }\n }\n console.log(ans);\n}\n"}, {"source_code": "let fs = require(\"fs\")\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0\n})\n\nfor (let index = 0; index < txt.length; index += 5) {\n let tab = []\n for (let i = index; i < index + 5; i++) {\n tab.push(...txt[i].split(\" \").filter(data => {\n return data.length > 0\n }).map(data => {\n return data * 1\n }))\n }\n football(tab)\n}\n\nfunction football(tab) {\n let pos = tab.indexOf(1);\n console.log(Math.abs(2 - Math.floor(pos / 5)) + Math.abs(2 - pos % 5));\n\n}"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet matrix = [], location = [];\n\nrl.on('line', n => {\n matrix.push(n.split(' ').map(Number));\n if (matrix.length === 5) {\n for (let i = 0; i < matrix.length; i++) {\n if (matrix[i].includes(1)) {\n location.push(i, matrix[i].indexOf(1));\n break;\n }\n }\n\n console.log(Math.abs(location[0] - 2) + Math.abs(location[1] - 2));\n rl.close();\n }\n});"}, {"source_code": "var m = []\nvar c = []\nvar v = 0\n \nfor (i = 0; i < 5; i++) {\n m.push(readline().split(\" \"));\n if (m[i].includes(\"1\")){\n v = Math.abs(2 - i) + Math.abs(2 - m[i].indexOf(\"1\"))\n }\n}\n \nprint(v)"}, {"source_code": "var x = -1, y;\nfor (var i = 0; i < 5; i++) {\n if (x > -1) {\n readline();\n continue;\n }\n var l = readline().split(' ');\n x = l.indexOf('1');\n if (x > -1) {\n y = i;\n }\n}\nprint(Math.abs(x - 2) + Math.abs(y - 2));\n\nfunction readNums() {\n return readline().split(' ').map(v => v - 0);\n}"}, {"source_code": "var x = [readline().split(\" \").map(x => parseInt(x))];\nx[1] = readline().split(\" \").map(x => parseInt(x));\nx[2] = readline().split(\" \").map(x => parseInt(x));\nx[3] = readline().split(\" \").map(x => parseInt(x));\nx[4] = readline().split(\" \").map(x => parseInt(x));\n \nvar i,j;\ncaught:\nfor( i = 0; i< x.length; i++) {\n\tfor( j=0; j< x[i].length; j++) {\n\t\tif(x[i][j] === 1) {\n\t\t\tbreak caught;\t\n\t\t}\n\t}\n}\nprint (Math.abs(2-i) + Math.abs(2-j))"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet data = [];\nrl.on('line', (input) => {\n data.push(input);\n});\n\nrl.on('close', () => {\n solve(data);\n});\n\nfunction solve(data) {\n\n let row, col;\n for (let i = 0; i < data.length; i++) {\n line = data[i].split(\" \");\n for (let j = 0; j < line.length; j++) {\n if (line[j] === \"1\") {\n row = i + 1;\n col = j + 1;\n }\n }\n }\n\n console.log(Math.abs((3-row)) + Math.abs((3-col)));\n\n}\n"}, {"source_code": "var x = -1, y;\nfor (var i = 0; i < 5; i++) {\n if (x > -1) {\n readline();\n continue;\n }\n var l = readline().split(' ');\n x = l.indexOf('1');\n if (x > -1) {\n y = i;\n }\n}\nprint(Math.abs(x - 2) + Math.abs(y - 2));\n\nfunction readNums() {\n return readline().split(' ').map(v => v - 0);\n}"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction print(s) {\n process.stdout.write(`${s}`);\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n let n = 0;\n // input\n for (let i = 0; i < 5; i++) {\n const row = readline().split(' ').map(x => parseInt(x));\n const offsetX = row.indexOf(1);\n if (offsetX > -1) {\n n = Math.abs(offsetX - 2) + Math.abs(i - 2);\n }\n }\n\n // output\n print(n);\n}\n\n"}, {"source_code": "function findElem() {\n for (var i=0; i < 5; i++) {\n var myArray = readline().split(' ');\n if (myArray.indexOf('1') !== -1) {\n for (var j=0; j<5; j++) {\n if (myArray[j]==='1') {\n return [i+1, j+1]\n }\n } \n }\n }\n}\n\nvar result = findElem();\nresult = Math.abs(result[0]-3)+Math.abs(result[1]-3)\nprint(result)"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nlet y = 1;\n\nrl.on('line', (m) => {\n let x = m.split(' ').map(Number).indexOf(1);\n\n if (x !== -1) {\n console.log(Math.abs(x + 1 - 3) + Math.abs(y - 3));\n }\n\n y++;\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({input: process.stdin});\nvar input = [];\nrl.on('line', function (line) {input.push(line);});\nrl.on('close', function() {\n for (let i = 0; i < input.length; i++) {\n const newArray = input[i].split(' ');\n input[i] = newArray;\n }\n\n// console.log(input);\n\n for (let i = 0; i < input.length; i++) {\n for (let j = 0; j < input[i].length; j++) {\n if (input[i][j] === '1') {\n // 2\n let x = Math.abs(j - 2);\n let y = Math.abs(i - 2);\n // console.log(i+1,j+1);\n console.log(x + y)\n }\n }\n }\n});"}, {"source_code": "a1=readline().split(' ');\na2=readline().split(' ');\na3=readline().split(' ');\na4=readline().split(' ');\na5=readline().split(' ');\n\nvar array=[a1, a2, a3, a4, a5], counter=0;\n\nfor (y=0; y<5; y++) {\n for (x=0; x<5; x++) {\n if (array[y][x]==1) {counter=Math.abs(2-x) + Math.abs(2-y)}\n }\n}\n\nprint(counter)"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction abs(x) {\n return x < 0 ? -x : x;\n}\n\nfunction solve() {\n let n = 5;\n let data = []\n for (let i = 0; i < n; i++) {\n let l = readLine();\n let d = l.split(' ');\n let len = d.length;\n let row = []\n for (let j = 0; j < len; j++)\n row.push(d[j] == \"1\" ? 1 : 0);\n data.push(row);\n }\n\n let x = 0, y = 0;\n for (let i = 0; i < n; i++) {\n for (let j = 0; j < n; j++) {\n if (data[i][j] == 1) {\n x = j;\n y = i;\n }\n }\n }\n\n return abs(x - 2) + abs(y - 2);\n}\n\nfunction main() {\n console.log(solve());\n}\n"}, {"source_code": "var x = 0;\nvar y = 0;\nfor (var i = 0; i < 5; i++) {\n var row = readline().split(' ');\n for (var j = 0; j < 5; j++) {\n if (+row[j] === 1) {\n y = i;\n x = j;\n break;\n }\n }\n}\nvar ans = Math.abs(y - 2) + Math.abs(x - 2);\nprint(ans);\n"}, {"source_code": "var count = 0;\nfor (var i = 1; i < 6; i++) {\n var matrix = readline().split(\" \");\n for (var j = 0; j < 5; j++) {\n if (matrix[j] == 1) {\n\n print(Math.abs(3 - i) + Math.abs(3 - (j + 1)));\n count = 1;\n }\n if (count == 1)\n break;\n }\n\n}"}, {"source_code": "var one=[readline(),readline(),readline(),readline(),readline()].join('').replace(/\\s/g, '');\n\none=one.indexOf('1');\n/* var row=Math.abs((one/5)-2);\nvar column =Math.abs(one%5-2); */\nvar row=parseInt(one/5);\nvar column =one%5;\nprint(Math.abs(row-2)+Math.abs(column-2));"}, {"source_code": "// Generated by CoffeeScript 2.5.1\nvar find, lines, mainAux, numMoves, print, readline, rl, rli, sum, write;\n\nrl = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nprint = console.log;\n\nwrite = function(...args) {\n return process.stdout.write(args.join(' '));\n};\n\nlines = [];\n\nrl.on('line', function(line) {\n return lines.push(line);\n});\n\nrl.on('close', main);\n\nrli = 0;\n\nreadline = function() {\n return lines[rli++];\n};\n\nsum = function(items) {\n return items.reduce((function(a, b) {\n return a + b;\n }), 0);\n};\n\nfind = function(input) {\n return [\n input.find((inp) => {\n return inp.includes('1');\n }).split(' ').findIndex((str) => {\n return str === '1';\n }),\n input.findIndex((inp) => {\n return inp.includes('1');\n })\n ];\n};\n\nnumMoves = function(v) {\n return Math.abs(2 - v);\n};\n\nmainAux = function() {\n var input;\n input = [];\n input.push(readline());\n input.push(readline());\n input.push(readline());\n input.push(readline());\n input.push(readline());\n return print(sum(find(input).map(function(v) {\n return numMoves(v);\n })));\n};\n\n\n function main() {\n return mainAux();\n }\n;\n\n//# sourceMappingURL=matrix.js.map\n"}, {"source_code": "var result = 0;\nfor(var i = 0; i < 5; i++) {\n var position = readline().replace(/ /g, \"\").indexOf(\"1\") + 1;\n\n if(position) {\n result = +`${position - 3}`.replace(\"-\", \"\") + +`${(i - 2)}`.replace(\"-\", \"\");\n }\n}\n\nprint(result);\n"}, {"source_code": "for(var i = 0; i<5; i++){\n var j = readline().split(' ').indexOf('1');\n if(j>-1){\n break;\n }\n}\n\nprint( Math.abs(2-i)+Math.abs(2-j) );"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n input.forEach( (line , i) => {\n line.split(' ').forEach( (x, j) => {\n if (x === '1') {\n console.log(\n Math.abs(2-i) + Math.abs(2-j)\n );\n process.exit();\n }\n });\n });\n});"}, {"source_code": "var x = 0;\nvar y = 0;\n\nvar found = false;\nvar line = readline()\nwhile(line != null && !found){\n var lineSplitted = line.split(' ')\n for(var i = 0; i < lineSplitted.length; i++){\n if(lineSplitted[i] == \"1\"){\n y = i;\n found = true;\n break;\n }\n }\n \n if(found) break;\n x++;\n line = readline()\n}\n\nprint(Math.abs(2 - x) + Math.abs(2 - y))"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet stdinInput = '';\n \nprocess.stdin.on('data', input => {\n stdinInput += input;\n})\n \nprocess.stdin.on('end', () => {\n main(stdinInput);\n})\n \nfunction main(data) {\n data = data.split('\\n');\n let count = 0;\n let idx = 0;\n let i;\n for (i = 0; i < data.length; i += 1) {\n idx = data[i].indexOf(1);\n if (idx >= 0) { \n idx /= 2;\n break;\n }\n }\n count = Math.abs(idx - 2) + Math.abs(i - 2);\n process.stdout.write(count + '');\n}"}, {"source_code": "var matrix = [];\n\nfunction moves(matrix) {\n\tfor ( var i = 0; i < 5; i++) {\n\t\tfor (var j = 0; j < 5; j++){\n\t\t\tif (matrix[i][j] == \"1\") {\n\t\t\t\treturn Math.abs(i - 2) + Math.abs(j - 2);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfor (var i = 0; i < 5; i++) {\n\tmatrix.push(readline().split(' '));\n}\n\nprint(moves(matrix));"}, {"source_code": "function main() {\n // write code here:\n var arr=stdin.splice('\\n').map(a => a.split(' '));\n for(let i=0;i parseInt(el));\n multiArray.push(lines);\n }\n for (var i = 0; i < 5; i++) {\n for (var j = 0; j < 5; j++) {\n if (multiArray[2][2] == 1) {\n break;\n }\n if (multiArray[2][j] == 1 && multiArray[2][2] != 1) {\n if (j < 2) {\n swap(multiArray[2], j, j + 1);\n counter++;\n } else if (j > 2) {\n swap(multiArray[2], j, j - 1);\n counter++;\n }\n if (multiArray[2][2] == 1) {\n break;\n }\n }\n if (multiArray[i][j] == 1) {\n if (i < 2) {\n swap(multiArray, i, i + 1);\n counter++;\n i = 0;\n }\n if (i > 2) {\n swap(multiArray, i, i - 1);\n counter++;\n i = 0;\n }\n }\n }\n if (multiArray[2][2] == 1) {\n break;\n }\n }\n print(counter);\n "}, {"source_code": "var a = [];\n\nvar x = 1;\nvar y = 1;\n\nfor (var i = 0; i < 5; i++) {\n var tx = readline().split(' ').indexOf('1');\n if ( tx != -1) {\n x += tx;\n y += i;\n break;\n }\n}\n\nprint(Math.abs(3 - x) + Math.abs(3 - y));"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n let arr = [];\n let bestPosition = [2, 2];\n\n for (let i = 0; i < inputs.length; i++) {\n const subArr = inputs[i].split(' ');\n arr.push(subArr);\n }\n\n // Get The position of 1\n let currentPositon = [];\n for (let i = 0; i < arr.length; i++) {\n\n for (let j = 0; j < arr[i].length; j++) {\n if (arr[i][j] == 1)\n currentPositon.push(i, j);\n }\n }\n\n // Get the max number that needs minimum steps\n\n const rowSteps = currentPositon[0] - bestPosition[0];\n const colSteps = currentPositon[1] - bestPosition[1];\n const minimumSteps = Math.abs(colSteps) + Math.abs(rowSteps);\n \n console.log(minimumSteps);\n\n})"}, {"source_code": "function bautifulMartix(matrix) {\n // determine the location of the current 1 point\n let coordinates = [];\n for (let row = 0; row < matrix.length; row++) {\n for (let col = 0; col < matrix[row].length; col++) {\n if (matrix[row][col] == \"1\") {\n coordinates.push(row);\n coordinates.push(col);\n }\n }\n }\n console.log(Math.abs(coordinates[0] - 2) + Math.abs(coordinates[1] - 2));\n}\n\nconst readline = require(\"readline\");\n// Create readline Interface\nlet inputs = [];\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.on(\"line\", (lineInput) => {\n inputs.push(lineInput);\n});\nrl.on(\"close\", () => {\n // call the function\n let matrix = [];\n inputs.forEach(function (el) {\n matrix.push(el.split(\" \"));\n });\n bautifulMartix(matrix);\n});\n"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction print(s) {\n process.stdout.write(`${s}`);\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n let n = 0;\n // input\n for (let i = 0; i < 5; i++) {\n const row = readline().split(' ').map(x => parseInt(x));\n const offsetX = row.indexOf(1);\n if (offsetX > -1) {\n n = Math.abs(offsetX - 2) + Math.abs(i - 2);\n }\n }\n\n // output\n print(n);\n}\n\n"}, {"source_code": "var c = 0;\nfor (var i=1; i<6; i++){\n\tvar str =readline().split(\" \");\n\tfor (var j=0; j<5; j++){\n\t\tif (str[j]==1){\n\t\t\n\t\t\tprint(Math.abs(3-i)+ Math.abs(3-(j+1)));\n\t\t\tc=1;\n\t\t}\n\t\tif (c==1)\n\t\tbreak;\n\t}\n\n}"}, {"source_code": "const readline = require(\"readline\")\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n\n//init\nlet tempi = 0;\nlet tempj = 0;\nlet columnCounter = 0;\nlet rowCounter = 0;\n\nlet inputCounterRow = 0;\n\n\nrl.on('line', input => {\n inputCounterRow++;\n let array = input.split(\" \").map(Number);\n for(let j = 0; j < 5; j++){\n if(array[j] === 1){\n tempi = inputCounterRow - 1;\n tempj = j;\n\n //j loop row counter\n while( tempj != 2){\n if(tempj > 2)\n tempj--;\n else\n tempj++;\n \n rowCounter++;\n }\n //j loop column counter.\n while(tempi != 2){\n if(tempi > 2)\n tempi--;\n else\n tempi++;\n\n columnCounter++;\n }\n }\n }\n\n if(inputCounterRow === 5){\n console.log(rowCounter + columnCounter);\n rl.close();\n }\n \n \n });"}, {"source_code": "var read = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\nvar obj;\nvar inLine = [];\nread.on('line', function (input) { inLine.push(input); });\nread.on('close', function () {\n obj = init(inLine);\n myerr(\"-----start-----\");\n var start = new Date();\n Main();\n var end = new Date() - start;\n myerr(\"----- end -----\");\n myerr(\"Time: \" + (end) + \"ms\");\n myerr(\"Memory: \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction nextInt() { return myconv(next(), 1); }\nfunction nextStrArray() { return myconv(next(), 2); }\nfunction nextIntArray() { return myconv(next(), 4); }\nfunction nextCharArray() { return myconv(next(), 6); }\nfunction next() { return obj.next(); }\nfunction hasNext() { return obj.hasNext(); }\nfunction init(input) {\n var returnObj = {\n list: input, index: 0, max: input.length,\n hasNext: function () { return (this.index < this.max); },\n next: function () { if (!this.hasNext()) { throw \"ArrayIndexOutOfBoundsException\"; } else { var returnInput = this.list[this.index]; this.index++; return returnInput; } }\n };\n return returnObj;\n}\nfunction myout(s) { console.log(s); }\nfunction myerr(s) { console.error(\"debug:\" + require(\"util\").inspect(s, false, null)); }\nfunction myconv(i, no) { try { switch (no) { case 1: return parseInt(i); case 2: return i.split(\" \"); case 4: return i.split(\" \").map(Number); case 6: return i.split(\"\"); case 7: return i.split(\"\").map(Number); case 8: return i.join(\" \"); case 9: return i.join(\"\\n\"); case 0: return i.join(\"\"); default: return i; } } catch (e) { return i; } }\n\n\nfunction Main() {\n var mat = [];\n \n for (var i = 0; i < 5; i++) {\n mat[i] = nextIntArray();\n for (var j = 0; mat[i][j] < 5; j++) {\n if (mat[i][j] === 1) {\n myout(Math.abs(i - 2) + Math.abs(j - 2));\n }\n }\n }\n \n} // Use Terminal to debug, not Debug Console!"}, {"source_code": "function readNumbers() {\n\treturn readline().split(' ').map(function (x) {\n\t\treturn parseInt(x);\n\t});\n}\n\nvar i = 0;\nvar j = 0;\n\nwhile (i < 5) {\n\tj = readNumbers().indexOf(1)\n\n\tif (j != -1) {\n\t\tbreak;\n\t}\n\n\ti++;\n}\n\nprint(\n\tMath.abs(i - 2) + Math.abs(j - 2)\n);"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n var T = 5;\n var arr = [];\n var ans = 0;\n while (T--) {\n var row = readLine().split(\" \").map(Number);\n arr.push(row);\n }\n for (let row = 0; row < 5; row++) {\n for (let col = 0; col < 5; col++) {\n if (arr[row][col] === 1) {\n ans = Math.abs(2 - row) + Math.abs(2 - col);\n }\n }\n }\n console.log(ans);\n}\n"}, {"source_code": "var arr = [];\nvar inp;\nconst res = [];\n\nfor(var i = 0; i<5 ; i++){\ninp = readline().split(\" \");\narr.push(inp);\n}\n\narr.forEach((cur, i) => {\n if(cur.indexOf('1') !== -1){\n res.push(cur.indexOf('1'));\n res.push(i);\n }\n});\n\nprint(res.reduce((acc, c) => {\n return (acc + Math.abs(c-2)); \n},0));"}, {"source_code": "function readNumbers() {\n\treturn readline().split(' ').map(function (x) {\n\t\treturn parseInt(x);\n\t});\n}\n\nvar i = 0;\nvar j = 0;\n\nwhile (i < 5) {\n\tj = readNumbers().indexOf(1)\n\n\tif (j != -1) {\n\t\tbreak;\n\t}\n\n\ti++;\n}\n\nprint(\n\tMath.abs(i - 2) + Math.abs(j - 2)\n);"}, {"source_code": "var x = [readline().split(\" \").map(x => parseInt(x))];\nx[1] = readline().split(\" \").map(x => parseInt(x));\nx[2] = readline().split(\" \").map(x => parseInt(x));\nx[3] = readline().split(\" \").map(x => parseInt(x));\nx[4] = readline().split(\" \").map(x => parseInt(x));\n \nvar i,j;\ncaught:\nfor( i = 0; i< x.length; i++) {\n\tfor( j=0; j< x[i].length; j++) {\n\t\tif(x[i][j] === 1) {\n\t\t\tbreak caught;\t\n\t\t}\n\t}\n}\nprint (Math.abs(2-i) + Math.abs(2-j))"}, {"source_code": "const readline = require(\"readline\");\n\nlet inputs = [];\n\nconst rl = readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout\n});\n\nrl.on(\"line\", line => inputs.push(line));\n\nrl.on(\"close\", () => console.log(solution(inputs)));\n\nconst distance = (a, b) => a > b ? a - b : b > a ? b - a : 0;\n\nfunction solution(data) {\n const matrix = data.map(str => str.split(\" \").map(Number));\n let a = 1, b = 1;\n for (let i = a; i <= matrix.length; i++) {\n for (let j = b; j <= matrix[0].length; j++) {\n if (matrix[(i-1)][(j-1)] === 1) {\n a = i;\n b = j;\n break;\n }\n }\n if (a !== 1 || b !== 1) break;\n };\n\n\treturn distance(3, a) + distance(3, b);\n};\n"}, {"source_code": "var count=0;\nfor(var i=0;i<5;i++){\n var row=readline();\n row=row.split(\" \");\n for(var j=0;j<5;j++){\n if(row[j]==1){\n count=Math.abs(j-2)+Math.abs(i-2);\n }\n }\n}\nprint(count);"}, {"source_code": "//Beautiful Matrix\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n let lines = inp.split(EOL);\n \n let loc = [];\n for(let i in lines) {\n \tif(lines[i].indexOf('1') != -1) {\n \t\tloc = [+i, ~~(lines[i].indexOf('1') / 2)];\n \t}\n }\n\n process.stdout.write(Math.abs(2 - loc[0]) + Math.abs(2 - loc[1]) + '');\n\n return;\n});"}, {"source_code": "var one = []\nfor(var i = 0; i < 5; i++) {\n var input = readline().split(\" \")\n if(input.indexOf(\"1\") != -1){\n one.push(i, input.indexOf(\"1\"))\n break;\n }\n}\n\nstep = Math.abs(2 - one[1]) + Math.abs(2 - one[0])\n\nprint(step)\n"}, {"source_code": "var coordinates = {\n row: -1,\n col: -1\n};\nfor (var i = 0; i < 5; i++) {\n var line = readline();\n var unitIndex = -1;\n for (var j = 0; j < line.length; j += 2) {\n if (line[j] === \"1\") {\n unitIndex = Math.floor(j/2);\n break;\n }\n } \n\n if (unitIndex !== -1) {\n coordinates.row = i;\n coordinates.col = unitIndex; \n break;\n }\n}\n\nprint(Math.abs(coordinates.row - 2) + Math.abs(coordinates.col - 2));"}, {"source_code": "var matrix = [];\n\nfunction moves(matrix) {\n\tfor ( var i = 0; i < 5; i++) {\n\t\tfor (var j = 0; j < 5; j++){\n\t\t\tif (matrix[i][j] == \"1\") {\n\t\t\t\treturn Math.abs(i - 2) + Math.abs(j - 2);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfor (var i = 0; i < 5; i++) {\n\tmatrix.push(readline().split(' '));\n}\n\nprint(moves(matrix));"}, {"source_code": "/* TEST CASE\ninput\n0 0 0 0 0\n0 0 0 0 1\n0 0 0 0 0\n0 0 0 0 0\n0 0 0 0 0\noutput\n3\n\ninput\n0 0 0 0 0\n0 0 0 0 0\n0 1 0 0 0\n0 0 0 0 0\n0 0 0 0 0\noutput\n1\n\n */\nfunction main() {\n\tvar x = [1, 1, 1, 1];\n\tvar i, j;\n\tvar splitted = [];\n\tfor (var x = 0; x < 5; x++) {\n\t\tsplitted[x] = readline().split(' ');\n\t}\n\tfor (var x = 0; x < 5; x++) {\n\t\tfor (var y = 0; y < 5; y++) {\n\t\t\tif (splitted[x][y] == '1') {\n\t\t\t\ti = x;\n\t\t\t\tj = y;\n\t\t\t\tx = 5;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tvar answer = Math.abs(2 - i) + Math.abs(2 - j);\n\tprint(answer);\n}\n\nmain();"}, {"source_code": "for(var i = 0; i < 5; i++){\n\tvar j = readline().split(' ').indexOf('1');\n\tif(j > -1)\n\t\tbreak;\n}\n\nprint(Math.abs(2-i)+Math.abs(2-j));"}, {"source_code": "var x = [readline().split(\" \").map(x => parseInt(x))];\nx[1] = readline().split(\" \").map(x => parseInt(x));\nx[2] = readline().split(\" \").map(x => parseInt(x));\nx[3] = readline().split(\" \").map(x => parseInt(x));\nx[4] = readline().split(\" \").map(x => parseInt(x));\n\nvar i,j;\ncaught:\nfor( i = 0; i< x.length; i++) {\n\tfor( j=0; j< x[i].length; j++) {\n\t\tif(x[i][j] === 1) {\n\t\t\tbreak caught;\t\n\t\t}\n\t}\n}\nprint (Math.abs(2-i) + Math.abs(2-j))"}, {"source_code": "a1=readline().split(' ');\na2=readline().split(' ');\na3=readline().split(' ');\na4=readline().split(' ');\na5=readline().split(' ');\n\nvar array=[a1, a2, a3, a4, a5], counter=0;\n\nfor (y=0; y<5; y++) {\n for (x=0; x<5; x++) {\n if (array[y][x]==1) {counter=Math.abs(2-x) + Math.abs(2-y)}\n }\n}\n\nprint(counter)"}, {"source_code": "var matrix = [];\nvar num = 5;\nwhile(num > 0){\n var input = readline().split(\" \").map(x=>parseInt(x));\n matrix.push(input);\n num--;\n}\nvar count = 0;\nvar row_index = 0;\nvar col_index = 0;\nnum = 5;\nouter: for(var i = 0; i< num; i++){\n inner: for(var j = 0; j < num; j++){\n if(matrix[i][j]==1){\n row_index = i;\n col_index = j;\n break outer;\n }\n }\n}\ncount = Math.abs(2-row_index)+Math.abs(2-col_index);\nprint(count);"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction print(s) {\n process.stdout.write(`${s}`);\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n let n = 0;\n // input\n for (let i = 0; i < 5; i++) {\n const row = readline().split(' ').map(x => parseInt(x));\n const offsetX = row.indexOf(1);\n if (offsetX > -1) {\n n = Math.abs(offsetX - 2) + Math.abs(i - 2);\n }\n }\n\n // output\n print(n);\n}\n\n"}, {"source_code": "var i = 0;\nvar j = 0;\nvar p = 0;\nvar q = 0;\nfor (i; i<5;i++){\n var r = readline().split(' ');\n for(j=0;j<5;j++){\n if(r[j] == 1){\n p = i;\n q = j;\n }\n }\n}\nprint((Math.abs(2-p))+Math.abs((2-q)));\n"}, {"source_code": "var x, y, ar;\nfor (var i = 0; i < 5; i ++) {\nar = readline().split(\" \").map(function(x) { return parseInt(x); });\nfor (var j = 0; j < 5; j ++) {\nif (ar[j] == 1) {\nx = i; y = j;\n}\n}\n}\nprint(Math.abs(2 - x) + Math.abs(2 - y));"}, {"source_code": "// You've got a 5 × 5 matrix, consisting of 24 zeroes and a single number one. Let's index the matrix rows by numbers from 1 to 5 from top to bottom, let's index the matrix columns by numbers from 1 to 5 from left to right. In one move, you are allowed to apply one of the two following transformations to the matrix:\n\n// Swap two neighboring matrix rows, that is, rows with indexes i and i + 1 for some integer i (1 ≤ i < 5).\n// Swap two neighboring matrix columns, that is, columns with indexes j and j + 1 for some integer j (1 ≤ j < 5). \n\n// You think that a matrix looks beautiful, if the single number one of the matrix is located in its middle (in the cell that is on the intersection of the third row and the third column). Count the minimum number of moves needed to make the matrix beautiful.\n\n// Input\n// The input consists of five lines, each line contains five integers: the j-th integer in the i-th line of the input represents the element of the matrix that is located on the intersection of the i-th row and the j-th column. It is guaranteed that the matrix consists of 24 zeroes and a single number one.\n\n// Output\n// Print a single integer — the minimum number of moves needed to make the matrix beautiful.\n\n//print([1, 2, 3].includes(2)) // true)\n\nvar m = []\nvar c = []\nvar v = 0\n\nfor (i = 0; i < 5; i++) {\n m.push(readline().split(\" \"));\n if (m[i].includes(\"1\")){\n v = Math.abs(2 - i) + Math.abs(2 - m[i].indexOf(\"1\"))\n }\n}\n\nprint(v)\n\n"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n var T = 5;\n var arr = [];\n var ans = 0;\n while (T--) {\n var row = readLine().split(\" \").map(Number);\n arr.push(row);\n }\n for (let row = 0; row < 5; row++) {\n for (let col = 0; col < 5; col++) {\n if (arr[row][col] === 1) {\n ans = Math.abs(2 - row) + Math.abs(2 - col);\n }\n }\n }\n console.log(ans);\n}\n"}, {"source_code": "var row1 = readline().split(' ');\nvar row2 = readline().split(' ');\nvar row3 = readline().split(' ');\nvar row4 = readline().split(' ');\nvar row5 = readline().split(' ');\n\nvar atRow = 0;\nvar atCol = 0;\nvar targetFound = false;\n\nfor (var i = 0; i < row1.length; i++) {\n if (targetFound)\n break;\n if (row1[i] != 0) {\n atRow = 0;\n atCol = i;\n targetFound = true;\n }\n}\n\nfor (var i = 0; i < row2.length; i++) {\n if (targetFound)\n break;\n if (row2[i] != 0) {\n atRow = 1;\n atCol = i;\n targetFound = true;\n }\n}\n\nfor (var i = 0; i < row3.length; i++) {\n if (targetFound)\n break;\n if (row3[i] != 0) {\n atRow = 2;\n atCol = i;\n targetFound = true;\n }\n}\n\nfor (var i = 0; i < row4.length; i++) {\n if (targetFound)\n break;\n if (row4[i] != 0) {\n atRow = 3;\n atCol = i;\n targetFound = true;\n }\n}\n\nfor (var i = 0; i < row5.length; i++) {\n if (targetFound)\n break;\n if (row5[i] != 0) {\n atRow = 4;\n atCol = i;\n targetFound = true;\n }\n}\n\nvar step = 0;\nif (atRow < 2) {\n step += 2 - atRow;\n}\nif (atRow > 2) {\n step += atRow - 2\n}\nif (atCol < 2) {\n step += 2 - atCol;\n}\nif (atCol > 2) {\n step += atCol - 2\n}\nprint(step);"}, {"source_code": "(function() {\n \"use strict\";\n var x , y;\n for(var i = 0; i < 5; i ++){\n var line = readline().replace(/\\s/g, '');\n var index = line.indexOf('1');\n if(index != -1){\n x = i + 1;\n y = index + 1;\n }\n }\n\n print(Math.abs(x - 3) + Math.abs(y - 3));\n\n})();"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\n\nconst runMain = () => {\n inputString = inputString.trim().split('\\n').map(string => string.trim());\n main();\n process.exit();\n}\nconst readLine = () => inputString[currentLine++];\n\nprocess.stdin.on('data', inputStdin => inputString += inputStdin);\nprocess.stdin.on('end', runMain);\nprocess.on('SIGINT', runMain);\n\nfunction main() {\n let i = 0;\n let j = 0;\n for (let k = 0; k < 5; k++) {\n const line = readLine().split(' ').join('');\n if (line.includes('1')) {\n j = line.indexOf('1');\n break;\n }\n i++;\n }\n console.log(Math.abs(2 - i) + Math.abs(2 - j));\n}\n"}, {"source_code": "var line_number = 0;\nconst cs = require(\"readline\").createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nvar lines = {};\ncs.on(\"line\", (input) => {\n if (input == \"\") {\n cs.close();\n }\n lines[line_number] = input.split(\" \");\n line_number += 1;\n}).on(\"close\", () => {\n main();\n process.exit();\n});\n\nfunction isOp(str) {\n return str.length === 1 && str.match(/[<=>]/);\n}\nfunction isChr(str) {\n return str.length === 1 && str.match(/[a-z]/i);\n}\nfunction isInt(str) {\n return str.length === 1 && !isNaN(str);\n}\n\nfunction print(str) {\n console.log(str);\n}\n\nfunction predict(test) {\n let op = \"\";\n let ops = [];\n let opVariables = [];\n let limits = [];\n for (let t of test) {\n // console.log(t);\n for (let i = 0; i < t.length; i++) {\n if (isOp(t[i])) {\n op = t[i];\n if (isOp(t[i + 1])) {\n op += t[i + 1];\n i += 1;\n }\n ops.push(op);\n op = \"\";\n } else if (isChr(t[i])) {\n // console.log(t[i])\n op = t[i];\n for (var j = i + 1; j < t.length; j++) {\n if (isChr(t[j]) || isInt(t[j])) {\n op += t[j];\n i = j;\n } else break;\n }\n opVariables.push(op);\n op = \"\";\n } else {\n if (i == 0 || (i > 0 && isOp(t[i - 1]))) {\n op = t[i];\n let j = i + 1;\n for (; j < t.length; j++) {\n if (isInt(t[j])) {\n op += t[j];\n i = j;\n } else break;\n }\n limits.push(op);\n op = \"\";\n }\n }\n }\n }\n\n let min = limits[0];\n let max = limits[1];\n\n let pvs = ops.map((o, i) => [o, opVariables[i]]);\n\n for (let pv of pvs) {\n if (pv[1] == undefined) {\n pv[1] = max;\n }\n // print(`${min} ${pv[0]} ${pv[1]} ?`)\n if (eval(`${min}${pv[0]}${pv[1]}`)) {\n // print(` ${min} ${pv[0]} ${pv[1]} true`)\n min = pv[1];\n } else {\n print(\"input error\");\n process.exit();\n }\n }\n}\n\nvar n;\nfunction main() {\n for(let r = 0; r < 15; r++) {\n for(let c = 0; c < 15; c++) {\n if (lines[r][c] === '1') {\n print(Math.abs(3-1-r)+Math.abs(3-1-c))\n process.exit()\n }\n }\n }\n}\n"}, {"source_code": "var matrix = [];\n\nfunction moves(matrix) {\n\tfor ( var i = 0; i < 5; i++) {\n\t\tfor (var j = 0; j < 5; j++){\n\t\t\tif (matrix[i][j] == \"1\") {\n\t\t\t\treturn Math.abs(i - 2) + Math.abs(j - 2);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfor (var i = 0; i < 5; i++) {\n\tmatrix.push(readline().split(' '));\n}\n\nprint(moves(matrix));"}, {"source_code": "var ans = 0;\nfor(var i = 0; i < 5; i++) {\n var line = readline(),\n index = line.split(\" \").findIndex(item => item === \"1\");\n \n if(index >= 0) {\n ans = Math.abs(i - 2) + Math.abs(index - 2);\n break;\n }\n}\n\nprint(ans);\n\n\n"}, {"source_code": "const main = () => {\n const matrix = new Array(5);\n\n for (var i = 0; i < 5; i++) {\n matrix[i] = readline().split(\" \");\n }\n\n for (var i = 0; i < 5; i++) {\n for (var j = 0; j < 5; j++) {\n if (matrix[i][j] === \"1\") {\n return Math.abs(2 - i) + Math.abs(2 - j);\n }\n }\n }\n};\n\nprint(main());"}, {"source_code": "var arrMatric = [];\nfor(var i = 0; i < 5; i++){\n arrMatric[i] = readline().split(' ');\n}\nfor(var i = 0; i < 5; i++){\n for(var m = 0; m < 5; m++){\n if(arrMatric[i][m] == 1){\n k = i;\n n = m;\n }\n }\n}\nm = Math.abs(2 - k); \nl = Math.abs(n - 2);\nm += l\nprint(m);"}, {"source_code": "var x = [readline().split(\" \").map(x => parseInt(x))];\nx[1] = readline().split(\" \").map(x => parseInt(x));\nx[2] = readline().split(\" \").map(x => parseInt(x));\nx[3] = readline().split(\" \").map(x => parseInt(x));\nx[4] = readline().split(\" \").map(x => parseInt(x));\n\nvar i,j;\ncaught:\nfor( i = 0; i< x.length; i++) {\n\tfor( j=0; j< x[i].length; j++) {\n\t\tif(x[i][j] === 1) {\n\t\t\tbreak caught;\t\n\t\t}\n\t}\n}\nprint (Math.abs(2-i) + Math.abs(2-j))"}, {"source_code": "'use strict';\n\n// const fs = require('fs');\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n var matrix = [];\n for (var i = 0; i < 5; i++) {\n let arr = readLine()\n .split(' ')\n .map(value => parseInt(value));\n matrix.push(arr);\n }\n\n let coordinate = [];\n\n for (var i = 0; i < 5; i++) {\n if (matrix[i].indexOf(1) != -1) {\n coordinate.push(i);\n coordinate.push(matrix[i].indexOf(1));\n }\n }\n\n let ans = Math.abs(2 - coordinate[0]) + Math.abs(2 - coordinate[1]);\n console.log(ans);\n}"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw \"ArrayIndexOutOfBoundsException ‚There is no more input\";}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var list = new Array(5);\n for(var i = 0; i < 5; i++){\n list[i] = nextStrArray();\n if(list[i].indexOf(\"1\") != -1){\n myout(Math.abs(list[i].indexOf(\"1\") + 1 - 3) + Math.abs(3 - (i + 1)));\n return;\n }\n }\n \n}\n"}, {"source_code": "\n'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\n\nfunction main() {\n let place = [];\n\n for (let row = 0; row < 5; row++) {\n let found = readline().split(\" \").indexOf('1');\n if (found > -1) {\n place = [row, found];\n break;\n }\n\n }\n\n let num1 = Math.abs(2- place[0]) >= 0 ? Math.abs(2- place[0]) : 0;\n let num2 = Math.abs(2- place[1]) >= 0 ? Math.abs(2- place[1]) : 0;\n console.log(num1 + num2);\n\n return;\n}"}, {"source_code": "var matrix = [];\nfor(var i = 0; i < 5; i++) matrix.push(readline().split(\" \"));\nvar xy = matrix.reduce((a, b, i) => b.indexOf(\"1\") >= 0 ? [i, b.indexOf(\"1\")] : a, [0, 0]);\nprint( Math.abs(2 - xy[0]) + Math.abs(2 - xy[1]));"}, {"source_code": "var arr = [];\nfor(var i = 0; i < 5; ++i) {\n arr.push(readline().split(\" \"));\n}\nvar rows = arr.length;\nvar cols = arr[0].length;\nvar rowOfTargetNum;\nvar colOfTargetNum;\nvar colIndexForBeatiful = Math.floor(cols / 2);\nvar rowIndexForBeatiful = Math.floor(rows / 2);\n \nfor(var i = 0; i < rows; ++i) {\n for(var j = 0; j < cols; ++j) {\n if(parseInt(arr[i][j]) == 1) {\n rowOfTargetNum = i;\n colOfTargetNum = j;\n break;\n }\n }\n if(rowOfTargetNum !== undefined) {\n break;\n }\n}\n \nprint(Math.abs(rowIndexForBeatiful - rowOfTargetNum) + Math.abs(colIndexForBeatiful - colOfTargetNum));"}, {"source_code": "for (i=0;i<5;i++){\n var x = readline().replace(/ /g,\"\");\n if (x.search(\"1\")>-1){\n print(Math.abs((x.indexOf(\"1\"))-2)+Math.abs(i-2))\n }\n}\n"}, {"source_code": "var result = 0;\nfor(var i = 0; i < 5; i++) {\n var position = readline().replace(/ /g, \"\").indexOf(\"1\") + 1;\n\n if(position) {\n result = +`${position - 3}`.replace(\"-\", \"\") + +`${(i - 2)}`.replace(\"-\", \"\");\n }\n}\n\nprint(result);\n"}, {"source_code": "var r = 5;\nvar c = 5;\n\nwhile (r > 0) {\n var s = readline();\n\n var i = s.indexOf('1');\n\n if (i !== -1) {\n c = i / 2 + 1;\n print(Math.abs(r - 3) + Math.abs(c - 3));\n break;\n }\n\n r--;\n}\n"}, {"source_code": "var r , c;\nvar input = [];\nfor(var i=0 ; i<5 ; i++){\n input = readline().split(' ').map(x=>parseInt(x));\n for(var j=0 ; j<5 ;j++){\n if(input[j]==1){\n r = i+1;\n c = j+1;\n break;\n }\n \n }\n}\n\nvar res = Math.abs(r-3) + Math.abs(c-3) ;\nprint(res);"}, {"source_code": "var res = sol();\nprint(res);\n\nfunction sol() {\n\n var rowOfOne = -1;\n var colOfOne = -1;\n\n var trans = 0;\n\n for (var i = 0; i < 5; i++) {\n var row = readline().split(\" \");\n for (var j = 0; j < 5; j++) {\n if (row[j] == 1) {\n rowOfOne = i;\n colOfOne = j;\n break;\n }\n }\n \n if(rowOfOne != -1){\n break;\n }\n }\n\n trans += Math.abs(rowOfOne - 2);\n trans += Math.abs(colOfOne - 2);\n\n return trans;\n}"}, {"source_code": "var x, y, ar;\nfor (var i = 0; i < 5; i ++) {\nar = readline().split(\" \").map(function(x) { return parseInt(x); });\nfor (var j = 0; j < 5; j ++) {\nif (ar[j] == 1) {\nx = i; y = j;\n}\n}\n}\nprint(Math.abs(2 - x) + Math.abs(2 - y));"}, {"source_code": "var counter = 0;\nvar nRow;\nvar nColumn;\n\nfor(var i = 0; i < 5; i++)\n{\n var row = readline().split(\" \");\n if(row.findIndex(x => x == \"1\") != -1)\n {\n nRow = i;\n nColumn = row.findIndex(x => x == \"1\");\n }\n}\n\nif(nRow == 0 || nRow == 4)\n counter += 2;\nelse if(nRow == 1 || nRow == 3)\n counter++;\n\nif(nColumn == 0 || nColumn == 4)\n counter += 2;\nelse if(nColumn == 1 || nColumn == 3)\n counter++;\n\nprint(counter);"}, {"source_code": "var x = 0;\nvar y = 0;\n\nvar found = false;\nvar line = readline()\nwhile(line != null && !found){\n var lineSplitted = line.split(' ')\n for(var i = 0; i < lineSplitted.length; i++){\n if(lineSplitted[i] == \"1\"){\n y = i;\n found = true;\n break;\n }\n }\n \n if(found) break;\n x++;\n line = readline()\n}\n\nprint(Math.abs(2 - x) + Math.abs(2 - y))"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n input.forEach( (line , i) => {\n line.split(' ').forEach( (x, j) => {\n if (x === '1') {\n console.log(\n Math.abs(2-i) + Math.abs(2-j)\n );\n process.exit();\n }\n });\n });\n});"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n let arr = [];\n let bestPosition = [2, 2];\n\n for (let i = 0; i < inputs.length; i++) {\n const subArr = inputs[i].split(' ');\n arr.push(subArr);\n }\n\n // Get The position of 1\n let currentPositon = [];\n for (let i = 0; i < arr.length; i++) {\n\n for (let j = 0; j < arr[i].length; j++) {\n if (arr[i][j] == 1)\n currentPositon.push(i, j);\n }\n }\n\n // Get the max number that needs minimum steps\n\n let minimumSteps = 0\n\n if (currentPositon.toString() != bestPosition.toString()) {\n const rowSteps = currentPositon[0] - bestPosition[0];\n const colSteps = currentPositon[1] - bestPosition[1];\n minimumSteps = Math.abs(colSteps) + Math.abs(rowSteps);\n }\n\n console.log(minimumSteps);\n\n})"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction readAsInt(){\n return parseInt(readline());\n}\n\nfunction readAsIntList(){\n return readline().split(' ').filter(i => i).map(i => parseInt(i));\n}\n\n\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n for(let i = 0; i < 5; i++) {\n let x = readAsIntList().findIndex(n => n);\n if(x>-1) {\n let result = (x > 2 ? ((x+1) % 3) : 2 - x) + (i > 2 ? ((i+1) % 3) : 2 - i);\n console.log(result);\n return;\n }\n }\n}\n\n"}, {"source_code": "\n function swap(arr, i, j) {\n var temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n var lines,\n multiArray = [],\n counter = 0;\n for (var i = 0; i < 5; i++) {\n lines = readline()\n .split(\" \")\n .map((el) => parseInt(el));\n multiArray.push(lines);\n }\n for (var i = 0; i < 5; i++) {\n for (var j = 0; j < 5; j++) {\n if (multiArray[2][2] == 1) {\n break;\n }\n if (multiArray[2][j] == 1 && multiArray[2][2] != 1) {\n if (j < 2) {\n swap(multiArray[2], j, j + 1);\n counter++;\n } else if (j > 2) {\n swap(multiArray[2], j, j - 1);\n counter++;\n }\n if (multiArray[2][2] == 1) {\n break;\n }\n }\n if (multiArray[i][j] == 1) {\n if (i < 2) {\n swap(multiArray, i, i + 1);\n counter++;\n i = 0;\n }\n if (i > 2) {\n swap(multiArray, i, i - 1);\n counter++;\n i = 0;\n }\n }\n }\n if (multiArray[2][2] == 1) {\n break;\n }\n }\n print(counter);\n "}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n const matrix = [];\n let minNumOfSwap;\n for( let i = 0 ; i < 5 ; i++){\n matrix[i] = readline().split(' ').map(x => parseInt(x))\n }\n\n\n for (let i=0 ; i <5 ;i++){\n for (let j =0 ; j < 5 ; j++){\n if (matrix[i][j] === 1 ){\n minNumOfSwap = Math.abs( i - 2) + Math.abs(j -2);\n break;\n }\n }\n if (minNumOfSwap > 0) break;\n }\n console.log(minNumOfSwap)\n\n}\n\n"}, {"source_code": "var m = []\nvar c = []\nvar v = 0\n \nfor (i = 0; i < 5; i++) {\n m.push(readline().split(\" \"));\n if (m[i].includes(\"1\")){\n v = Math.abs(2 - i) + Math.abs(2 - m[i].indexOf(\"1\"))\n }\n}\n \nprint(v)"}, {"source_code": "var n1 = readline().indexOf(\"1\"); \nvar n2 = readline().indexOf(\"1\");\nvar n3 = readline().indexOf(\"1\");\nvar n4 = readline().indexOf(\"1\");\nvar n5 = readline().indexOf(\"1\");\nif (n1 >= 0){print(Math.abs(n1/2 - 2) + 2)}\nelse if(n2 >= 0){print(Math.abs(n2/2 - 2) + 1)}\nelse if(n3 >= 0){print(Math.abs(n3/2 - 2))}\nelse if(n4 >= 0){print(Math.abs(n4/2 - 2) + 1)}\nelse if(n5 >= 0){print(Math.abs(n5/2 - 2) + 2)}"}, {"source_code": "var s = [];\nfor (var i = 0; i < 5; i ++)\n s.push(readline());\nfor (var i = 0; i < s.length; i++)\n{\n var q = s[i].split(' ');\n for (var j = 0; j < q.length; j++)\n if (q[j] === '1')\n {\n print(Math.abs((i + 1) - 3) + Math.abs((j + 1) - 3));\n break;\n }\n}"}, {"source_code": "var mat = [], x = 0, y = 0, row;\n\nfor(var i=0; i<5; i++) {\n row = readline().split(' ');\n mat.push(row);\n \n if(row.indexOf('1') >= 0) {\n x = i;\n y = row.indexOf('1');\n }\n}\n\nprint(Math.abs(2-x) + Math.abs(2-y));"}, {"source_code": "var matrix = [];\nvar num = 5;\nwhile(num > 0){\n var input = readline().split(\" \").map(x=>parseInt(x));\n matrix.push(input);\n num--;\n}\nvar count = 0;\nvar row_index = 0;\nvar col_index = 0;\nnum = 5;\nouter: for(var i = 0; i< num; i++){\n inner: for(var j = 0; j < num; j++){\n if(matrix[i][j]==1){\n row_index = i;\n col_index = j;\n break outer;\n }\n }\n}\ncount = Math.abs(2-row_index)+Math.abs(2-col_index);\nprint(count);"}, {"source_code": "var one = []\nfor(var i = 0; i < 5; i++) {\n var input = readline().split(\" \")\n if(input.indexOf(\"1\") != -1){\n one.push(i, input.indexOf(\"1\"))\n break;\n }\n}\n\nstep = Math.abs(2 - one[1]) + Math.abs(2 - one[0])\n\nprint(step)\n"}, {"source_code": "function bautifulMartix(matrix) {\n // determine the location of the current 1 point\n let coordinates = [];\n for (let row = 0; row < matrix.length; row++) {\n for (let col = 0; col < matrix[row].length; col++) {\n if (matrix[row][col] == \"1\") {\n coordinates.push(row);\n coordinates.push(col);\n }\n }\n }\n console.log(Math.abs(coordinates[0] - 2) + Math.abs(coordinates[1] - 2));\n}\n\nconst readline = require(\"readline\");\n// Create readline Interface\nlet inputs = [];\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.on(\"line\", (lineInput) => {\n inputs.push(lineInput);\n});\nrl.on(\"close\", () => {\n // call the function\n let matrix = [];\n inputs.forEach(function (el) {\n matrix.push(el.split(\" \"));\n });\n bautifulMartix(matrix);\n});\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet stdinInput = '';\n \nprocess.stdin.on('data', input => {\n stdinInput += input;\n})\n \nprocess.stdin.on('end', () => {\n main(stdinInput);\n})\n \nfunction main(data) {\n data = data.split('\\n');\n let count = 0;\n let idx = 0;\n let i;\n for (i = 0; i < data.length; i += 1) {\n idx = data[i].indexOf(1);\n if (idx >= 0) { \n idx /= 2;\n break;\n }\n }\n count = Math.abs(idx - 2) + Math.abs(i - 2);\n process.stdout.write(count + '');\n}"}, {"source_code": "var c = 0;\nfor (var i=1; i<6; i++){\n\tvar str =readline().split(\" \");\n\tfor (var j=0; j<5; j++){\n\t\tif (str[j]==1){\n\t\t\n\t\t\tprint(Math.abs(3-i)+ Math.abs(3-(j+1)));\n\t\t\tc=1;\n\t\t}\n\t\tif (c==1)\n\t\tbreak;\n\t}\n\n}"}, {"source_code": "for(var i = 0 ; i < 5 ; i++) {\n inp = readline().split(\" \");\n for(var j=0;j<5;j++){\n if(inp[j]==1){\n print(Math.abs(2-i)+Math.abs(2-j))\n }\n }\n}\n"}, {"source_code": "var a = [];\n\nfor(var i=0; i<5; i++)\n a[i] = readline().split(\" \");\n\nvar n = 0;\n\nfor(var i=0; i<5; i++)\n for(var j=0; j<5; j++)\n if(a[i][j] == \"1\")\n {\n if(i>1) n = n+(i-2);\n else n = n+(2-i);\n\n if(j>1) n = n+(j-2);\n else n = n+(2-j);\n } \n\nprint(n);\n"}, {"source_code": "var posX = 0;\nvar posY = 0;\nvar res = 2;\n\nfor (var i = 0; i < 5; i++) {\n\tstr = readline().split(' ').map(Number);\n\n\tfor (var j = 0; j < str.length; j++) {\n\t\tif (str[j] === 1) {\n\t\t\tposX = j;\n\t\t\tposY = i;\n\t\t};\n\t};\n};\n\nprint(Math.abs(res - posX) + Math.abs(res - posY));"}, {"source_code": "var result = 0;\nfor(var i = 0; i < 5; i++) {\n var position = readline().replace(/ /g, \"\").indexOf(\"1\") + 1;\n\n if(position) {\n result = +`${position - 3}`.replace(\"-\", \"\") + +`${(i - 2)}`.replace(\"-\", \"\");\n }\n}\n\nprint(result);\n"}, {"source_code": "var ans, val;\n\nfor (var i = 0 ; i < 5 ; i++) {\n val = readline().split(' ');\n\n for (var j = 0 ; j < 5 ; j++) {\n if (val[j] == '1') {\n ans = Math.abs(2 - i) + Math.abs(2 - j);\n }\n }\n}\n\nprint(ans);"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nlet y = 1;\n\nrl.on('line', (m) => {\n let x = m.split(' ').map(Number).indexOf(1);\n\n if (x !== -1) {\n console.log(Math.abs(x + 1 - 3) + Math.abs(y - 3));\n }\n\n y++;\n});"}, {"source_code": "var ans1=-1,ans2=-1;\nfor(var i=0;i<5;i++)\n{\n var j=readline().split(' ').indexOf('1');\n if(j>-1)\n ans1=i,ans2=j;\n}\nprint(Math.abs(ans1-2)+Math.abs(ans2-2));\n"}, {"source_code": "var a = readline().split(' ');\nvar b = readline().split(' ');\nvar c = readline().split(' ');\nvar d = readline().split(' ');\nvar e = readline().split(' ');\nif (a.includes(\"1\")) {\n var row = 1\n var col = a.indexOf(\"1\") + 1;\n // print(Math.abs(row - col) );\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n // print(moveByRow);\n // print(moveByCol);\n print(Math.abs(moveByRow + moveByCol));\n}\nif (b.includes(\"1\")) {\n var row = 2\n var col = b.indexOf(\"1\") + 1;\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n // print(moveByRow);\n // print(moveByCol);\n print(Math.abs(moveByRow + moveByCol));\n}\nif (c.includes(\"1\")) {\n var row = 3\n var col = c.indexOf(\"1\") + 1;\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n // print(moveByRow);\n // print(moveByCol);\n print(Math.abs(moveByRow + moveByCol));\n}\nif (d.includes(\"1\")) {\n var row = 4\n var col = d.indexOf(\"1\") + 1;\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n // print(moveByRow);\n // print(moveByCol);\n print(Math.abs(moveByRow + moveByCol));\n}\nif (e.includes(\"1\")) {\n var row = 5\n var col = e.indexOf(\"1\") + 1;\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n // print(moveByRow);\n // print(moveByCol);\n print(Math.abs(moveByRow + moveByCol));\n}\n"}, {"source_code": "var read = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\nvar obj;\nvar inLine = [];\nread.on('line', function (input) { inLine.push(input); });\nread.on('close', function () {\n obj = init(inLine);\n myerr(\"-----start-----\");\n var start = new Date();\n Main();\n var end = new Date() - start;\n myerr(\"----- end -----\");\n myerr(\"Time: \" + (end) + \"ms\");\n myerr(\"Memory: \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction nextInt() { return myconv(next(), 1); }\nfunction nextStrArray() { return myconv(next(), 2); }\nfunction nextIntArray() { return myconv(next(), 4); }\nfunction nextCharArray() { return myconv(next(), 6); }\nfunction next() { return obj.next(); }\nfunction hasNext() { return obj.hasNext(); }\nfunction init(input) {\n var returnObj = {\n list: input, index: 0, max: input.length,\n hasNext: function () { return (this.index < this.max); },\n next: function () { if (!this.hasNext()) { throw \"ArrayIndexOutOfBoundsException\"; } else { var returnInput = this.list[this.index]; this.index++; return returnInput; } }\n };\n return returnObj;\n}\nfunction myout(s) { console.log(s); }\nfunction myerr(s) { console.error(\"debug:\" + require(\"util\").inspect(s, false, null)); }\nfunction myconv(i, no) { try { switch (no) { case 1: return parseInt(i); case 2: return i.split(\" \"); case 4: return i.split(\" \").map(Number); case 6: return i.split(\"\"); case 7: return i.split(\"\").map(Number); case 8: return i.join(\" \"); case 9: return i.join(\"\\n\"); case 0: return i.join(\"\"); default: return i; } } catch (e) { return i; } }\n\n\nfunction Main() {\n var mat = [];\n \n for (var i = 0; i < 5; i++) {\n mat[i] = nextIntArray();\n for (var j = 0; mat[i][j] < 5; j++) {\n if (mat[i][j] === 1) {\n myout(Math.abs(i - 2) + Math.abs(j - 2));\n }\n }\n }\n \n} // Use Terminal to debug, not Debug Console!"}], "negative_code": [{"source_code": "var matrix = [];\n\nfunction moves(matrix) {\n\tfor ( var i = 0; i < 25; i++) {\n\t\tif (matrix[i] == \"1\") {\n\t\t\treturn Math.abs(i - 12);\n\t\t}\n\t}\n}\n\nfor (var i = 0; i < 5; i++) {\n\tvar line = readline().split(' ');\n\tfor (var j = 0; j < 5; j++) {\n\t\tmatrix.push(line[j]);\n\t}\t\n}\nprint(moves(matrix));"}, {"source_code": "var matrix = [];\nfor(var i = 0; i < 5; i++) {\n matrix[i] = readline().split(' ').map(Number);\n}\nprint(matrix);\nvar row = 0;\nvar column = 0;\nfor(var r = 0; r < 5; r ++) {\n for(var c = 0; c < 5; c++) {\n if(matrix[r][c] === 1) {\n row = r;\n column = c;\n break;\n }\n }\n}\nvar result = Math.abs(row -2) + Math.abs(column - 2);\nprint(result);"}, {"source_code": "var x, y;\nfor (var i = 0; i < 5; i++) {\n var s = readline().split(' ');\n for (var j = 0; j < s.length; j++) {\n if (s[j] == 1) {\n x = i+1;\n y = j+1;\n }\n }\n}\n\nprint((3-x) + Math.abs((3 - y)));"}, {"source_code": "//Beautiful Matrix\nvar one=[readline(),readline(),readline(),readline(),readline()].join('').replace(/\\s/g, '');\none=one.indexOf('1');\nvar row=parseInt(Math.abs((one/5)-2));\nvar column =Math.abs(one%5-2); \nprint(row+column);"}, {"source_code": " var a=[readline(),readline(),readline(),readline(),readline()].join('').replace(/\\s/g, '');\n\nvar one=a.indexOf('1');\n/* var row=Math.abs((one/5)-2);\nvar column =Math.abs(one%5-2); */\nvar row=Math.abs(parseInt(one/5)-2);\nvar column =Math.abs(one%5);\n/* print(a); \nprint(one); \nprint(row); \n\nprint(column);\nprint(Math.abs(row-2));\nprint(Math.abs(column-2)); */\nprint(column+row);"}, {"source_code": "//Beautiful Matrix\nvar a = [readline(), readline(), readline(), readline(), readline()].join('').replace(/\\s/g, '');\nvar one = a.indexOf('1');\nvar row = Math.abs((one / 5) - 2);\nvar column = Math.abs(one % 5 - 2);\nif ((one + 1) % 5 == 0) row++;\nprint(parseInt(row + column));"}, {"source_code": "var one=[readline(),readline(),readline(),readline(),readline()].join('').replace(/\\s/g, '');\none=one.indexOf('1');\nvar row=parseInt(Math.abs((one/5)))-2;\nvar column =Math.abs(one%5-2); \nprint(row+column);"}, {"source_code": "var one=[readline(),readline(),readline(),readline(),readline()].join('').replace(/\\s/g, '');\none=one.indexOf('1');\nvar row=parseInt(Math.abs((one/5)-2));\nvar column =Math.abs(one%5-2); \nprint(Math.abs(row-2)+Math.abs(column-2));"}, {"source_code": "var arr = [];\nfor(var i = 0; i < 5; ++i) {\n arr.push(readline().split(\" \"));\n}\nvar rows = arr.length;\nvar cols = arr[0].length;\nvar rowOfTargetNum;\nvar colOfTargetNum;\nvar colIndexForBeatiful = Math.floor(cols / 2 + 1);\nvar rowIndexForBeatiful = Math.floor(rows / 2 + 1);\n\nfor(var i = 0; i < rows; ++i) {\n for(var j = 0; j < cols; ++j) {\n if(parseInt(arr[i][j]) == 1) {\n rowOfTargetNum = i;\n colOfTargetNum = j;\n break;\n }\n }\n if(rowOfTargetNum !== undefined) {\n break;\n }\n}\n\nprint(Math.abs(rowIndexForBeatiful - rowOfTargetNum) + Math.abs(colIndexForBeatiful - colOfTargetNum));"}, {"source_code": "'use strict'\nlet a = 5, b, c;\n\nfor (; a; a--) {\n c = readline();\n for (b = 9; b; b--) {\n if (+c[a - 1][b - 1]) {\n print((a - 3 < 0 ? 3 - a : a - 3) + (b - 7 < 0 ? 7 - b : b - 7));\n\t break;\n }\n }\n}\n"}, {"source_code": "'use strict'\nlet a = 5, b, c;\n\nfor (; a; a--) {\n c = readline();\n for (b = 9; b; b--) {\n if (+c[b - 1]) {\n print((a - 3 < 0 ? 3 - a : a - 3) + (b - 7 < 0 ? 7 - b : b - 7));\n\t break;\n }\n }\n}\n"}, {"source_code": "var a = 5, b, c, d;\n\nfor (; a; a--) {\n d = readline();\n for (b = 9, c = 1; b; b--) {\n if (d[b - 1] !== \" \") {\n if (+d[b - 1]) {\n\t print(Math.abs(a - 4) + Math.abs(c - 3));\n\t\tbreak;\n }\n\t c++;\n }\n }\n}\n"}, {"source_code": "print(readline())"}, {"source_code": "var a = 5, b, c, d;\n\nfor (; a; a--) {\n d = readline();\n for (b = 9, c = 1; b; b--) {\n if (d[b - 1] !== \" \") {\n if (+d[b - 1]) {\n\t\tprint(a + ' ' + c)\n\t\tbreak;\n }\n\t c++;\n }\n }\n}\n"}, {"source_code": "var a = 5, b, c, d;\n\nfor (; a; a--) {\n d = readline();\n for (b = 9, c = 1; b; b--) {\n if (d[b - 1] !== \" \") {\n if (+d[b - 1]) {\n\t\tc = (a - 3) + (c - 3);\n\t print(c < 0 ? -c : c);\n\t\tbreak;\n }\n\t c++;\n }\n }\n}\n"}, {"source_code": "var a = 5, b, c, d;\n\nfor (; a; a--) {\n d = readline();\n for (b = 9, c = 1; b; b--) {\n if (d[b - 1] !== \" \") {\n if (+d[a - 1][b - 1]) {\n\t\tc = (a - 3) + (c - 3);\n\t print(c < 0 ? -c : c);\n\t\tbreak;\n }\n\t c++;\n }\n }\n}\n"}, {"source_code": "var a = 5, b, c, d;\n\nfor (; a; a--) {\n d = readline();\n for (b = 9, c = 1; b; b--) {\n if (d[b - 1] !== \" \") {\n if (+d[b - 1]) {\n\t\tc = (a - 4) + (c - 3);\n\t print(c < 0 ? -c : c);\n\t\tbreak;\n }\n\t c++;\n }\n }\n}\n"}, {"source_code": "readline()\nprint(readline())"}, {"source_code": "'use strict'\nlet a = 5, b, c, d;\n\nfor (; a; a--) {\n d = readline();\n for (b = 9, c = 1; b; b--) {\n if (d[a - 1][b - 1] !== \" \") {\n if (+d[a - 1][b - 1]) {\n print((a - 3 < 0 ? 3 - a : a - 3) + (c - 3 < 0 ? 3 - c : c - 3));\n break;\n }\n\t c++;\n }\n }\n}"}, {"source_code": "var a = 5, b, c, d;\n\nfor (; a; a--) {\n d = readline();\n for (b = 9, c = 1; b; b--) {\n if (d[b - 1] !== \" \") {\n if (+d[b - 1]) {\n\t\t//c = (a - 3) + (c - 3);\n\t //print(c < 0 ? -c : c);\n\t\tprint((a - 1) + ' ' + c)\n\t\tbreak;\n }\n\t c++;\n }\n }\n}\n"}, {"source_code": "var a = 5, b, c, d;\n\nfor (; a; a--) {\n d = readline();\n for (b = 9, c = 1; b; b--) {\n if (d[b - 1] !== \" \") {\n if (+d[b - 1]) {\n\t\tc = (a - 3) + (c - 3);\n\t\tprint(a + ' ' + c)\n\t\tbreak;\n }\n\t c++;\n }\n }\n}\n"}, {"source_code": "function findElem() {\n for (var i=0; i < 5; i++) {\n var myArray = readline().split(' ');\n if (myArray.indexOf('1') !== -1 && myArray.indexOf('1') !== 0) {\n for (var j=0; j<5; j++) {\n if (myArray[j]==='1') {\n return [i+1, j+1]\n }\n } \n }\n }\n}\n\nvar result = findElem();\nprint(result)\nresult = Math.abs(result[0]-3)+Math.abs(result[1]-3)\nprint(result)"}, {"source_code": "function findElem() {\n for (var i=0; i < 5; i++) {\n var myArray = readline().split(' ');\n if (myArray.indexOf('1') !== -1 && myArray.indexOf('1') !== 0) {\n for (var j=0; j<5; j++) {\n if (myArray[j]==='1') {\n return [i, j]\n }\n } \n }\n }\n}\n\nvar result = findElem();\nresult = Math.abs(result[0]-3)+Math.abs(result[1]-3)\nprint(result)"}, {"source_code": "var arr = [];\nfor(var i = 0; i < 5; i++){\n arr.push(readline().split(\" \"));\n}\nprint(arr);"}, {"source_code": "var ans, val;\n\nfor (var i = 0 ; i < 5 ; i++) {\n for (var j = 0 ; j < 5 ; j++) {\n val = Number(readline());\n\n if (val == 1) {\n ans = Math.abs(2 - i) + Math.abs(2 - j);\n }\n }\n}\n\nprint(ans);"}, {"source_code": "var ans;\n\nfor (var i = 0 ; i < 5 ; i++) {\n for (var j = 0 ; j < 5 ; j++) {\n var val = Number(readline());\n\n if (val == 1) {\n ans = Math.abs(2 - i) + Math.abs(2 - j);\n }\n }\n}\n\nprint(ans);"}, {"source_code": "\nfor (var i = 1; i <= 5; i++) {\n var numbers = readline().split(\" \").map(function(x) { return parseInt(x); });\n\n var shouldBreak = false;\n\n for (var j = 1; j <= 5; j++) {\n if (numbers[j] === 1) {\n shouldBreak = true;\n break;\n }\n }\n\n if (shouldBreak) {\n break;\n }\n}\n\nprint(Math.abs(i - 3) + Math.abs(j - 3));\n"}, {"source_code": "for (var i = 1; i <= 5; i++) {\n var row = readline().split(\" \").map(x => parseInt(x));\n for (var j = 1; j <= 5; j ++) {\n if (row[j] === 1) {\n print(Math.abs(i - 3) + Math.abs(j - 3));\n }\n }\n}"}, {"source_code": "var pending;\n \nfor (var i = 1; i <= 5; i++) {\n var row = readline().split(\" \").map(x => parseInt(x));\n for (var j = 1; j <= 5; j ++) {\n if (row[j] === 1) {\n pending = Math.abs(i - 3) + Math.abs(j - 3);\n }\n }\n}\n \nprint(pending);"}, {"source_code": "for (var i = 1; i <= 5; i++) {\n var row = readline().split(\" \").map(x => parseInt(x));\n for (var j = 1; j <= 5; j ++) {\n if (row[j] === 1) {\n print(Math.abs(i - 3) + Math.abs(j - 3));\n break;\n }\n }\n}"}, {"source_code": "var pending;\n\nfor (var i = 0; i < 5; i++) {\n var row = readline().split(\" \").map(x => parseInt(x));\n for (var j = 0; j < 5; j ++) {\n if (row[j] === 1) {\n pending = Math.abs(i - 3) + Math.abs(j - 3);\n }\n }\n}\n\nprint(pending);"}, {"source_code": "var mati, matj;\n\nfor (var i = 1; i <= 5; i++) {\n var row = readline().split(\" \").map(x => parseInt(x));\n for (var j = 1; j <= 5; j ++) {\n if (row[j] === 1) {\n mati = i;\n matj = j;\n }\n }\n}\n\nprint(Math.abs(mati - 3) + Math.abs(matj - 3));"}, {"source_code": "var n1 = readline().indexOf(\"1\"); \nvar n2 = readline().indexOf(\"1\");\nvar n3 = readline().indexOf(\"1\");\nvar n4 = readline().indexOf(\"1\");\nvar n5 = readline().indexOf(\"1\");\nif (n1 >= 0){print( Math.abs((n1/2 +2)-6))}\nelse if(n2 >= 0){print( Math.abs((n1/2 +3)-6))}\nelse if(n3 >= 0){print( Math.abs((n1/2 +4)-6))}\nelse if(n4 >= 0){print( Math.abs((n1/2 +5)-6))}\nelse if(n5 >= 0){print( Math.abs((n1/2 +6)-6))}"}, {"source_code": "var n1 = readline().indexOf(\"1\"); \nvar n2 = readline().indexOf(\"1\");\nvar n3 = readline().indexOf(\"1\");\nvar n4 = readline().indexOf(\"1\");\nvar n5 = readline().indexOf(\"1\");\nif (n1 >= 0){print( Math.abs((n1/2 +2)-6))}\nelse if(n2 >= 0){print( Math.abs((n2/2 +3)-6))}\nelse if(n3 >= 0){print( Math.abs((n3/2 +4)-6))}\nelse if(n4 >= 0){print( Math.abs((n4/2 +5)-6))}\nelse if(n5 >= 0){print( Math.abs((n5/2 +6)-6))}"}, {"source_code": "var n1 = readline().indexOf(\"1\"); \nvar n2 = readline().indexOf(\"1\");\nvar n3 = readline().indexOf(\"1\");\nvar n4 = readline().indexOf(\"1\");\nvar n5 = readline().indexOf(\"1\");\nif (n1 >= 0){print(Math.abs(n1/2 - 2) + 2)}\nelse if(n2 >= 0){print(Math.abs(n1/2 - 2) + 1)}\nelse if(n3 >= 0){print(Math.abs(n1/2 - 2))}\nelse if(n4 >= 0){print(Math.abs(n1/2 - 2) + 1)}\nelse if(n5 >= 0){print(Math.abs(n1/2 - 2) + 2)}"}, {"source_code": "for(var i=0;i<5;i++){\n var arr = readline().split(\" \").map(x => parseInt(x));\n for(var j=0;j<5;j++){\n if(arr[i]==1){\n print(abs(2-i)+abs(2-j));\n }\n }\n}"}, {"source_code": "var matrix = [];\nfor(var i = 0; i < 5; i++) matrix.push(readline().split(\" \"));\nvar xy = matrix.reduce((a, b, i) => b.indexOf(1) > 0 ? [i, b.indexOf(1)] : a, [0, 0]);\nprint( Math.abs(3 - xy[0]) + Math.abs(3 - xy[1]));"}, {"source_code": "var matrix = [];\nfor(var i = 0; i < 5; i++) matrix.push(readline().split(\" \"));\nvar xy = matrix.reduce((a, b, i) => b.indexOf(1) > 0 ? [i, b.indexOf(1)] : a, [0, 0]);\nprint( Math.abs(2 - xy[0]) + Math.abs(2 - xy[1]));"}, {"source_code": "var matrix = [];\nfor(var i = 0; i < 5; i++) matrix.push(readline().split(\" \"));\nvar xy = matrix.reduce((a, b, i) => b.indexOf(\"1\") > 0 ? [i, b.indexOf(\"1\")] : a, [0, 0]);\nprint( Math.abs(2 - xy[0]) + Math.abs(2 - xy[1]));"}, {"source_code": "var count = 0;\nfor (var i = 1; i < 6; i++) {\n var str = readline().split(\" \");\n for (var j = 1; j < 6; j++) {\n if (str[j] == 1) {\n\n print(Math.abs(3 - i) + Math.abs(3 - (j + 1)));\n count = 1;\n }\n if (count == 1)\n break;\n }\n}"}, {"source_code": "for (i=0;i<5;i++){\n var x = readline().replace(/\" \"/g,\"\");\n if (x.search(\"1\")>-1){\n print(Math.abs((x.indexOf(\"1\"))-2)+Math.abs(i-2))\n }\n}\n"}, {"source_code": "for (i=0;i<5;i++){\n var x = readline().replace(/\" \",\"\"/g);\n if (x.search(\"1\")>0){\n print(Math.abs((x.indexOf(\"1\")/2)-2)+Math.abs(i-2))\n }\n}\n"}, {"source_code": "var a = -1, b = -1;\n\nfor (var i = 1; i < 6; i++) {\n var line = readline();\n if ( line.includes(1) ) {\n a = i;\n b = line.indexOf(1) + 1;\n break;\n }\n}\n\nprint( Math.abs(2 - a) + Math.abs(2 - b));"}, {"source_code": "var a = -1, b = -1;\n\nfor (var i = 1; i < 6; i++) {\n var line = readline();\n if ( line.includes(1) ) {\n a = i;\n b = line.indexOf(1) / 2 + 1;\n break;\n }\n}\n\nprint( Math.abs(2 - a) + Math.abs(2 - b));"}, {"source_code": "var a = -1, b = -1;\n\nfor (var i = 0; i < 5; i++) {\n var line = readline();\n if ( line.includes(1) ) {\n a = i;\n b = line.indexOf(1);\n break;\n }\n}\n\nprint( Math.abs(2 - a) + Math.abs(2 - b));"}, {"source_code": "for(var i = 0; i<5; i++){\n var j = readline().split(' ').indexOf('1');\n if(j>0){\n break;\n }\n}\n\nprint(Math.abs(2-i)+Math.abs(2-j));"}, {"source_code": "for(var i = 0; i<5; i++){\n var j = readline().split(\" \").indexOf('1');\n if(j>-5){\n break;\n }\n}\n\nprint(Math.abs(2-i)+Math.abs(2-j));"}, {"source_code": "for(var i = 0; i<5; i++){\n var j = readline().split(\" \").indexOf('1');\n if(j>-2){\n break;\n }\n}\n\nprint(Math.abs(2-i)+Math.abs(2-j));\n"}, {"source_code": "var a = readline().split(' ');\nvar b = readline().split(' ');\nvar c = readline().split(' ');\nvar d = readline().split(' ');\nvar e = readline().split(' ');\n\nvar a = a.concat(b,c,d,e);\nprint(12 - a.indexOf(\"1\"));\n"}, {"source_code": "var a = readline().split(' ');\nvar b = readline().split(' ');\nvar c = readline().split(' ');\nvar d = readline().split(' ');\nvar e = readline().split(' ');\n\nvar a = a.concat(b,c,d,e);\nprint(Math.abs(12 - a.indexOf(\"1\")));"}, {"source_code": "var a = readline().split(' ');\nvar b = readline().split(' ');\nvar c = readline().split(' ');\nvar d = readline().split(' ');\nvar e = readline().split(' ');\n\nif (a.includes(\"1\")) {\n var row = 1\n var col = a.indexOf(\"1\");\n print(Math.abs(row - col) );\n \n}\nif (b.includes(\"1\")) {\n var row = 2\n var col = b.indexOf(\"1\") + 1 ;\n print(Math.abs(row - col) );\n}\nif (c.includes(\"1\")) {\n var row = 3\n var col = c.indexOf(\"1\") + 1;\n print(Math.abs(row - col) );\n}\n\nif (d.includes(\"1\")) {\n var row = 4\n var col = d.indexOf(\"1\") + 1;\n print(Math.abs(row - col) );\n}\n\nif (e.includes(\"1\")) {\n var row = 5\n var col = e.indexOf(\"1\") + 1;\n if(col === 5){\n print('4');\n }\n else {\n print(Math.abs(row - col));\n }\n \n}\n"}, {"source_code": "var a = readline().split(' ');\nvar b = readline().split(' ');\nvar c = readline().split(' ');\nvar d = readline().split(' ');\nvar e = readline().split(' ');\n\nif (a.includes(\"1\")) {\n var row = 1\n var col = a.indexOf(\"1\") + 1;\n // print(Math.abs(row - col) );\n \n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n \n print(moveByRow);\n print(moveByCol);\n \n print(Math.abs(moveByRow + moveByCol) );\n \n}\nif (b.includes(\"1\")) {\n var row = 2\n var col = b.indexOf(\"1\") + 1 ;\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n \n print(moveByRow);\n print(moveByCol);\n \n print(Math.abs(moveByRow + moveByCol) );\n}\nif (c.includes(\"1\")) {\n var row = 3\n var col = c.indexOf(\"1\") + 1;\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n \n print(moveByRow);\n print(moveByCol);\n \n print(Math.abs(moveByRow + moveByCol) );\n}\n\nif (d.includes(\"1\")) {\n var row = 4\n var col = d.indexOf(\"1\") + 1;\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n \n print(moveByRow);\n print(moveByCol);\n \n print(Math.abs(moveByRow + moveByCol) );\n \n \n}\n\nif (e.includes(\"1\")) {\n var row = 5\n var col = e.indexOf(\"1\") + 1;\n var moveByRow = Math.abs(3 - row);\n var moveByCol = Math.abs(3 - col);\n \n print(moveByRow);\n print(moveByCol);\n \n print(Math.abs(moveByRow + moveByCol) );\n \n}\n"}, {"source_code": "var row1 = readline().split(' ');\nvar row2 = readline().split(' ');\nvar row3 = readline().split(' ');\nvar row4 = readline().split(' ');\nvar row5 = readline().split(' ');\n\nvar atRow = 0;\nvar atCol = 0;\nvar targetFound = false;\n\nfor (var i = 0; i < row1.length; i++) {\n if (targetFound)\n break;\n if (row1[i] != 0) {\n atRow = 0;\n atCol = i;\n targetFound = true;\n }\n}\n\nfor (var i = 0; i < row2.length; i++) {\n if (targetFound)\n break;\n if (row2[i] != 0) {\n atRow = 0;\n atCol = i;\n targetFound = true;\n }\n}\n\nfor (var i = 0; i < row3.length; i++) {\n if (targetFound)\n break;\n if (row3[i] != 0) {\n atRow = 0;\n atCol = i;\n targetFound = true;\n }\n}\n\nfor (var i = 0; i < row4.length; i++) {\n if (targetFound)\n break;\n if (row4[i] != 0) {\n atRow = 0;\n atCol = i;\n targetFound = true;\n }\n}\n\nfor (var i = 0; i < row5.length; i++) {\n if (targetFound)\n break;\n if (row5[i] != 0) {\n atRow = 0;\n atCol = i;\n targetFound = true;\n }\n}\n\nvar step = 0;\nif (atRow < 2) {\n step += 2 - atRow;\n}\nif (atRow > 2) {\n step += atRow - 2\n}\nif (atCol < 2) {\n step += 2 - atCol;\n}\nif (atCol > 2) {\n step += atCol - 2\n}\nprint(step);"}, {"source_code": "var arrMatric = [];\nfor(var i = 0; i < 5; i++){\n arrMatric[i] = readline().split(' ');\n}\nfor(var i = 0; i < 5; i++){\n for(var m = 0; m < 5; m++){\n if(arrMatric[i][m] == 1){\n k = i;\n n = m;\n }\n }\n}\nm = 2 - k + n - 2;\nm = Math.abs(m);\nprint(m);"}, {"source_code": "'use strict';\nlet x, y;\nfor (let i = 1; i <= 5; i++) {\n let row = readline();\n if (row.indexOf('1') !== -1) {\n y = i;\n x = row.replace(' ', '').indexOf('1') + 1;\n }\n}\nwrite(Math.abs(3 - y) + Math.abs(3 - x));"}, {"source_code": "for(var i = 0; i < 5; i++) {\n var line = readline(),\n index = line.split(\" \").findIndex(item => item === 1);\n \n if(index >= 0) {\n print(Math.abs(i - 2) + Math.abs(index - 2));\n break;\n }\n}\n\n\n"}, {"source_code": "var str = \"\";\nfor (var i=0; i<5; i++){\nstr = readline().split();\n\t\n}\nfor(var i=0; i2) {\n num--;\n steps++;\n }\n }\n}\n\n\nprint(steps);"}, {"source_code": "function distToCenter(lines) {\n for (var i = 0; i < lines.length; i++) {\n var j = lines[i].indexOf(\"1\");\n if (j !== -1) {\n return Math.abs(j - 2) + Math.abs(i - 2);\n }\n }\n}\nfunction main(stdin) {\n console.log(distToCenter(stdin.split(\"\\n\")));\n}\nmain(require(\"fs\")\n .readFileSync(0, \"utf-8\")\n .trim());\n"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet matrix = [], location = [];\n\nrl.on('line', n => {\n matrix.push(n.split(' ').map(Number));\n if (matrix.length === 5) {\n for (let i = 0; i < matrix.length; i++) {\n if (matrix[i].includes(1)) {\n location.push(i, matrix[i].indexOf(1));\n break;\n }\n }\n\n const yShift = Math.abs(location[0] - 2);\n const xShift = Math.abs(location[1] - 2);\n console.log(Math.max(xShift, yShift));\n rl.close();\n }\n});"}, {"source_code": "// Generated by CoffeeScript 2.5.1\nvar find, lines, mainAux, print, readline, rl, rli, sum, write;\n\nrl = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nprint = console.log;\n\nwrite = function(...args) {\n return process.stdout.write(args.join(' '));\n};\n\nlines = [];\n\nrl.on('line', function(line) {\n return lines.push(line);\n});\n\nrl.on('close', main);\n\nrli = 0;\n\nreadline = function() {\n return lines[rli++];\n};\n\nsum = function(items) {\n return items.reduce((function(a, b) {\n return a + b;\n }), 0);\n};\n\nfind = function(input) {\n return [\n input.find((inp) => {\n return inp.includes('1');\n }).split(' ').findIndex((str) => {\n return str === '1';\n }),\n input.findIndex((inp) => {\n return inp.includes('1');\n })\n ];\n};\n\nmainAux = function() {\n var input;\n input = [];\n input.push(readline());\n input.push(readline());\n input.push(readline());\n input.push(readline());\n input.push(readline());\n return print(sum(find(input).map(function(v) {\n return Math.abs(3 - v);\n })));\n};\n\n\n function main() {\n return mainAux();\n }\n;\n\n//# sourceMappingURL=matrix.js.map\n"}, {"source_code": "// Generated by CoffeeScript 2.5.1\nvar find, lines, mainAux, numMoves, print, readline, rl, rli, sum, write;\n\nrl = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nprint = console.log;\n\nwrite = function(...args) {\n return process.stdout.write(args.join(' '));\n};\n\nlines = [];\n\nrl.on('line', function(line) {\n return lines.push(line);\n});\n\nrl.on('close', main);\n\nrli = 0;\n\nreadline = function() {\n return lines[rli++];\n};\n\nsum = function(items) {\n return items.reduce((function(a, b) {\n return a + b;\n }), 0);\n};\n\nfind = function(input) {\n return [\n input.find((inp) => {\n return inp.includes('1');\n }).split(' ').findIndex((str) => {\n return str === '1';\n }),\n input.findIndex((inp) => {\n return inp.includes('1');\n })\n ];\n};\n\nnumMoves = function(v) {\n return Math.abs(3 - v);\n};\n\nmainAux = function() {\n var input;\n input = [];\n input.push(readline());\n input.push(readline());\n input.push(readline());\n input.push(readline());\n input.push(readline());\n return print(sum(find(input).map(function(v) {\n return numMoves(v);\n })));\n};\n\n\n function main() {\n return mainAux();\n }\n;\n\n//# sourceMappingURL=matrix.js.map\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet i = 0;\nlet point;\nrl.on('line', (line) => {\n\n let row = line.split(' ').map(Number);\n if (!point) {\n for (let j = 0; j < row.length; j++) {\n if (row[j] === 1) {\n point = {i, j};\n }\n }\n }\n i++\n if (i === 5) {\n let moves = 0;\n if (point.i > 2) {\n moves += point.i - 2;\n } else if (point.i > 2) {\n moves += 2 - point.i;\n }\n if (point.j > 2) {\n moves += point.j - 2;\n } else if (point.j > 2) {\n moves += 2 - point.j;\n }\n console.log(moves);\n }\n});\n"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet matrix = [];\nrl.on(\"line\",(input)=>{\n let row = input.split(\" \").map(Number)\n matrix.push(row)\n if(matrix[4]){\n rl.close();\n let perfectRow = 3;\n let perfectCol = 3;\n let steps = null ;\n let currentRow = null\n let currentCol = null\n matrix.forEach((row,index) => {\n if(row.includes(1)){\n currentRow = index+1; \n row.forEach((col,index)=>{\n if(col==1) currentCol = index+1;\n })\n\n }\n if (currentRow!=perfectRow || currentCol!=perfectCol ) {\n steps = Math.abs(currentCol - perfectCol)+Math.abs(currentRow-perfectRow);\n }\n\n });\n console.log(steps)\n\n }\n})"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet matrix = [];\nrl.on(\"line\",(input)=>{\n let row = input.split(\" \").map(Number)\n matrix.push(row)\n if(matrix[4]){\n rl.close();\n let perfectRow = 3;\n let perfectCol = 3;\n let steps = null ;\n let currentRow = null\n let currentCol = null\n matrix.forEach((row,index) => {\n if(row.includes(1)){\n currentRow = index+1; \n row.forEach((col,index)=>{\n if(col==1) currentCol = index+1;\n })\n\n }\n if (currentRow!=perfectRow || currentCol!=perfectCol ) {\n steps = Math.abs((currentCol - perfectCol) + (currentRow-perfectRow));\n }\n\n });\n console.log(steps)\n\n }\n})"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet matrix = [];\nrl.on(\"line\",(input)=>{\n let row = input.split(\" \").map(Number)\n matrix.push(row)\n if(matrix[4]){\n let steps = 0 ;\n rl.close();\n let perfectRow = 2;\n let perfectCol = 2;\n let currentRow = null\n let currentCol = null\n matrix.forEach((row,index) => {\n if(row.includes(1)){\n currentRow = index ; \n row.forEach((col,index)=>{\n if(col==1) currentCol = index\n })\n\n }\n if (currentRow!=perfectRow || currentCol!=perfectCol ) {\n steps = (currentRow-perfectRow)+(currentCol-perfectRow)\n }\n\n });\n console.log(steps)\n\n }\n})"}, {"source_code": "\"use strict\";\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", (inputStdin) => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((string) => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n let matrix = [];\n for(let i=0;i<5;i++){\n matrix.push(readline()\n .split(\"\")\n .map((x) => +x));\n }\n\n \n \n beautifulMatrix(matrix);\n}\n\nfunction beautifulMatrix(matrix) {\n for (let row = 0; row < matrix.length; row++) {\n for (let column = 0; column < matrix[row].length; column++) {\n if (matrix[row][column] == 1) {\n console.log(Math.abs(2 - row) + Math.abs(2 - column));\n return Math.abs(2 - row) + Math.abs(2 - column);\n }\n }\n }\n}"}, {"source_code": "\"use strict\";\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", (inputStdin) => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((string) => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n let matrix = [];\n for(let i=0;i<5;i++){\n matrix.push(readline()\n .split(\" \")\n .map((x) => +x));\n }\n\n \n \n beautifulMatrix(matrix);\n}\n\nfunction beautifulMatrix(matrix) {\n console.log(matrix)\n for (let row = 0; row < matrix.length; row++) {\n for (let column = 0; column < matrix[row].length; column++) {\n if (matrix[row][column] == 1) {\n console.log(Math.abs(2 - row) + Math.abs(2 - column));\n return Math.abs(2 - row) + Math.abs(2 - column);\n }\n }\n }\n}"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n let arr = [];\n let bestPosition = [2, 2];\n\n for (let i = 0; i < inputs.length; i++) {\n const subArr = inputs[i].split(' ');\n arr.push(subArr);\n }\n\n // Get The position of 1\n let currentPositon = [];\n for (let i = 0; i < arr.length; i++) {\n\n for (let j = 0; j < arr[i].length; j++) {\n if (arr[i][j] == 1)\n currentPositon.push(i, j);\n }\n }\n\n // Get the max number that needs minimum steps\n\n let minimumSteps = 0\n\n if (currentPositon.toString() != bestPosition.toString()) {\n const rowSteps = currentPositon[0] - bestPosition[0];\n const colSteps = currentPositon[1] - bestPosition[1];\n minimumSteps = Math.abs(rowSteps + colSteps);\n }\n\n console.log(minimumSteps);\n\n})"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n let arr = [];\n let bestPosition = [2, 2];\n\n for (let i = 0; i < inputs.length; i++) {\n const subArr = inputs[i].split(' ');\n arr.push(subArr);\n }\n\n // Get The position of 1\n let currentPositon = [];\n for (let i = 0; i < arr.length; i++) {\n\n for (let j = 0; j < arr[i].length; j++) {\n if (arr[i][j] == 1)\n currentPositon.push(i, j);\n }\n }\n\n // Get the max number that needs minimum steps\n\n let minimumSteps = 0\n\n if (currentPositon.toString() == bestPosition.toString()) {\n minimumSteps = Math.max(...currentPositon) - bestPosition[1];\n } else {\n minimumSteps = Math.max(...currentPositon) - bestPosition[1] + 1;\n }\n\n console.log(minimumSteps);\n\n})"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n let arr = [];\n let bestPosition = [2, 2];\n\n for (let i = 0; i < inputs.length; i++) {\n const subArr = inputs[i].split(' ');\n arr.push(subArr);\n }\n\n // Get The position of 1\n let currentPositon = [];\n for (let i = 0; i < arr.length; i++) {\n\n for (let j = 0; j < arr[i].length; j++) {\n if (arr[i][j] == 1)\n currentPositon.push(i, j);\n }\n }\n\n // Get the max number that needs minimum steps\n const minimumSteps = Math.max(...currentPositon) - bestPosition[1] + 1;\n\n console.log(minimumSteps);\n\n})"}, {"source_code": "const readline = require('readline');\n\nlet inputs = [];\n\n// Create readline Interface\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\n\n// Read Inputs\nrl.on('line', lineInput => {\n inputs.push(lineInput)\n})\n\nrl.on('close', () => {\n\n let arr = [];\n let bestPosition = [2, 2];\n \n\n for (let i = 0; i < inputs.length; i++) {\n const subArr = inputs[i].split(' ');\n arr.push(subArr);\n }\n\n // Get The position of 1\n let currentPositon = [];\n for (let i = 0; i < arr.length; i++) {\n\n for (let j = 0; j < arr[i].length; j++) {\n if (arr[i][j] == 1)\n currentPositon.push(i, j);\n }\n }\n\n // Get the max number that needs minimum steps\n\n let minimumSteps = 0\n\n if (currentPositon.toString() != bestPosition.toString()) {\n const rowSteps = currentPositon[0] - bestPosition[0];\n const colSteps = currentPositon[1] - bestPosition[1];\n minimumSteps = Math.abs(rowSteps + colSteps);\n }\n\n console.log(minimumSteps);\n\n})"}, {"source_code": "// Interface of codeforces.com\nlet stdin = process.stdin;\nstdin.setEncoding('utf8');\n\n\nstdin.on('line', line => {\n makeMatrix(line);\n count ++;\n if (count >= 5) {\n console.log(solution(matrix));\n }\n});\n\n\nfunction makeMatrix(line) {\n const row = line.split(' ').map(char => Number(char));\n matrix.push(row);\n}\n\n\nfunction solution(matrix) {\n// Get the matrix from the input and put it into a data structure\n// Count the minimum number needed to make the matrix beautiful\n const index = getIndex(matrix);\n return (Math.abs(2 - index[0]) + Math.abs(2 - index[1]));\n\n}\n\n\n// Finds and returns the index of '1'\nfunction getIndex(matrix) {\n let x = 0, y = 0;\n for (let i = 0; i < matrix.length; i++) {\n for (let j = 0; j < matrix.length; j++) { \n if (matrix[i][j] === 1) {\n return [i, j];\n }\n }\n }\n}\n"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction print(s) {\n process.stdout.write(`${s}`);\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n // input\n let n = readline();\n const numbers = readline().split(' ').map(x => parseInt(x)).sort();\n\n // output\n print(numbers.join(' '));\n}\n\n"}, {"source_code": "const readline = require('readline')\n\nconst rl = readline.createInterface({\n\t input: process.stdin,\n\t output: process.stdout,\n\tterminal : false\n});\n\n\nrl.on(\"line\", main)\nlet i = 0;\nlet n = 0;\nlet m = []\nfunction main(input){\n\t\n\tm.push(input.split(' '))\n\ti++\n\tif(i < 5){\n\t\treturn\n\t}\n\n\tconsole.log(m)\n\tconsole.log(m[1][4])\n\t\n\tlet x = 0\n\tlet y = 0\n\tfor(var j = 0; j < 5; j++){\n\t\tfor(var k = 0 ; k < 5; k++){\n\t\t\tif(m[j][k] === \"1\"){\n\t\t\t\ty = j\n\t\t\t\tx = k\n\t\t\t}\n\t\t}\n\t}\n\t\n\tconsole.log(Math.abs((x+1)-3) + Math.abs((y+1)-3))\n}\n"}, {"source_code": "// https://codeforces.com/problemset/problem/263/A\n\nfunction main(stdin) {\n const matrix = stdin.map(row => row.split(' ').map(Number))\n let y = 0; let x = 0\n\n while(matrix[y][x] !== 1)\n if(x < 5) { x++ }\n else { x = 0; y++ }\n\n process.stdout.write(Math.abs(((y - 2) * -1) + (x - 2)) + '')\n}\n\n// Handle standard input\nprocess.stdin.resume()\nprocess.stdin.setEncoding('utf-8')\n\nlet inputString = ''\n\nprocess.stdin.on('data', (inputStdin) => inputString += inputStdin)\nprocess.stdin.on('end', () =>\n main(inputString.trim().split('\\n').map(s => s.trim())))\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\nconst matrix = () => {\n let oneStringRow;\n let oneColumn;\n let steps;\n for (let i = 0; i < input.length; i++) {\n if (input[i].includes('1')) {\n oneStringRow = i;\n oneColumn = input[i].indexOf('1') / 2;\n }\n }\n steps = Math.abs(2 - oneStringRow) + Math.abs(2 - oneColumn);\n console.log(steps);\n readLine.on('close', matrix);\n\n};"}], "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9"} {"nl": {"description": "Ari the monster always wakes up very early with the first ray of the sun and the first thing she does is feeding her squirrel.Ari draws a regular convex polygon on the floor and numbers it's vertices 1, 2, ..., n in clockwise order. Then starting from the vertex 1 she draws a ray in the direction of each other vertex. The ray stops when it reaches a vertex or intersects with another ray drawn before. Ari repeats this process for vertex 2, 3, ..., n (in this particular order). And then she puts a walnut in each region inside the polygon. Ada the squirrel wants to collect all the walnuts, but she is not allowed to step on the lines drawn by Ari. That means Ada have to perform a small jump if she wants to go from one region to another. Ada can jump from one region P to another region Q if and only if P and Q share a side or a corner.Assuming that Ada starts from outside of the picture, what is the minimum number of jumps she has to perform in order to collect all the walnuts?", "input_spec": "The first and only line of the input contains a single integer n (3 ≤ n ≤ 54321) - the number of vertices of the regular polygon drawn by Ari.", "output_spec": "Print the minimum number of jumps Ada should make to collect all the walnuts. Note, that she doesn't need to leave the polygon after.", "sample_inputs": ["5", "3"], "sample_outputs": ["9", "1"], "notes": "NoteOne of the possible solutions for the first sample is shown on the picture above."}, "positive_code": [{"source_code": "/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Prelude_1 = __webpack_require__(1);\n\tvar d8 = __webpack_require__(2);\n\tvar n = d8.readnumbers()[0];\n\tvar regions = n - 2;\n\tfor (var i = 2; i <= n; i++) {\n\t var left = Prelude_1.max(0, i - 3);\n\t var right = Prelude_1.max(0, n - i - 1);\n\t regions += left + right;\n\t}\n\tprint(regions);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tfunction min(a, b) {\n\t return a < b ? a : b;\n\t}\n\texports.min = min;\n\tfunction max(a, b) {\n\t return a < b ? b : a;\n\t}\n\texports.max = max;\n\tfunction curry(f) {\n\t return function (x) { return function (y) { return f(x, y); }; };\n\t}\n\texports.curry = curry;\n\tfunction uncurry(f) {\n\t return function (x, y) { return f(x)(y); };\n\t}\n\texports.uncurry = uncurry;\n\tfunction id(x) {\n\t return x;\n\t}\n\texports.id = id;\n\tfunction constant(x) {\n\t return function (_) { return x; };\n\t}\n\texports.constant = constant;\n\tfunction flip(f) {\n\t return function (y) { return function (x) { return f(x)(y); }; };\n\t}\n\texports.flip = flip;\n\tfunction flip2(f) {\n\t return function (y, x) { return f(x, y); };\n\t}\n\texports.flip2 = flip2;\n\tfunction compose(g, f) {\n\t return function (x) { return g(f(x)); };\n\t}\n\texports.compose = compose;\n\tfunction gcd(a, b) {\n\t var r = a % b;\n\t while (r !== 0) {\n\t a = b;\n\t b = r;\n\t r = a % b;\n\t }\n\t return b;\n\t}\n\texports.gcd = gcd;\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar List = __webpack_require__(3);\n\tfunction readnumbers() {\n\t return List.map(parseInt, readline().split(' '));\n\t}\n\texports.readnumbers = readnumbers;\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Prelude_1 = __webpack_require__(1);\n\tfunction add(xs, ys) {\n\t return xs.concat(ys);\n\t}\n\texports.add = add;\n\tfunction head(xs) {\n\t return xs[0];\n\t}\n\texports.head = head;\n\tfunction last(xs) {\n\t return xs[xs.length - 1];\n\t}\n\texports.last = last;\n\tfunction tail(xs) {\n\t return xs.slice(1);\n\t}\n\texports.tail = tail;\n\tfunction init(xs) {\n\t return xs.slice(0, xs.length - 1);\n\t}\n\texports.init = init;\n\tfunction map(f, xs) {\n\t var result = new Array(xs.length);\n\t for (var i = 0; i < xs.length; i++) {\n\t result[i] = f(xs[i]);\n\t }\n\t return result;\n\t}\n\texports.map = map;\n\tfunction reverse(xs) {\n\t return xs.slice().reverse();\n\t}\n\texports.reverse = reverse;\n\tfunction intersperse(x, xs) {\n\t if (xs.length == 0) {\n\t return [];\n\t }\n\t var result = new Array(xs.length + xs.length - 1);\n\t for (var i = 0; i + 1 < xs.length; i++) {\n\t result[i + i] = xs[i];\n\t result[i + i + 1] = x;\n\t }\n\t result[result.length - 1] = xs[xs.length - 1];\n\t return result;\n\t}\n\texports.intersperse = intersperse;\n\tfunction intercalate(xs, xss) {\n\t return concat(intersperse(xs, xss));\n\t}\n\texports.intercalate = intercalate;\n\tfunction foldl(f, initial, xs) {\n\t var result = initial;\n\t for (var i = 0; i < xs.length; i++) {\n\t result = f(result, xs[i]);\n\t }\n\t return result;\n\t}\n\texports.foldl = foldl;\n\tfunction foldr(f, initial, xs) {\n\t var result = initial;\n\t for (var i = xs.length - 1; i >= 0; i--) {\n\t result = f(xs[i], result);\n\t }\n\t return result;\n\t}\n\texports.foldr = foldr;\n\tfunction concat(xss) {\n\t var total = sum(map(function (xs) { return xs.length; }, xss));\n\t var result = new Array(total);\n\t var m = 0;\n\t for (var i = 0; i < xss.length; i++) {\n\t var xs = xss[i];\n\t for (var j = 0; j < xs.length; j++) {\n\t result[m++] = xs[j];\n\t }\n\t }\n\t return result;\n\t}\n\texports.concat = concat;\n\tfunction sum(xs) {\n\t var result = 0;\n\t for (var i = 0; i < xs.length; i++) {\n\t result += xs[i];\n\t }\n\t return result;\n\t}\n\texports.sum = sum;\n\tfunction product(xs) {\n\t var result = 1;\n\t for (var i = 0; i < xs.length; i++) {\n\t result *= xs[i];\n\t }\n\t return result;\n\t}\n\texports.product = product;\n\tfunction sort(xs, compare) {\n\t return copy(xs).sort(compare);\n\t}\n\texports.sort = sort;\n\tfunction sortInPlace(xs, compare) {\n\t xs.sort(compare);\n\t return xs;\n\t}\n\texports.sortInPlace = sortInPlace;\n\tfunction maximumInRange(xs, s, e) {\n\t var result = xs[s];\n\t for (var i = s + 1; i <= e; i++) {\n\t if (result < xs[i])\n\t result = xs[i];\n\t }\n\t return result;\n\t}\n\texports.maximumInRange = maximumInRange;\n\tfunction maximum(xs) {\n\t return maximumInRange(xs, 0, xs.length - 1);\n\t}\n\texports.maximum = maximum;\n\tfunction maximumInRangeWith(xs, s, e, f) {\n\t var result = f(xs[s]);\n\t for (var i = s + 1; i <= e; i++) {\n\t var candidate = f(xs[i]);\n\t if (result < candidate)\n\t result = candidate;\n\t }\n\t return result;\n\t}\n\texports.maximumInRangeWith = maximumInRangeWith;\n\tfunction maximumWith(xs, f) {\n\t return maximumInRangeWith(xs, 0, xs.length - 1, f);\n\t}\n\texports.maximumWith = maximumWith;\n\tfunction minimumInRange(xs, s, e) {\n\t var result = xs[s];\n\t for (var i = s + 1; i <= e; i++) {\n\t if (result > xs[i])\n\t result = xs[i];\n\t }\n\t return result;\n\t}\n\texports.minimumInRange = minimumInRange;\n\tfunction minimum(xs) {\n\t return minimumInRange(xs, 0, xs.length - 1);\n\t}\n\texports.minimum = minimum;\n\tfunction minimumInRangeWith(xs, s, e, f) {\n\t var result = f(xs[s]);\n\t for (var i = s + 1; i <= e; i++) {\n\t var candidate = f(xs[i]);\n\t if (result > candidate)\n\t result = candidate;\n\t }\n\t return result;\n\t}\n\texports.minimumInRangeWith = minimumInRangeWith;\n\tfunction minimumWith(xs, f) {\n\t return minimumInRangeWith(xs, 0, xs.length - 1, f);\n\t}\n\texports.minimumWith = minimumWith;\n\tfunction replicate(n, x) {\n\t var result = new Array(n);\n\t for (var i = 0; i < result.length; i++) {\n\t result[i] = x;\n\t }\n\t return result;\n\t}\n\texports.replicate = replicate;\n\tfunction take(n, xs) {\n\t return xs.slice(0, n);\n\t}\n\texports.take = take;\n\tfunction drop(n, xs) {\n\t return xs.slice(n);\n\t}\n\texports.drop = drop;\n\tfunction splitAt(n, xs) {\n\t return [take(n, xs), drop(n, xs)];\n\t}\n\texports.splitAt = splitAt;\n\tfunction takeWhile(f, xs) {\n\t for (var i = 0; i < xs.length; i++) {\n\t if (!f(xs[i])) {\n\t return xs.slice(0, i);\n\t }\n\t }\n\t return xs.slice();\n\t}\n\texports.takeWhile = takeWhile;\n\tfunction dropWhile(f, xs) {\n\t for (var i = 0; i < xs.length; i++) {\n\t if (!f(xs[i])) {\n\t return xs.slice(i);\n\t }\n\t }\n\t return [];\n\t}\n\texports.dropWhile = dropWhile;\n\tfunction group(xs) {\n\t if (xs.length == 0)\n\t return [];\n\t var result = [];\n\t var last = [xs[0]];\n\t for (var i = 1; i < xs.length; i++) {\n\t if (last[0] === xs[i]) {\n\t last.push(xs[i]);\n\t }\n\t else {\n\t result.push(last);\n\t last = [xs[i]];\n\t }\n\t }\n\t result.push(last);\n\t return result;\n\t}\n\texports.group = group;\n\tfunction nub(xs) {\n\t if (xs.length == 0)\n\t return [];\n\t var result = [];\n\t result.push(xs[0]);\n\t for (var i = 1; i < xs.length; i++) {\n\t if (xs[i] !== xs[i - 1]) {\n\t result.push(xs[i]);\n\t }\n\t }\n\t return result;\n\t}\n\texports.nub = nub;\n\tfunction filter(f, xs) {\n\t var result = [];\n\t for (var i = 0; i < xs.length; i++) {\n\t if (f(xs[i]))\n\t result.push(xs[i]);\n\t }\n\t return result;\n\t}\n\texports.filter = filter;\n\tfunction zip(xs, ys) {\n\t var n = Prelude_1.min(xs.length, ys.length);\n\t var result = new Array(n);\n\t for (var i = 0; i < n; i++) {\n\t result[i] = [xs[i], ys[i]];\n\t }\n\t return result;\n\t}\n\texports.zip = zip;\n\tfunction unzip(xs) {\n\t var r1 = new Array(xs.length);\n\t var r2 = new Array(xs.length);\n\t for (var i = 0; i < xs.length; i++) {\n\t r1[i] = xs[i][0];\n\t r2[i] = xs[i][1];\n\t }\n\t return [r1, r2];\n\t}\n\texports.unzip = unzip;\n\tfunction range(from, to) {\n\t var result = Array(to - from + 1);\n\t for (var i = from; i <= to; i++) {\n\t result[i - from] = i;\n\t }\n\t return result;\n\t}\n\texports.range = range;\n\tfunction copy(xs) {\n\t return xs.slice(0);\n\t}\n\texports.copy = copy;\n\tfunction apply_permutation(p, xs) {\n\t var n = xs.length;\n\t var result = new Array(n);\n\t for (var i = 0; i < n; i++) {\n\t result[i] = xs[p[i]];\n\t }\n\t return result;\n\t}\n\texports.apply_permutation = apply_permutation;\n\tfunction next_permutation(p) {\n\t var n = p.length;\n\t if (n < 2)\n\t return null;\n\t var r = copy(p);\n\t var k = n - 2;\n\t for (; k >= 0 && r[k] >= r[k + 1]; k--)\n\t ;\n\t if (k < 0)\n\t return null;\n\t for (var i = k + 1, j = n - 1; i < j; i++, j--) {\n\t var t_1 = r[i];\n\t r[i] = r[j];\n\t r[j] = t_1;\n\t }\n\t var next = k + 1;\n\t for (; r[next] <= r[k]; next++)\n\t ;\n\t var t = r[k];\n\t r[k] = r[next];\n\t r[next] = t;\n\t return r;\n\t}\n\texports.next_permutation = next_permutation;\n\tfunction create(n, value) {\n\t return replicate(n, value);\n\t}\n\texports.create = create;\n\tfunction createWith(n, f) {\n\t var result = new Array(n);\n\t for (var i = 0; i < n; i++) {\n\t result[i] = f(i);\n\t }\n\t return result;\n\t}\n\texports.createWith = createWith;\n\tfunction create2D(n1, n2, value) {\n\t return map(function (_) { return replicate(n2, value); }, replicate(n1, 0));\n\t}\n\texports.create2D = create2D;\n\tfunction create2DWith(n1, n2, f) {\n\t var result = new Array(n1);\n\t for (var i = 0; i < n1; i++) {\n\t result[i] = new Array(n2);\n\t for (var j = 0; j < n2; j++) {\n\t result[i][j] = f(i, j);\n\t }\n\t }\n\t return result;\n\t}\n\texports.create2DWith = create2DWith;\n\n\n/***/ }\n/******/ ]);"}, {"source_code": "var input = parseInt(readline());\nprint(((input - 3) * (input - 1)) + 1);\n\n"}, {"source_code": "print(Math.pow(parseInt(readline())-2,2))"}, {"source_code": "a = readline();\nprint((a-2)*(a-2));"}], "negative_code": [], "src_uid": "efa8e7901a3084d34cfb1a6b18067f2b"} {"nl": {"description": "Unary is a minimalistic Brainfuck dialect in which programs are written using only one token. Brainfuck programs use 8 commands: \"+\", \"-\", \"[\", \"]\", \"<\", \">\", \".\" and \",\" (their meaning is not important for the purposes of this problem). Unary programs are created from Brainfuck programs using the following algorithm. First, replace each command with a corresponding binary code, using the following conversion table: \">\"  →  1000, \"<\"  →  1001, \"+\"  →  1010, \"-\"  →  1011, \".\"  →  1100, \",\"  →  1101, \"[\"  →  1110, \"]\"  →  1111. Next, concatenate the resulting binary codes into one binary number in the same order as in the program. Finally, write this number using unary numeral system — this is the Unary program equivalent to the original Brainfuck one.You are given a Brainfuck program. Your task is to calculate the size of the equivalent Unary program, and print it modulo 1000003 (106 + 3).", "input_spec": "The input will consist of a single line p which gives a Brainfuck program. String p will contain between 1 and 100 characters, inclusive. Each character of p will be \"+\", \"-\", \"[\", \"]\", \"<\", \">\", \".\" or \",\".", "output_spec": "Output the size of the equivalent Unary program modulo 1000003 (106 + 3).", "sample_inputs": [",.", "++++[>,.<-]"], "sample_outputs": ["220", "61425"], "notes": "NoteTo write a number n in unary numeral system, one simply has to write 1 n times. For example, 5 written in unary system will be 11111.In the first example replacing Brainfuck commands with binary code will give us 1101 1100. After we concatenate the codes, we'll get 11011100 in binary system, or 220 in decimal. That's exactly the number of tokens in the equivalent Unary program."}, "positive_code": [{"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let brain = readLine();\n while (brain.includes('>')) {\n brain = brain.replace('>', '1000');\n }\n while (brain.includes('<')) {\n brain = brain.replace('<', '1001');\n }\n while (brain.includes('+')) {\n brain = brain.replace('+', '1010');\n }\n while (brain.includes('-')) {\n brain = brain.replace('-', '1011');\n }\n while (brain.includes('.')) {\n brain = brain.replace('.', '1100');\n }\n while (brain.includes(',')) {\n brain = brain.replace(',', '1101');\n }\n while (brain.includes('[')) {\n brain = brain.replace('[', '1110');\n }\n while (brain.includes(']')) {\n brain = brain.replace(']', '1111');\n }\n let ans = convertBase(brain, 2, 10);\n\n let final = 0;\n let length = ans.length;\n for (let i = 0; i < length; i++) {\n final = (final * 10 + (ans[i] - 0)) % 1000003;\n }\n console.log(final);\n}\n\nfunction parseBigInt(bigint, base) {\n //convert bigint string to array of digit values\n for (var values = [], i = 0; i < bigint.length; i++) {\n values[i] = parseInt(bigint.charAt(i), base);\n }\n return values;\n}\n\nfunction formatBigInt(values, base) {\n //convert array of digit values to bigint string\n for (var bigint = '', i = 0; i < values.length; i++) {\n bigint += values[i].toString(base);\n }\n return bigint;\n}\n\nfunction convertBase(bigint, inputBase, outputBase) {\n //takes a bigint string and converts to different base\n var inputValues = parseBigInt(bigint, inputBase),\n outputValues = [], //output array, little-endian/lsd order\n remainder,\n len = inputValues.length,\n pos = 0,\n i;\n while (pos < len) {\n //while digits left in input array\n remainder = 0; //set remainder to 0\n for (i = pos; i < len; i++) {\n //long integer division of input values divided by output base\n //remainder is added to output array\n remainder = inputValues[i] + remainder * inputBase;\n inputValues[i] = Math.floor(remainder / outputBase);\n remainder -= inputValues[i] * outputBase;\n if (inputValues[i] == 0 && i == pos) {\n pos++;\n }\n }\n outputValues.push(remainder);\n }\n outputValues.reverse(); //transform to big-endian/msd order\n return formatBigInt(outputValues, outputBase);\n}\n"}, {"source_code": "var mod = 1000003,\n\to = {\n\t\t\">\": 8,\n\t\t\"<\": 9,\n\t\t\"+\": 10,\n\t\t\"-\": 11,\n\t\t\".\": 12,\n\t\t\",\": 13,\n\t\t\"[\": 14,\n\t\t\"]\": 15\n\t};\n\nprint(function(s) {\n\tvar ans = 0;\n\tvar base = 1;\n\ts.split('').reverse().forEach(function(c, i) {\n\t\tans += o[c] * base;\n\t\tans %= mod;\n\t\tbase *= 16;\n\t\tbase %= mod;\n\t});\n\treturn ans;\n}(readline()));"}], "negative_code": [{"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let brain = readLine();\n while (brain.includes('>')) {\n brain = brain.replace('>', '1000');\n }\n while (brain.includes('<')) {\n brain = brain.replace('<', '1001');\n }\n while (brain.includes('+')) {\n brain = brain.replace('+', '1010');\n }\n while (brain.includes('-')) {\n brain = brain.replace('-', '1011');\n }\n while (brain.includes('.')) {\n brain = brain.replace('.', '1100');\n }\n while (brain.includes(',')) {\n brain = brain.replace(',', '1101');\n }\n while (brain.includes('[')) {\n brain = brain.replace('[', '1110');\n }\n while (brain.includes(']')) {\n brain = brain.replace(']', '1111');\n }\n // console.log(brain);\n let ans = parseInt(brain, 2);\n let final = ans % 1000003;\n console.log(final);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let brain = readLine();\n while (brain.includes('>')) {\n brain = brain.replace('>', '1000');\n }\n while (brain.includes('<')) {\n brain = brain.replace('<', '1001');\n }\n while (brain.includes('+')) {\n brain = brain.replace('+', '1010');\n }\n while (brain.includes('-')) {\n brain = brain.replace('-', '1011');\n }\n while (brain.includes('.')) {\n brain = brain.replace('.', '1100');\n }\n while (brain.includes(',')) {\n brain = brain.replace(',', '1101');\n }\n while (brain.includes('[')) {\n brain = brain.replace('[', '1110');\n }\n while (brain.includes(']')) {\n brain = brain.replace(']', '1111');\n }\n // console.log(brain);\n console.log(parseInt(brain, 2) % 1000003);\n}\n"}], "src_uid": "04fc8dfb856056f35d296402ad1b2da1"} {"nl": {"description": "You are given an array of $$$n$$$ integers: $$$a_1, a_2, \\ldots, a_n$$$. Your task is to find some non-zero integer $$$d$$$ ($$$-10^3 \\leq d \\leq 10^3$$$) such that, after each number in the array is divided by $$$d$$$, the number of positive numbers that are presented in the array is greater than or equal to half of the array size (i.e., at least $$$\\lceil\\frac{n}{2}\\rceil$$$). Note that those positive numbers do not need to be an integer (e.g., a $$$2.5$$$ counts as a positive number). If there are multiple values of $$$d$$$ that satisfy the condition, you may print any of them. In case that there is no such $$$d$$$, print a single integer $$$0$$$.Recall that $$$\\lceil x \\rceil$$$ represents the smallest integer that is not less than $$$x$$$ and that zero ($$$0$$$) is neither positive nor negative.", "input_spec": "The first line contains one integer $$$n$$$ ($$$1 \\le n \\le 100$$$) — the number of elements in the array. The second line contains $$$n$$$ space-separated integers $$$a_1, a_2, \\ldots, a_n$$$ ($$$-10^3 \\le a_i \\le 10^3$$$).", "output_spec": "Print one integer $$$d$$$ ($$$-10^3 \\leq d \\leq 10^3$$$ and $$$d \\neq 0$$$) that satisfies the given condition. If there are multiple values of $$$d$$$ that satisfy the condition, you may print any of them. In case that there is no such $$$d$$$, print a single integer $$$0$$$.", "sample_inputs": ["5\n10 0 -7 2 6", "7\n0 0 1 -1 0 0 2"], "sample_outputs": ["4", "0"], "notes": "NoteIn the first sample, $$$n = 5$$$, so we need at least $$$\\lceil\\frac{5}{2}\\rceil = 3$$$ positive numbers after division. If $$$d = 4$$$, the array after division is $$$[2.5, 0, -1.75, 0.5, 1.5]$$$, in which there are $$$3$$$ positive numbers (namely: $$$2.5$$$, $$$0.5$$$, and $$$1.5$$$).In the second sample, there is no valid $$$d$$$, so $$$0$$$ should be printed."}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nlet n = 0\n\nrl.on('line', (input) => {\n if (l === 0) {\n n = parseInt(input)\n } else {\n rl.close();\n let arr = input.split(\" \").map(x => parseInt(x))\n for (let i = 1; i <= 1000; i++) {\n let p = 0;\n for (let j = 0; j < n; j++) {\n if ((arr[j] / i) > 0) {\n p++\n }\n }\n if (p >= Math.ceil(n / 2)) {\n console.log(i)\n return\n }\n\n p = 0;\n for (let j = 0; j < n; j++) {\n if (arr[j] / (i * -1) > 0) {\n p++\n }\n }\n if (p >= Math.ceil(n / 2)) {\n console.log(i * -1)\n return\n }\n }\n\n console.log(0)\n return\n }\n l++\n});"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nvar inputs = [];\nconst PI = parseInt;\n\nfunction main() {\n pos = inputs[1].split(\" \").filter(_ => PI(_) > 0);\n neg = inputs[1].split(\" \").filter(_ => PI(_) < 0);\n\n const ln = inputs[1].split(\" \").length;\n if(pos.length >= ln / 2) console.log(1);\n else if(neg.length >= ln / 2) console.log(-1);\n else console.log(0)\n}\n\nreadline.on('line', (input) => { inputs.push(input); });\nreadline.on('close', main)"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var N = nextInt();\n var list = nextIntArray();\n var plus = 0;\n var minus = 0;\n var zero = 0;\n for(var i = 0; i < N; i++){\n if(list[i] < 0){\n minus++;\n }else if(list[i] > 0){\n plus++;\n }else{\n zero++;\n }\n }\n if(minus >= N / 2){\n myout(-1);\n }else if(plus >= N / 2){\n myout(1);\n }else{\n myout(0);\n }\n}\n"}, {"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false,\n});\n\nlet c = 0;\n\nrl.on(\"line\", (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n let pos = 0;\n let neg = 0;\n const arr = d.split(\" \").map(Number);\n let min = Math.ceil(arr.length / 2);\n\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] > 0) {\n pos++;\n } else if (arr[i] < 0) {\n neg++;\n }\n }\n\n if (pos >= min) {\n console.log(1);\n } else if (Math.abs(neg) >= min) {\n console.log(-1);\n } else {\n console.log(0);\n }\n c++;\n});\n"}, {"source_code": "let rawInput = '';\nprocess.stdin.on('data', c => rawInput += c);\nlet inputByLinesOnRslv = new Promise((resolve, reject) => {\n process.stdin.on('end', () => {\n const { EOL } = require('os');\n resolve(rawInput.split(EOL));\n });\n});\n\n(async function(){\n\n let lines = await inputByLinesOnRslv;\n let n = parseInt(lines[0]);\n let items = lines[1].split(\" \");\n let ls = parseFloat(n) / 2.0;\n let found = 0;\n\n for (let d = -1000; d <= 1000; ++d) {\n if (!d) { continue; }\n let many = 0;\n for (let i = 0; i < n; ++i) {\n let curd = parseFloat(items[i]) / parseFloat(d);\n if (curd > 0) { many++; }\n }\n if (many < ls) { continue; }\n found = 1;\n console.log(d);\n break;\n }\n if (!found) { console.log(0); }\n\n})();"}, {"source_code": "let rawInput = '';\nprocess.stdin.on('data', c => rawInput += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = rawInput.split(EOL);\n let n = parseInt(lines[0]);\n let items = lines[1].split(\" \");\n //console.log(items);\n let ls = parseFloat(n) / 2.0;\n //console.log(ls);\n let found = 0;\n for (let d = -1000; d <= 1000; ++d) {\n if (!d) { continue; }\n let many = 0;\n for (let i = 0; i < n; ++i) {\n let curd = 0.0;\n curd = parseFloat(items[i]) / parseFloat(d);\n //console.log(curd);\n if (curd > 0) { many++; }\n }\n if (many < ls) { continue; }\n found = 1;\n console.log(d);\n break;\n }\n if (!found) { console.log(0); }\n});"}, {"source_code": "var n = readline();\nvar x = readline().split(\" \");\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n if(x[i] > 0)\n nPositive++; \n if(x[i] < 0)\n nNegative++;\n}\n\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);"}], "negative_code": [{"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nvar inputs = [];\nconst PI = parseInt;\n\nfunction main() {\n pos = inputs[1].split(\" \").filter(_ => PI(_) > 0);\n neg = inputs[1].split(\" \").filter(_ => PI(_) < 0);\n\n const ln = inputs[1].split(\" \").length;\n if(pos > ln / 2) console.log(1);\n else if(neg > ln / 2) console.log(-1);\n else console.log(0)\n}\n\nreadline.on('line', (input) => { inputs.push(input); });\nreadline.on('close', main)"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var N = nextInt();\n var list = nextIntArray();\n var plus = 0;\n var minus = 0;\n var zero = 0;\n for(var i = 0; i < N; i++){\n if(list[i] < 0){\n minus++;\n }else if(list[i] > 0){\n plus++;\n }else{\n zero++;\n }\n }\n if(minus > zero && minus > plus){\n myout(-1);\n }else if(plus > zero && plus > minus){\n myout(1);\n }else{\n myout(0);\n }\n}\n"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var N = nextInt();\n var list = nextIntArray();\n var plus = 0;\n var minus = 0;\n var zero = 0;\n for(var i = 0; i < N; i++){\n if(list[i] < 0){\n minus++;\n }else if(list[i] > 0){\n plus++;\n }else{\n zero++;\n }\n }\n if(minus > N / 2){\n myout(-1);\n }else if(plus > N / 2){\n myout(1);\n }else{\n myout(0);\n }\n}\n"}, {"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false,\n});\n\nlet c = 0;\n\nrl.on(\"line\", (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n let ans = 0;\n const arr = d.split(\" \").map(Number);\n let min = Math.ceil(arr.length / 2);\n\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] > 0) {\n ans++;\n }\n }\n\n if (ans >= min) {\n console.log(1);\n } else {\n console.log(0);\n }\n c++;\n});\n"}, {"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false,\n});\n\nlet c = 0;\n\nrl.on(\"line\", (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n let ans = 0;\n const arr = d.split(\" \").map(Number);\n let min = Math.ceil(arr.length / 2);\n\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] > 0) {\n ans++;\n }\n }\n\n if (ans >= min) {\n console.log(ans);\n } else {\n console.log(0);\n }\n c++;\n});\n"}, {"source_code": "var n = readline();\nvar x;\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n x = readline();\n print(x);\n\n if(x > 0)\n nPositive++; \n if(x < 0)\n nNegative--;\n}\nprint(number);\nprint(nPositive);\nprint(nNegative);\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);"}, {"source_code": "var n = readline();\nvar x;\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n x = readline();\n \n if(x > 0)\n nPositive++; \n if(x < 0)\n nNegative++;\n}\n\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);"}, {"source_code": "var n = readline();\n\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n var x = readline();\n\n if(x > 0)\n nPositive++; \n if(x < 0)\n nNegative--;\n}\n\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);"}, {"source_code": "var n = readline();\n\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n var x;\n x = readline();\n \n if(x > 0)\n {\n nPositive++;\n print(\"hello\");\n }\n \n if(x < 0)\n nNegative--;\n}\nprint(number);\nprint(nPositive);\nprint(nNegative);\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);"}, {"source_code": "var n = readline();\n\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n var x;\n x = readline();\n print(x);\n \n if(x > 0)\n nPositive++; \n if(x < 0)\n nNegative--;\n}\nprint(number);\nprint(nPositive);\nprint(nNegative);\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);"}, {"source_code": "var n = readline();\n\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n var x;\n x = readline();\n \n if(x > 0)\n nPositive++;\n if(x < 0)\n nNegative--;\n}\nprint(number);\nprint(nPositive);\nprint(nNegative);\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);\n "}, {"source_code": "var n = readline();\n\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n var x;\n x = readline();\n \n if(x > 0)\n nPositive++;\n if(x < 0)\n nNegative--;\n}\n\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);"}, {"source_code": "var n = readline();\n\nvar nPositive = 0;\nvar nNegative = 0;\n\nnumber = Math.ceil(n / 2);\n\nfor(var i = 0; i < n; i++)\n{\n var x = readline();\n print(x);\n\n if(x > 0)\n nPositive++; \n if(x < 0)\n nNegative--;\n}\nprint(number);\nprint(nPositive);\nprint(nNegative);\nif(nPositive >= number)\n print(1);\nelse if(nNegative >= number)\n print(-1);\nelse\n print(0);"}], "src_uid": "a13cb35197f896cd34614c6c0b369a49"} {"nl": {"description": "After seeing the \"ALL YOUR BASE ARE BELONG TO US\" meme for the first time, numbers X and Y realised that they have different bases, which complicated their relations.You're given a number X represented in base bx and a number Y represented in base by. Compare those two numbers.", "input_spec": "The first line of the input contains two space-separated integers n and bx (1 ≤ n ≤ 10, 2 ≤ bx ≤ 40), where n is the number of digits in the bx-based representation of X. The second line contains n space-separated integers x1, x2, ..., xn (0 ≤ xi < bx) — the digits of X. They are given in the order from the most significant digit to the least significant one. The following two lines describe Y in the same way: the third line contains two space-separated integers m and by (1 ≤ m ≤ 10, 2 ≤ by ≤ 40, bx ≠ by), where m is the number of digits in the by-based representation of Y, and the fourth line contains m space-separated integers y1, y2, ..., ym (0 ≤ yi < by) — the digits of Y. There will be no leading zeroes. Both X and Y will be positive. All digits of both numbers are given in the standard decimal numeral system.", "output_spec": "Output a single character (quotes for clarity): '<' if X < Y '>' if X > Y '=' if X = Y ", "sample_inputs": ["6 2\n1 0 1 1 1 1\n2 10\n4 7", "3 3\n1 0 2\n2 5\n2 4", "7 16\n15 15 4 0 0 7 10\n7 9\n4 8 0 3 1 5 0"], "sample_outputs": ["=", "<", ">"], "notes": "NoteIn the first sample, X = 1011112 = 4710 = Y.In the second sample, X = 1023 = 215 and Y = 245 = 1123, thus X < Y.In the third sample, and Y = 48031509. We may notice that X starts with much larger digits and bx is much larger than by, so X is clearly larger than Y."}, "positive_code": [{"source_code": "function rda(){ return readline().split(\" \").map(Number); }\nfunction rdn(){ return +readline(); }\n\nvar inp = rda();\nvar n = inp[0], bx = inp[1];\nvar x = rda();\ninp = rda();\nvar m = inp[0], by = inp[1];\nvar y = rda();\n\nvar x10 = 0, y10 = 0;\n\nvar pows = [];\nfor(var i = 0, s = 1; i < n; i++, s *= bx){\n pows.push(s);\n}\npows.reverse();\nfor(var i = 0; i < n; i++){\n x10 += pows[i]*x[i];\n}\n\npows = [];\nfor(var i = 0, s = 1; i < m; i++, s *= by){\n pows.push(s);\n}\npows.reverse();\nfor(var i = 0; i < m; i++){\n y10 += pows[i]*y[i];\n}\n\nif(x10 == y10){\n write(\"=\");\n}else if(x10 > y10){\n write(\">\");\n}else{\n write(\"<\");\n}"}, {"source_code": "var xParams = readline().split(' '),\n xRepresentation = readline();\n yParams = readline().split(' '),\n yRepresentation = readline();\n \n// var xParams = \"7 16\".split(' '),\n// xRepresentation = \"15 15 4 0 0 7 10\";\n// yParams = \"7 9\".split(' '),\n// yRepresentation = \"4 8 0 3 1 5 0\";\n \nvar n = Number(xParams[0]),\n xNumSys = Number(xParams[1]),\n m = Number(yParams[0]),\n yNumSys = Number(yParams[1]);\n\n \nfunction solver() {\n var x = transformBaseRepToDecimal(xRepresentation.split(' ').map(function (item) {\n return Number(item);\n }), xNumSys);\n var y = transformBaseRepToDecimal(yRepresentation.split(' ').map(function (item) {\n return Number(item);\n }), yNumSys);\n \n var res = '=';\n if (x < y) {\n return '<';\n } else if (x > y) {\n return '>';\n }\n \n return res;\n}\n\nfunction transformBaseRepToDecimal(arr, base) {\n var decimalValue = 0;\n \n for (var i = arr.length - 1, val = 1; i >= 0; i--) {\n decimalValue += ((val * arr[i]));\n val *= base;\n }\n \n return decimalValue;\n}\n\nprint(solver());\n// console.log(solver());"}, {"source_code": "var x = readline().split(' ');\nvar n = parseInt(x[0]);\nvar bx = parseInt(x[1]);\nx = readline().split(' ');\nvar a = []\nfor(var i = 0; i < n; i++) {\n a[i] = parseInt(x[i]);\n}\nx = readline().split(' ');\nvar m = parseInt(x[0]);\nvar by = parseInt(x[1]);\nx = readline().split(' ');\nvar b = []\nfor(var i = 0; i\");\n"}], "negative_code": [], "src_uid": "d6ab5f75a7bee28f0af2bf168a0b2e67"} {"nl": {"description": "Petr wants to make a calendar for current month. For this purpose he draws a table in which columns correspond to weeks (a week is seven consequent days from Monday to Sunday), rows correspond to weekdays, and cells contain dates. For example, a calendar for January 2017 should look like on the picture: Petr wants to know how many columns his table should have given the month and the weekday of the first date of that month? Assume that the year is non-leap.", "input_spec": "The only line contain two integers m and d (1 ≤ m ≤ 12, 1 ≤ d ≤ 7) — the number of month (January is the first month, December is the twelfth) and the weekday of the first date of this month (1 is Monday, 7 is Sunday).", "output_spec": "Print single integer: the number of columns the table should have.", "sample_inputs": ["1 7", "1 1", "11 6"], "sample_outputs": ["6", "5", "5"], "notes": "NoteThe first example corresponds to the January 2017 shown on the picture in the statements.In the second example 1-st January is Monday, so the whole month fits into 5 columns.In the third example 1-st November is Saturday and 5 columns is enough."}, "positive_code": [{"source_code": "var m, d, out;\n\nm=readline().split(' ') \nd=parseInt(m[1])\nm=parseInt(m[0])\n\nout=(d==7)?6:5;\n\nswitch (m){\n case 2: out=(d==1)?4:5; break;\n case 1: out=(d==6)?6:out; break;\n case 3: out=(d==6)?6:out; break;\n case 5: out=(d==6)?6:out; break;\n case 7: out=(d==6)?6:out; break;\n case 8: out=(d==6)?6:out; break;\n case 10: out=(d==6)?6:out; break; \n case 12: out=(d==6)?6:out; break; \n}\n\nprint (out)"}, {"source_code": "var input = readline().split(' ').map(Number);\n\nvar month = input[0];\nvar firstday = input[1]; \n\nvar month_days = 0;\n\nif (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {\n\tmonth_days = 31;\n} else if (month == 2) {\n\tmonth_days = 28;\n} else {\n\tmonth_days = 30;\n}\n\nvar wasted_days = (firstday - 1) % 7;\n\nvar total_days = wasted_days + month_days;\n\nvar weeks = Math.ceil(total_days / 7);\n\nprint(weeks);"}, {"source_code": "var i = readline().split(' ').map(function(x){return parseInt(x);}),\n o = (i[0] == 2) ? 28 : ([4, 6, 9, 11].indexOf(i[0]) < 0 ? 31 : 30);\no += i[1] - 1;\nprint(Math.ceil(o / 7) + '\\n');\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nconst daysInMonth = (month) => new Date(2017, month, 0).getDate();\n\nrl.on('line', (data) => {\n const [m, d] = data.split(' ').map(Number);\n const days = daysInMonth(m);\n const ans = Math.ceil((days + (d - 1)) / 7);\n\n console.log(ans);\n});\n"}, {"source_code": "let data = '';\nprocess.stdin.on('data', c => data += c);\n\nfunction* nextLine() {\n\tlet lines = data.trim().split(/\\n/g);\n\tfor(let l of lines){\n\t\tyield l.trim();\n\t}\n}\n\nlet nl = nextLine();\n\nnl.num = function() {\n\t\treturn Number(this.next().value);\n\t};\nnl.nums = function() {\n\t\treturn this.next().value.split(/\\s/g).map(Number);\n\t};\nnl.line = function() {\n\t\treturn this.next().value;\n\t}\n\t\nconst sol = () => {\n\tlet [m, d] = nl.nums();\n\tlet month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\tconsole.log(Math.trunc((d - 1 + month[m-1] + 6)/7));\n\n};\n\nprocess.stdin.on('end', sol);\n"}], "negative_code": [{"source_code": "var input = readline().split(' ').map(Number);\n\nvar month = input[0];\nvar firstday = input[1]; \n\nvar month_days = 0;\n\nif (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {\n\tmonth_days = 31;\n} else if (month == 2) {\n\tmonth_days = 29;\n} else {\n\tmonth_days = 30;\n}\n\nvar wasted_days = (firstday - 1) % 7;\n\nvar total_days = wasted_days + month_days;\n\nvar weeks = Math.ceil(total_days / 7);\n\nprint(weeks);"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nconst daysInMonth = (month) => new Date(2017, month, 0).getDate();\n\nrl.on('line', (data) => {\n const [m, d] = data.split(' ').map(Number);\n const days = daysInMonth(m);\n const ans = Math.ceil((days + d - (7 - d)) / 7);\n\n console.log(ans);\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nconst daysInMonth = (month) => new Date(2017, month, 0).getDate();\n\nrl.on('line', (data) => {\n const [m, d] = data.split(' ').map(Number);\n const days = daysInMonth(m);\n const ans = Math.ceil(days / 7);\n\n console.log(ans);\n});\n"}], "src_uid": "5b969b6f564df6f71e23d4adfb2ded74"} {"nl": {"description": "PolandBall is a young, clever Ball. He is interested in prime numbers. He has stated a following hypothesis: \"There exists such a positive integer n that for each positive integer m number n·m + 1 is a prime number\".Unfortunately, PolandBall is not experienced yet and doesn't know that his hypothesis is incorrect. Could you prove it wrong? Write a program that finds a counterexample for any n.", "input_spec": "The only number in the input is n (1 ≤ n ≤ 1000) — number from the PolandBall's hypothesis. ", "output_spec": "Output such m that n·m + 1 is not a prime number. Your answer will be considered correct if you output any suitable m such that 1 ≤ m ≤ 103. It is guaranteed the the answer exists.", "sample_inputs": ["3", "4"], "sample_outputs": ["1", "2"], "notes": "NoteA prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself.For the first sample testcase, 3·1 + 1 = 4. We can output 1.In the second sample testcase, 4·1 + 1 = 5. We cannot output 1 because 5 is prime. However, m = 2 is okay since 4·2 + 1 = 9, which is not a prime number."}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nconst isPrime = (n) => {\n for (let i = 2; i*i <= n; i++) {\n if (n % i === 0) {\n return false;\n }\n }\n\n return true;\n}\n\nrl.on('line', (d) => {\n let ans = 1;\n\n while (isPrime(+d * ans + 1)) {\n ans++;\n }\n\n console.log(ans);\n});\n"}, {"source_code": "function is_prime(n){\n for (var i=2;i*i<=n;i++)\n if (n%i==0)\n return false;\n return true;\n }\n var n = +readline();\n for (var m = 1;; m++)\n if (!is_prime(n*m+1))\n {\n print(m);\n break;\n }"}, {"source_code": "var n = parseInt(readline()),\n found = false\n\n//console.log('n',n)\nfor (var m = 1 ; m < 1000 && !found ; m++) {\n var res = n * m + 1\n //console.log(\"a\",m,res,Math.sqrt(res))\n for (var div = 2 ; div <= Math.sqrt(res) && !found ; div++) {\n //console.log(\"b\",m)\n //console.log(m,res,div,res%div)\n if (!(res%div)) found = m\n }\n}\n\nprint(found)\n"}, {"source_code": "function isPrime(temp) {\n\tfor (var j = 2; j * j <= temp; j++) {\n\t\tif (temp % j === 0) {\n\t\t\treturn true;\n\t\t}\n\t}\n}\nvar n = Number(readline()), result;\nfor (var i = 1; ; i++) {\n\tvar temp = n * i + 1;\n\tif (isPrime(temp)) {\n\t result = i;\n\t\tbreak;\n\t}\n}\nprint(result);"}, {"source_code": "var n = parseInt(readline());\nfor (var m = 1; m <= 1000; m++) {\n var theoreticResult = n * m + 1;\n if (isPrime(theoreticResult)) {\n print(m);\n break;\n }\n}\n\nfunction isPrime(n) {\n for (var i = 2; i <= Math.sqrt(n); i++) {\n if (n % i === 0) {\n return true;\n }\n }\n\n return false;\n}"}, {"source_code": "function main() {\n\tvar n = Number(readline());\n\t\n\tif (n == 1) {\n\t\tprint(3);\n\t} else if (n == 2) {\n\t\tprint(4);\n\t} else {\n\t\tprint(n - 2);\n\t}\n\t\n\treturn 0;\n}\n\nmain();"}], "negative_code": [{"source_code": "var n = readline(),\nlastDigit = Number(n[n.length - 1]),\nsecondToLastDigit = n.length >= 2 ? Number(n[n.length - 2]) : 0,\nseveralLastDigits = secondToLastDigit * 10 + lastDigit,\nresult;\nif (severalLastDigits === 0) {\n\tseveralLastDigits = Number(/[1-9]0+$/.exec(n)[0]);\n}\nfor (var i = 1; ; i++) {\n\tvar temp = severalLastDigits * i + 1;\n\tif (temp % 2 === 0 && temp != 2 || temp % 3 === 0 && temp != 3 ||\n\t\ttemp % 5 === 0 && temp != 5 || temp % 7 === 0 && temp != 7 ) {\n\t\tresult = i;\n\t\tbreak;\n\t}\n}\nprint(result);"}], "src_uid": "5c68e20ac6ecb7c289601ce8351f4e97"} {"nl": {"description": "Two little greedy bears have found two pieces of cheese in the forest of weight a and b grams, correspondingly. The bears are so greedy that they are ready to fight for the larger piece. That's where the fox comes in and starts the dialog: \"Little bears, wait a little, I want to make your pieces equal\" \"Come off it fox, how are you going to do that?\", the curious bears asked. \"It's easy\", said the fox. \"If the mass of a certain piece is divisible by two, then I can eat exactly a half of the piece. If the mass of a certain piece is divisible by three, then I can eat exactly two-thirds, and if the mass is divisible by five, then I can eat four-fifths. I'll eat a little here and there and make the pieces equal\". The little bears realize that the fox's proposal contains a catch. But at the same time they realize that they can not make the two pieces equal themselves. So they agreed to her proposal, but on one condition: the fox should make the pieces equal as quickly as possible. Find the minimum number of operations the fox needs to make pieces equal.", "input_spec": "The first line contains two space-separated integers a and b (1 ≤ a, b ≤ 109). ", "output_spec": "If the fox is lying to the little bears and it is impossible to make the pieces equal, print -1. Otherwise, print the required minimum number of operations. If the pieces of the cheese are initially equal, the required number is 0.", "sample_inputs": ["15 20", "14 8", "6 6"], "sample_outputs": ["3", "-1", "0"], "notes": null}, "positive_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction descendA(hash, a, steps) {\n\tif (hash[a] !== undefined && hash[a] <= steps) {\n\t\treturn;\n\t}\n\thash[a] = steps;\n\tif (a%2 == 0) {\n\t\tdescendA(hash, a/2, steps+1);\n\t}\n\tif (a%3 == 0) {\n\t\tdescendA(hash, a/3, steps+1);\n\t}\n\tif (a%5 == 0) {\n\t\tdescendA(hash, a/5, steps+1);\n\t}\n}\n\nfunction descendB(hashA, hashB, b, steps, best) {\n\tif (hashB[b] !== undefined && hashB[b] <= steps) {\n\t\treturn;\n\t}\n\thashB[b] = steps;\n\tif (hashA[b] !== undefined) {\n\t\tif (best.value == -1 || hashA[b]+steps < best.value) {\n\t\t\tbest.value = hashA[b]+steps;\n\t\t}\n\t}\n\tif (b%2 == 0) {\n\t\tdescendB(hashA, hashB, b/2, steps+1, best);\n\t}\n\tif (b%3 == 0) {\n\t\tdescendB(hashA, hashB, b/3, steps+1, best);\n\t}\n\tif (b%5 == 0) {\n\t\tdescendB(hashA, hashB, b/5, steps+1, best);\n\t}\n}\n\nfunction main() {\n\tvar integers = tokenizeIntegers(readline());\n\tvar a = integers[0], b = integers[1];\n\n\tvar hashA = {};\n\tdescendA(hashA, a, 0);\n\t\n\tvar hashB = {};\n\tvar best = {value: -1};\n\tdescendB(hashA, hashB, b, 0, best);\n\n\tprint(best.value);\n}\n\nmain();\n"}, {"source_code": "const readline = require('readline')\n\nconst rl = readline.createInterface({\n input: process.stdin\n})\n\nrl.on('line', line => {\n const [a, b] = line.split(' ').map(v => parseInt(v, 10))\n solve(a, b)\n})\n\nfunction solve(a, b) {\n if (a == b) { console.log(0); return; }\n\n const m = {}\n if (b > a) {\n const t = a; a = b; b = t;\n }\n const ma = { [a]: 0 }\n const mb = { [b]: 0 }\n\n const qa = [[a, 0]]\n const qb = [[b, 0]]\n\n let min = Infinity;\n while (true) {\n if (qa.length) {\n const [aa, sa] = qa.shift()\n\n for (const d of [2,3,5]) {\n if (aa%d == 0) {\n const r = aa/d\n if (mb[r] != undefined) { min = Math.min(mb[r]+sa+1, min); } \n if (!ma[r]) { qa.push([r, sa+1]) }\n ma[r] = ma[r] || (sa+1); \n }\n }\n }\n\n if (qb.length) {\n\n const [bb, sb] = qb.shift()\n for (const d of [2,3,5]) {\n if (bb%d == 0) {\n const r = bb/d\n if (ma[r] != undefined) { min = Math.min(ma[r]+sb+1, min); }\n if (!mb[r]) { qb.push([r, sb+1]) }\n mb[r] = mb[r] || (sb+1);\n }\n }\n }\n\n if (isFinite(min)) { console.log(min); return; }\n\n if (!qa.length && !qb.length) { console.log(-1); return; }\n\n }\n}\n\n"}], "negative_code": [{"source_code": "const readline = require('readline')\n\nconst rl = readline.createInterface({\n input: process.stdin\n})\n\nrl.on('line', line => {\n const [a, b] = line.split(' ').map(v => parseInt(v, 10))\n solve(a, b)\n})\n\nfunction solve(a, b) {\n if (a == b) { console.log(0); return; }\n\n const m = {}\n if (b > a) {\n const t = a; a = b; b = t;\n }\n const ma = { [a]: 0 }\n const mb = { [b]: 0 }\n\n const qa = [[a, 0]]\n const qb = [[b, 0]]\n\n let min = Infinity;\n while (true) {\n if (qa.length) {\n const [aa, sa] = qa.shift()\n\n for (const d of [2,3,5]) {\n if (aa%d == 0) {\n const r = aa/d\n if (mb[r]) { min = Math.min(mb[r]+sa+1, min); } \n if (!ma[r]) { qa.push([r, sa+1]) }\n ma[r] = ma[r] || (sa+1); \n }\n }\n }\n\n if (qb.length) {\n\n const [bb, sb] = qb.shift()\n for (const d of [2,3,5]) {\n if (bb%d == 0) {\n const r = bb/d\n if (ma[r]) { min = Math.min(ma[r]+sb+1, min); }\n if (!mb[r]) { qb.push([r, sb+1]) }\n mb[r] = mb[r] || (sb+1);\n }\n }\n }\n\n if (isFinite(min)) { console.log(min); return; }\n\n if (!qa.length && !qb.length) { console.log(-1); return; }\n\n }\n}\n\n"}, {"source_code": "const readline = require('readline')\n\nconst rl = readline.createInterface({\n input: process.stdin\n})\n\nrl.on('line', line => {\n const [a, b] = line.split(' ').map(v => parseInt(v, 10))\n solve(a, b)\n})\n\nfunction solve(a, b) {\n if (a == b) return 0\n\n const m = {}\n if (b > a) {\n const t = a; a = b; b = t;\n }\n const ma = { [a]: 0 }\n const mb = { [b]: 0 }\n\n const qa = [[a, 0]]\n const qb = [[b, 0]]\n\n let iter = 0;\n while (true) {\n if (!qa.length && !qb.length) { console.log(-1); return; }\n const [aa, sa] = qa.shift()\n\n for (const d of [2,3,5]) {\n if (aa%d == 0) {\n const r = aa/d\n if (mb[r]) { console.log(mb[r]+sa+1); return; } \n if (!ma[r]) { qa.push([r, sa+1]) }\n ma[r] = ma[r] || (sa+1); \n }\n }\n\n if (!qb.length) { continue; }\n\n const [bb, sb] = qb.shift()\n for (const d of [2,3,5]) {\n if (bb%d == 0) {\n const r = bb/d\n if (ma[r]) { console.log(ma[r]+sb+1); return; }\n if (!mb[r]) { qb.push([r, sb+1]) }\n mb[r] = mb[r] || (sb+1);\n }\n }\n\n if (!qa.length) { console.log(-1); return; }\n\n }\n}\n\n"}, {"source_code": "const readline = require('readline')\n\nconst rl = readline.createInterface({\n input: process.stdin\n})\n\nrl.on('line', line => {\n const [a, b] = line.split(' ').map(v => parseInt(v, 10))\n solve(a, b)\n})\n\nfunction solve(a, b) {\n if (a == b) return 0\n\n const m = {}\n if (b > a) {\n const t = a; a = b; b = t;\n }\n const ma = { [a]: 0 }\n const mb = { [b]: 0 }\n\n const qa = [[a, 0]]\n const qb = [[b, 0]]\n\n let iter = 0;\n while (true) {\n const [aa, sa] = qa.shift()\n\n for (const d of [2,3,5]) {\n if (aa%d == 0) {\n const r = aa/d\n if (mb[r]) { console.log(mb[r]+sa+1); return; } \n if (!ma[r]) { qa.push([r, sa+1]) }\n ma[r] = ma[r] || (sa+1); \n }\n }\n\n if (!qb.length) { console.log(-1); return; }\n\n const [bb, sb] = qb.shift()\n for (const d of [2,3,5]) {\n if (bb%d == 0) {\n const r = bb/d\n if (ma[r]) { console.log(ma[r]+sb+1); return; }\n if (!mb[r]) { qb.push([r, sb+1]) }\n mb[r] = mb[r] || (sa+1);\n }\n }\n\n if (!qa.length) { console.log(-1); return; }\n\n }\n}\n\n"}, {"source_code": "const readline = require('readline')\n\nconst rl = readline.createInterface({\n input: process.stdin\n})\n\nrl.on('line', line => {\n const [a, b] = line.split(' ').map(v => parseInt(v, 10))\n solve(a, b)\n})\n\nfunction solve(a, b) {\n if (a == b) return 0\n\n const m = {}\n if (b > a) {\n const t = a; a = b; b = t;\n }\n const ma = { [a]: 0 }\n const mb = { [b]: 0 }\n\n const qa = [[a, 0]]\n const qb = [[b, 0]]\n\n let iter = 0;\n while (true) {\n const [aa, sa] = qa.shift()\n\n for (const d of [2,3,5]) {\n if (aa%d == 0) {\n const r = aa/d\n if (mb[r]) { console.log(mb[r]+sa+1); return; } \n if (!ma[r]) { qa.push([r, sa+1]) }\n ma[r] = ma[r] || (sa+1); \n }\n }\n\n if (!qb.length) { console.log(-1); return; }\n\n const [bb, sb] = qb.shift()\n for (const d of [2,3,5]) {\n if (bb%d == 0) {\n const r = bb/d\n if (ma[r]) { console.log(ma[r]+sb+1); return; }\n if (!mb[r]) { qb.push([r, sb+1]) }\n mb[r] = mb[r] || (sb+1);\n }\n }\n\n if (!qa.length) { console.log(-1); return; }\n\n }\n}\n\n"}, {"source_code": "const readline = require('readline')\n\nconst rl = readline.createInterface({\n input: process.stdin\n})\n\nrl.on('line', line => {\n const [a, b] = line.split(' ').map(v => parseInt(v, 10))\n solve(a, b)\n})\n\nfunction solve(a, b) {\n if (a == b) { console.log(0); return; }\n\n const m = {}\n if (b > a) {\n const t = a; a = b; b = t;\n }\n const ma = { [a]: 0 }\n const mb = { [b]: 0 }\n\n const qa = [[a, 0]]\n const qb = [[b, 0]]\n\n let iter = 0;\n while (true) {\n if (qa.length) {\n const [aa, sa] = qa.shift()\n\n for (const d of [2,3,5]) {\n if (aa%d == 0) {\n const r = aa/d\n if (mb[r]) { console.log(mb[r]+sa+1); return; } \n if (!ma[r]) { qa.push([r, sa+1]) }\n ma[r] = ma[r] || (sa+1); \n }\n }\n }\n\n if (qb.length) {\n\n const [bb, sb] = qb.shift()\n for (const d of [2,3,5]) {\n if (bb%d == 0) {\n const r = bb/d\n if (ma[r]) { console.log(ma[r]+sb+1); return; }\n if (!mb[r]) { qb.push([r, sb+1]) }\n mb[r] = mb[r] || (sb+1);\n }\n }\n }\n\n if (!qa.length && !qb.length) { console.log(-1); return; }\n\n }\n}\n\n"}], "src_uid": "75a97f4d85d50ea0e1af0d46f7565b49"} {"nl": {"description": "Iahub isn't well prepared on geometry problems, but he heard that this year there will be a lot of geometry problems on the IOI selection camp. Scared, Iahub locked himself in the basement and started thinking of new problems of this kind. One of them is the following.Iahub wants to draw n distinct points and m segments on the OX axis. He can draw each point with either red or blue. The drawing is good if and only if the following requirement is met: for each segment [li, ri] consider all the red points belong to it (ri points), and all the blue points belong to it (bi points); each segment i should satisfy the inequality |ri - bi| ≤ 1.Iahub thinks that point x belongs to segment [l, r], if inequality l ≤ x ≤ r holds.Iahub gives to you all coordinates of points and segments. Please, help him to find any good drawing.", "input_spec": "The first line of input contains two integers: n (1 ≤ n ≤ 100) and m (1 ≤ m ≤ 100). The next line contains n space-separated integers x1, x2, ..., xn (0 ≤ xi ≤ 100) — the coordinates of the points. The following m lines contain the descriptions of the m segments. Each line contains two integers li and ri (0 ≤ li ≤ ri ≤ 100) — the borders of the i-th segment. It's guaranteed that all the points are distinct.", "output_spec": "If there is no good drawing for a given test, output a single integer -1. Otherwise output n integers, each integer must be 0 or 1. The i-th number denotes the color of the i-th point (0 is red, and 1 is blue). If there are multiple good drawings you can output any of them.", "sample_inputs": ["3 3\n3 7 14\n1 5\n6 10\n11 15", "3 4\n1 2 3\n1 2\n2 3\n5 6\n2 2"], "sample_outputs": ["0 0 0", "1 0 1"], "notes": null}, "positive_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar data = tokenizeIntegers(readline()),\n\t\tpointNum = data[0], segmentNum = data[1],\n\t\tpoints = tokenizeIntegers(readline());\n\tfor (var i = 0; i < segmentNum; ++i) {\n\t\tdata = tokenizeIntegers(readline());\n\t}\n\tvar pointInfo = [];\n\tfor (var i = 0; i < pointNum; ++i) {\n\t\tpointInfo.push({ index: i, value: points[i] });\n\t}\n\tpointInfo.sort(function(a, b) {\n\t\treturn a.value - b.value;\n\t});\n\tvar result = new Array(pointNum);\n\tfor (var i = 0; i < pointNum; ++i) {\n\t\tresult[pointInfo[i].index] = i%2;\n\t}\n\tprint(result.join(' '));\n}\n\nmain();\n"}, {"source_code": "function main() {\n\n var input1= readline().split(' ').map(Number);\n\n var arr = readline().split(' ').map(Number);\n\n var n=input1[0];\n var temparr=arr.slice();\n var sortarr=temparr.sort(function(a, b){return a-b});\n var newarr=[];\n var result=[];\n var col=0;\n var res;\n\n for(var i=0;i 1) {\n\t\t\tprint(-1);\n\t\t\treturn;\n\t\t}\n\t}\n\tvar result = [];\n\tfor (var i = 0; i < pointNum; ++i) {\n\t\tresult.push(i%2);\n\t}\n\tprint(result.join(' '));\n}\n\nmain();\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar data = tokenizeIntegers(readline()),\n\t\tpointNum = data[0], segmentNum = data[1],\n\t\tpoints = tokenizeIntegers(readline());\n\tfor (var i = 0; i < segmentNum; ++i) {\n\t\tdata = tokenizeIntegers(readline());\n\t}\n\tvar result = [];\n\tfor (var i = 0; i < pointNum; ++i) {\n\t\tresult.push(i%2 == 0 ? 1 : 0);\n\t}\n\tprint(result.join(' '));\n}\n\nmain();\n"}, {"source_code": "function main() {\n\n var input1= readline().split(' ').map(Number);\n\n var arr = readline().split(' ').map(Number);\n\n var n=input1[0];\n var temparr=arr.slice();\n var sortarr=temparr.sort(function(a, b){return a-b});\n var newarr=[];\n var result=[];\n var col=0;\n \n for(var i=0;i this.pos) {\n this.pos = right;\n }\n };\n return Point;\n})();\n\nfunction main() {\n var arr = [];\n var arrC = [];\n var n = nextInt();\n var m = nextInt();\n for (var i = 0; i < n; i++) {\n arr[i] = nextInt();\n }\n for (var i = 0; i <= 100; i++) {\n arrC[i] = new Point(i);\n }\n for (var i = 0; i < m; i++) {\n var l = nextInt();\n var r = nextInt();\n for (var j = l; j <= r; j++) {\n arrC[j].putSeg(l, r);\n }\n }\n for (var i = 0; i < n; i++) {\n for (var j = arrC[arr[i]].pre; j <= arrC[arr[i]].pos; j++) {\n arrC[j].color++;\n }\n }\n var s = \"\";\n for (var i = 0; i < n; i++) {\n s += (arrC[arr[i]].color % 2) + \" \";\n }\n print(s);\n}\n\nmain();\n"}, {"source_code": "var tok = null;\nvar index = 0;\nfunction next() {\n while (tok == null || index == tok.length) {\n tok = readline().split(' ');\n index = 0;\n }\n var res = tok[index++];\n return res;\n}\n\nfunction nextInt() {\n return parseInt(next());\n}\n\nfunction main() {\n var n = nextInt();\n var m = nextInt();\n for (var i = 0; i < n; i++) {\n var x = nextInt();\n }\n for (var i = 0; i < m; i++) {\n var x = nextInt();\n var y = nextInt();\n }\n var s = \"0\";\n for (var i = 1; i < n; i++) {\n s = s + \" \" + (i % 2);\n }\n print(s);\n}\n\nmain();\n"}], "src_uid": "692698d4b49ad446984f3a7a631f961d"} {"nl": {"description": "A group of $$$n$$$ dancers rehearses a performance for the closing ceremony. The dancers are arranged in a row, they've studied their dancing moves and can't change positions. For some of them, a white dancing suit is already bought, for some of them — a black one, and for the rest the suit will be bought in the future.On the day when the suits were to be bought, the director was told that the participants of the olympiad will be happy if the colors of the suits on the scene will form a palindrome. A palindrome is a sequence that is the same when read from left to right and when read from right to left. The director liked the idea, and she wants to buy suits so that the color of the leftmost dancer's suit is the same as the color of the rightmost dancer's suit, the 2nd left is the same as 2nd right, and so on.The director knows how many burls it costs to buy a white suit, and how many burls to buy a black suit. You need to find out whether it is possible to buy suits to form a palindrome, and if it's possible, what's the minimal cost of doing so. Remember that dancers can not change positions, and due to bureaucratic reasons it is not allowed to buy new suits for the dancers who already have suits, even if it reduces the overall spending.", "input_spec": "The first line contains three integers $$$n$$$, $$$a$$$, and $$$b$$$ ($$$1 \\leq n \\leq 20$$$, $$$1 \\leq a, b \\leq 100$$$) — the number of dancers, the cost of a white suit, and the cost of a black suit. The next line contains $$$n$$$ numbers $$$c_i$$$, $$$i$$$-th of which denotes the color of the suit of the $$$i$$$-th dancer. Number $$$0$$$ denotes the white color, $$$1$$$ — the black color, and $$$2$$$ denotes that a suit for this dancer is still to be bought.", "output_spec": "If it is not possible to form a palindrome without swapping dancers and buying new suits for those who have one, then output -1. Otherwise, output the minimal price to get the desired visual effect.", "sample_inputs": ["5 100 1\n0 1 2 1 2", "3 10 12\n1 2 0", "3 12 1\n0 1 0"], "sample_outputs": ["101", "-1", "0"], "notes": "NoteIn the first sample, the cheapest way to obtain palindromic colors is to buy a black suit for the third from left dancer and a white suit for the rightmost dancer.In the second sample, the leftmost dancer's suit already differs from the rightmost dancer's suit so there is no way to obtain the desired coloring.In the third sample, all suits are already bought and their colors form a palindrome."}, "positive_code": [{"source_code": "var ip = readline().split(' ').map(Number);\nvar n = ip[0],line = readline().split(' ').map(Number),sum = 0,ar = new Array(3),match = true;\nar[0] = ip[1];ar[1] = ip[2];ar[2] = 101;\nfor (var i =0;i<=(n-1)/2;i++){\n if (line[i] !== line[n-1-i]){\n if (line[i] === 2 || line[n-i-1] === 2){\n sum += Math.min(ar[line[i]],ar[line[n-1-i]]);\n } else {\n sum = -1;\n break;\n }\n } else if (line[i] === 2 && line[n-1-i] === 2){\n sum += Math.min(ar[0],ar[1]) * (i === n-1-i ? 1:2);\n }\n}\nprint(sum)"}, {"source_code": "var x = readline()\n .split(\" \")\n .map(x => Number(x));\nvar n = x[0],\n a = x[1],\n b = x[2];\nvar c = readline()\n .split(\" \")\n .map(x => Number(x));\n\nvar min = Math.min(a, b);\n\nvar price = 0;\nvar possible = true;\n\nfor (var i = 0; i < c.length; i++) {\n var j = c.length - i - 1;\n \n if (c[i] === 2) {\n if (c[j] === 0) {\n price += a;\n } else if (c[j] === 1) {\n price += b;\n } else {\n price += min;\n }\n } else if (c[i] !== c[j] && c[j] !== 2) {\n possible = false;\n }\n}\n\nif (possible) {\n print(price);\n} else {\n print(-1);\n}"}, {"source_code": "var input=readline().split(' ').map(Number);\nvar arr=readline().split(' ').map(Number);\nvar long=(input[0]-1),white=input[1],black=input[2],result=0,check=true;\nfor(var i=0;i<=long/2;i++){\n if(arr[i]!=arr[long-i]&&arr[i]!=2&&arr[long-i]!=2){\n check=false;\n break;\n }else\n if(arr[i]+arr[long-i]===4){\n if(i!=(long-i))\n result+=black>white?2*white:2*black;\n else\n result+=black>white?white:black;\n }else if(arr[i]===2){\n result+=arr[long-i]===0?white:black;\n }else if(arr[long-i]===2)\n result+=arr[i]===0?white:black;\n}\nprint(check?result:\"-1\");\n"}, {"source_code": "var par = readline().split(\" \").map( (x) => parseInt(x));\nvar n = par[0];\nvar price = [par[1], par[2]]\nvar minPrice = par[1] parseInt(x));\nvar result = 0;\nvar fail = false;\nfor(var i = 0; i {\n let input = '';\n\n if (fs.existsSync('./input.txt')) {\n input = fs.readFileSync('./input.txt').toString();\n resolve(this.parseInputString(input));\n } else {\n process.stdin.resume();\n process.stdin.setEncoding('utf-8');\n process.stdin.on('data', inputStdin => {\n input += inputStdin;\n });\n\n process.stdin.on('end', () => {\n resolve(this.parseInputString(input));\n });\n }\n });\n }\n\n static parseInputString(input) {\n return input.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n }\n}\n\n/***/ }),\n\n/***/ \"./helpers/solution-manager.js\":\n/*!*************************************!*\\\n !*** ./helpers/solution-manager.js ***!\n \\*************************************/\n/*! exports provided: SolutionManager */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SolutionManager\", function() { return SolutionManager; });\nclass SolutionManager {\n static printSolution(solutionFn) {\n let result = solutionFn();\n if (typeof result !== 'undefined') {\n if (Array.isArray(result)) {\n result.forEach(v => console.log(v));\n } else {\n console.log(result);\n }\n }\n }\n}\n\n/***/ }),\n\n/***/ \"./sources/hackerrank/algorithms/practice/strings/highest-value-palindrome-copy/index.js\":\n/*!***********************************************************************************************!*\\\n !*** ./sources/hackerrank/algorithms/practice/strings/highest-value-palindrome-copy/index.js ***!\n \\***********************************************************************************************/\n/*! no exports provided */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _helpers_solution_manager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../helpers/solution-manager */ \"./helpers/solution-manager.js\");\n/* harmony import */ var _helpers_input_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../helpers/input-manager */ \"./helpers/input-manager.js\");\n\n\n\n_helpers_input_manager__WEBPACK_IMPORTED_MODULE_1__[\"InputManager\"].getInput().then((input) => _helpers_solution_manager__WEBPACK_IMPORTED_MODULE_0__[\"SolutionManager\"].printSolution(() => {\n let [n, a, b] = input.shift().split(' ').map(v => Number(v));\n let suits = input.shift().split(' ').map(v => Number(v));\n let costs = [a, b];\n let totalCost = 0;\n let i = 0;\n\n for (i = 0; i < Math.floor(n / 2); i++) {\n let mirrorIndex = n - 1 - i;\n\n if (suits[i] !== suits[mirrorIndex]) {\n if (suits[mirrorIndex] !== 2 && suits[i] !== 2) {\n return -1;\n }\n\n let colorIndex = suits[mirrorIndex] === 2 ? mirrorIndex : i;\n totalCost += costs[mirrorIndex === colorIndex ? suits[i] : suits[mirrorIndex]];\n } else if (suits[mirrorIndex] === 2 && suits[i] === 2) {\n totalCost += Math.min(a, b) * 2;\n }\n }\n\n if (suits[i] === 2 && n % 2 !== 0) {\n totalCost += Math.min(a, b);\n }\n\n return totalCost;\n}));\n\n/***/ }),\n\n/***/ \"fs\":\n/*!*********************!*\\\n !*** external \"fs\" ***!\n \\*********************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ })\n\n/******/ });\n//# sourceMappingURL=index.built.js.map"}], "negative_code": [{"source_code": "const x = readline()\n .split(\" \")\n .map(x => Number(x));\nconst n = x[0],\n a = x[1],\n b = x[2];\nconst c = readline()\n .split(\" \")\n .map(x => Number(x));\n\nconst min = Math.min(a, b);\n\nvar price = 0;\nvar possible = true;\n\nfor (var i = 0; i < c.length / 2 - 1; i++) {\n const j = c.length - i - 1;\n if (c[i] === 2 && c[j] === 2) {\n price += min * 2;\n } else if (c[i] === 2) {\n price += add(c[j]);\n } else if (c[j] === 2) {\n price += add(c[i]);\n } else if (c[i] !== c[j]) {\n possible = false;\n }\n}\n\nif (c.length % 2 === 1 && c[Math.floor(c.length / 2)] === 2) {\n price += min;\n}\n\nif (possible) {\n print(price);\n} else {\n print(-1);\n}\n\nfunction add(color) {\n if (color === 0) {\n return a;\n } else {\n return b;\n }\n}\n"}, {"source_code": "var input=readline().split(' ').map(Number);\nvar arr=readline().split(' ').map(Number);\nvar long=(input[0]-1),white=input[1],black=input[2],result=0,check=true;\nfor(var i=0;i<=(long+1)/2;i++){\n if(arr[i]!=arr[long-i]&&arr[i]!=2&&arr[long-i]!=2){\n check=false;\n break;\n }else\n if(arr[i]+arr[long-i]===4){\n if(i!=(long-i))\n result+=black>white?2*white:2*black;\n else\n result+=black>white?white:black;\n }else if(arr[i]===2){\n result+=arr[long-i]===0?white:black;\n }else if(arr[long-i]===2)\n result+=arr[i]===0?white:black;\n}\nprint(check?result:\"-1\");\n"}, {"source_code": "var par = readline().split(\" \").map( (x) => parseInt(x));\nvar n = par[0];\nvar price = [par[1], par[2]]\nvar minPrice = par[1] parseInt(x));\nvar result = 0;\nfor(var i = 0; i {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const k = +readLine();\n const l = +readLine();\n const m = +readLine();\n const n = +readLine();\n const d = +readLine();\n const arr = Array(d).fill(1);\n let count = 0;\n function isDivisible(num) {\n return num % k === 0 || num % l === 0 || num % m === 0 || num % n === 0;\n }\n for (let i = 0; i < d; i++) {\n if (arr[i] === 1 && isDivisible(i + 1)) {\n arr[i] = -1;\n }\n }\n for (let i = 0; i < d; i++) {\n if (arr[i] === -1) count++;\n }\n console.log(count);\n}\n"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw \"ArrayIndexOutOfBoundsException ‚There is no more input\";}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var K = nextInt();\n var L = nextInt();\n var M = nextInt();\n var D = nextInt();\n var N = nextInt();\n var output = 0;\n for(var i = 1; i <= N; i++){\n if(i % K == 0 || i % L == 0 || i % M == 0 || i % D == 0){\n output++;\n }\n }\n myout(output);\n}\n"}, {"source_code": "//Insomnia cure\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n let lines = inp.split(EOL).map(c => +c);\n \n let gcd = (a, b) => {\n \tif(b == 0) {\n \t\treturn a;\n \t}\n \treturn gcd(b, a % b);\n };\n\n let lcm = (a, b) => (a * b) / gcd(a, b);\n\n let thr = lines.slice(0, 4);\n\n let flg = true;\n for(let i in thr) {\n if(thr[i] <= lines[4]) {\n flg = false;\n break;\n }\n }\n if(flg) {\n process.stdout.write('0');\n return;\n }\n\n let thrx = [];\n\n for(let i = 0; i < thr.length; i++) {\n \tlet addflg = true;\n \tfor(let j = 0; j < thrx.length; j++) {\n \t\tif(thr[i] % thrx[j] == 0) {\n \t\t\taddflg = false;\n \t\t\tbreak;\n \t\t}\n \t\tif(thrx[j] % thr[i] == 0) {\n \t\t\tthrx[j] = thr[i];\n \t\t\taddflg = true;\n \t\t\tbreak;\n \t\t}\n \t}\n\t\tif(addflg) {\n\t\t\tthrx.push(thr[i]);\n\t\t}\n }\n\n let thrf = [thrx, [], [], []];\n for(let i = 0; i < thrx.length; i++) {\n \tfor(let j = i + 1; j < thrx.length; j++) {\n \t\tlet l1 = lcm(thrx[i], thrx[j]);\n \t\tfor(let k = j + 1; k < thrx.length; k++) {\n \t\t\tlet l2 = lcm(l1, thrx[k]);\n \t\t\tfor(let l = k + 1; l < thrx.length; l++) {\n \t\t\t\tthrf[3].push(lcm(l2, thrx[l]));\n \t\t\t}\n \t\t\tthrf[2].push(l2);\n \t\t}\n \t\tthrf[1].push(l1);\n \t}\n }\n\n let calc = (i) => Math.floor(lines[4] / i);\n\n let res = 0;\n\n for(let i = 0; i < thrf.length; i++) {\n \tlet sum = 0;\n \tfor(let j in thrf[i]) {\n \t\tsum += calc(thrf[i][j]);\n \t}\n \tres += (1 - ((i % 2) * 2)) * sum;\n }\n\n process.stdout.write(res + '');\n\n return;\n});"}, {"source_code": "//Insomnia cure\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n let lines = inp.split(EOL).map(c => +c);\n \n let gcd = (a, b) => {\n \tif(b == 0) {\n \t\treturn a;\n \t}\n \treturn gcd(b, a % b);\n };\n\n let lcm = (a, b) => (a * b) / gcd(a, b);\n\n let thr = lines.slice(0, 4);\n\n let flg = 2;\n for(let i in thr) {\n if(thr[i] < lines[4]) {\n flg = 0;\n break;\n }\n if(thr[i] == lines[4]) {\n flg = 1;\n }\n }\n if(flg == 2) {\n process.stdout.write('0');\n return;\n }\n // if(flg == 1) {\n // process.stdout.write('1');\n // return;\n // }\n\n let thrx = [];\n\n for(let i = 0; i < thr.length; i++) {\n \tlet addflg = true;\n \tfor(let j = 0; j < thrx.length; j++) {\n \t\tif(thr[i] % thrx[j] == 0) {\n \t\t\taddflg = false;\n \t\t\tbreak;\n \t\t}\n \t\tif(thrx[j] % thr[i] == 0) {\n \t\t\tthrx[j] = thr[i];\n \t\t\taddflg = true;\n \t\t\tbreak;\n \t\t}\n \t}\n\t\tif(addflg) {\n\t\t\tthrx.push(thr[i]);\n\t\t}\n }\n\n let thrf = [thrx, [], [], []];\n for(let i = 0; i < thrx.length; i++) {\n \tfor(let j = i + 1; j < thrx.length; j++) {\n \t\tlet l1 = lcm(thrx[i], thrx[j]);\n \t\tfor(let k = j + 1; k < thrx.length; k++) {\n \t\t\tlet l2 = lcm(l1, thrx[k]);\n \t\t\tfor(let l = k + 1; l < thrx.length; l++) {\n \t\t\t\tthrf[3].push(lcm(l2, thrx[l]));\n \t\t\t}\n \t\t\tthrf[2].push(l2);\n \t\t}\n \t\tthrf[1].push(l1);\n \t}\n }\n\n let calc = (i) => Math.floor(lines[4] / i);\n\n let res = 0;\n\n for(let i = 0; i < thrf.length; i++) {\n \tlet sum = 0;\n \tfor(let j in thrf[i]) {\n \t\tsum += calc(thrf[i][j]);\n \t}\n \tres += (1 - ((i % 2) * 2)) * sum;\n }\n\n process.stdout.write(res + '');\n\n return;\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet k, l, m, n, d;\n\nrl.on('line', (data) => {\n if (c === 0) {\n k = +data;\n c++;\n return;\n }\n\n if (c === 1) {\n l = +data;\n c++;\n return;\n }\n\n if (c === 2) {\n m = +data;\n c++;\n return;\n }\n\n if (c === 3) {\n n = +data;\n c++;\n return;\n }\n\n if (c === 4) {\n d = +data;\n c++;\n }\n\n let ans = 0;\n for (let i = 1; i <= d; i++) {\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {\n ans++;\n }\n }\n\n console.log(ans);\n\n c++;\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet k, l, m, n, d;\nlet ans = 0;\n\nrl.on('line', (data) => {\n if (c === 0) {\n k = +data;\n c++;\n return;\n }\n\n if (c === 1) {\n l = +data;\n c++;\n return;\n }\n\n if (c === 2) {\n m = +data;\n c++;\n return;\n }\n\n if (c === 3) {\n n = +data;\n c++;\n return;\n }\n\n if (c === 4) {\n d = +data;\n c++;\n }\n\n for (let i = 1; i <= d; i++) {\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {\n ans++;\n }\n }\n\n console.log(ans);\n\n c++;\n});\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n const k = parseInt(input[0]);\n const l = parseInt(input[1]);\n const m = parseInt(input[2]);\n const n = parseInt(input[3]);\n const d = parseInt(input[4]);\n\n let answ = 0;\n for (let i = 1; i <= d; i += 1) {\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) answ += 1;\n }\n\n console.log(answ);\n});"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction isPrime(x) {\n\tlet s = Math.sqrt(x);\n\tlet i = 2;\n\twhile (i <= s) {\n\t\tif (x % i === 0) {\n\t\t\treturn false;\n\t\t}\n\t\ti++;\n\t}\n\treturn true;\n}\n\nfunction main() {\n\tlet k = readLine() >> 0,\n\t\tl = readLine() >> 0,\n\t\tm = readLine() >> 0,\n\t\tn = readLine() >> 0,\n\t\td = readLine() >> 0;\n\n\tlet hit = 0;\n\tfor (let i = 1; i <= d; ++i)\n\t\tif (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) hit++;\n\n\tconsole.log(hit);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n\n let result = d;\n\n if (k === 1 || l === 1 || m === 1 || n === 1) {\n console.log(result);\n return;\n }\n\n for (let i = 1; i <= d; i++) {\n if (i % k !== 0 && i % l !== 0 && i % m !== 0 && i % n !== 0) {\n result--;\n }\n }\n console.log(result);\n}\n"}, {"source_code": "let fs = require(\"fs\");\n\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => data.length > 0);\n\nfor (let i = 0; i < txt.length; i += 5) {\n doit(txt[i + 4] * 1, txt[i + 0] * 1, txt[i + 1] * 1, txt[i + 2] * 1, txt[i + 3] * 1);\n\n}\n\nfunction doit(total, ...num) {\n let score = 0;\n for (let i = 1; i <= total; i++) {\n for (let i1 = 0; i1 < num.length; i1++) {\n if (i % num[i1] === 0) {\n ++score;\n break;\n }\n\n }\n\n }\n console.log(score);\n}"}, {"source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\nfunction main(input) {\n let output = nameLookUp(input);\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n// Write your code here\nfunction nameLookUp(str) {\n let inputs = str.trim().replace(/\\r/g, '').split('\\n');\n let dragons = inputs.slice(0, inputs.length - 1);\n let totalDragons = +inputs[inputs.length - 1];\n let damagedDragons = 0;\n if (dragons.indexOf('1') !== -1) {\n damagedDragons = totalDragons;\n }\n else {\n\n for (let i = 1; i <= totalDragons; i++) {\n if (i % dragons[0] == 0 || i % dragons[1] == 0 || i % dragons[2] == 0 || i % dragons[3] == 0) {\n damagedDragons++;\n }\n }\n }\n\n return damagedDragons.toString();\n}\n"}, {"source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\nfunction main(input) {\n let output = nameLookUp(input);\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n// Write your code here\nfunction nameLookUp(str) {\n let inputs = str.trim().split('\\n');\n let dragons = inputs.slice(0, inputs.length - 1);\n let totalDragons = +inputs[inputs.length - 1];\n let damagedDragons = [];\n\n for (let row of dragons) {\n for (let i = 1; i <= totalDragons; i++) {\n let multiple = row * i;\n if (multiple <= totalDragons) {\n damagedDragons.push(multiple);\n }\n }\n }\n damagedDragons = [...new Set(damagedDragons)].length;\n return damagedDragons.toString();\n}\n"}, {"source_code": "\nconst readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nconst dragons = () => {\n let [k,l,m,n,d] = input.map(x => +x);\n let count = 0;\n for (let i = 1; i <= d; i++) {\n if ( (i % n === 0) || (i % m === 0) ||\n (i % l === 0) || (i % k === 0) ) {\n count++;\n }\n }\n console.log(count);\n};\n\n\n\nreadLine.on('close', dragons);"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n let cont = d;\n if (k == 1 || l == 1 || m == 1 || n == 1) {\n console.log(cont);\n } else {\n for (var i = 1; i <= d; i++) {\n if ((i % k != 0) && (i % l != 0) && (i % m != 0) && (i % n != 0)) {\n cont--;\n }\n }\n console.log(cont);\n }\n}"}, {"source_code": "var k = parseInt(readline());\nvar l= parseInt(readline());\nvar m= parseInt(readline());\nvar n= parseInt(readline());\nvar d= parseInt(readline());\nvar da = Array.from({length:d}, (_,i)=>i+1);\nvar output = [];\nda.forEach(x=>{\n if(x%k===0 || x%l===0 || x%m===0 || x%n===0){\n output.push(x)\n }\n})\nprint(output.length);"}, {"source_code": ";(function () {\n\n\tvar k = +readline();\n\tvar l = +readline();\n\tvar m = +readline();\n\tvar n = +readline();\n\tvar d = +readline();\n\tvar p = 0;\n\n\tfor (var i = 1; i <= d; i++) p += !(i%k) || !(i%l) || !(i%m) || !(i%n);\n\n\tprint(p);\n\n}).call(this);\n"}, {"source_code": "function insomniaCure(k,l,m,n,d){\n var listDamage = [];\n for(var i=1;i*k<=d;i++) {\n listDamage.push(i*k);\n }\n for(var j=1;j*l<=d;j++) {\n listDamage.push(j*l);\n }\n for(var a=1;a*m<=d;a++) {\n listDamage.push(a*m);\n }\n for(var b=1;b*n<=d;b++) {\n listDamage.push(b*n);\n }\n var uniqueItems = Array.from(new Set(listDamage));\n return uniqueItems.length;\n}\nk = readline();\nl = readline();\nm = readline();\nn = readline();\nd = readline();\nprint(insomniaCure(parseInt(k),parseInt(l),parseInt(m),parseInt(n),parseInt(d)));\n"}, {"source_code": "var r = readline\n var k = +r()\n var l = +r()\n var m = +r()\n var n = +r()\n var d = +r()\n var result = 0\n for (var i = 1; i <= d; i++) {\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {\n result++\n }\n }\n print(result)"}, {"source_code": "var k = readline();\nvar l = readline();\nvar m = readline();\nvar n = readline();\nvar d = readline();\nvar count = 0;\nfor (var i = 1; i <= d; i++)\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0)\n count++;\nprint(count);"}, {"source_code": "var k = parseInt(readline());\nvar l = parseInt(readline());\nvar m = parseInt(readline());\nvar n = parseInt(readline());\nvar d = parseInt(readline());\nvar damaged_dragon = 0;\n\nfor(var i = 1; i <= d; i++)\n{\n\tif(i % k == 0 | i % l == 0 | i % m == 0 | i % n == 0)\n\t\tdamaged_dragon++;\n}\n\nprint(damaged_dragon);"}, {"source_code": "\n'use strict';\n\n(function() {\n let n1 = parseInt(readline()),\n n2 = parseInt(readline()),\n n3 = parseInt(readline()),\n n4 = parseInt(readline()),\n d = parseInt(readline());\n\n let obj = {};\n for(let i = 1; i<=d; i++){\n if(\n i % n1 === 0 || \n i % n2 === 0 || \n i % n3 === 0 || \n i % n4 === 0\n ) {\n obj[i] = 1;\n }\n }\n\n write(Object.keys(obj).length);\n\n})();"}, {"source_code": "var k = parseInt(readline());\nvar l = parseInt(readline());\nvar m = parseInt(readline());\nvar n = parseInt(readline());\nvar d = parseInt(readline());\nvar mas = [];\nvar sum = 0;\nfor(var i = 0; i < d; ++i)\n{\n mas[i] = true;\n}\nfor(var i = k-1; i < d; i+=k)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n }\n}\nfor(var i = l-1; i < d; i+=l)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nfor(var i = m-1; i < d; i+=m)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nfor(var i = n-1; i < d; i+=n)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nprint(sum);"}, {"source_code": "var k = readline();\nvar l = readline();\nvar m = readline();\nvar n = readline();\nvar d = readline();\nvar res = 0;\n\tfor (var i=1; i<+d+1; i++){\n\t\tif(i%k==0||i%l==0||i%m==0||i%n==0)\n\t\tres++;\n\t}\nprint(res);"}, {"source_code": "var w = readline()\nvar x = readline()\nvar y = readline()\nvar z = readline()\nvar limit = readline()\nvar count = 0;\nfor(var i = 1; i <= limit; i++){\n if(i % w == 0 || i % x == 0 || i % y == 0 || i % z == 0){\n count++; \n }\n}\nprint(count)"}, {"source_code": "/* TEST CASE\ninput\n1\n2\n3\n4\n12\noutput\n12\n\ninput\n2\n3\n4\n5\n24\noutput\n17\n\nInput\n2\n7\n4\n9\n56937\nOutput\n34795\nAnswer\n35246\n\n */\nfunction main() {\n\tvar x = [1, 1, 1, 1];\n\tvar i, j;\n\tfor (i = 0; i < 4; i++) {\n\t\tx[i] = parseInt(readline());\n\t}\n\tvar n = parseInt(readline());\n\tvar y = new Array(n + 1);\n\tvar answer = 0;\n\tfor (i = x.length - 1; i >= 0; i--) {\n\t\tvar p = x[i];\n\t\tfor (j = p; j <= n; j += p) {\n\t\t\tif (!y[j]) {\n\t\t\t\tanswer++;\n\t\t\t\ty[j] = true;\n\t\t\t}\n\t\t}\n\t}\n\tprint(answer);\n}\n\nmain();"}, {"source_code": "var k = Number(readline());\nvar l = Number(readline());\nvar m = Number(readline());\nvar n = Number(readline());\nvar d = Number(readline());\n\nvar count = 0;\n\nfor (var i = 1; i <= d; i++) {\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {\n count++;\n }\n}\n\nprint(count);"}, {"source_code": "var r=readline;var k=+r(),l=+r(),m=+r(),n=+r(),d=+r(),rt=0;\nfor(var i=1; i<=d; i++)if(i%k===0||i%l===0||i%m===0||i%n===0)++rt;\nprint(rt);\n"}, {"source_code": "var k = parseInt(readline());\nvar l = parseInt(readline());\nvar m = parseInt(readline());\nvar n = parseInt(readline());\nvar d = parseInt(readline());\nvar res = 0;\nfor (var i = 1; i <= d; i++) {\n\tif (i % k == 0 || i % l == 0 || i % m == 0 || i % n == 0) {\n \tres ++;\n }\n}\n\nprint(res);"}, {"source_code": "var input = [];\nvar receiveAnArray = function(num)\n {\n var arr = [];\n for (var i = 1; i <= num; i++)\n {\n arr.push('.');\n }\n return arr;\n }\nvar deleteElements = function(arr, input)\n {\n for (var i = input - 1; i <= arr.length - 1; i += input)\n {\n arr.splice(i, 1, '');\n\t\t\tif (arr.length === 0) break;\n }\n return arr;\n }\nfor (var i = 1; i <= 4; i++)\n{\n input.push(+readline());\n}\nvar arr = receiveAnArray(+readline());\nfor (var i = 0; i <= 3; i++)\n{\n\tarr = deleteElements(arr, input[i]);\n}\nprint(arr.length - arr.join('').length);"}, {"source_code": "var k = parseInt(readline(), 10),\n l = parseInt(readline(), 10),\n m = parseInt(readline(), 10),\n n = parseInt(readline(), 10),\n d = parseInt(readline(), 10);\n\nvar num = 0;\n\nif(k!==1 && l !== 1 && m !== 1 && n !== 1) {\n for(var i=1; i<=d; i++) {\n if(i%k === 0 || i%l === 0 || i%m === 0 || i%n === 0) num++;\n }\n print(num);\n} else {\n print(d);\n}"}, {"source_code": "var k = parseInt(readline());\nvar l = parseInt(readline());\nvar m = parseInt(readline());\nvar n = parseInt(readline());\nvar d = parseInt(readline());\n\nvar damagedDragons = 0;\n\nfor(var i = 1; i <= d; i++)\n{\n if(i % k == 0 || i % l == 0 || i % m == 0 || i % n == 0)\n damagedDragons++;\n}\n\nprint(damagedDragons);"}, {"source_code": "// var line = readline().split(' ');\n// var n = parseInt(line[0]);\n\nvar k = parseInt(readline());\nvar l = parseInt(readline());\nvar m = parseInt(readline());\nvar n = parseInt(readline());\nvar d = parseInt(readline());\n\nvar toK = k;\nvar toL = l;\nvar toM = m;\nvar toN = n;\n\nvar damaged = 0;\nvar i = 0;\n\nfor (i = 1; i <= d; i++) {\n if (--toK === 0) {\n toK = k;\n }\n if (--toL === 0) {\n toL = l;\n }\n if (--toM === 0) {\n toM = m;\n }\n if (--toN === 0) {\n toN = n;\n }\n if (toK === k || toL === l || toM === m || toN === n) {\n damaged++;\n }\n}\n\nwrite(damaged);"}, {"source_code": "(function main() {\n\n var k = parseInt(readline());\n var l = parseInt(readline());\n var m = parseInt(readline());\n var n = parseInt(readline());\n var d = parseInt(readline()); \n\n var dragons = [];\n for (var i = 0; i < d; i++){\n dragons[i] = false;\n }\n\n var each = d;\n while(each >= 0){\n dragons[each] = true;\n each -= k;\n }\n\n each = d;\n while(each >= 0){\n dragons[each] = true;\n each -= l;\n }\n\n each = d;\n while(each >= 0){\n dragons[each] = true;\n each -= m;\n }\n\n each = d;\n while(each >= 0){\n dragons[each] = true;\n each -= n;\n }\n\n var count = 0;\n for (var i = 0; i < d; i++){\n if (dragons[i]){\n count++;\n }\n }\n\n print(count);\n\n return 0;\n})();"}, {"source_code": "var k = Number(readline());\nvar l = Number(readline());\nvar m = Number(readline());\nvar n = Number(readline());\nvar d = Number(readline());\n\nvar count = 0;\nfor (var i = 1; i <= d; ++i) {\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0)\n count++;\n}\n\nprint(count);\n"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nfor(var i = 1;i <= n; ++i){\n dragons.push(i);\n}\nvar result = dragons.filter((dragon) => {\n if(dragon % Number(a) === 0 || dragon % Number(b) === 0 || dragon % Number(c) === 0 || dragon % Number(d) === 0){\n return true;\n }\n return false;\n}).length;\n \nprint(result);"}, {"source_code": "(function main() {\n //var s1 = readline().toLowerCase();\n //var s2 = readline().toLowerCase();\n var k = readline().split(' ').map(Number),\n l = readline().split(' ').map(Number),\n m = readline().split(' ').map(Number),\n n = readline().split(' ').map(Number),\n d = readline().split(' ').map(Number),\n ans = 0;\n for (var i = 1; i <= d; i++) {\n if (!(i % k && i % l && i % m && i % n)) {\n ans++;\n }\n }\n print(ans);\n})()"}, {"source_code": "function getAns(k,l,m,n,d){\n var ans=0;\n for (var i=1;i<=d;i++){\n if (i%k===0||i%l===0||i%m===0||i%n===0) ans++;\n }\n return ans;\n}\n\nvar r=readline;\nvar k=+r(),l=+r(),m=+r(),n=+r(),d=+r();\nprint(getAns(k,l,m,n,d));\n"}, {"source_code": "var x = parseInt(readline()),\n y = parseInt(readline()),\n z = parseInt(readline()),\n k = parseInt(readline()),\n d = parseInt(readline());\nvar str = [];\nfor(var i=0;i a*b);\n\nvar s = -Math.floor(d / LCP(k));\nfor (var i = 0; i < 4; i++) {\n s += Math.floor(d / k[i]);\n var arr = k.slice(0);\n arr.splice(i, 1);\n s += Math.floor(d / LCP(arr));\n}\nfor (var i = 0; i < 4; i++) {\n for (var j = i + 1; j < 4; j++) {\n s -= Math.floor(d / LCP([k[i], k[j]]));\n }\n}\nprint(s);\nfunction GCD(a, b) {\n while (a > 0 && b > 0) {\n if (a > b) {\n a %= b;\n } else {\n b %= a;\n }\n }\n return a + b;\n}\nfunction LCP_(a, b) {\n var gcd = GCD(a, b);\n return a * b / gcd;\n}\nfunction LCP(arr) {\n var r = arr.reduce((a,b) => LCP_(a,b));\n return r;\n}\n\nfunction readNums() {\n return readline().split(' ').map(v => v - 0);\n}"}, {"source_code": "var k = parseInt( readline() );\nvar l = parseInt( readline() );\nvar m = parseInt( readline() );\nvar n = parseInt( readline() );\nvar d = parseInt( readline() );\n\nfor(var count=0,i=1;i<=d;i++){\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0){\n count++;\n }\n}\n\nprint(count);"}, {"source_code": "var k = parseInt(readline()),\n\tl = parseInt(readline()),\n\tm = parseInt(readline()),\n\tn = parseInt(readline()),\n\td = parseInt(readline()),\n\tcounter = 0\n\nwhile (d > 0) {\n\tif (d % k == 0 || d % l == 0 || d % m == 0 || d % n == 0)\n\t\tcounter ++\n\td --\n}\n\nprint(counter)"}], "negative_code": [{"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw \"ArrayIndexOutOfBoundsException ‚There is no more input\";}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var K = nextInt();\n var L = nextInt();\n var M = nextInt();\n var D = nextInt();\n var N = nextInt();\n var output = 0;\n for(var i = 1; i <= N; i++){\n if(i % K == 0 || i % L == 0 || i % K == M || i % D == 0){\n output++;\n }\n }\n myout(output);\n}\n"}, {"source_code": "//Insomnia cure\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n let lines = inp.split(EOL).map(c => +c);\n \n let gcd = (a, b) => {\n \tif(b == 0) {\n \t\treturn a;\n \t}\n \treturn gcd(b, a % b);\n };\n\n let lcm = (a, b) => (a * b) / gcd(a, b);\n\n let thr = lines.slice(0, 4);\n\n let flg = true;\n for(let i in thr) {\n if(thr[i] < lines[4]) {\n flg = false;\n }\n }\n if(flg) {\n process.stdout.write('0');\n return;\n }\n\n let thrx = [];\n\n for(let i = 0; i < thr.length; i++) {\n \tlet addflg = true;\n \tfor(let j = 0; j < thrx.length; j++) {\n \t\tif(thr[i] % thrx[j] == 0) {\n \t\t\taddflg = false;\n \t\t\tbreak;\n \t\t}\n \t\tif(thrx[j] % thr[i] == 0) {\n \t\t\tthrx[j] = thr[i];\n \t\t\taddflg = true;\n \t\t\tbreak;\n \t\t}\n \t}\n\t\tif(addflg) {\n\t\t\tthrx.push(thr[i]);\n\t\t}\n }\n\n let thrf = [thrx, [], [], []];\n for(let i = 0; i < thrx.length; i++) {\n \tfor(let j = i + 1; j < thrx.length; j++) {\n \t\tlet l1 = lcm(thrx[i], thrx[j]);\n \t\tfor(let k = j + 1; k < thrx.length; k++) {\n \t\t\tlet l2 = lcm(l1, thrx[k]);\n \t\t\tfor(let l = k + 1; l < thrx.length; l++) {\n \t\t\t\tthrf[3].push(lcm(l2, thrx[l]));\n \t\t\t}\n \t\t\tthrf[2].push(l2);\n \t\t}\n \t\tthrf[1].push(l1);\n \t}\n }\n\n let calc = (i) => Math.floor(lines[4] / i);\n\n let res = 0;\n\n for(let i = 0; i < thrf.length; i++) {\n \tlet sum = 0;\n \tfor(let j in thrf[i]) {\n \t\tsum += calc(thrf[i][j]);\n \t}\n \tres += (1 - ((i % 2) * 2)) * sum;\n }\n\n process.stdout.write(res + '');\n\n return;\n});"}, {"source_code": "//Insomnia cure\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n let lines = inp.split(EOL).map(c => +c);\n \n let gcd = (a, b) => {\n \tif(b == 0) {\n \t\treturn a;\n \t}\n \treturn gcd(b, a % b);\n };\n\n let lcm = (a, b) => (a * b) / gcd(a, b);\n\n let thr = lines.slice(0, 4);\n\n let flg = true;\n for(let i in thr) {\n if(thr[i] >= lines[4]) {\n flg = false;\n }\n }\n if(flg) {\n process.stdout.write('0');\n return;\n }\n\n let thrx = [];\n\n for(let i = 0; i < thr.length; i++) {\n \tlet addflg = true;\n \tfor(let j = 0; j < thrx.length; j++) {\n \t\tif(thr[i] % thrx[j] == 0) {\n \t\t\taddflg = false;\n \t\t\tbreak;\n \t\t}\n \t\tif(thrx[j] % thr[i] == 0) {\n \t\t\tthrx[j] = thr[i];\n \t\t\taddflg = true;\n \t\t\tbreak;\n \t\t}\n \t}\n\t\tif(addflg) {\n\t\t\tthrx.push(thr[i]);\n\t\t}\n }\n\n let thrf = [thrx, [], [], []];\n for(let i = 0; i < thrx.length; i++) {\n \tfor(let j = i + 1; j < thrx.length; j++) {\n \t\tlet l1 = lcm(thrx[i], thrx[j]);\n \t\tfor(let k = j + 1; k < thrx.length; k++) {\n \t\t\tlet l2 = lcm(l1, thrx[k]);\n \t\t\tfor(let l = k + 1; l < thrx.length; l++) {\n \t\t\t\tthrf[3].push(lcm(l3, thrx[l]));\n \t\t\t}\n \t\t\tthrf[2].push(l2);\n \t\t}\n \t\tthrf[1].push(l1);\n \t}\n }\n\n let calc = (i) => Math.floor(lines[4] / i);\n\n let res = 0;\n\n for(let i = 0; i < thrf.length; i++) {\n \tlet sum = 0;\n \tfor(let j in thrf[i]) {\n \t\tsum += calc(thrf[i][j]);\n \t}\n \tres += (1 - ((i % 2) * 2)) * sum;\n }\n\n process.stdout.write(res + '');\n\n return;\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet k, l, m, n, d;\n\nrl.on('line', (data) => {\n if (c === 0) {\n k = +data;\n c++;\n return;\n }\n\n if (c === 1) {\n l = +data;\n c++;\n return;\n }\n\n if (c === 2) {\n m = +data;\n c++;\n return;\n }\n\n if (c === 3) {\n n = +data;\n c++;\n return;\n }\n\n if (c === 4) {\n d = +data;\n c++;\n }\n\n let ans = Math.ceil(d / k) + Math.ceil(d / l) + Math.ceil(d / m) + Math.ceil(d / n) - Math.ceil(d / (k * l)) - Math.ceil(d / (k * m)) - Math.ceil(d / (k * n)) - Math.ceil(d / (l * m)) - Math.ceil(d / (l * n)) - Math.ceil(d / (m * n)) + Math.ceil(d / (k * l * m)) + Math.ceil(d / (k * l * n)) + Math.ceil(d / (l * m * n)) - Math.ceil(d / (k * l * m * n));\n\n if (k === 1 || l === 1 || m === 1 || n === 1) {\n ans = d;\n }\n\n console.log(ans);\n // for (let i = 1; i <= d; i++) {\n // if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {\n // ans++;\n // }\n // }\n\n // console.log(ans);\n\n c++;\n});\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n const k = parseInt(input[0]);\n const l = parseInt(input[1]);\n const m = parseInt(input[2]);\n const n = parseInt(input[3]);\n const d = parseInt(input[4]);\n\n let answ = 0;\n for (let i = 1; i <= d; i += 1) {\n if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0 || i % d === 0) answ += 1;\n }\n\n console.log(answ);\n});"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n\n let result = d;\n\n if (k == 1 || l == 1 || m == 1 || n == 1) {\n console.log(result);\n return;\n } else {\n for (let i = 1; i <= d; i++) {\n if (k % i !== 0 && l % i !== 0 && m % i !== 0 && n % i !== 0) {\n result--;\n }\n }\n console.log(result);\n }\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n\n let result = 0;\n for (let i = 1; i <= d; i++) {\n if (k % i === 0 || l % i === 0 || m % i === 0 || n % i === 0) {\n result++;\n }\n }\n console.log(result);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n\n let result = d;\n\n if (k == 1 || l == 1 || m == 1 || n == 1) {\n console.log(result);\n return;\n } else {\n for (let i = 1; i <= d; i++) {\n if (i % k !== 0 && i % l !== 0 && i % m !== 0 && i % m !== 0) {\n result--;\n }\n }\n console.log(result);\n }\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n\n let result = d;\n\n if (k == 1 || l == 1 || m == 1 || n == 1) {\n console.log(result);\n return;\n }\n for (let i = 1; i <= d; i++) {\n if (k % i !== 0 && l % i !== 0 && m % i !== 0 && n % i !== 0) {\n result--;\n }\n }\n console.log(result);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n\n let result = d;\n\n for (let i = 1; i <= d; i++) {\n if (k % i !== 0 && l % i !== 0 && m % i !== 0 && n % i !== 0) {\n result--;\n }\n }\n console.log(result);\n}\n"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n if (k == 1 || l == 1 || m == 1 || n == 1) {\n console.log(d);\n } else {\n for (var i = 1; i <= 24; i++) {\n if (i % k != 0 && i % l != 0 && i % m != 0 && i % n != 0) {\n d--;\n }\n }\n console.log(d);\n }\n}"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let k = parseInt(readLine());\n let l = parseInt(readLine());\n let m = parseInt(readLine());\n let n = parseInt(readLine());\n let d = parseInt(readLine());\n if (k == 1 || l == 1 || m == 1 || n == 1) {\n console.log(d);\n } else {\n for (var i = 1; i <= d; i++) {\n if (i % k != 0 && i % l != 0 && i % m != 0 && i % n != 0) {\n d--;\n }\n }\n console.log(d);\n }\n}"}, {"source_code": "var k = parseInt(readline());\nvar l= parseInt(readline());\nvar m= parseInt(readline());\nvar n= parseInt(readline());\nvar d= parseInt(readline());\nvar da = Array.from({length:d}, (_,i)=>i+1);\nvar output = [];\nda.forEach(x=>{\n if(x%k===0 || x%l===0 || x%m===0 || x%n===0){\n print(\"exist: \",x)\n output.push(x)\n }\n})\nprint(output);"}, {"source_code": "var k = parseInt(readline());\nvar l= parseInt(readline());\nvar m= parseInt(readline());\nvar n= parseInt(readline());\nvar d= parseInt(readline());\nvar da = Array.from({length:d}, (_,i)=>i+1);\nvar output = [];\nda.forEach(x=>{\n if(x%k===0 || x%l===0 || x%m===0 || x%n===0){\n output.push(x)\n }\n})\nprint(output);"}, {"source_code": "var k = parseInt(readline());\nvar l= parseInt(readline());\nvar m= parseInt(readline());\nvar n= parseInt(readline());\nvar d= parseInt(readline());\nvar arr= [k,l,m,n];\nvar output = [];\narr.forEach(e=>{\n Array.from({length:d}, (_,i)=>i+1).forEach(x=>{\n if(x%e === 0){\n output.push(x)\n }\n })\n \n})\nvar output = output.filter((v,i,a)=>a.indexOf(v)===i);\nprint(output.reduce((a,b)=>a+b,0));\n"}, {"source_code": "var line\n var input = []\n while (line = readline()) {\n input.push(line)\n }\n\n var length = input[input.length - 1]\n\n var actionInx = {}\n\n for (var i = 0; i < input.length - 1; i++) {\n if (actionInx[input[i]] === undefined) {\n actionInx[input[i]] = [i]\n } else {\n actionInx[input[i]].push(i)\n }\n }\n\n for (var j = 0; j < length; j++) {\n var hashEntry = actionInx[j]\n if (hashEntry) {\n var len = hashEntry.length\n for (var k = 0; k < len; k++) {\n var newEntryKey = j + +input[hashEntry[k]]\n var newEntry = actionInx[newEntryKey]\n if (!newEntry && newEntryKey <= length) {\n actionInx[newEntryKey] = [hashEntry[k]]\n } else if (newEntry && newEntryKey <= length) {\n actionInx[newEntryKey].push(hashEntry[k])\n }\n }\n }\n }\n\n var result = Object.keys(actionInx).length\n\n print(result)"}, {"source_code": "var k = parseInt(readline());\nvar l = parseInt(readline());\nvar m = parseInt(readline());\nvar n = parseInt(readline());\nvar d = parseInt(readline());\nvar mas = [];\nvar sum = 0;\nfor(var i = 0; i < d; ++i)\n{\n mas[i] = true;\n}\nfor(var i = 0; i < d && k < d; i+=k)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n }\n}\nfor(var i = 0; i < d && l < d; i+=l)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nfor(var i = 0; i < d && m < d; i+=m)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nfor(var i = 0; i < d && n < d; i+=n)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nprint(sum);"}, {"source_code": "var k = parseInt(readline());\nvar l = parseInt(readline());\nvar m = parseInt(readline());\nvar n = parseInt(readline());\nvar d = parseInt(readline());\nvar mas = [];\nvar sum = 0;\nfor(var i = 0; i < d; ++i)\n{\n mas[i] = true;\n}\nfor(var i = 0; i < d; i+=k)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n }\n}\nfor(var i = 0; i < d; i+=l)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nfor(var i = 0; i < d; i+=m)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nfor(var i = 0; i < d; i+=n)\n{\n if(mas[i])\n {\n mas[i] = false;\n sum ++;\n } \n}\nprint(sum);"}, {"source_code": "var k = readline();\nvar l = readline();\nvar m = readline();\nvar n = readline();\nvar d = readline();\nvar res = 0;\n\tfor (var i=1; i= 0; j--) {\n\t\t\tif (num <= x[j] && x[j] % num == 0) {\n\t\t\t\tx[j] = num;\n\t\t\t\tneed = false;\n\t\t\t\tbreak;\n\t\t\t} else if (x[j] <= num && num % x[j] == 0) {\n\t\t\t\tneed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (need) {\n\t\t\tx.push(num);\n\t\t}\n\t}\n\tvar z = parseInt(readline());\n\tvar n = x.length;\n\tfor (i = 0; i < n; i++) {\n\t\tfor (j = i + 1; j < n; j++) {\n\t\t\ty.push(x[i] * x[j]);\n\t\t}\n\t}\n//\tprint(\"x =\", x);\n//\tprint(\"y =\", y);\n//\tprint(\"z =\", z);\n\tvar answer = 0;\n\t\n\tfor (i = 0; i < n; i++) {\n\t\tanswer += Math.floor(z / x[i]);\n\t}\n\tfor (i = y.length - 1; i >= 0; i--) {\n\t\tanswer -= Math.floor(z / y[i]);\n\t}\n\n\tprint(answer);\n}\n\nmain();"}, {"source_code": "var k = parseInt(readline(), 10),\n l = parseInt(readline(), 10),\n m = parseInt(readline(), 10),\n n = parseInt(readline(), 10),\n d = parseInt(readline(), 10);\n\nvar k_ar = [], l_ar = [], m_ar = [], n_ar = [];\n\nif(k!==1 && l !== 1 && m !== 1 && n !== 1) {\n for(var i=1; k*i<=d || l*i<=d || m*i<=d; i++) {\n if(k*i <= d) k_ar.push(k*i);\n if(l*i <= d) l_ar.push(l*i);\n if(m*i <= d) m_ar.push(m*i);\n if(n*i <= d) n_ar.push(n*i);\n }\n \n print([...new Set([...k_ar, ...l_ar, ...m_ar, ...n_ar])].length);\n} else {\n print(d);\n}"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nfor(var i = 0;i < n; ++i){\n dragons.push(i);\n}\nvar result = dragons.map((dragon) => {\n if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){\n return true;\n }\n return false;\n}).length;\n\nprint(result);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = new Array(n);\nfor(var i = 0;i < n; ++i){\n dragons.push(i);\n}\nvar result = dragons.map((dragon) => {\n if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){\n return true;\n }\n}).length;\nprint(result)"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nfor(var i = 1;i <= n; ++i){\n dragons.push(i);\n}\nvar result = dragons.map((dragon) => {\n if(a === 2){\n print(dragon);\n }\n if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){\n if(a === 2){\n print(dragon);\n }\n return true;\n }\n return false;\n}).length;\n\nprint(result);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nfor(var i = 1;i <= n; ++i){\n dragons.push(i);\n}\nvar result = dragons.map((dragon) => {\n if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){\n return true;\n }\n return false;\n}).length;\n\nprint(result);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nfor(var i = 1;i <= n; ++i){\n dragons.push(i);\n}\nvar result = dragons.map((dragon) => {\n if(dragon % +a === 0 || dragon % +b === 0 || dragon % +c === 0 || dragon % +d === 0){\n return true;\n }\n return false;\n}).length;\n \nprint(result);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nprint(a,b,c,d);\nfor(var i = 1;i <= n; ++i){\n dragons.push(i);\n}\nvar result = dragons.map((dragon) => {\n if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){\n return true;\n }\n return false;\n}).length;\n\nprint(result);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = new Array(n);\nfor(var i = 0;i < n; ++i){\n dragons.push(i);\n}\nprint(dragons.map((dragon) => {\n if(dragon % a === 0 && dragon % b === 0 && dragon % c === 0 && dragon % d === 0){\n return true;\n }\n}).length - 1);\n"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nfor(var i = 1;i <= n; ++i){\n dragons.push(i);\n}\nvar result = dragons.map((dragon) => {\n if(dragon % Number(a) === 0 || dragon % Number(b) === 0 || dragon % Number(c) === 0 || dragon % Number(d) === 0){\n return true;\n }\n return false;\n}).length;\n \nprint(result);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nfor(var i = 0;i < n; ++i){\n dragons.push(i);\n}\nprint(dragons)\nvar result = dragons.map((dragon) => {\n if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){\n return true;\n }\n return false;\n}).length;\n\nprint(result);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = [];\nfor(var i = 0;i < n; ++i){\n dragons.push(i);\n}\nvar result = dragons.map((dragon) => {\n if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){\n return true;\n }\n}).length;\n\nprint(result);"}, {"source_code": "var a = readline();\nvar b = readline();\nvar c = readline();\nvar d = readline();\nvar n = readline();\nvar dragons = new Array(n);\nfor(var i = 0;i < n; ++i){\n dragons.push(i);\n}\nprint(dragons.map((dragon) => {\n if(dragon % a === 0 && dragon % b === 0 && dragon % c === 0 && dragon % d === 0){\n return true;\n }\n}).length);\n\n"}, {"source_code": "var x = parseInt(readline()),\n y = parseInt(readline()),\n z = parseInt(readline()),\n k = parseInt(readline()),\n d = parseInt(readline());\nvar str = [];\nfor(var i=0;i{\n Array.from({length:d}, (_,i)=>i+1).forEach(x=>{\n if(x%e === 0){\n output.push(x)\n }\n })\n \n})\nvar output = output.filter((v,i,a)=>a.indexOf(v)===i);\nprint(output.reduce((a,b)=>a+b,0));\n \n"}], "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7"} {"nl": {"description": "This winter is so cold in Nvodsk! A group of n friends decided to buy k bottles of a soft drink called \"Take-It-Light\" to warm up a bit. Each bottle has l milliliters of the drink. Also they bought c limes and cut each of them into d slices. After that they found p grams of salt.To make a toast, each friend needs nl milliliters of the drink, a slice of lime and np grams of salt. The friends want to make as many toasts as they can, provided they all drink the same amount. How many toasts can each friend make?", "input_spec": "The first and only line contains positive integers n, k, l, c, d, p, nl, np, not exceeding 1000 and no less than 1. The numbers are separated by exactly one space.", "output_spec": "Print a single integer — the number of toasts each friend can make.", "sample_inputs": ["3 4 5 10 8 100 3 1", "5 100 10 1 19 90 4 3", "10 1000 1000 25 23 1 50 1"], "sample_outputs": ["2", "3", "0"], "notes": "NoteA comment to the first sample: Overall the friends have 4 * 5 = 20 milliliters of the drink, it is enough to make 20 / 3 = 6 toasts. The limes are enough for 10 * 8 = 80 toasts and the salt is enough for 100 / 1 = 100 toasts. However, there are 3 friends in the group, so the answer is min(6, 80, 100) / 3 = 2."}, "positive_code": [{"source_code": "print(function(n, k, l, c, d, p, nl, np){\n\tvar a = ~~( k*l/nl );\n\tvar b = c*d;\n\tvar e = ~~( p/np );\n\treturn ~~( Math.min(a,b,e)/n );\n}.apply(0, readline().split(' ').map(Number)));"}, {"source_code": "var input = readline().split(\" \"), n = +input[0], k = +input[1], l = +input[2], c = +input[3],\nd = +input[4], p = +input[5], nl = +input[6], np = +input[7];\n\nwrite(Math.floor(Math.min( (Math.floor(k * l / nl)), (Math.floor(c * d)), (Math.floor(p / np)) ) / n));"}, {"source_code": ";(function () {\n\t\n\tvar d = readline().split(' ').map(Number);\n\n\tprint( Math.floor( Math.min( Math.floor(d[1] * d[2] / d[6]), d[3] * d[4], Math.floor(d[5] / d[7]) ) / d[0] ) );\n\n}).call(this);"}, {"source_code": "var str = readline().split(\" \");\n // n,k,l,c, d, p,nl,np\nn = +str[0], k = +str[1], l = +str[2], c = +str[3],\nd = +str[4], p = +str[5], nl = +str[6], np = +str[7];\n\nprint(Math.floor(Math.min(k*l/nl, c*d, p/np)/n));"}, {"source_code": "\n// 151A Газировкопитие \n\n// var n = parseInt(readline());\n\nvar input_line = readline().split(' ').map(Number);\n\nvar n = input_line[0];\nvar k = input_line[1];\nvar l = input_line[2];\nvar c = input_line[3];\nvar d = input_line[4];\nvar p = input_line[5];\nvar nl = input_line[6];\nvar np = input_line[7];\n\nvar gaz = k * l / nl / n;\nvar lame =c * d / n;\nvar sol = p / np / n;\n\nvar count = Math.floor(Math.min(gaz, lame, sol));\n\nprint(count);\n"}, {"source_code": "var numbers = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nvar allMl = (numbers[1]*numbers[2]) / numbers[6]; // l * k / nl\nvar allSclice = numbers[3]*numbers[4]; // c * d \nvar pgram = numbers[5]/ numbers[7] ; // p / np\n\nvar min = function (x,y,z) {\n if (x <= y){\n if(x<= z){\n return x;\n }else {\n return z;\n }\n }else {\n if(y<=z){\n return y;\n }else{\n return z;\n }\n } \n};\n\nwrite(parseInt(min(allMl,allSclice,pgram)/numbers[0]));"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const [n, k, l, c, d, p, nl, np] = readLine()\n .split(\" \")\n .map((n) => parseInt(n));\n\n console.log(Math.floor(Math.min((k * l) / nl, c * d, p / np) / n));\n}\n"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error('\\n');\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr('time : ' + end + 'ms');\n myerr('memory : ' + Math.round(process.memoryUsage().heapTotal / 1024) + 'KB');\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var one = nextIntArray();\n var n = one[0];\n var k = one[1];\n var l = one[2];\n var c = one[3];\n var d = one[4];\n var p = one[5];\n var nl = one[6];\n var np = one[7];\n var allB = k * l;\n var allS = c * d;\n myout(Math.min.apply(null, [Math.floor(allB / nl / n), Math.floor(p / np / n), Math.floor(allS / n)]));\n}\n"}, {"source_code": "//Soft Drinking\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n let lines = inp.split(EOL)[0].split(' ');\n \n let n = +lines[0];\n let k = +lines[1];\n let l = +lines[2];\n let c = +lines[3];\n let d = +lines[4];\n let p = +lines[5];\n let nl = +lines[6];\n let np = +lines[7];\n\n process.stdout.write(Math.min(~~((k * l) / (n * nl)), ~~((c * d) / n), ~~(p / (n * np))) + '');\n\n return;\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (data) => {\n let [n, k, l, c, d, p, nl, np] = data.split(' ').map(Number);\n\n let x = Math.floor(k * l / nl);\n let y = c * d;\n let z = Math.floor(p / np);\n let ans = Math.floor(Math.min(x, y, z) / n);\n\n console.log(ans);\n});\n"}, {"source_code": "const input = [];\n\nconst RL = require('readline').createInterface({\n input : process.stdin,\n output : process.stdout\n});\n \nRL.on('line', line => input.push(line));\n\nRL.on('close', () => {\n const [n, k, l, c, d, p, nl, np] = input[0].split(' ').map(x => parseInt(x));\n let botl = parseInt((k * l) / nl);\n let lim = c*d; let s = parseInt(p / np);\n\n console.log( parseInt(Math.min(botl, lim, s) / n) );\n});"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction isPrime(x) {\n\tlet s = Math.sqrt(x);\n\tlet i = 2;\n\twhile (i <= s) {\n\t\tif (x % i === 0) {\n\t\t\treturn false;\n\t\t}\n\t\ti++;\n\t}\n\treturn true;\n}\n\nfunction main() {\n\tlet [n, k, l, c, d, p, nl, np] = readLine()\n\t\t.split(' ')\n\t\t.map(x => x >> 0);\n\n\tlet bottle = Math.floor((k * l) / nl);\n\tlet limes = c * d;\n\tlet salt = Math.floor(p / np);\n\n\tlet res = Math.floor(Math.min(bottle, limes, salt) / n);\n\tconsole.log(res);\n}\n"}], "negative_code": [{"source_code": "const input = [];\n\nconst RL = require('readline').createInterface({\n input : process.stdin,\n output : process.stdout\n});\n \nRL.on('line', line => input.push(line));\n\nRL.on('close', () => {\n const [n, k, l, c, d, p, nl, np] = input[0].split(' ').map(x => parseInt(x));\n let botl = parseInt((k * l) / nl);\n let lim = d; let s = parseInt(p / np);\n\n console.log( parseInt(Math.min(botl, lim, s) / n) );\n});"}], "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1"} {"nl": {"description": "You found a mysterious function f. The function takes two strings s1 and s2. These strings must consist only of lowercase English letters, and must be the same length.The output of the function f is another string of the same length. The i-th character of the output is equal to the minimum of the i-th character of s1 and the i-th character of s2.For example, f(\"ab\", \"ba\") = \"aa\", and f(\"nzwzl\", \"zizez\") = \"niwel\".You found two strings x and y of the same length and consisting of only lowercase English letters. Find any string z such that f(x, z) = y, or print -1 if no such string z exists.", "input_spec": "The first line of input contains the string x. The second line of input contains the string y. Both x and y consist only of lowercase English letters, x and y have same length and this length is between 1 and 100.", "output_spec": "If there is no string z such that f(x, z) = y, print -1. Otherwise, print a string z such that f(x, z) = y. If there are multiple possible answers, print any of them. The string z should be the same length as x and y and consist only of lowercase English letters.", "sample_inputs": ["ab\naa", "nzwzl\nniwel", "ab\nba"], "sample_outputs": ["ba", "xiyez", "-1"], "notes": "NoteThe first case is from the statement.Another solution for the second case is \"zizez\"There is no solution for the third case. That is, there is no z such that f(\"ab\", z) =  \"ba\"."}, "positive_code": [{"source_code": "// Polyfill for NodeJS\nif (undefined == readline) {\n\tvar rLines = require('fs').readFileSync(\"/dev/stdin\", \"utf8\").split(\"\\n\"), \n\t\trIndex = 0,\n\t\treadline = function() {\n\t\t\trIndex ++\n\t\t\treturn rLines[rIndex - 1]\n\t\t}\n}\nif (undefined == print) {\n\tvar print = console.log\n}\n\n// Useful Read functions\nvar int = function() {\n\treturn parseInt(readline())\n}\n\nvar ints = function() {\n\treturn readline().split(' ')\n\t\t.map(function(x) {\n\t\t\treturn parseInt(x)\n\t\t})\n}\n\nvar x = readline(),\n\ty = readline(),\n\ti = x.length - 1\n\nwhile (i >= 0 && y.charCodeAt(i) <= x.charCodeAt(i)) i --\n\nif (i > -1)\n\tprint(-1)\nelse\n\tprint(y)"}, {"source_code": " var str1 = readline();\n var str2 = readline();\n var flag = true;\n for(var i = 0; i < str1.length; i += 1) {\n if(str1[i] < str2[i]) {\n flag = false;\n }\n }\n if(flag) {\n print(str2);\n } else {\n print(-1);\n }\n"}, {"source_code": " var x = readline();\n var y = readline();\n var flag = true;\n for(var i = 0; i < x.length; i += 1) {\n if(x[i] < y[i]) {\n flag = false;\n }\n }\n if(flag) {\n print(y);\n } else {\n print(-1);\n }\n"}, {"source_code": "var word1 = readline();\nvar word2 = readline();\nvar y = [];\nvar flag = true;\n\nfor (var i = 0; i < word1.length; i++){\n if (word1[i] < word2[i]){\n flag = false;\n break;\n }\n if (word1[i] == word2[i])\n y[i] = word1[i];\n else\n y[i] = word2[i];\n //y[i] = String.fromCharCode(word1.charCodeAt(i) - 1);;\n}\n\nif(flag)\n print(y.join(\"\"));\nelse\n print(-1);"}, {"source_code": "var x = readline().trim(), y = readline();\nfor (var i = 0; i < x.length; i++) {\n if (x[i] < y[i]) {\n y = \"-1\";\n break;\n }\n}\nprint(y);"}, {"source_code": " var x = readline();\n var y = readline();\n var z = '';\n var flag = true;\n for(var i = 0; flag && i < x.length; i += 1) {\n if(x[i] < y[i]) {\n flag = false;\n }\n }\n if(flag) {\n print(y);\n } else {\n print(-1);\n }"}], "negative_code": [{"source_code": "var word1 = readline();\nvar word2 = readline();\nvar y = [];\nvar flag = true;\n\nfor (var i = 0; i < word1.length; i++){\n if (word1[i] < word2[i]){\n flag = false;\n break;\n }\n if (word1[i] == word2[i])\n y[i] = word1[i];\n else\n y[i] = String.fromCharCode(word1.charCodeAt(i) - 1);;\n}\n\nif(flag)\n print(y.join(\"\"));\nelse\n print(-1);"}], "src_uid": "ce0cb995e18501f73e34c76713aec182"} {"nl": {"description": "Ted has a pineapple. This pineapple is able to bark like a bulldog! At time t (in seconds) it barks for the first time. Then every s seconds after it, it barks twice with 1 second interval. Thus it barks at times t, t + s, t + s + 1, t + 2s, t + 2s + 1, etc. Barney woke up in the morning and wants to eat the pineapple, but he can't eat it when it's barking. Barney plans to eat it at time x (in seconds), so he asked you to tell him if it's gonna bark at that time.", "input_spec": "The first and only line of input contains three integers t, s and x (0 ≤ t, x ≤ 109, 2 ≤ s ≤ 109) — the time the pineapple barks for the first time, the pineapple barking interval, and the time Barney wants to eat the pineapple respectively.", "output_spec": "Print a single \"YES\" (without quotes) if the pineapple will bark at time x or a single \"NO\" (without quotes) otherwise in the only line of output.", "sample_inputs": ["3 10 4", "3 10 3", "3 8 51", "3 8 52"], "sample_outputs": ["NO", "YES", "YES", "YES"], "notes": "NoteIn the first and the second sample cases pineapple will bark at moments 3, 13, 14, ..., so it won't bark at the moment 4 and will bark at the moment 3.In the third and fourth sample cases pineapple will bark at moments 3, 11, 12, 19, 20, 27, 28, 35, 36, 43, 44, 51, 52, 59, ..., so it will bark at both moments 51 and 52."}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (d) => {\n let [t, s, x] = d.split(' ').map(Number);\n let ans = 'NO';\n let val = t;\n\n if (val === x) {\n ans = 'YES';\n }\n\n let idx = 1;\n while (val <= x) {\n val = t + (idx * s);\n\n if (val === x) {\n ans = 'YES';\n break;\n }\n\n val = t + (idx * s) + 1;\n\n if (val === x) {\n ans = 'YES';\n break;\n }\n\n idx++;\n }\n\n console.log(ans);\n c++;\n});\n"}, {"source_code": "function rda(){ return readline().split(\" \").map(Number); };\nfunction rdn(){ return +readline(); };\n\nvar input = rda(), t = input[0], s = input[1], x = input[2];\n\nvar ans = \"NO\";\nif(t == x){\n ans = \"YES\";\n}else if(t > x){\n ans = \"NO\";\n}else{\n if( ((x-t)%s == 0 || (x-t)%s == 1) && x-t != 0 && x-t != 1) ans = \"YES\";\n}\n\nwrite(ans);"}, {"source_code": "const input = readline().split(\" \");\nconst begin = input[0];\nconst interval = input[1];\nconst time = input[2];\nconst diff = time - begin;\nprint(!diff || (diff >= interval && diff % interval <= 1) ? \"YES\" : \"NO\");\n"}, {"source_code": "var params = readline().split(' ').map(Number);\nvar t = params[0];\nvar s = params[1];\nvar x = params[2];\n\nprint((x === t) || (((x - t) % s === 0 && (x - t) / s > 0) || ((x - t - 1) % s === 0 && (x - t - 1) / s > 0)) ? 'YES' : 'NO');"}, {"source_code": "var a=readline().split(' ');\nvar t=parseInt(a[0]);\nvar s=parseInt(a[1]);\nvar x=parseInt(a[2]);\nx -= t;\nif(x == 1 || x < 0){\n\tprint(\"NO\");\n\tquit();\n};\nif(x % s == 0 || x % s == 1) {\n\tprint(\"YES\");\n} else {\n\tprint(\"NO\");\n}\n;\n"}, {"source_code": "var line = readline().split(' ');\n\nvar t = parseInt(line[0]);\nvar s = parseInt(line[1]);\nvar x = parseInt(line[2]);\nvar f1 = (x-t)%s==0 && x>=t;\nvar f2 = (x-t-1)%s==0 && x>=(t+s+1);\nif(f1 || f2) {\n print('YES');\n}else{\n print('NO');\n}\n\n"}, {"source_code": " var tmp = readline().split(' ').map(x => parseInt(x));\n var t = tmp[0];\n var s = tmp[1];\n var x = tmp[2];\n\n x -= t;\n if(x < 0) {\n print('NO');\n } else {\n print(((x % s) === 0) || (((x % s) === 1) && (x !== 1)) ? 'YES' : 'NO');\n }"}], "negative_code": [{"source_code": "function rda(){ return readline().split(\" \").map(Number); };\nfunction rdn(){ return +readline(); };\n\nvar input = rda(), t = input[0], s = input[1], x = input[2];\n\nvar ans = \"NO\";\nif(t == x){\n ans = \"YES\";\n}else{\n if( ((x-t)%s == 0 || (x-t)%s == 1) && x-t != 0 && x-t != 1) ans = \"YES\";\n}\n\nwrite(ans);"}, {"source_code": "var a=readline().split(' ');\nvar t=parseInt(a[0]);\nvar s=parseInt(a[1]);\nvar x=parseInt(a[2]);\nx -= t;\nif(x == 1){\n\tprint(\"NO\");\n\tquit();\n};\nif(x % s == 0 || x % s == 1) {\n\tprint(\"YES\");\n} else {\n\tprint(\"NO\");\n}\n;\n"}, {"source_code": "var line = readline().split(' ');\n\nvar t = parseInt(line[0]);\nvar s = parseInt(line[1]);\nvar x = parseInt(line[2]);\nvar f1 = (x-t)%s==0 && x>=t;\nvar f2 = (x-t-1)%s==1 && x>=(t+s+1);\nif(f1 || f2) {\n print('YES');\n}else{\n print('NO');\n}\n\n"}], "src_uid": "3baf9d841ff7208c66f6de1b47b0f952"} {"nl": {"description": "You are given a regular polygon with $$$n$$$ vertices labeled from $$$1$$$ to $$$n$$$ in counter-clockwise order. The triangulation of a given polygon is a set of triangles such that each vertex of each triangle is a vertex of the initial polygon, there is no pair of triangles such that their intersection has non-zero area, and the total area of all triangles is equal to the area of the given polygon. The weight of a triangulation is the sum of weigths of triangles it consists of, where the weight of a triagle is denoted as the product of labels of its vertices.Calculate the minimum weight among all triangulations of the polygon.", "input_spec": "The first line contains single integer $$$n$$$ ($$$3 \\le n \\le 500$$$) — the number of vertices in the regular polygon.", "output_spec": "Print one integer — the minimum weight among all triangulations of the given polygon.", "sample_inputs": ["3", "4"], "sample_outputs": ["6", "18"], "notes": "NoteAccording to Wiki: polygon triangulation is the decomposition of a polygonal area (simple polygon) $$$P$$$ into a set of triangles, i. e., finding a set of triangles with pairwise non-intersecting interiors whose union is $$$P$$$.In the first example the polygon is a triangle, so we don't need to cut it further, so the answer is $$$1 \\cdot 2 \\cdot 3 = 6$$$.In the second example the polygon is a rectangle, so it should be divided into two triangles. It's optimal to cut it using diagonal $$$1-3$$$ so answer is $$$1 \\cdot 2 \\cdot 3 + 1 \\cdot 3 \\cdot 4 = 6 + 12 = 18$$$."}, "positive_code": [{"source_code": "var n = readline();\n \nvar ans = 0;\n \nfor(var i=2; i{\"use strict\";var t={675:(t,e)=>{Object.defineProperty(e,\"__esModule\",{value:!0}),Array.numbersMatrix=(t,e,r)=>{let n=[];null==t&&(e=t),null==r&&(r=0);for(let i=0;it-e))},Array.prototype.sortDesc=function(){return this.sort(((t,e)=>e-t))},Array.prototype.max=function(){if(0==this.length)return 0;let t=this[0];for(let e=1;e{if(p){if(s=i.default.readFileSync(\"input.txt\").toString().trim().split(\"\\n\").map((t=>t.trim())),t(),i.default.writeFileSync(\"output.txt\",l),console.log(l),i.default.readFileSync(\"expected.txt\").toString().trim()==l.trim()){const{exec:t}=r(129);t(\"osascript -e 'display notification \\\"✅ AC!!\\\"'\")}}else process.stdin.resume(),process.stdin.setEncoding(\"utf-8\"),process.stdin.on(\"data\",(t=>{o+=t})),process.stdin.on(\"end\",(e=>{s=o.trim().split(\"\\n\").map((t=>t.trim())),t(),console.log(l)}))};function h(){return s[u++]}function f(){return h().split(\" \").map((t=>parseFloat(t)))}function c(){return h().split(\"\")}e.default={runMain:a,runEachTest:t=>{a((()=>{let[e]=f();for(;e>0;)t(),e--}))},readline:h,nextNumbers:f,nextBigNumbers:function(){return h().split(\" \").map((t=>BigInt(t)))},nextNumbersMatrix:function(t){let e=[];for(let r=0;r{t.exports=require(\"child_process\")},747:t=>{t.exports=require(\"fs\")}},e={};!function r(n){if(e[n])return e[n].exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}(965)})();\n\n// Solution written in typescript and compiled via webpack. Original source code below\n// Happy Hacking 😜\n\n\n// import './array'\n// \n// import io from './io'\n// \n// function main() {\n// let [n] = io.nextNumbers()\n// \n// let res = 0\n// \n// for (let i = 2; i < n; ++i) {\n// res += i * (i + 1)\n// }\n// \n// io.puts(res)\n// }\n// \n// // io.runEachTest(main)\n// io.runMain(main)"}], "negative_code": [{"source_code": "var n = readline();\nvar w=0;\nvar s = new Set();\nfor(var i=1; i<=n; i++){\n for(var j=1; j {\n if (state == 'n') {\n n = parseInt(line);\n state = 'a';\n } else if (state == 'a') {\n a = parseInt(line);\n state = 'b';\n } else if (state == 'b') {\n b = parseInt(line);\n\n let max = n / a;\n let found = false;\n for (let i = 0; i <= max; i++) {\n let rest = n - i * a;\n if (rest % b == 0) {\n console.log('YES');\n console.log(i + ' ' + rest / b);\n found = true;\n break;\n }\n }\n if (!found) {\n console.log('NO');\n }\n state = 'n';\n }\n}).on('close', () => {\n process.exit(0);\n});\n"}, {"source_code": "var a = parseInt(readline());\nvar b = parseInt(readline());\nvar c = parseInt(readline());\nvar d = Math.ceil(a / b);\nvar e = d * b;\nvar f = 0;\nvar g = 0;\nvar h = Math.floor(a / c);\nwhile(true)\n{\n if(e < a)\n {\n e = e + c;\n f++;\n }\n else if(e == a)\n {\n g = 1;\n break;\n }\n else if(e > a)\n {\n e = e - b;\n d--;\n }\n if((f > h) || (d < 0))\n {\n g = 2;\n break;\n }\n}\nif(g == 1)\n{\n print('YES');\n var i = d + ' ' + f;\n print(i);\n \n}\nelse if(g == 2)\n{\n print('NO');\n}"}, {"source_code": "\nfunction gcd(a, b){\n\tif(!b){\n\t\treturn a;\n\t}\n\treturn gcd(b, a%b);\n}\nfunction e_gcd(a, b){\n\tif(a===0)\n\t\treturn [0, 1];\n\telse{\n\t\txy=e_gcd(b%a, a);\n\t\treturn [xy[1]-Math.floor(b/a)*xy[0], xy[0]];\n\t}\n}\nvar n=readline();\nvar a=parseInt(readline());\nvar b=parseInt(readline());\nif(n%gcd(a, b)!==0){\n\tprint(\"NO\");\n}\nelse{\n\txy=e_gcd(a, b);\n\tx=xy[0];\n\ty=xy[1];\n\tx=x*n/gcd(a, b);\n\ty=y*n/gcd(a, b);\n\tif(x<0 && y>=0){\n\t\tvar k=Math.ceil(Math.abs(x)*gcd(a, b)/b);\n\t\tx=x+k*b/gcd(a, b);\n\t\ty=y-k*a/gcd(a, b);\n\t}\n\telse{\n\t\tif(x>=0 && y<0){\n\t\t\tb = [a, a = b][0];\n\t\t\ty = [x, x = y][0];\n\t\t\tvar k=Math.ceil(Math.abs(x)*gcd(a, b)/b);\n\t\t\tx=x+k*b/gcd(a, b);\n\t\t\ty=y-k*a/gcd(a, b);\n\t\t\ty = [x, x = y][0];\n\t\t}\t\n\t} \n\tif(x>=0 && y>=0){\n\t\tprint(\"YES\");\n\t\tprint(x, y);\n\t}\n\telse{\n\t\tprint(\"NO\");\n\t}\n}"}, {"source_code": "var n = parseInt(readline());\nvar a = parseInt(readline());\nvar b = parseInt(readline());\nvar x = 0;\nvar y = 0;\nvar toPrint = 'NO';\nif (a > b) {\n while (x <= n) {\n if ((n - x) % b === 0) {\n toPrint = 'YES\\n' + Math.round(x / a) + ' ' + Math.round((n - x) / b);\n break;\n }\n x+=a;\n }\n} else {\n while (y <= n) {\n if ((n - y) % a === 0) {\n toPrint = 'YES\\n' + Math.round((n - y) / a) + ' ' + Math.round(y / b);\n break;\n }\n y+=b;\n }\n}\nprint(toPrint);"}, {"source_code": "//var print = require('./print');\n//var readline = require('./readline');\n\nvar n = parseInt(readline());\nvar a = parseInt(readline());\nvar b = parseInt(readline());\n\nfor(var y = 0;;y++){\n var x = (n - b * y) / a;\n if(y * b > n){\n print('NO');\n break;\n }\n else if(x == parseInt(x) && a * x + b * y == n){\n print('YES');\n print(x + \" \" + y);\n break;\n }\n /*else {\n if(x * a + y * b >= n){\n print('NO');\n break;\n }\n }*/\n}\n\n/* A\nvar n = readline();\nvar res = '';\nfor (var i = 0; i < n.length - 2; i++)\n res += n[i];\nif(n.length > 1){\n if(n[n.length - 1] > '5')\n res += parseInt(n[n.length - 2]) + 1;\n else {\n res += n[n.length - 2];\n }\n}\nres += '0';\nprint(res);\n*/\n"}, {"source_code": "var n = +readline();\nvar a = +readline();\nvar b = +readline();\nvar ans = 'NO';\nfor (var i=0; i <= Math.floor(n/a); i++){\n if ((n-a*i)%b == 0){\n\t\tans = 'YES';\n\t\tprint (ans);\n\t\tprint (i, (n-a*i)/b);\n\t\tbreak;\n\t}\n}\nif (ans == 'NO') print('NO');"}], "negative_code": [{"source_code": "let n = 9960594;\nlet a = 2551;\nlet b = 2557;\n\nconst readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nlet state = 'n';\nrl.on('line', (line) => {\n if (state == 'n') {\n let n = parseInt(line);\n state = 'a';\n } else if (state == 'a') {\n let a = parseInt(line);\n state = 'b';\n } else if (state == 'b') {\n let b = parseInt(line);\n\n let max = n / a;\n let found = false;\n for (let i = 0; i <= max; i++) {\n let rest = n - i * a;\n if (rest % b == 0) {\n console.log('YES');\n console.log(i + ' ' + rest / b);\n found = true;\n break;\n }\n }\n if (!found) {\n console.log('NO');\n }\n state = 'n';\n }\n}).on('close', () => {\n process.exit(0);\n});\n"}, {"source_code": "var n = readline();\nvar x = readline();\nvar y = readline();\nvar ok=0;\nfor(var i=0; i<1000007; i++){\n\tif(n-i*x>=0 && (n-i*x)%y===0){\n\t\tprint(\"YES\");\n\t\tprint(i, (n-i*x)/y);\n\t\tok=1;\n\t\tbreak;\n\t}\n}\nif(!ok){\n\tprint(\"NO\");\n}\n"}, {"source_code": "var n = +readline();\nvar a = +readline();\nvar b = +readline();\nvar ans = 'NO';\nfor (var i=0; i < Math.ceil(n/a); i++){\n\tif ((n-a*i)%b == 0){\n\t\tans = 'YES';\n\t\tprint (ans);\n\t\tprint (i, (n-a*i)/b);\n\t\tbreak;\n\t}\n}\nif (ans == 'NO') print('NO');\n"}, {"source_code": "var n = +readline();\nvar a = +readline();\nvar b = +readline();\nvar ans = 'NO';\nfor (var i=0; i <= Math.ceil(n/a); i++){\n\tif ((n-a*i)%b == 0){\n\t\tans = 'YES';\n\t\tprint (ans);\n\t\tprint (i, (n-a*i)/b);\n\t\tbreak;\n\t}\n}\nif (ans == 'NO') print('NO');\n"}], "src_uid": "b031daf3b980e03218167f40f39e7b01"} {"nl": {"description": "You are given a string q. A sequence of k strings s1, s2, ..., sk is called beautiful, if the concatenation of these strings is string q (formally, s1 + s2 + ... + sk = q) and the first characters of these strings are distinct.Find any beautiful sequence of strings or determine that the beautiful sequence doesn't exist.", "input_spec": "The first line contains a positive integer k (1 ≤ k ≤ 26) — the number of strings that should be in a beautiful sequence. The second line contains string q, consisting of lowercase Latin letters. The length of the string is within range from 1 to 100, inclusive.", "output_spec": "If such sequence doesn't exist, then print in a single line \"NO\" (without the quotes). Otherwise, print in the first line \"YES\" (without the quotes) and in the next k lines print the beautiful sequence of strings s1, s2, ..., sk. If there are multiple possible answers, print any of them.", "sample_inputs": ["1\nabca", "2\naaacas", "4\nabc"], "sample_outputs": ["YES\nabca", "YES\naaa\ncas", "NO"], "notes": "NoteIn the second sample there are two possible answers: {\"aaaca\", \"s\"} and {\"aaa\", \"cas\"}."}, "positive_code": [{"source_code": "function toi(x){return parseInt(x);}\nn=toi(readline());\nvar s=readline();\nvar res=\"\";\nvar dic={};\nvar num=0;\nfor(var i=0;i 0) {\n\t\t\tprint( s.substring( ans[i-1], p ) );\n\t\t}\t\n\t} );\n} else {\n\tprint( 'NO' );\n}"}], "negative_code": [{"source_code": "var k = parseInt( readline() ),\n\ts = readline(),\n\tans = [],\n\tused = {};\n\t\nfor (var i = 0; i < s.length && ans.length < k; i++) {\n\tif (!used[s.charAt( i )]) {\n\t\tans.push( i );\n\t\tused[s.charAt( i )] = true;\n\t}\n}\n\nif (k === ans.length) {\n\tprint( 'YES' );\n\tans.push( s.length );\n\tans.forEach( function(p, i) {\n\t\tif (i > 0) {\n\t\t\tprint( s.substring( ans[i-1], i ) );\n\t\t}\t\n\t} );\n} else {\n\tprint( 'NO' );\n}"}], "src_uid": "c1b071f09ef375f19031ce99d10e90ab"} {"nl": {"description": "You have $$$n$$$ coins, each of the same value of $$$1$$$.Distribute them into packets such that any amount $$$x$$$ ($$$1 \\leq x \\leq n$$$) can be formed using some (possibly one or all) number of these packets.Each packet may only be used entirely or not used at all. No packet may be used more than once in the formation of the single $$$x$$$, however it may be reused for the formation of other $$$x$$$'s.Find the minimum number of packets in such a distribution.", "input_spec": "The only line contains a single integer $$$n$$$ ($$$1 \\leq n \\leq 10^9$$$) — the number of coins you have.", "output_spec": "Output a single integer — the minimum possible number of packets, satisfying the condition above.", "sample_inputs": ["6", "2"], "sample_outputs": ["3", "2"], "notes": "NoteIn the first example, three packets with $$$1$$$, $$$2$$$ and $$$3$$$ coins can be made to get any amount $$$x$$$ ($$$1\\leq x\\leq 6$$$). To get $$$1$$$ use the packet with $$$1$$$ coin. To get $$$2$$$ use the packet with $$$2$$$ coins. To get $$$3$$$ use the packet with $$$3$$$ coins. To get $$$4$$$ use packets with $$$1$$$ and $$$3$$$ coins. To get $$$5$$$ use packets with $$$2$$$ and $$$3$$$ coins To get $$$6$$$ use all packets. In the second example, two packets with $$$1$$$ and $$$1$$$ coins can be made to get any amount $$$x$$$ ($$$1\\leq x\\leq 2$$$)."}, "positive_code": [{"source_code": "print(Math.floor(Math.log2(+readline())+1));"}], "negative_code": [{"source_code": "print(Math.ceil((-1 + Math.sqrt(1 + 8*+readline()))/2));"}], "src_uid": "95cb79597443461085e62d974d67a9a0"} {"nl": {"description": "Year 2118. Androids are in mass production for decades now, and they do all the work for humans. But androids have to go to school to be able to solve creative tasks. Just like humans before.It turns out that high school struggles are not gone. If someone is not like others, he is bullied. Vasya-8800 is an economy-class android which is produced by a little-known company. His design is not perfect, his characteristics also could be better. So he is bullied by other androids.One of the popular pranks on Vasya is to force him to compare $$$x^y$$$ with $$$y^x$$$. Other androids can do it in milliseconds while Vasya's memory is too small to store such big numbers.Please help Vasya! Write a fast program to compare $$$x^y$$$ with $$$y^x$$$ for Vasya, maybe then other androids will respect him.", "input_spec": "On the only line of input there are two integers $$$x$$$ and $$$y$$$ ($$$1 \\le x, y \\le 10^{9}$$$).", "output_spec": "If $$$x^y < y^x$$$, then print '<' (without quotes). If $$$x^y > y^x$$$, then print '>' (without quotes). If $$$x^y = y^x$$$, then print '=' (without quotes).", "sample_inputs": ["5 8", "10 3", "6 6"], "sample_outputs": [">", "<", "="], "notes": "NoteIn the first example $$$5^8 = 5 \\cdot 5 \\cdot 5 \\cdot 5 \\cdot 5 \\cdot 5 \\cdot 5 \\cdot 5 = 390625$$$, and $$$8^5 = 8 \\cdot 8 \\cdot 8 \\cdot 8 \\cdot 8 = 32768$$$. So you should print '>'.In the second example $$$10^3 = 1000 < 3^{10} = 59049$$$.In the third example $$$6^6 = 46656 = 6^6$$$."}, "positive_code": [{"source_code": "\nvar l = readline().split(' ');\nx = parseInt(l[0]);\ny = parseInt(l[1]);\n\nif(x < y){\n log = Math.log(y) / Math.log(x);\n py = log*x;\n px = y;\n if(px < py) print('<');\n else if(px > py) print('>');\n else print('=');\n}\nelse if(x > y){\n log = Math.log(x) / Math.log(y);\n px = log*y;\n py = x;\n if(px < py) print('<');\n else if(px > py) print('>');\n else print('=');\n}\nelse print('=');"}, {"source_code": "var arr = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nvar a = arr[0]\nvar b = arr[1]\n\nif(a == b) print(\"=\")\nelse if(a >= 8 && b >= 8){\n if(a < b){\n print(\">\")\n }\n else print (\"<\")\n}\nelse if(Math.pow(a,b) == Math.pow(b,a)){\n print(\"=\")\n}\nelse if(Math.pow(a,b) > Math.pow(b, a)){\n print(\">\")\n}\nelse print(\"<\")\n"}, {"source_code": "var r = readline().split(' ');\nvar x = +r[0],\n y = +r[1];\n\nvar logxy = y * Math.log(x);\nvar logyx = x * Math.log(y);\n\nif (Math.abs(logxy - logyx) < Number.EPSILON) {\n print('=');\n}\nelse {\n print(logxy > logyx ? '>' : '<');\n}"}, {"source_code": "var aux = readline().split(\" \").map(function(x) { return parseInt(x); });\nprint(solve(aux[0],aux[1]));\nfunction solve(x,y)\n{\n switch(true)\n {\n case x==y||(x==2&&y==4)||(x==4&&y==2):\n return '=';\n case x==1:\n return '<';\n case y==1:\n return '>';\n }\n var a=Math.log2(x)*y,b=Math.log2(y)*x;\n if(a';\n}"}, {"source_code": "\n var tmp = readline().split(' ').map(x => parseInt(x));\n var x = tmp[0];\n var y = tmp[1];\n\n var res = [];\n for(var i = 1; i < 6; i += 1) {\n res[i] = [];\n for(var j = 1; j < 6; j += 1) {\n var a = Math.pow(i, j);\n var b = Math.pow(j, i);\n if(a === b) {\n res[i][j] = '=';\n continue;\n }\n if(a > b) {\n res[i][j] = '>';\n continue;\n }\n if(a < b) {\n res[i][j] = '<';\n continue;\n }\n }\n }\n if(x <= 5 && y <= 5) {\n print(res[x][y]);\n } else if(x > 5 && y > 5) {\n if(x === y) {\n print('=');\n } else if(x > y) {\n print('<');\n } else {\n print('>');\n }\n } else if(x > 5 && y <= 5) {\n if(y === 1) {\n print('>');\n } else {\n print('<');\n }\n } else {\n if(x === 1) {\n print('<');\n } else {\n print('>');\n }\n }\n"}, {"source_code": "/**\n * Created by bhavyaagg on 09/06/18.\n */\n\nconst readline = require('readline');\n\nr1 = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nr1.on('line', (data) => {\n let x = data.split(\" \")[0];\n let y = data.split(\" \")[1];\n\n if (x == y) {\n console.log(\"=\");\n } else {\n if (x == 1) {\n console.log(\"<\")\n }\n else if (y == 1) {\n console.log(\">\")\n }\n else {\n let a = y * Math.log(x) - x * Math.log(y);\n\n if (a == 0) {\n console.log(\"=\")\n }\n else if (a < 0) {\n console.log(\"<\")\n } else {\n console.log(\">\")\n }\n }\n }\n // else if (x < y) {\n //\n // console.log(\">\")\n // } else {\n // console.log(\"<\")\n // }\n\n r1.close();\n})\n"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.question('', (answer) => {\n // TODO: Log the answer in a database\n let vals = answer.split(\" \");\n if(Math.log(vals[0])/vals[0] === Math.log(vals[1])/vals[1]){\n console.log(\"=\");\n }else if(Math.log(vals[0])/vals[0] > Math.log(vals[1])/vals[1]){\n console.log(\">\");\n }else {\n console.log(\"<\");\n }\n rl.close();\n});"}], "negative_code": [{"source_code": "var arr = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nvar a = arr[0]\nvar b = arr[1]\n\nif(a == b) print(\"=\")\nelse if(a >= 8 && b >= 8){\n if(a < b){\n print(\">\")\n }\n else print (\"<\")\n}\nelse if(Math.pow(a,b) > Math.pow(b, a)){\n print(\">\")\n}\nelse print(\"<\")\n"}, {"source_code": "var arr = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nvar a = arr[0]\nvar b = arr[1]\n\nif(a == b) print(\"=\")\nelse if(b * Math.log(a) > a * Math.log(b)){\n print(\">\")\n}\nelse print(\"<\")\n"}, {"source_code": "var arr = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nvar a = arr[0]\nvar b = arr[1]\n\nvar log = Math.log\nif(a == b) print(\"=\")\nelse if(b * log(a) > a * log(b)){\n print(\">\")\n}\nelse print(\"<\")\n"}, {"source_code": "var arr = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nvar a = arr[0]\nvar b = arr[1]\n\nif(a == b) print(\"=\")\nelse if(a >= 3 && b >= 3){\n if(a < b){\n print(\">\")\n }\n else print (\"<\")\n}\nelse if(Math.pow(a,b) > Math.pow(b, a)){\n print(\">\")\n}\nelse print(\"<\")\n"}, {"source_code": "var r = readline().split(' ');\nvar x = +r[0],\n y = +r[1];\n\nif (x === y) {\n print('=');\n}\nelse if (x > y) {\n print('<');\n}\nelse {\n print('>');\n}"}, {"source_code": "var r = readline().split(' ');\nvar x = +r[0],\n y = +r[1];\n\nvar xy = Math.pow(x, y);\nvar yx = Math.pow(y, x);\n\nif (xy === yx) {\n print('=');\n}\nelse {\n print(xy > yx ? '>' : '<');\n}"}, {"source_code": "var r = readline().split(' ');\nvar x = r[0],\n y = r[1];\n\nif (x === y) {\n print('=');\n}\nelse if (x > y) {\n print('<');\n}\nelse {\n print('>');\n}"}, {"source_code": "var r = readline().split(' ');\nvar x = +r[0],\n y = +r[1];\n\nif (x === y) {\n print('=');\n}\nelse {\n var res = Math.pow(x, y) > Math.pow(y, x) ? '>' : '<';\n print(res);\n}"}, {"source_code": "var r = readline().split(' ');\nvar x = +r[0],\n y = +r[1];\n\nif (x === y) {\n print('=');\n}\nelse if (x < 10 || y < 10) {\n var res = Math.pow(x, y) > Math.pow(y, x) ? '>' : '<';\n print(res);\n}\nelse if (x > y) {\n print('<');\n}\nelse {\n print('>');\n}"}, {"source_code": "function gcd(x, y) {\n while (x > 0) {\n var t = x;\n x = y % x;\n y = t;\n }\n return y;\n}\n\nvar r = readline().split(' ');\nvar x = +r[0],\n y = +r[1];\n\nvar g = gcd(x, y);\nvar xd = x / g;\nvar yd = y / g;\nvar md = Math.min(xd, yd)\n\nvar xy = Math.pow(g, yd - md) * Math.pow(xd, yd);\nvar yx = Math.pow(g, xd - md) * Math.pow(yd, xd);\n\nif (xy === yx) {\n print('=');\n}\nelse {\n print(xy > yx ? '>' : '<');\n}"}, {"source_code": "var aux = readline().split(\" \").map(function(x) { return parseInt(x); });\nprint(solve(aux[0],aux[1]));\nfunction solve(x,y)\n{\n switch(true)\n {\n case x==y||(x==2&&y==4)||(x==4&y==2):\n return '=';\n case x==1:\n return '<';\n case y=1:\n return '>';\n }\n var a=Math.log2(x)*y,b=Math.log2(y)*x;\n if(a';\n}"}, {"source_code": "var aux = readline().split(\" \").map(function(x) { return parseInt(x); });\nprint(solve(aux[0],aux[1]));\nfunction solve(x,y)\n{\n switch(true)\n {\n case x==y||(x==2&&y==4)||(x==4&y==2):\n return '=';\n case x==1:\n return '<';\n case y==1:\n return '>';\n }\n var a=Math.log2(x)*y,b=Math.log2(y)*x;\n if(a';\n}"}, {"source_code": " var tmp = readline().split(' ').map(x => parseInt(x));\n var x = tmp[0];\n var y = tmp[1];\n\n var res = [];\n for(var i = 1; i < 6; i += 1) {\n res[i] = [];\n for(var j = 1; j < 6; j += 1) {\n var a = Math.pow(i, j);\n var b = Math.pow(j, i);\n if(a === b) {\n res[i][j] = '=';\n continue;\n }\n if(a > b) {\n res[i][j] = '>';\n continue;\n }\n if(a < b) {\n res[i][j] = '<';\n continue;\n }\n }\n }\n if(x <= 5 && y <= 5) {\n print(res[x][y]);\n } else if(x > 5 && y > 5) {\n if(x === y) {\n print('=');\n } else if(x > y) {\n print('<');\n } else {\n print('>');\n }\n } else if(x > 5 && y <= 5) {\n print('<');\n } else {\n print('>');\n }"}, {"source_code": " var tmp = readline().split(' ').map(x => parseInt(x));\n var x = tmp[0];\n var y = tmp[1];\n var reverse = false;\n if(x > y) {\n reverse = true;\n var z = y;\n y = x;\n x = z;\n }\n var e = 2.71828;\n if(x === y ||\n (x === 2 && y == 4) ||\n (x === -2 && y == -4)) {\n print('=');\n } else if(x > e && y > e) {\n print(reverse ? '<' : '>');\n } else if(x < e && y < e) {\n print(reverse ? '>' : '<');\n } else {\n if(x == 1) {\n print(reverse ? '>' : '<');\n } else {\n print(reverse ? '<' : '>');\n }\n }"}, {"source_code": "/**\n * Created by bhavyaagg on 09/06/18.\n */\n\nconst readline = require('readline');\n\nr1 = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nr1.on('line', (data) => {\n let x = data.split(\" \")[0];\n let y = data.split(\" \")[1];\n\n if (x == y) {\n console.log(\"=\");\n } else if (x < y) {\n console.log(\">\")\n } else {\n console.log(\"<\")\n }\n\n r1.close();\n})\n"}, {"source_code": "/**\n * Created by bhavyaagg on 09/06/18.\n */\n\nconst readline = require('readline');\n\nr1 = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nr1.on('line', (data) => {\n let x = data.split(\" \")[0];\n let y = data.split(\" \")[1];\n\n if (x == y) {\n console.log(\"=\");\n } else {\n if (x == 1) {\n console.log(\">\")\n\n }\n else if (y == 1) {\n console.log(\">\")\n }\n else {\n let a = y * Math.log(x) - x * Math.log(y);\n\n if (a == 0) {\n console.log(\"=\")\n }\n else if (a < 0) {\n console.log(\"<\")\n } else {\n console.log(\">\")\n }\n }\n }\n // else if (x < y) {\n //\n // console.log(\">\")\n // } else {\n // console.log(\"<\")\n // }\n\n r1.close();\n})\n"}, {"source_code": "/**\n * Created by bhavyaagg on 09/06/18.\n */\n\nconst readline = require('readline');\n\nr1 = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nr1.on('line', (data) => {\n let x = data.split(\" \")[0];\n let y = data.split(\" \")[1];\n\n if (x == y) {\n console.log(\"=\");\n } else {\n if(y*Math.log(x) < x * Math.log(x)){\n console.log(\"<\")\n } else{\n console.log(\">\")\n }\n }\n // else if (x < y) {\n //\n // console.log(\">\")\n // } else {\n // console.log(\"<\")\n // }\n\n r1.close();\n})\n"}, {"source_code": "/**\n * Created by bhavyaagg on 09/06/18.\n */\n\nconst readline = require('readline');\n\nr1 = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nr1.on('line', (data) => {\n let x = data.split(\" \")[0];\n let y = data.split(\" \")[1];\n\n if (x == y) {\n console.log(\"=\");\n } else {\n if(x==1){\n console.log(\">\")\n\n }\n else if(y==1){\n console.log(\">\")\n }\n else if(y*Math.log(x) < x * Math.log(x)){\n console.log(\"<\")\n } else{\n console.log(\">\")\n }\n }\n // else if (x < y) {\n //\n // console.log(\">\")\n // } else {\n // console.log(\"<\")\n // }\n\n r1.close();\n})\n"}, {"source_code": "/**\n * Created by bhavyaagg on 09/06/18.\n */\n\nconst readline = require('readline');\n\nr1 = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nr1.on('line', (data) => {\n let x = data.split(\" \")[0];\n let y = data.split(\" \")[1];\n\n if (x == y) {\n console.log(\"=\");\n } else if (x < y) {\n console.log(\"<\")\n } else {\n console.log(\">\")\n }\n\n r1.close();\n})\n"}, {"source_code": "/**\n * Created by bhavyaagg on 09/06/18.\n */\n\nconst readline = require('readline');\n\nr1 = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nr1.on('line', (data) => {\n let x = data.split(\" \")[0];\n let y = data.split(\" \")[1];\n\n if (x == y) {\n console.log(\"=\");\n } else {\n if (x == 1) {\n console.log(\">\")\n\n }\n else if (y == 1) {\n console.log(\">\")\n }\n else {\n let a = y * Math.log(x) - x * Math.log(x);\n\n if (a == 0) {\n console.log(\"=\")\n }\n else if (a < 0) {\n console.log(\"<\")\n } else {\n console.log(\">\")\n }\n }\n }\n // else if (x < y) {\n //\n // console.log(\">\")\n // } else {\n // console.log(\"<\")\n // }\n\n r1.close();\n})\n"}], "src_uid": "ec1e44ff41941f0e6436831b5ae543c6"} {"nl": {"description": "You are given two positive integer numbers a and b. Permute (change order) of the digits of a to construct maximal number not exceeding b. No number in input and/or output can start with the digit 0.It is allowed to leave a as it is.", "input_spec": "The first line contains integer a (1 ≤ a ≤ 1018). The second line contains integer b (1 ≤ b ≤ 1018). Numbers don't have leading zeroes. It is guaranteed that answer exists.", "output_spec": "Print the maximum possible number that is a permutation of digits of a and is not greater than b. The answer can't have any leading zeroes. It is guaranteed that the answer exists. The number in the output should have exactly the same length as number a. It should be a permutation of digits of a.", "sample_inputs": ["123\n222", "3921\n10000", "4940\n5000"], "sample_outputs": ["213", "9321", "4940"], "notes": null}, "positive_code": [{"source_code": "var aOrig = readline();\nvar bOrig = readline();\nvar bIsLonger = false;\nvar prevIsBigger = false;\n\n\nif (aOrig.length < bOrig.length) {\n bOrig = bOrig.substr(0, aOrig.length);\n bIsLonger = true;\n}\n\nvar a = aOrig.split('');\nvar b = bOrig.split('');\n\nvar map = {\n 0: 0,\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0,\n 9: 0\n};\n\nvar result = '';\n\nfunction findMax(e) {\n var origE = e;\n if (bIsLonger || typeof prevIsBigger === 'number') {\n // print(\"wtf...\" + prevIsBigger)\n e = 9;\n }\n while(e > -1) {\n if (map[e]) {\n map[e]--;\n // print(result + e);\n return e;\n }\n e--;\n if (prevIsBigger === false) {\n prevIsBigger = result.length;\n }\n }\n var prev = result[result.length - 1];\n map[prev]++;\n // print(\"ye boi\" + prevIsBigger + \" \" + (result.length))\n if (prevIsBigger === result.length) {\n prevIsBigger = false;\n }\n result = result.substring(0, result.length - 1);\n // print(result);\n //THIS S***!!!!!!!!!!\n var q = findMax(prev - 1);\n result += q;\n // print(\">> \" + result);\n prevIsBigger = result.length;\n return findMax(origE);\n\n}\n\na.forEach(e => {\n map[e]++;\n});\nb.forEach(e => {\n var c = findMax(e);\n result += c;\n //2 lines above are not the same as below!!!!!!\n //result += findMax(e);\n // print(\"> \" + result)\n});\n\nprint(result);"}, {"source_code": "// if (!readline) { var { readline, print } = require('./index.js'); }\n\nconst\n\tZERO_CHAR_CODE = '0'.charCodeAt();\n\n/**\n * Returns an array of length 10\n * that stores the number of occurrences of each digit in the number\n * @param { string } number \n * @returns { [number] }\n */\nfunction getDigitsNumber(num) {\n\tvar result = new Array(10).fill(0);\n\tfor (var char of num) {\n\t\tvar digit = char.charCodeAt() - ZERO_CHAR_CODE;\n\t\tif (digit >= 0 && digit <= 9) {\n\t\t\tresult[digit]++;\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n * Returns an array of digits of number\n * @param { string } number \n * @returns { [number] }\n */\nfunction getDigits(num) {\n\tvar result = new Array(num.length).fill(0);\n\tfor (var i = 0; i < num.length; i++) {\n\t\tvar digit = num.charCodeAt(i) - ZERO_CHAR_CODE;\n\t\tif (digit < 0 || digit > 9) throw 'is not number';\n\t\tresult[i] = digit;\n\t}\n\treturn result;\n}\n\n/**\n * Returns a number (as string) consisting of digits of a and not exceeding b\n * @param { string } a \n * @param { string } b \n * @returns { string }\n */\nfunction rearrangeNumbers(a, b) {\n\tvar aNums = getDigitsNumber(a);\n\tvar bNums = getDigits(b);\n\tvar result = '';\n\tif (a.length != b.length) {\n\t\tfor (var i = 9; i >= 0; i--) result += ('' + i).repeat(aNums[i]);\n\t} else {\n\t\tvar rNums = new Array(a.length);\n\t\tvar ind, lastInd;\n\t\tind = lastInd = 0;\n\t\tvar isLess = false;\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\tvar needToBreak = true;\n\t\t\tvar iFrom = isLess ? 9 : bNums[i];\n\t\t\tfor (var j = iFrom; j >= 0; j--) {\n\t\t\t\tif (aNums[j] > 0) {\n\t\t\t\t\tif (j < bNums[i]) {\n\t\t\t\t\t\tisLess = true;\n\t\t\t\t\t\tlastInd = i;\n\t\t\t\t\t}\n\t\t\t\t\tind = i;\n\t\t\t\t\trNums[i] = j;\n\t\t\t\t\taNums[j]--;\n\t\t\t\t\tneedToBreak = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needToBreak) break;\n\t\t}\n\t\tvar backStep = false;\n\t\twhile (ind + 1 < a.length) {\n\t\t\tvar needToStepBack = true;\n\t\t\tvar iFrom = backStep ? rNums[ind + 1] - 1 : isLess ? 9 : bNums[ind + 1];\n\t\t\tfor (var i = iFrom; i >= 0; i--) {\n\t\t\t\tif (aNums[i] > 0) {\n\t\t\t\t\taNums[i]--;\n\t\t\t\t\tind++;\n\t\t\t\t\tif (!isLess && i < bNums[ind]) {\n\t\t\t\t\t\tisLess = true;\n\t\t\t\t\t\tlastInd = ind;\n\t\t\t\t\t}\n\t\t\t\t\trNums[ind] = i;\n\t\t\t\t\tbackStep = false;\n\t\t\t\t\tneedToStepBack = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needToStepBack) {\n\t\t\t\taNums[rNums[ind]]++;\n\t\t\t\tind--;\n\t\t\t\tbackStep = true;\n\t\t\t\t// if (isLess && ind < lastInd) {\n\t\t\t\tif (isLess && ind == lastInd) {\n\t\t\t\t\tisLess = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\tresult += '' + rNums[i]\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction main() {\n\tvar a = readline();\n\tvar b = readline();\n\tprint(rearrangeNumbers(a, b));\n}\n\nmain();\n"}, {"source_code": "a = readline();\nb = readline();\ncnt = Array(10).fill(0);\nfor (c of a) cnt[c]++;\nlo = hi = \"\";\nfor (c of a.length < b.length ? \"9999999999999999999\" : b) {\n for (i = c - 1; i >= 0; i--)\n if (cnt[i]) {\n lo = hi + i;\n cnt[i]--;\n for (j = 9; j >= 0; j--) {\n for (k = cnt[j]; k; k--) lo += j;\n }\n cnt[i]++;\n break;\n }\n if (!cnt[c]) break;\n hi += c;\n cnt[c]--;\n}\nprint(lo.length > hi.length ? lo : hi);\n"}], "negative_code": [{"source_code": "var aOrig = readline();\nvar bOrig = readline();\nvar bIsLonger = false;\nvar prevIsBigger = false;\n\n\nif (aOrig.length < bOrig.length) {\n bOrig = bOrig.substr(0, aOrig.length);\n bIsLonger = true;\n}\n\nvar a = aOrig.split('');\nvar b = bOrig.split('');\n\nvar map = {\n 0: 0,\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0,\n 9: 0\n};\n\nvar result = '';\n\nfunction findMax(e) {\n var origE = e;\n if (bIsLonger || prevIsBigger) {\n e = 9;\n }\n while(e > -1) {\n if (map[e]) {\n map[e]--;\n // print(result + e);\n return e;\n }\n e--;\n if (!prevIsBigger) {\n prevIsBigger = result.length - 1;\n }\n }\n var prev = result[result.length - 1];\n // print(\"===\");\n map[prev]++;\n if (prevIsBigger >= result.length - 2) {\n prevIsBigger = false;\n }\n result = result.substring(0, result.length - 1);\n // print(result);\n result += findMax(prev - 1);\n // print(\">> \" + result);\n prevIsBigger = result.length - 2;\n return findMax(origE);\n\n}\n\na.forEach(e => {\n map[e]++;\n});\nb.forEach(e => {\n var c = findMax(e);\n result += c;\n //2 lines above are not the same as below!!!!!!\n //result += findMax(e);\n // print(\"> \" + result)\n});\n\nprint(result);"}, {"source_code": "var aOrig = readline();\nvar bOrig = readline();\nvar bIsLonger = false;\nvar prevIsLonger = false;\n\n\nif (aOrig.length < bOrig.length) {\n bOrig = bOrig.substr(0, aOrig.length);\n bIsLonger = true;\n}\n\nvar a = aOrig.split('');\nvar b = bOrig.split('');\n\nvar map = {\n 0: 0,\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0,\n 9: 0\n};\n\nvar result = '';\n\nfunction findMax(e) {\n if (bIsLonger || prevIsLonger) {\n e = 9;\n }\n var origE = e;\n while(e > -1) {\n if (map[e]) {\n map[e]--;\n if (origE === e) {\n prevIsLonger = false;\n }\n return e;\n }\n e--;\n prevIsLonger = true;\n if (e < 0) {\n e = 9;\n }\n }\n}\n\n\n\na.forEach(e => {\n map[e]++;\n});\nb.forEach(e => result += findMax(e));\n\nprint(result);"}, {"source_code": "var aOrig = readline();\nvar bOrig = readline();\nvar bIsLonger = false;\nvar prevIsBigger = false;\n\n\nif (aOrig.length < bOrig.length) {\n bOrig = bOrig.substr(0, aOrig.length);\n bIsLonger = true;\n}\n\nvar a = aOrig.split('');\nvar b = bOrig.split('');\n\nvar map = {\n 0: 0,\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0,\n 9: 0\n};\n\nvar result = '';\n\nfunction findMax(e) {\n var origE = e;\n if (bIsLonger || typeof prevIsBigger === 'number') {\n // print(\"wtf...\" + prevIsBigger)\n e = 9;\n }\n while(e > -1) {\n if (map[e]) {\n map[e]--;\n // print(result + e);\n return e;\n }\n e--;\n if (prevIsBigger === false) {\n prevIsBigger = result.length;\n }\n }\n var prev = result[result.length - 1];\n // print(\"===\");\n // if(result) {\n //\n // print(result);\n // }\n map[prev]++;\n if (prevIsBigger >= result.length - 1) {\n prevIsBigger = false;\n }\n result = result.substring(0, result.length - 1);\n // print(result);\n result += findMax(prev - 1);\n // print(\">> \" + result);\n prevIsBigger = result.length - 2;\n return findMax(origE);\n\n}\n\na.forEach(e => {\n map[e]++;\n});\nb.forEach(e => {\n var c = findMax(e);\n result += c;\n //2 lines above are not the same as below!!!!!!\n //result += findMax(e);\n // print(\"> \" + result)\n});\n\nprint(result);"}, {"source_code": "var aOrig = readline();\nvar bOrig = readline();\nvar bIsLonger = false;\nvar prevIsBigger = false;\n\n\nif (aOrig.length < bOrig.length) {\n bOrig = bOrig.substr(0, aOrig.length);\n bIsLonger = true;\n}\n\nvar a = aOrig.split('');\nvar b = bOrig.split('');\n\nvar map = {\n 0: 0,\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0,\n 9: 0\n};\n\nvar result = '';\n\nfunction findMax(e) {\n var origE = e;\n if (bIsLonger || prevIsBigger) {\n e = 9;\n }\n while(e > -1) {\n if (map[e]) {\n map[e]--;\n if (origE === e) {\n prevIsBigger = false;\n }\n return e;\n }\n e--;\n prevIsBigger = true;\n }\n map[result[result.length - 1]]++;\n var prev = result[result.length - 1];\n result = result.substring(0, result.length - 1);\n result += findMax(prev - 1);\n return findMax(origE - 1);\n\n}\n\na.forEach(e => {\n map[e]++;\n});\nb.forEach(e => result += findMax(e));\n\nprint(result);"}, {"source_code": "var aOrig = readline();\nvar bOrig = readline();\nvar bIsLonger = false;\nvar prevIsLonger = false;\n\n\nif (aOrig.length < bOrig.length) {\n bOrig = bOrig.substr(0, aOrig.length);\n bIsLonger = true;\n}\n\nvar a = aOrig.split('');\nvar b = bOrig.split('');\n\nvar map = {\n 0: 0,\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0,\n 9: 0\n};\n\nvar result = '';\n\nfunction findMax(e) {\n var origE = e;\n if (bIsLonger || prevIsLonger) {\n e = 9;\n }\n while(e > -1) {\n if (map[e]) {\n map[e]--;\n if (origE === e) {\n prevIsLonger = false;\n }\n return e;\n }\n e--;\n prevIsLonger = true;\n if (e < 0) {\n e = 9;\n }\n }\n}\n\n\n\na.forEach(e => {\n map[e]++;\n});\nb.forEach(e => result += findMax(e));\n\nprint(result);"}, {"source_code": "// if (!readline) { var { readline, print } = require('./index.js'); }\n\nconst\n\tZERO_CHAR_CODE = '0'.charCodeAt();\n\n/**\n * Returns an array of length 10\n * that stores the number of occurrences of each digit in the number\n * @param { string } number \n * @returns { [number] }\n */\nfunction getDigitsNumber(num) {\n\tvar result = new Array(10).fill(0);\n\tfor (var char of num) {\n\t\tvar digit = char.charCodeAt() - ZERO_CHAR_CODE;\n\t\tif (digit >= 0 && digit <= 9) {\n\t\t\tresult[digit]++;\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n * Returns an array of digits of number\n * @param { string } number \n * @returns { [number] }\n */\nfunction getDigits(num) {\n\tvar result = new Array(num.length).fill(0);\n\tfor (var i = 0; i < num.length; i++) {\n\t\tvar digit = num.charCodeAt(i) - ZERO_CHAR_CODE;\n\t\tif (digit < 0 || digit > 9) throw 'is not number';\n\t\tresult[i] = digit;\n\t}\n\treturn result;\n}\n\n/**\n * Returns a number (as string) consisting of digits of a and not exceeding b\n * @param { string } a \n * @param { string } b \n * @returns { string }\n */\nfunction rearrangeNumbers(a, b) {\n\tvar aNums = getDigitsNumber(a);\n\tvar bNums = getDigits(b);\n\tvar result = '';\n\tif (a.length != b.length) {\n\t\tfor (var i = 9; i >= 0; i--) result += ('' + i).repeat(aNums[i]);\n\t} else {\n\t\tvar rNums = new Array(a.length);\n\t\tvar ind, lastInd;\n\t\tind = lastInd = 0;\n\t\tvar isLess = false;\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\tvar needToBreak = true;\n\t\t\tvar iFrom = isLess ? 9 : bNums[i];\n\t\t\tfor (var j = iFrom; j >= 0; j--) {\n\t\t\t\tif (aNums[j] > 0) {\n\t\t\t\t\tif (j < bNums[i]) {\n\t\t\t\t\t\tisLess = true;\n\t\t\t\t\t\tlastInd = i;\n\t\t\t\t\t}\n\t\t\t\t\tind = i;\n\t\t\t\t\trNums[i] = j;\n\t\t\t\t\taNums[j]--;\n\t\t\t\t\tneedToBreak = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needToBreak) break;\n\t\t}\n\t\tvar backStep = false;\n\t\twhile (ind + 1 < a.length) {\n\t\t\tvar needToStepBack = true;\n\t\t\tvar iFrom = backStep ? rNums[ind + 1] - 1 : isLess ? 9 : bNums[ind + 1];\n\t\t\tfor (var i = iFrom; i >= 0; i--) {\n\t\t\t\tif (aNums[i] > 0) {\n\t\t\t\t\taNums[i]--;\n\t\t\t\t\tif (!isLess && i < bNums[ind]) {\n\t\t\t\t\t\tisLess = true;\n\t\t\t\t\t\tlastInd = ind;\n\t\t\t\t\t}\n\t\t\t\t\tind++;\n\t\t\t\t\trNums[ind] = i;\n\t\t\t\t\tbackStep = false;\n\t\t\t\t\tneedToStepBack = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needToStepBack) {\n\t\t\t\taNums[rNums[ind]]++;\n\t\t\t\tind--;\n\t\t\t\tbackStep = true;\n\t\t\t\t// if (isLess && ind < lastInd) {\n\t\t\t\tif (isLess && ind == lastInd) {\n\t\t\t\t\tisLess = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\tresult += '' + rNums[i]\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction main() {\n\tvar a = readline();\n\tvar b = readline();\n\tprint(rearrangeNumbers(a, b));\n}\n\nmain();\n"}, {"source_code": "// if (!readline) { var { readline, print } = require('./index.js'); }\n\nconst\n\tZERO_CHAR_CODE = '0'.charCodeAt();\n\n/**\n * Returns an array of length 10\n * that stores the number of occurrences of each digit in the number\n * @param { string } number \n * @returns { [number] }\n */\nfunction getDigitsNumber(num) {\n\tvar result = new Array(10).fill(0);\n\tfor (var char of num) {\n\t\tvar digit = char.charCodeAt() - ZERO_CHAR_CODE;\n\t\tif (digit >= 0 && digit <= 9) {\n\t\t\tresult[digit]++;\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n * Returns an array of digits of number\n * @param { string } number \n * @returns { [number] }\n */\nfunction getDigits(num) {\n\tvar result = new Array(num.length).fill(0);\n\tfor (var i = 0; i < num.length; i++) {\n\t\tvar digit = num.charCodeAt(i) - ZERO_CHAR_CODE;\n\t\tif (digit < 0 || digit > 9) throw 'is not number';\n\t\tresult[i] = digit;\n\t}\n\treturn result;\n}\n\n/**\n * Returns a number (as string) consisting of digits of a and not exceeding b\n * @param { string } a \n * @param { string } b \n * @returns { string }\n */\nfunction rearrangeNumbers(a, b) {\n\tvar aNums = getDigitsNumber(a);\n\tvar bNums = getDigits(b);\n\tvar result = '';\n\tif (a.length != b.length) {\n\t\tfor (var i = 9; i >= 0; i--) result += ('' + i).repeat(aNums[i]);\n\t} else {\n\t\tvar rNums = new Array(a.length);\n\t\tvar ind, lastInd;\n\t\tind = lastInd = 0;\n\t\tvar isLess = false;\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\tvar needToBreak = true;\n\t\t\tvar iFrom = isLess ? 9 : bNums[i];\n\t\t\tfor (var j = iFrom; j >= 0; j--) {\n\t\t\t\tif (aNums[j] > 0) {\n\t\t\t\t\tif (j < bNums[i]) {\n\t\t\t\t\t\tisLess = true;\n\t\t\t\t\t\tlastInd = i;\n\t\t\t\t\t}\n\t\t\t\t\tind = i;\n\t\t\t\t\trNums[i] = j;\n\t\t\t\t\taNums[j]--;\n\t\t\t\t\tneedToBreak = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needToBreak) break;\n\t\t}\n\t\tvar backStep = false;\n\t\twhile (ind + 1 < a.length) {\n\t\t\tvar needToStepBack = true;\n\t\t\tvar iFrom = backStep ? rNums[ind + 1] - 1 : isLess ? 9 : bNums[ind + 1];\n\t\t\tfor (var i = iFrom; i >= 0; i--) {\n\t\t\t\tif (aNums[i] > 0) {\n\t\t\t\t\taNums[i]--;\n\t\t\t\t\tind++;\n\t\t\t\t\trNums[ind] = i;\n\t\t\t\t\tif (!isLess && i < iFrom) {\n\t\t\t\t\t\tisLess = true;\n\t\t\t\t\t\tlastInd = ind;\n\t\t\t\t\t}\n\t\t\t\t\tbackStep = false;\n\t\t\t\t\tneedToStepBack = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needToStepBack) {\n\t\t\t\taNums[rNums[ind]]++;\n\t\t\t\tind--;\n\t\t\t\tbackStep = true;\n\t\t\t\t// if (isLess && ind < lastInd) {\n\t\t\t\tif (isLess && ind == lastInd) {\n\t\t\t\t\tisLess = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\tresult += '' + rNums[i]\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction main() {\n\tvar a = readline();\n\tvar b = readline();\n\tprint(rearrangeNumbers(a, b));\n}\n\nmain();\n"}, {"source_code": "// if (!readline) { var { readline, print } = require('./index.js'); }\n\nconst\n\tZERO_CHAR_CODE = '0'.charCodeAt();\n\n/**\n * Returns an array of length 10\n * that stores the number of occurrences of each digit in the number\n * @param { string } number \n * @returns { [number] }\n */\nfunction getDigitsNumber(num) {\n\tvar result = new Array(10).fill(0);\n\tfor (var char of num) {\n\t\tvar digit = char.charCodeAt() - ZERO_CHAR_CODE;\n\t\tif (digit >= 0 && digit <= 9) {\n\t\t\tresult[digit]++;\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n * Returns an array of digits of number\n * @param { string } number \n * @returns { [number] }\n */\nfunction getDigits(num) {\n\tvar result = new Array(num.length).fill(0);\n\tfor (var i = 0; i < num.length; i++) {\n\t\tvar digit = num.charCodeAt(i) - ZERO_CHAR_CODE;\n\t\tif (digit < 0 || digit > 9) throw 'is not number';\n\t\tresult[i] = digit;\n\t}\n\treturn result;\n}\n\n/**\n * Returns a number (as string) consisting of digits of a and not exceeding b\n * @param { string } a \n * @param { string } b \n * @returns { string }\n */\nfunction rearrangeNumbers(a, b) {\n\tvar aNums = getDigitsNumber(a);\n\tvar bNums = getDigits(b);\n\tvar result = '';\n\tif (a.length != b.length) {\n\t\tfor (var i = 9; i >= 0; i--) result += ('' + i).repeat(aNums[i]);\n\t} else {\n\t\tvar rNums = new Array(a.length);\n\t\tvar ind, lastInd;\n\t\tind = lastInd = 0;\n\t\tvar isLess = false;\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\tvar needToBreak = true;\n\t\t\tvar iFrom = isLess ? 9 : bNums[i];\n\t\t\tfor (var j = iFrom; j >= 0; j--) {\n\t\t\t\tif (aNums[j] > 0) {\n\t\t\t\t\tif (j < bNums[i]) {\n\t\t\t\t\t\tisLess = true;\n\t\t\t\t\t\tlastInd = i;\n\t\t\t\t\t}\n\t\t\t\t\tind = i;\n\t\t\t\t\trNums[i] = j;\n\t\t\t\t\taNums[j]--;\n\t\t\t\t\tneedToBreak = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needToBreak) break;\n\t\t}\n\t\twhile (ind + 1 < a.length) {\n\t\t\tvar needToStepBack = true;\n\t\t\tvar iFrom = isLess ? 9 : bNums[ind + 1];\n\t\t\tfor (var i = iFrom; i >= 0; i--) {\n\t\t\t\tif (aNums[i] > 0) {\n\t\t\t\t\taNums[i]--;\n\t\t\t\t\tind++;\n\t\t\t\t\trNums[ind] = i;\n\t\t\t\t\tif (!isLess && i < iFrom) {\n\t\t\t\t\t\tisLess = true;\n\t\t\t\t\t\tlastInd = ind;\n\t\t\t\t\t}\n\t\t\t\t\tneedToStepBack = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needToStepBack) {\n\t\t\t\taNums[rNums[ind]]++;\n\t\t\t\tind--;\n\t\t\t\tif (isLess && ind == lastInd) {\n\t\t\t\t\tisLess = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\tresult += '' + rNums[i]\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction main() {\n\tvar a = readline();\n\tvar b = readline();\n\tprint(rearrangeNumbers(a, b));\n}\n\nmain();\n"}, {"source_code": "a = readline();\nb = readline();\nif (a.length < b.length) b = Array(a.length).fill(9);\ncnt = Array(10).fill(0);\nfor (c of a) cnt[+c]++;\nlo = hi = 0;\nfor (c of b) {\n d = +c;\n for (i = d - 1; i >= 0; i--) {\n if (cnt[i]) {\n lo = hi * 10 + i;\n cnt[i]--;\n for (j = 9; j >= 0; j--) {\n for (k = cnt[j]; k; k--) lo = lo * 10 + j;\n }\n cnt[i]++;\n break;\n }\n }\n if (cnt[d]) {\n hi = hi * 10 + d;\n cnt[d]--;\n } else break;\n}\nprint(lo < hi ? hi : lo);"}], "src_uid": "bc31a1d4a02a0011eb9f5c754501cd44"} {"nl": {"description": "Running with barriers on the circle track is very popular in the country where Dasha lives, so no wonder that on her way to classes she saw the following situation:The track is the circle with length L, in distinct points of which there are n barriers. Athlete always run the track in counterclockwise direction if you look on him from above. All barriers are located at integer distance from each other along the track. Her friends the parrot Kefa and the leopard Sasha participated in competitions and each of them ran one lap. Each of the friends started from some integral point on the track. Both friends wrote the distance from their start along the track to each of the n barriers. Thus, each of them wrote n integers in the ascending order, each of them was between 0 and L - 1, inclusively. Consider an example. Let L = 8, blue points are barriers, and green points are Kefa's start (A) and Sasha's start (B). Then Kefa writes down the sequence [2, 4, 6], and Sasha writes down [1, 5, 7]. There are several tracks in the country, all of them have same length and same number of barriers, but the positions of the barriers can differ among different tracks. Now Dasha is interested if it is possible that Kefa and Sasha ran the same track or they participated on different tracks. Write the program which will check that Kefa's and Sasha's tracks coincide (it means that one can be obtained from the other by changing the start position). Note that they always run the track in one direction — counterclockwise, if you look on a track from above. ", "input_spec": "The first line contains two integers n and L (1 ≤ n ≤ 50, n ≤ L ≤ 100) — the number of barriers on a track and its length. The second line contains n distinct integers in the ascending order — the distance from Kefa's start to each barrier in the order of its appearance. All integers are in the range from 0 to L - 1 inclusively. The second line contains n distinct integers in the ascending order — the distance from Sasha's start to each barrier in the order of its overcoming. All integers are in the range from 0 to L - 1 inclusively.", "output_spec": "Print \"YES\" (without quotes), if Kefa and Sasha ran the coinciding tracks (it means that the position of all barriers coincides, if they start running from the same points on the track). Otherwise print \"NO\" (without quotes).", "sample_inputs": ["3 8\n2 4 6\n1 5 7", "4 9\n2 3 5 8\n0 1 3 6", "2 4\n1 3\n1 2"], "sample_outputs": ["YES", "YES", "NO"], "notes": "NoteThe first test is analyzed in the statement."}, "positive_code": [{"source_code": "function main(){\n var line = readline().split(\" \").map(Number);\n var barriers = line[0];\n var trackLength = line[1];\n\n if(barriers === 1)\n return print(\"YES\");\n\n var kefaBarriers = readline().split(\" \").map(Number).map(function(e, i, ar){\n return i === ar.length - 1 ? trackLength + ar[0] - e : ar[i+1] - e;\n });\n var sashaBarriers = readline().split(\" \").map(Number).map(function(e, i, ar){\n return i === ar.length - 1 ? trackLength + ar[0] - e : ar[i+1] - e;\n });\n\n for(var i = 0; i < barriers; i++){\n if(sashaBarriers[i] === kefaBarriers[0])\n for(j = i + 1; j < barriers + i; j++){\n if(sashaBarriers[j%barriers] !== kefaBarriers[j-i])\n break;\n else\n if(j-i === barriers - 1)\n return print(\"YES\");\n }\n }\n\n return print(\"NO\");\n}\n\nmain();\n"}, {"source_code": "function main() {\n var data = readline().split(' ').map(Number);\n var first = readline().split(' ').map(Number);\n var second = readline().split(' ').map(Number);\n var L = data[1];\n var n = data[0];\n\n\n for(var i=0;i a -b);\n var good = true;\n for(var j=0;j= 2; i--) {\r\n g[i - 1] = mul(g[i], i);\r\n }\r\n let res = 0,\r\n max = Math.min(n, k);\r\n for (let i = 0; i <= max; i++) {\r\n res = (res + mul(f[n], g[i], g[n - i])) % MOD;\r\n }\r\n return res;\r\n}\r\nconst MOD = 10 ** 9 + 7;\r\nfunction power(a, b) {\r\n let res = 1;\r\n while (b) {\r\n if (b & 1) res = mul(res, a);\r\n a = mul(a, a);\r\n b = b >> 1;\r\n }\r\n return res;\r\n}\r\nfunction mul(...args) {\r\n if (args.length === 0) throw new Error('参数不能为空');\r\n if (args.length === 1) return args[0];\r\n const [a, b] = args;\r\n if (args.length > 2) return mul(mul(a, b), ...args.slice(2));\r\n return (Math.floor(a / 65536) * b % MOD * 65536 + (a & 65535) * b) % MOD;\r\n}\r\nfunction convertInput(read) {\r\n const rn = () => Number(read());\r\n const rb = () => BigInt(read());\r\n const rns = n => {\r\n let res = new Array(n);\r\n for (let i = 0; i < n; i++) res[i] = rn();\r\n return res;\r\n };\r\n const re = n => {\r\n let res = new Array(n);\r\n for (let i = 0; i < n; i++) res[i] = rn() - 1;\r\n return res;\r\n };\r\n const rbs = n => {\r\n let res = new Array(n);\r\n for (let i = 0; i < n; i++) res[i] = rb();\r\n return res;\r\n };\r\n return [rn, rb, rns, re, rbs];\r\n}\r\nfunction main(r) {\r\n try {\r\n let t = 1;\r\n let res = new Array(t);\r\n let limit = 100;\r\n for (let i = 0; i < t; i++) {\r\n var _solve;\r\n const s = (_solve = solve(r)) !== null && _solve !== void 0 ? _solve : '';\r\n if (t < limit) {\r\n process.stdout.write(s.toString());\r\n process.stdout.write('\\n');\r\n }\r\n }\r\n if (t >= limit) ; else {\r\n return '';\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n}\r\n\r\nconst inputs = fs__default[\"default\"].readFileSync(0, 'utf-8').split(/\\s+/);\r\nvoid function () {\r\n const read = ((i = 0) => () => inputs[i++])();\r\n const output = main(read);\r\n process.stdout.write(output);\r\n}();\r\n"}], "negative_code": [], "src_uid": "dc7b887afcc2e95c4e90619ceda63071"} {"nl": {"description": "Mr. Kitayuta has kindly given you a string s consisting of lowercase English letters. You are asked to insert exactly one lowercase English letter into s to make it a palindrome. A palindrome is a string that reads the same forward and backward. For example, \"noon\", \"testset\" and \"a\" are all palindromes, while \"test\" and \"kitayuta\" are not.You can choose any lowercase English letter, and insert it to any position of s, possibly to the beginning or the end of s. You have to insert a letter even if the given string is already a palindrome.If it is possible to insert one lowercase English letter into s so that the resulting string will be a palindrome, print the string after the insertion. Otherwise, print \"NA\" (without quotes, case-sensitive). In case there is more than one palindrome that can be obtained, you are allowed to print any of them.", "input_spec": "The only line of the input contains a string s (1 ≤ |s| ≤ 10). Each character in s is a lowercase English letter.", "output_spec": "If it is possible to turn s into a palindrome by inserting one lowercase English letter, print the resulting string in a single line. Otherwise, print \"NA\" (without quotes, case-sensitive). In case there is more than one solution, any of them will be accepted. ", "sample_inputs": ["revive", "ee", "kitayuta"], "sample_outputs": ["reviver", "eye", "NA"], "notes": "NoteFor the first sample, insert 'r' to the end of \"revive\" to obtain a palindrome \"reviver\".For the second sample, there is more than one solution. For example, \"eve\" will also be accepted.For the third sample, it is not possible to turn \"kitayuta\" into a palindrome by just inserting one letter."}, "positive_code": [{"source_code": "String.prototype.insert = function (index, string) {\n if (index > 0)\n return this.substring(0, index) + string + this.substring(index, this.length);\n else\n return string + this;\n};\nString.prototype.reverse= function(){\n return this.split('').reverse().join('');\n}\n\n\nfunction solve(){\n var s = readline();\n var alphabet = \"abcdefghijklmnopqrstuvwxyz\".split(\"\");\n for(var i = 0; i <= s.length; ++i){\n for(var j = 0; j < alphabet.length; ++j){\n var s1 = s.insert(i,alphabet[j]);\n var s2 = s1.reverse();\n if(s1 == s2){\n print(s1);\n return;\n }\n }\n }\n print(\"NA\");\n}\nsolve();"}, {"source_code": "(function() {\n\nvar alpha = \"abcdefghijklmnopqrstuvwxyz\";\nvar str = readline();\n\nfor(var i = 0; i <= str.length; i++) {\n for(var j = 0; j < alpha.length; j++) {\n var res = str.substr(0,i)+alpha[j]+str.substr(i);\n if(isPalin(res))\n return print(res);\n }\n}\n\nprint(\"NA\");\n\nfunction isPalin(s) {\n for(var i = 0; i < s.length/2; i++) {\n if(s[i] !== s[s.length-1-i])\n return false;\n }\n return true;\n}\n\n})();\n"}, {"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.question(\"\", function(word) {\n let ans = word.split('')\n let j = ans.length - 1;\n let ans2 = ans.join('');\n let found = false\n for(let i = 0; !found && i < ans.length; i++){\n for(let j = 0; j < ans.length; j++){\n let ans1 = ans2.slice(0, i) + ans[j] + ans2.slice(i, ans.length )\n if(checkPolindrom(ans1)){\n found = true;\n console.log(ans1);\n break;\n }\n }\n }\n\n for(let i = 0; !found && i < ans.length; i++){\n if(ans[i] !== ans[j]){\n let ans1 = ans2 + ans[j];\n if(checkPolindrom(ans1)){\n found = true\n console.log(ans1)\n break;\n }\n ans1 = ans[j] + ans2;\n if(checkPolindrom(ans1)){\n found = true\n console.log(ans1)\n break;\n }\n ans1 = ans[i] + ans2;\n if(checkPolindrom(ans1)){\n found = true\n console.log(ans1)\n break;\n }\n ans1 = ans2 + ans[i];\n if(checkPolindrom(ans1)){\n found = true\n console.log(ans1)\n break;\n }\n }\n }\n if(!found)\n console.log('NA')\n process.exit(0)\n})\n\nrl.on(\"close\", function() {\n console.log(\"\\nBYE BYE !!!\");\n process.exit(0);\n});\n\n\nfunction checkPolindrom(ans1){\n var splitString = ans1.split(\"\");\n var reverseArray = splitString.reverse();\n let check = reverseArray.join(\"\");\n return check === ans1;\n}"}], "negative_code": [], "src_uid": "24e8aaa7e3e1776adf342ffa1baad06b"} {"nl": {"description": "You are given three integers $$$a$$$, $$$b$$$ and $$$x$$$. Your task is to construct a binary string $$$s$$$ of length $$$n = a + b$$$ such that there are exactly $$$a$$$ zeroes, exactly $$$b$$$ ones and exactly $$$x$$$ indices $$$i$$$ (where $$$1 \\le i < n$$$) such that $$$s_i \\ne s_{i + 1}$$$. It is guaranteed that the answer always exists.For example, for the string \"01010\" there are four indices $$$i$$$ such that $$$1 \\le i < n$$$ and $$$s_i \\ne s_{i + 1}$$$ ($$$i = 1, 2, 3, 4$$$). For the string \"111001\" there are two such indices $$$i$$$ ($$$i = 3, 5$$$).Recall that binary string is a non-empty sequence of characters where each character is either 0 or 1.", "input_spec": "The first line of the input contains three integers $$$a$$$, $$$b$$$ and $$$x$$$ ($$$1 \\le a, b \\le 100, 1 \\le x < a + b)$$$.", "output_spec": "Print only one string $$$s$$$, where $$$s$$$ is any binary string satisfying conditions described above. It is guaranteed that the answer always exists.", "sample_inputs": ["2 2 1", "3 3 3", "5 3 6"], "sample_outputs": ["1100", "101100", "01010100"], "notes": "NoteAll possible answers for the first example: 1100; 0011. All possible answers for the second example: 110100; 101100; 110010; 100110; 011001; 001101; 010011; 001011. "}, "positive_code": [{"source_code": "var firstLine = readline().split(' ').map(function(v){return +v;});\n\nvar zeroCount = firstLine[0] - 1;\nvar oneCount = firstLine[1] - 1;\nvar xCount = firstLine[2] - 1;\n\nvar zero = \"0\";\nvar one = \"1\";\nvar param = false;\nvar resultString = one + zero;\n\nwhile(xCount > 0) {\n if (oneCount === 0 || zeroCount === 0) break;\n\n if (param) {\n param = !param;\n resultString = resultString + zero;\n zeroCount -= 1;\n } else {\n param = !param;\n resultString = resultString + one;\n oneCount -= 1;\n }\n\n xCount -= 1;\n}\n\nif (xCount > 0 && zeroCount > 0) {\n resultString = zero + resultString;\n zeroCount -= 1;\n}\n\nif (xCount > 0 && oneCount > 0) {\n resultString = resultString + one;\n oneCount -= 1;\n}\n\nif (xCount === 0 && resultString[resultString.length - 1] === one) { \n resultString = one.repeat(oneCount) + resultString.slice(0, -1) + zero.repeat(zeroCount) + resultString[resultString.length - 1];\n} else {\n resultString = one.repeat(oneCount) + resultString + zero.repeat(zeroCount);\n}\n\nprint(resultString);"}, {"source_code": "var line = readline ();\nline = line.trim ().split ( ' ' );\nvar a = (+ line [ 0 ]), b = (+ line [ 1 ]), x = (+ line [ 2 ]);\nvar result = [ ];\nvar cnt = 0;\nif ( a > b ) {\n result.push ( '0' );\n a --;\n while ( cnt < x ) {\n if ( cnt % 2 == 1 ) {\n result.push ( '0' );\n a --;\n } else {\n result.push ( '1' ); \n b --;\n }\n cnt ++;\n }\n} else {\n result.push ( '1' );\n b --;\n while ( cnt < x ) {\n if ( cnt % 2 == 0 ) {\n result.push ( '0' );\n a --;\n } else {\n result.push ( '1' );\n b --;\n }\n cnt ++;\n }\n}\nvar pos;\npos = result.indexOf ( '0' );\nwhile ( a > 0 ) {\n result.splice ( pos, 0, '0' );\n a --;\n}\npos = result.indexOf ( '1' );\nwhile ( b > 0 ) {\n result.splice ( pos, 0, '1' );\n b --;\n}\nvar str = '';\nfor ( var g = 0; g < result.length; g ++ ) { str += result [ g ]; }\nprint ( str );\n"}, {"source_code": "\"use strict\";\n\n// var inp = prompt().split(\" \").map(function(x) { return parseInt(x); });\nvar inp = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar a = inp[0];\nvar b = inp[1];\nvar x = inp[2];\nvar s = \"\"\n\nvar flag;\nif (a <= b)\n flag = \"1\"\n else\n flag = \"0\";\n\n for(var i = 0; i < x; i++){\n s+=flag;\n\n if (flag == \"0\") flag = \"1\"\n else flag = \"0\";\n }\n \n\n flag = s[s.length - 1];\n var flagCount = 0;\n for (var i = 0; i < s.length; i++)\n if (s[i] == flag) flagCount++;\n\n \n var q = (flag == \"0\") ? a : b;\n for (var i = flagCount; i < q; i++)\n s += flag;\n\n if (flag == \"0\") flag = \"1\"\n else flag = \"0\";\n q = (flag == \"0\") ? a : b;\n\n flagCount = 0;\n for (var i = 0; i < s.length; i++)\n if (s[i] == flag) flagCount++;\n for (var i = flagCount; i < q; i++)\n s += flag;\n\n\n// console.log(s);\nprint(s);"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n let [a, b, x] = is.nextArray().map(Number);\n const binaryString = new Int32Array(x + 1);\n\n for (let i = a > b ? 1 : 0; i < binaryString.length; i += 2)\n binaryString[i] = 1;\n\n let zeros = 0, ones = 0;\n binaryString.forEach((item) => {\n if (item)\n ones++;\n else\n zeros++;\n });\n\n a -= zeros;\n b -= ones;\n\n for (let i = 0; i < 2; i++) {\n if (binaryString[i] === 0) {\n for (let j = 0; j < a; j++)\n process.stdout.write('0');\n } else {\n for (let j = 0; j < b; j++)\n process.stdout.write('1');\n }\n process.stdout.write(String(binaryString[i]));\n }\n\n for (let i = 2; i < binaryString.length; i++)\n process.stdout.write(String(binaryString[i]));\n}\n\n/*\n * api stdin\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n');\n }\n\n nextLine() {\n return this.lines[this.index++];\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', input => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}], "negative_code": [{"source_code": "var firstLine = readline().split(' ').map(function(v){return +v;});\n\nvar zeroCount = firstLine[0] - 1;\nvar oneCount = firstLine[1] - 1;\nvar xCount = firstLine[2] - 1;\n\nvar zero = \"0\";\nvar one = \"1\";\nvar param = false;\nvar resultString = one + zero;\n\nwhile(xCount > 0) {\n if (oneCount === 0 || zeroCount === 0) break;\n\n if (param) {\n param = !param;\n resultString = resultString + zero;\n zeroCount -= 1;\n } else {\n param = !param;\n resultString = resultString + one;\n oneCount -= 1;\n }\n\n xCount -= 1;\n}\n\nif (xCount > 0 && zeroCount > 0) {\n resultString = zero + resultString;\n zeroCount -= 1;\n}\n\nif (xCount > 0 && oneCount > 0) {\n resultString = resultString + one;\n oneCount -= 1;\n}\n\nif (xCount === 0 && resultString[resultString.length - 1] !== one) {\n resultString = one.repeat(oneCount) + resultString + zero.repeat(zeroCount);\n} else { \n resultString = one.repeat(oneCount) + resultString.slice(0, -1) + zero.repeat(zeroCount) + resultString[resultString.length - 1];\n}\n\nprint(resultString);"}, {"source_code": "var firstLine = readline().split(' ').map(function(v){return +v;});\n\nvar zeroCount = firstLine[0] - 1;\nvar oneCount = firstLine[1] - 1;\nvar xCount = firstLine[2] - 1;\n\nvar zero = \"0\";\nvar one = \"1\";\nvar param = false;\nvar resultString = one + zero;\n\nwhile(xCount > 0) {\n if (oneCount === 0 || zeroCount === 0) break;\n\n if (param) {\n param = !param;\n resultString = resultString + zero;\n zeroCount -= 1;\n } else {\n param = !param;\n resultString = resultString + one;\n oneCount -= 1;\n }\n\n xCount -= 1;\n}\n\nif (xCount > 0 && zeroCount > 0) {\n resultString = zero + resultString;\n zeroCount -= 1;\n}\n\nif (xCount > 0 && oneCount > 0) {\n resultString = resultString + one;\n oneCount -= 1;\n}\n\nresultString = one.repeat(oneCount) + resultString + zero.repeat(zeroCount);\n\nprint(resultString);"}, {"source_code": "\"use strict\";\n\nprint(\"1100\");"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n let [a, b, x] = is.nextArray().map(Number);\n console.log(a, b, x);\n const binaryString = new Int32Array(x + 1);\n\n for (let i = a > b ? 1 : 0; i < binaryString.length; i += 2)\n binaryString[i] = 1;\n\n let zeros = 0, ones = 0;\n binaryString.forEach((item) => {\n if (item)\n ones++;\n else\n zeros++;\n });\n\n a -= zeros;\n b -= ones;\n\n for (let i = 0; i < 2; i++) {\n if (binaryString[i] === 0) {\n for (let j = 0; j < a; j++)\n process.stdout.write('0');\n } else {\n for (let j = 0; j < b; j++)\n process.stdout.write('1');\n }\n process.stdout.write(String(binaryString[i]));\n }\n\n for (let i = 2; i < binaryString.length; i++)\n process.stdout.write(String(binaryString[i]));\n}\n\n/*\n * api stdin\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n');\n }\n\n nextLine() {\n return this.lines[this.index++];\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', input => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}], "src_uid": "ef4123b8f3f3b511fde8b79ea9a6b20c"} {"nl": {"description": "Santa Claus has n candies, he dreams to give them as gifts to children.What is the maximal number of children for whose he can give candies if Santa Claus want each kid should get distinct positive integer number of candies. Santa Class wants to give all n candies he has.", "input_spec": "The only line contains positive integer number n (1 ≤ n ≤ 1000) — number of candies Santa Claus has.", "output_spec": "Print to the first line integer number k — maximal number of kids which can get candies. Print to the second line k distinct integer numbers: number of candies for each of k kid. The sum of k printed numbers should be exactly n. If there are many solutions, print any of them.", "sample_inputs": ["5", "9", "2"], "sample_outputs": ["2\n2 3", "3\n3 5 1", "1\n2"], "notes": null}, "positive_code": [{"source_code": "var n = parseInt(readline());\nvar k = 0;\nvar num = [];\n\nwhile(n > k) {\n \n k++;\n n -= k;\n}\n\nfor(var i = 1; i < k; i++)\n num.push(i);\n \nnum.push(n + k); // push last element\n\nprint(k);\nprint(num.join(\" \"));"}, {"source_code": "/*\n The idea to solve this problem is: \n \n repeatedly increase k until n is exhausted, while push value of k to array. \n Add remainder of n to last element of array since it cannot be broken down \n anymore.\n*/\n\nvar n = parseInt(readline());\nvar k = 0;\nvar num = [];\n\nwhile(n > k) {\n \n k++;\n n-=k;\n num.push(k);\n}\n\nnum[num.length - 1] += n;\n \nprint(num.length);\nprint(num.join(\" \"));"}, {"source_code": "var input = Number(readline());\nvar quantity = Math.floor((Math.pow(1 + 4 * 2 * input, 0.5) - 1) / 2);\nvar sum = 0;\nvar numbers = [];\nfor (var i = 1; i < quantity; i++) {\n\tsum += i;\n\tnumbers.push(i);\n}\nnumbers.push(input - sum);\nprint(\"\" + quantity);\nprint(numbers.join(\" \"));"}, {"source_code": "function sa(n){\n var i =1;\n for (; ; i++) {\n if (n < i) return i - 1;\n else n -= i;\n }\n}\n \n var n = Number(readline());\n var res = sa(n)\n print(res);\n var r = \"\"\n var sum = 0;\n for(var i=0;i n - s - i) {\n res.push(n - s);\n k += 1;\n break;\n } else {\n res.push(i);\n s += i;\n k += 1;\n }\n }\n print(k);\n print(res.join(' '));\n}\n"}, {"source_code": "var input = readline();\nvar current = 1;\nvar sum = 0;\n\n\nrecurse();\n\nvar output = [];\n\nfor(var i = 1; i < current; i++){\n output.push(i);\n}\n\nif(sum > input){\n var diff = sum - input;\n output.splice(output.indexOf(diff), 1);\n}\n\nfunction recurse(){\n if(sum < input){\n sum = sum + current;\n current = current + 1; \n recurse();\n }\n}\n\nprint(output.length);\nprint(output.join(\" \"));"}], "negative_code": [{"source_code": "var n = parseInt(readline());\nvar i = 1;\nvar sum = 0;\nvar num = [];\n\nwhile((n - sum) > sum) {\n \n sum += i;\n num.push(i);\n i++;\n}\n\nif((n - sum) === num[num.length - 1])\n num[num.length - 1] += (n - sum);\nelse\n num.push(n - sum);\n\nprint(num.length);\nprint(num.join(\" \"));"}, {"source_code": "var n = parseInt(readline());\nvar i = 1;\nvar sum = 0;\nvar num = [];\n\nwhile((n - sum) > sum) {\n \n sum += i;\n num.push(i);\n i++;\n}\n\nif((n - sum) === num[num.length - 1])\n num[num.length - 1] += (n - sum);\nelse {\n \n if(n - sum > 0)\n num.push(n - sum);\n}\n \nprint(num.length);\nprint(num.join(\" \"));"}, {"source_code": "var input = Number(readline());\nprint(Math.floor((Math.pow(1 + 4 * 2 * input, 0.5) - 1) / 2).toString());"}, {"source_code": "var n = parseInt(readline());\nvar s = 1;\nvar res = [1];\nvar k = 1;\nfor(var i = 2; i < n; i ++ ) {\n if(i + 1 >= n - s - i) {\n res.push(n - s);\n k += 1;\n break;\n } else {\n res.push(i);\n s += i;\n k += 1;\n }\n}\n\nprint(k);\nprint(res.join(' '));\n"}, {"source_code": "var n = parseInt(readline());\nvar s = 0;\nvar res = [];\nvar k = 0;\nif(n === 1) {\n print(1);\n print(1);\n} else {\n for(var i = 1; i < n; i ++ ) {\n if(i + 1 >= n - s - i) {\n res.push(n - s);\n k += 1;\n break;\n } else {\n res.push(i);\n s += i;\n k += 1;\n }\n }\n \n print(k);\n print(res.join(' '));\n\n}\n"}], "src_uid": "356a7bcebbbd354c268cddbb5454d5fc"} {"nl": {"description": "It's New Year's Eve soon, so Ivan decided it's high time he started setting the table. Ivan has bought two cakes and cut them into pieces: the first cake has been cut into a pieces, and the second one — into b pieces.Ivan knows that there will be n people at the celebration (including himself), so Ivan has set n plates for the cakes. Now he is thinking about how to distribute the cakes between the plates. Ivan wants to do it in such a way that all following conditions are met: Each piece of each cake is put on some plate; Each plate contains at least one piece of cake; No plate contains pieces of both cakes. To make his guests happy, Ivan wants to distribute the cakes in such a way that the minimum number of pieces on the plate is maximized. Formally, Ivan wants to know the maximum possible number x such that he can distribute the cakes according to the aforementioned conditions, and each plate will contain at least x pieces of cake.Help Ivan to calculate this number x!", "input_spec": "The first line contains three integers n, a and b (1 ≤ a, b ≤ 100, 2 ≤ n ≤ a + b) — the number of plates, the number of pieces of the first cake, and the number of pieces of the second cake, respectively.", "output_spec": "Print the maximum possible number x such that Ivan can distribute the cake in such a way that each plate will contain at least x pieces of cake.", "sample_inputs": ["5 2 3", "4 7 10"], "sample_outputs": ["1", "3"], "notes": "NoteIn the first example there is only one way to distribute cakes to plates, all of them will have 1 cake on it.In the second example you can have two plates with 3 and 4 pieces of the first cake and two plates both with 5 pieces of the second cake. Minimal number of pieces is 3."}, "positive_code": [{"source_code": "function f(n, u, v) {\n var t = Math.trunc(u * n / (u + v));\n return Math.trunc(t ? v / (n - t) : u);\n}\n\nvar l = readline().split(' ').map(Number);\nvar x = f(l[0], l[1], l[2]), y = f(l[0], l[2], l[1]);\nprint(x > y ? x : y);\n"}, {"source_code": "var arr = readline().split(' ')\nvar max = -1;\n\nfor (var i = 1; i < arr[0]; i++) \n max = Math.max(max, Math.min(Math.trunc(arr[1]/i), Math.trunc(arr[2]/(arr[0]-i))));\n\nprint(max);"}, {"source_code": "const\n conditions = readline().split(' '),\n platesCount = +conditions[0],\n cakes_1 = +conditions[1],\n cakes_2 = +conditions[2];\n \nvar\n minCakes = Math.min(cakes_1, cakes_2),\n maxCakes = Math.max(cakes_1, cakes_2);\n minPieces = Math.ceil(maxCakes / Math.ceil(platesCount / 2)),\n plates = [];\n \nwhile (minPieces > cakes_1 || minPieces > cakes_2) {\n minPieces--;\n}\n\nfunction putCakes() {\n var \n plates = [],\n tmpMinCakes = minCakes,\n tmpMaxCakes = maxCakes;\n for (var i = 0; i < platesCount; i++) {\n if (tmpMaxCakes) {\n if (tmpMaxCakes >= minPieces) {\n plates.push(minPieces)\n tmpMaxCakes -= minPieces;\n if (Math.floor(tmpMaxCakes / minPieces) < 1) {\n plates[i] += tmpMaxCakes\n tmpMaxCakes = 0;\n }\n }\n } else {\n if (tmpMinCakes >= minPieces) {\n if (i === platesCount - 1) {\n plates.push(tmpMinCakes);\n } else {\n plates.push(minPieces)\n tmpMinCakes -= minPieces; \n }\n } else {\n plates.push(tmpMinCakes);\n }\n }\n }\n pieces = plates.reduce((a, b) => {return Math.min(a, b)})\n if (pieces < minPieces) {\n minPieces --;\n putCakes();\n } else {\n print(pieces)\n }\n}\n\nputCakes()"}, {"source_code": "function main() {\n var data = readline().split(\" \");\n var plates = data[0];\n var firstCake = data[1];\n var secondCake = data[2];\n\n var maxPieces = Math.floor((firstCake + secondCake) / plates);\n var smallCake = Math.min(firstCake, secondCake);\n maxPieces = maxPieces > smallCake ? smallCake : maxPieces;\n if (\n firstCake === 1 ||\n secondCake === 1 ||\n firstCake + secondCake < 2 * plates\n )\n maxPieces = 1;\n else {\n while (\n Math.floor(firstCake / maxPieces) + Math.floor(secondCake / maxPieces) <\n plates\n ) {\n maxPieces--;\n }\n }\n print(maxPieces);\n}\n\nmain();\n"}, {"source_code": "var inputData = readline().split(' ');\nvar n = parseInt(inputData[0]);\nvar a = parseInt(inputData[1]);\nvar b = parseInt(inputData[2]);\nvar result = 0;\nfor (var i = n - 1; i > 0; i--) {\n var maxResult;\n var maxA = Math.floor(a/(n-i));\n var maxB = Math.floor(b/i);\n maxResult = maxA < maxB ? maxA : maxB;\n if (result <= maxResult) {\n result = maxResult;\n } else {\n break;\n }\n}\nprint(result);"}, {"source_code": "const getMaxPiecesOnPlate = (N, a, b) => {\n var maxPieces = 0;\n\n for (var i = 1; i < N; i++) {\n maxPieces = Math.max(\n maxPieces,\n Math.min(Math.floor(a / i), Math.floor(b / (N - i)))\n );\n }\n\n return maxPieces;\n};\n\nconst main = () => {\n const input = readline()\n .split(\" \")\n .map((i) => Number(i));\n\n return getMaxPiecesOnPlate(input[0], input[1], input[2]);\n};\n\nprint(main());"}, {"source_code": "var data = readline();\nprint('\\n');\n\nvar platesCount = data.split(' ')[0];\nvar firstCaceParts = data.split(' ')[1];\nvar secondCakeParts = data.split(' ')[2];\n\nfunction getMax(n, a, b) {\n var count = 0;\n\n for (var i = 1; i < n; i++) {\n var current = Math.min(Math.floor(a / i), Math.floor(b / (n - i)));\n if (current > count) {\n count = current;\n }\n }\n\n return count;\n}\n\nprint(getMax(platesCount, firstCaceParts, secondCakeParts));"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nprint(tort(args[0], args[1], args[2]));\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n var curr = Math.min(Math.floor(x / i), Math.floor(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nprint(tort(firstLine.split(' ')[0], firstLine.split(' ')[1], firstLine.split(' ')[2]));\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n var curr = Math.min(Math.floor(x / i), Math.floor(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nprint(tort(...args));\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n var curr = Math.min(Math.floor(x / i), Math.floor(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "'use strict';\nvar incomingData = readline().split(' ');\nvar n = incomingData[0];\nvar a = incomingData[1];\nvar b = incomingData[2];\n\nfunction f(n, a, b) {\n var x = -1;\n for (var i = 1; i < n; i++) {\n var part_a = Math.trunc(a / i);\n var part_b = Math.trunc(b / (n-i));\n x = Math.max(x, Math.min(part_a, part_b));\n }\n print(x);\n}\n\nf(n, a, b);"}, {"source_code": "function tes(e){\n var t911b = e.split(' ');\n var sumPlate = t911b[0];\n var fCake = t911b[1];\n var sCake = t911b[2];\n var res = -1;\n for (var i = 1; i < sumPlate; i++) {\n var f = Math.trunc(fCake / i);\n var s = Math.trunc(sCake / (sumPlate-i));\n res = Math.max(res, Math.min(f, s));\n }\n print(res);\n}\ntes(readline());"}, {"source_code": "var inputData = readline().split(' ');//prompt(\"enter 3 argymentf\").split(' ').map(Number);\nvar bigestDigit = 0;\nvar tarelkiTortu = inputData[0], kyskiTorta1 = inputData[1], kyskiTorta2 = inputData[2]; \n\n\n for( var i = 1; i < tarelkiTortu; ++i){\n var calcTort1 = Math.trunc(kyskiTorta1/i);\n var calcTort2 = Math.trunc(kyskiTorta2/(tarelkiTortu - i));\n if(calcTort1 && calcTort2){\n var smallerDigit = Math.min(calcTort1, calcTort2);\n bigestDigit = Math.max(smallerDigit, bigestDigit);\n }\n}\n\nprint(bigestDigit);//alert(\"bigestDigit\");"}, {"source_code": "var inputData = readline().split(' ');//prompt(\"enter 3 argymentf\").split(' ');\nvar bigestDigit = 0;\nvar tarelkiTortu = inputData[0], kyskiTorta1 = inputData[1], kyskiTorta2 = inputData[2]; \n\n\n for( var i = 1; i < tarelkiTortu; ++i){\n var calcTort1 = Math.trunc(kyskiTorta1/i);\n var calcTort2 = Math.trunc(kyskiTorta2/(tarelkiTortu - i));\n if(calcTort1 && calcTort2){\n var smallerDigit = Math.min(calcTort1, calcTort2);\n bigestDigit = Math.max(smallerDigit, bigestDigit);\n }\n}\n\nprint(bigestDigit);//alert(\"bigestDigit\");"}, {"source_code": "var inputData = readline().split(' ').map(Number);//prompt(\"enter 3 argymentf\").split(' ').map(Number);\nvar bigestDigit = 0;\nvar tarelkiTortu = inputData[0], kyskiTorta1 = inputData[1], kyskiTorta2 = inputData[2]; \n\n\n for( var i = 1; i < tarelkiTortu; ++i){\n var calcTort1 = Math.trunc(kyskiTorta1/i);\n var calcTort2 = Math.trunc(kyskiTorta2/(tarelkiTortu - i));\n if(calcTort1 && calcTort2){\n var smallerDigit = Math.min(calcTort1, calcTort2);\n bigestDigit = Math.max(smallerDigit, bigestDigit);\n }\n}\n\nprint(bigestDigit);//alert(\"bigestDigit\");"}, {"source_code": "var inputData = readline().split(' ').map(Number);//prompt(\"enter 3 argymentf\").split(' ').map(Number);\nvar bigestDigit = -1;\nvar tarelkiTortu = inputData[0], kyskiTorta1 = inputData[1], kyskiTorta2 = inputData[2]; \n\n\n for( var i = 1; i < tarelkiTortu; ++i){\n var calcTort1 = Math.trunc(kyskiTorta1/i);\n var calcTort2 = Math.trunc(kyskiTorta2/(tarelkiTortu - i));\n if(calcTort1 && calcTort2){\n var smallerDigit = Math.min(calcTort1, calcTort2);\n bigestDigit = Math.max(smallerDigit, bigestDigit);\n }\n}\n\nprint(bigestDigit);//alert(\"bigestDigit\");"}, {"source_code": "_=readline().split(' ').map(Number)\nn=_[0],a=_[1],b=_[2]\nx=-1\nfor (var i=1;i y ? x : y);\n"}, {"source_code": "var arr = readline().split(' ')\nvar max = -1;\n\nfor (var i = 1; i < arr[0]; i++) max = Math.max(max, Math.min(arr[1]/i, arr[2]/(arr[0]-i)));\n\nprint(max);"}, {"source_code": "const\n conditions = readline().split(' '),\n platesCount = +conditions[0],\n cakes_1 = +conditions[1],\n cakes_2 = +conditions[2];\n\nvar \n plates = [],\n pieces = 0,\n minPieces = Math.floor((cakes_1 + cakes_2) / platesCount);\n\nwhile (minPieces > cakes_1 || minPieces > cakes_2) {\n minPieces--;\n}\n\nif (minPieces === 1) {\n print(minPieces);\n} else {\n var \n tmpCakes_1 = Math.min(cakes_1, cakes_2),\n tmpCakes_2 = Math.max(cakes_1, cakes_2);\n for (var i = 0; i < platesCount; i++) {\n if (tmpCakes_1) {\n if (tmpCakes_1 >= minPieces) {\n plates.push(minPieces)\n tmpCakes_1 -= minPieces;\n } else {\n plates.push(tmpCakes_1);\n tmpCakes_1 = 0;\n } \n } else {\n if (tmpCakes_2 >= minPieces) {\n if (i === platesCount - 1) {\n plates.push(tmpCakes_2);\n } else {\n plates.push(minPieces)\n tmpCakes_2 -= minPieces; \n }\n } else {\n plates.push(tmpCakes_2);\n }\n }\n }\n pieces = plates.reduce((a, b) => {return Math.min(a, b)})\n}\nprint(pieces)"}, {"source_code": "const\n conditions = readline().split(' '),\n platesCount = +conditions[0],\n cakes_1 = +conditions[1],\n cakes_2 = +conditions[2];\n\nvar \n plates = [],\n pieces = 0,\n minPieces = Math.floor((cakes_1 + cakes_2) / platesCount);\n\nwhile (minPieces > cakes_1 || minPieces > cakes_2) {\n minPieces--;\n}\n\nfunction putCakes() {\n var \n plates = [],\n tmpCakes_1 = Math.min(cakes_1, cakes_2),\n tmpCakes_2 = Math.max(cakes_1, cakes_2);\n for (var i = 0; i < platesCount; i++) {\n if (tmpCakes_1) {\n if (tmpCakes_1 >= minPieces) {\n plates.push(minPieces)\n tmpCakes_1 -= minPieces;\n } else {\n plates.push(tmpCakes_1);\n tmpCakes_1 = 0;\n } \n } else {\n if (tmpCakes_2 >= minPieces) {\n if (i === platesCount - 1) {\n plates.push(tmpCakes_2);\n } else {\n plates.push(minPieces)\n tmpCakes_2 -= minPieces; \n }\n } else {\n plates.push(tmpCakes_2);\n }\n }\n }\n pieces = plates.reduce((a, b) => {return Math.min(a, b)})\n if ((pieces + 1) < minPieces) {\n minPieces --;\n putCakes();\n } else {\n print(pieces)\n }\n}\n\nif (minPieces === 1) {\n print(minPieces);\n} else {\n putCakes();\n}\n"}, {"source_code": "const\n conditions = readline().split(' '),\n platesCount = +conditions[0],\n cakes_1 = +conditions[1],\n cakes_2 = +conditions[2];\n\nvar \n plates = [],\n pieces = 0,\n minPieces = Math.floor((cakes_1 + cakes_2) / platesCount);\n\nwhile (minPieces > cakes_1 || minPieces > cakes_2) {\n minPieces--;\n}\n\nfunction putCakes() {\n var \n plates = [],\n tmpCakes_1 = Math.min(cakes_1, cakes_2),\n tmpCakes_2 = Math.max(cakes_1, cakes_2);\n for (var i = 0; i < platesCount; i++) {\n if (tmpCakes_1) {\n if (tmpCakes_1 >= minPieces) {\n plates.push(minPieces)\n tmpCakes_1 -= minPieces;\n } else {\n plates.push(tmpCakes_1);\n tmpCakes_1 = 0;\n } \n } else {\n if (tmpCakes_2 >= minPieces) {\n if (i === platesCount - 1) {\n plates.push(tmpCakes_2);\n } else {\n plates.push(minPieces)\n tmpCakes_2 -= minPieces; \n }\n } else {\n plates.push(tmpCakes_2);\n }\n }\n }\n \n pieces = plates.reduce((a, b) => {return Math.min(a, b)})\n if (pieces < minPieces) {\n minPieces --;\n putCakes();\n } else {\n print(minPieces);\n }\n}\n\nif (minPieces === 1) {\n print(minPieces);\n} else {\n putCakes();\n \n}\n"}, {"source_code": "const\n conditions = readline().split(' '),\n platesCount = +conditions[0],\n cakes_1 = +conditions[1],\n cakes_2 = +conditions[2];\n\nvar \n plates = [],\n pieces = 0,\n minPieces = Math.floor((cakes_1 + cakes_2) / platesCount);\n\nwhile (minPieces > cakes_1 || minPieces > cakes_2) {\n minPieces--;\n}\n\nif (minPieces === 1) {\n print(minPieces);\n} else {\n var \n tmpCakes_1 = Math.min(cakes_1, cakes_2),\n tmpCakes_2 = Math.max(cakes_1, cakes_2);\n for (var i = 0; i < platesCount; i++) {\n if (tmpCakes_1) {\n if (tmpCakes_1 >= minPieces) {\n plates.push(minPieces)\n tmpCakes_1 -= minPieces;\n } else {\n plates.push(tmpCakes_1);\n tmpCakes_1 = 0;\n } \n } else {\n if (tmpCakes_2 >= minPieces) {\n if (i === platesCount - 1) {\n plates.push(tmpCakes_2);\n } else {\n plates.push(minPieces)\n tmpCakes_2 -= minPieces; \n }\n } else {\n plates.push(tmpCakes_2);\n }\n }\n }\n pieces = plates.reduce((a, b) => {return Math.min(a, b)})\n print(pieces)\n}\n"}, {"source_code": "function main() {\n var data = readline().split(\" \");\n var plates = data[0];\n var firstCake = data[1];\n var secondCake = data[2];\n\n var maxPieces = Math.floor((firstCake + secondCake) / plates);\n if (\n firstCake === 1 ||\n secondCake === 1 ||\n firstCake + secondCake < 2 * plates\n )\n maxPieces = 1;\n else {\n while (\n Math.floor(firstCake / maxPieces) + Math.floor(secondCake / maxPieces) <\n plates\n ) {\n maxPieces--;\n }\n }\n print(maxPieces);\n}\n\nmain();\n"}, {"source_code": "var inputData = readline().split(' ');\nvar guests = parseInt(inputData[0]);\nvar a = parseInt(inputData[1]);\nvar b = parseInt(inputData[2]);\nvar aPart = Math.round(guests / (a + b) * a);\nvar bPart = Math.round(guests / (a + b) * b);\n if (aPart < 1) {\n aPart++;\n bPart--;\n } else if (bPart < 1) {\n bPart++;\n aPart--;\n }\nif (a < b) {\n print(Math.floor(a / aPart));\n} else {\n print(Math.floor(b / bPart));\n}"}, {"source_code": "var inputData = readline().split(' ');\nvar guests = parseInt(inputData[0]);\nvar a = parseInt(inputData[1]);\nvar b = parseInt(inputData[2]);\nvar index = guests / (a + b);\nvar aPart = index * a;\nvar bPart = index * b;\nif (aPart < bPart) {\n aPart = Math.ceil(aPart);\n bPart = Math.floor(bPart);\n print(Math.floor(a / aPart));\n} else {\n bPart = Math.ceil(bPart);\n aPart = Math.floor(aPart);\n print(Math.floor(b / bPart));\n}"}, {"source_code": "var inputData = readline().split(' ');\nvar guests = parseInt(inputData[0]);\nvar a = parseInt(inputData[1]);\nvar b = parseInt(inputData[2]);\nvar aPart = Math.round(guests / (a + b) * a);\nvar bPart = Math.round(guests / (a + b) * b);\n if (aPart < 1) {\n aPart++;\n bPart--;\n } else if (bPart < 1) {\n bPart++;\n aPart--;\n }\nvar minAPart = Math.floor(a / aPart);\nvar minBPart = Math.floor(b / bPart);\nprint(minAPart < minBPart ? minAPart : minBPart);"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(tort(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n const curr = Math.min(Math.floor(x / i), Math.floor(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n\nfunction getRezult (plate, firstCake, secondCake) {\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.round(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n\n if (plateForFirst === plate && secondCake > 0) {\n --plateForFirst;\n ++plateForSecond;\n } else if (plateForSecond === plate && firstCake > 0) {\n ++plateForFirst;\n --plateForSecond; \n }\n\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForSecond);\n if (pathOfFirst < pathOfSecond) {\n return pathOfFirst;\n }\n return pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(tort(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n// console.log(tort(100, 100, 100));\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n const curr = Math.min(Math.round(x / i), Math.round(y / (k - i)));\n if (curr >= maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\n// print('\\n');\n\nvar args = firstLine.split(' ');\n\nprint(tort(...args));\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n const curr = Math.min(Math.floor(x / i), Math.floor(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n\nfunction getRezult (plate, firstCake, secondCake) {\n var rezult = 0;\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.round(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n\n if (plateForFirst === plate && secondCake > 0) {\n --plateForFirst;\n ++plateForSecond;\n } else if (plateForSecond === plate && firstCake > 0) {\n ++plateForFirst;\n --plateForSecond; \n }\n\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForSecond);\n if (pathOfFirst < pathOfSecond) {\n rezult = pathOfFirst;\n } else {\n rezult = pathOfSecond;\n }\n\n return rezult;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n\nfunction getRezult (plate, firstCake, secondCake) {\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.floor(plate * procentFirst / 100) === 0 ? 1 : Math.floor(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForSecond);\n\n if (pathOfFirst < pathOfSecond) {\n return pathOfFirst;\n }\n return pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], firstLine.split(' ')[2]))\n\n\n\nfunction getRezult (plate, firstCake, secondCake) {\n const allCake = firstCake + secondCake;\n const procentFirst = firstCake / allCake * 100 ;\n const plateForFirst = Math.round(plate * procentFirst / 100);\n const plateForSecond = plate - plateForFirst;\n const pathOfFirst = Math.floor(firstCake / plateForFirst);\n const pathOfSecond = Math.floor(secondCake / plateForFirst);\n\n return pathOfFirst < pathOfSecond ? pathOfFirst : pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.round(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForFirst);\n\n return pathOfFirst < pathOfSecond ? pathOfFirst : pathOfSecond;\n}"}, {"source_code": "\nconst firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n const allCake = firstCake + secondCake;\n const procentFirst = firstCake / allCake * 100 ;\n const plateForFirst = Math.round(plate * procentFirst / 100);\n const plateForSecond = plate - plateForFirst;\n const pathOfFirst = Math.floor(firstCake / plateForFirst);\n const pathOfSecond = Math.floor(secondCake / plateForFirst);\n if (pathOfFirst < pathOfSecond) {\n return pathOfFirst;\n }\n return pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(tort(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n// console.log(tort(100, 100, 100));\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n const curr = Math.min(Math.round(x / i), Math.round(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nconst firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n const allCake = firstCake + secondCake;\n const procentFirst = firstCake / allCake * 100 ;\n const plateForFirst = Math.round(plate * procentFirst / 100);\n const plateForSecond = plate - plateForFirst;\n const pathOfFirst = Math.floor(firstCake / plateForFirst);\n const pathOfSecond = Math.floor(secondCake / plateForFirst);\n\n return pathOfFirst < pathOfSecond ? pathOfFirst : pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n\nfunction getRezult (plate, firstCake, secondCake) {\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.round(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForSecond);\n\n if (pathOfFirst < pathOfSecond) {\n return pathOfFirst;\n }\n return pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n\nfunction getRezult (plate, firstCake, secondCake) {\n var rezult = 0;\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.round(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n\n if (plateForFirst === plate && secondCake > 0) {\n --plateForFirst;\n ++plateForSecond;\n } else if (plateForSecond === plate && firstCake > 0) {\n ++plateForFirst;\n --plateForSecond; \n }\n\n \n pathOfFirst = Math.floor(firstCake / plateForFirst);\n pathOfSecond = Math.floor(secondCake / plateForSecond);\n if (pathOfFirst < pathOfSecond) {\n rezult <= pathOfFirst ? pathOfFirst : rezult;;\n } else {\n rezult <= pathOfSecond ? pathOfSecond : rezult;;\n }\n\n --plateForFirst;\n ++plateForSecond;\n\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForSecond);\n if (pathOfFirst < pathOfSecond) {\n rezult <= pathOfFirst ? pathOfFirst : rezult;;\n } else {\n rezult <= pathOfSecond ? pathOfSecond : rezult;;\n }\n \n return rezult;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(tort(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n const curr = Math.min(Math.round(x / i), Math.round(y / (k - i)));\n if (curr >= maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n debugger;\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.floor(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForSecond);\n\n if (pathOfFirst < pathOfSecond) {\n return pathOfFirst;\n }\n return pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]);\n\nprint(tort(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n const curr = Math.min(Math.round(x / i), Math.round(y / (k - i)));\n if (curr >= maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n const allCake = firstCake + secondCake;\n const procentFirst = firstCake / allCake * 100 ;\n const plateForFirst = Math.round(plate * procentFirst / 100);\n const plateForSecond = plate - plateForFirst;\n const pathOfFirst = Math.floor(firstCake / plateForFirst);\n const pathOfSecond = Math.floor(secondCake / plateForFirst);\n\n return pathOfFirst < pathOfSecond ? pathOfFirst : pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.round(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForFirst);\n\n return pathOfFirst < pathOfSecond ? pathOfFirst : pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nvar args = firstLine.split(' ');\n\nprint(tort(args[0], args[111], args[2]));\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n var curr = Math.min(Math.floor(x / i), Math.floor(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(tort(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n const curr = Math.min(Math.floor(x / i), Math.floor(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n var allCake = firstCake + secondCake;\n var procentFirst = firstCake / allCake * 100 ;\n var plateForFirst = Math.round(plate * procentFirst / 100);\n var plateForSecond = plate - plateForFirst;\n var pathOfFirst = Math.floor(firstCake / plateForFirst);\n var pathOfSecond = Math.floor(secondCake / plateForFirst);\n\n if (pathOfFirst < pathOfSecond) {\n return pathOfFirst;\n }\n return pathOfSecond;\n}"}, {"source_code": "\nvar firstLine = readline();\nprint('\\n');\n\nprint(tort(+firstLine.split(' ')[0], +firstLine.split(' ')[1], +firstLine.split(' ')[2]))\n\n\nfunction tort(k, x, y) {\n var maxMin = 0;\n \n for (var i = 1; i < k; i++) {\n const curr = Math.min(Math.round(x / i), Math.round(y / (k - i)));\n if (curr > maxMin) {\n maxMin = curr;\n }\n }\n \n return maxMin;\n}\n\n"}, {"source_code": "\nconst firstLine = readline();\nprint('\\n');\n\nprint(getRezult(+firstLine.split(' ')[0], +firstLine.split(' ')[1], firstLine.split(' ')[2]))\n\nfunction getRezult (plate, firstCake, secondCake) {\n const allCake = firstCake + secondCake;\n const procentFirst = firstCake / allCake * 100 ;\n const plateForFirst = Math.round(plate * procentFirst / 100);\n const plateForSecond = plate - plateForFirst;\n const pathOfFirst = Math.floor(firstCake / plateForFirst);\n const pathOfSecond = Math.floor(secondCake / plateForFirst);\n\n if (pathOfFirst < pathOfSecond) {\n return 5;\n }\n return 20;\n}"}, {"source_code": "var inputData = readline().split(' ').map(Number);//prompt(\"enter 3 argymentf\").split(' ').map(Number);\nvar bigestDigit = -1;\nvar tarelkiTortu = inputData[0], kyskiTorta1 = inputData[1], kyskiTorta2 = inputData[2]; \n\n\n for( var i = 1; i < tarelkiTortu; ++i){\n var calcTort1 = Math.round(kyskiTorta1/i);\n var calcTort2 = Math.round(kyskiTorta2/(tarelkiTortu - i));\n if(calcTort1 && calcTort2){\n var smallerDigit = Math.min(calcTort1, calcTort2);\n bigestDigit = Math.max(smallerDigit, bigestDigit);\n }\n}\n\nprint(bigestDigit);//alert(\"bigestDigit\");"}, {"source_code": "var inputData = readline().split(' ').map(Number);//prompt(\"enter 3 argymentf\").split(' ').map(Number);\nvar bigestDigit = 0;\nvar tarelkiTortu = inputData[0], kyskiTorta1 = inputData[1], kyskiTorta2 = inputData[2]; \n\nfunction calculate(){\n for( var i = 1; i < tarelkiTortu; i++){\n var calcTort1 = Math.round(this.kyskiTorta1/i);\n var calcTort2 = Math.round(this.kyskiTorta2/(this.tarelkiTortu - i));\n if(calcTort1 && calcTort2){\n var smallerDigit = Math.min(calcTort1, calcTort2);\n this.bigestDigit = Math.max(smallerDigit, bigestDigit);\n }\n}\n}\nprint(bigestDigit);//alert(\"bigestDigit\");"}, {"source_code": "var inputData = readline().split(' ').map(Number);//prompt(\"enter 3 argymentf\").split(' ').map(Number);\nvar bigestDigit = 0;\nvar tarelkiTortu = inputData[0], kyskiTorta1 = inputData[1], kyskiTorta2 = inputData[2]; \n\n\n for( var i = 1; i < tarelkiTortu; ++i){\n var calcTort1 = Math.round(this.kyskiTorta1/i);\n var calcTort2 = Math.round(this.kyskiTorta2/(this.tarelkiTortu - i));\n if(calcTort1 && calcTort2){\n var smallerDigit = Math.min(calcTort1, calcTort2);\n this.bigestDigit = Math.max(smallerDigit, bigestDigit);\n }\n}\n\nprint(bigestDigit);//alert(\"bigestDigit\");"}, {"source_code": "var inputData = readline().split(' ').map(Number);//prompt(\"enter 3 argymentf\").split(' ').map(Number);\nvar bigestDigit = 0;\nvar tarelkiTortu = inputData[0], kyskiTorta1 = inputData[1], kyskiTorta2 = inputData[2]; \n\n\n for( var i = 1; i < tarelkiTortu; i++){\n var calcTort1 = Math.round(this.kyskiTorta1/i);\n var calcTort2 = Math.round(this.kyskiTorta2/(this.tarelkiTortu - i));\n if(calcTort1 && calcTort2){\n var smallerDigit = Math.min(calcTort1, calcTort2);\n this.bigestDigit = Math.max(smallerDigit, bigestDigit);\n }\n}\n\nprint(bigestDigit);//alert(\"bigestDigit\");"}, {"source_code": "_=readline().split(' ').map(Number)\nn=_[0],a=_[1],b=_[2]\nx=1000000000\nfor (var i=1;i>0;\n padString = String(padString || ' ');\n if (value.length > targetLength) {\n return value;\n }\n else {\n targetLength = targetLength-value.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength/padString.length);\n }\n return padString.slice(0,targetLength) +value;\n }\n}\n\nfunction main() {\n var n = +readline();\n var a = [];\n\n for(var i = 0; i < n; i++) {\n a.push(+readline());\n }\n\n var sum = a.reduce((sum,i) => sum +i, 0);\n\n if(sum % 360 === 0) {\n print('YES');\n return;\n }\n \n if(sum % 2 != 0) {\n print('NO');\n return;\n }\n\n var k = parseInt(padStart('', n , '1'), 2);\n for(var i = 1; i < k; i++) {\n var dv = padStart(i.toString(2), n, '0');\n s = a.reduce(function(res, item, index) {\n return res + (dv[index] == 1 ? '+': '-') + item;\n }, '');\n if(eval(s) % 360 === 0) {\n print ('YES');\n return;\n }\n }\n print('NO');\n}\nmain();"}, {"source_code": "var n = +readline();\n\nvar mas = [];\nvar i = 0;\n\nwhile(i < n) {\n\tmas[i] = +readline();\n\ti++;\n}\ni = 0;\nvar max = Math.pow(2, n);\nvar result = 'NO';\n\nwhile(i <= max) {\n\tvar rrr = summ(convert(i));\n\tif(rrr %360 === 0) {\n\t\tresult = 'YES';\n\t\tbreak;\n }\n\ti++;\n}\n\nprint(result);\n\nfunction convert(input) {\n\tvar s = input.toString(2);\n\twhile(n > s.length) { s = \"0\"+s; }\n\treturn s;\n}\n\n\nfunction summ(st) {\n\tvar x = 0;\n\tvar p = 0;\n\twhile(p < n) {\n\t\tx += (mas[p] * (+st[p] ? 1 : -1));\n\t\tp++;\n }\n\treturn x;\n}"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', (inputStdin) => {\n\tinputString += inputStdin;\n});\n\nprocess.stdin.on('end', (_) => {\n\tinputString = inputString.trim().split('\\n').map((string) => {\n\t\treturn string.trim();\n\t});\n\n\tmain();\n});\n\nfunction readline() {\n\treturn inputString[currentLine++];\n}\n\nfunction main() {\n\tlet n = +readline();\n\tlet a = [];\n\twhile (n--) {\n\t\tlet m = +readline();\n\t\ta.push(m);\n\t}\n\tlet flag = calc(a, 0);\n\tif (flag == 0) console.log('NO');\n\telse console.log('YES');\n}\n\ncalc = (a, sum) => {\n\tif (a.length == 0) {\n\t\tif (sum % 360 == 0) return 1;\n\t\telse return 0;\n\t} else {\n\t\treturn calc(a.slice(1), sum + a[0]) + calc(a.slice(1), sum - a[0]);\n\t}\n};\n"}, {"source_code": "let i = '';\nprocess.stdin.on('data', c => i += c);\nprocess.stdin.on('end', () => {\n const {EOL} = require('os');\n const lines = i.split(EOL) ;/*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length).filter(l => l).map(l => parseInt(l));\n\n if ((arr.reduce((a, v) => a + v, 0) % 360) === 0) {\n \tconsole.log(\"YES\");\n \treturn;\n }\n\n \tfunction subseqs(arr, k) {\n\t\t\tconst n = arr.length;\n\t\t\tconst res = [];\n\t\t\tlet j = 0;\n\n\t\t\tfor (let mask = 0; mask < (1 << n); mask++) {\n\t\t\t\tlet num = 0;\n\n\t\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\t\tif (mask & (1 << i)) {\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (num === k) {\n\t\t\t\t\tres[j] = [0, 0];\n\n\t\t\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\t\t\tif (mask & (1 << i)) {\n\t\t\t\t\t\t\tres[j][0] = (res[j][0] + arr[i]) % 360;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tres[j][1] = (res[j][1] + arr[i]) % 360;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn res;\n\t\t}\n\n\tfor (let i = 1; i < arr.length / 2 + 1; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n\n// const lines = `15\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168\n// 168`.split('\\n');\n//\n// const k = lines[0];\n// const arr = lines.slice(1, lines.length).filter(l => l).map(l => parseInt(l));\n//\n// if ((arr.reduce((a, v) => a + v, 0) % 360) === 0) {\n// \tconsole.log(\"YES\");\n// \tproccess.exit(0);\n// }\n//\n// function subseqs(arr, k) {\n// \tconst n = arr.length;\n// \tconst res = [];\n// \tlet j = 0;\n//\n// \tfor (let mask = 0; mask < (1 << n); mask++) {\n// \t\tlet num = 0;\n//\n// \t\tfor (let i = 0; i < n; i++) {\n// \t\t\tif (mask & (1 << i)) {\n// \t\t\t\tnum++;\n// \t\t\t}\n// \t\t}\n//\n// \t\tif (num === k) {\n// \t\t\tres[j] = [0, 0];\n//\n// \t\t\tfor (let i = 0; i < n; i++) {\n// \t\t\t\tif (mask & (1 << i)) {\n// \t\t\t\t\tres[j][0] = (res[j][0] + arr[i]) % 360;\n// \t\t\t\t} else {\n// \t\t\t\t\tres[j][1] = (res[j][1] + arr[i]) % 360;\n// \t\t\t\t}\n// \t\t\t}\n//\n// \t\t\tj++;\n// \t\t}\n// \t}\n//\n// \treturn res;\n// }\n//\n// for (let i = 1; i < arr.length; i++) {\n// \tfor (const ss of subseqs(arr, i)) {\n// \t\tif (ss[0] === ss[1]) {\n// \t\t\tconsole.log(\"YES\");\n// \t\t\tproccess.exit(0);\n// \t\t}\n// \t}\n// }\n//\n// console.log(\"NO\");\n//\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n});\n\nconst lines = [];\n\nreadline.on('line', (line) => {\n lines.push(Number(line));\n});\n\nconst processAngles = (n, angles) => {\n for (let i = 0; i < 2 ** (n - 1); i += 1) {\n const bitbask = i.toString(2).padStart(angles.length, '0');\n const rotation = angles.reduce((acc, angle, idx) => {\n if (bitbask[idx] === '0') {\n return acc + angle;\n }\n\n return acc - angle;\n }, 0);\n\n if (rotation % 360 === 0) {\n return 'YES';\n }\n }\n\n return 'NO';\n};\n\nreadline.on('close', () => {\n const [n, ...angles] = lines;\n\n console.log(processAngles(n, angles));\n});\n"}], "negative_code": [{"source_code": "function padStart(value,targetLength,padString) {\n targetLength = targetLength>>0;\n padString = String(padString || ' ');\n if (value.length > targetLength) {\n return value;\n }\n else {\n targetLength = targetLength-value.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength/padString.length);\n }\n return padString.slice(0,targetLength) +value;\n }\n}\n\nfunction main() {\n var n = +readline();\n var a = [];\n\n for(var i = 0; i < n; i++) {\n a.push(+readline());\n }\n\n var sum = a.reduce((sum,i) => sum +i, 0);\n\n if(sum % 360 === 0) {\n print('YES');\n return;\n }\n \n if(sum % 2 != 0) {\n print('NO');\n return;\n }\n\n var k = parseInt(padStart('', n , '1'), 2);\n for(var i = 1; i < k; i++) {\n var dv = padStart(i.toString(2), n, '0');\n s = a.reduce(function(res, item, index) {\n return res + (dv[index] == 1 ? '+': '-') + item;\n }, '');\n if(eval(s) === 0) {\n print ('YES');\n return;\n }\n }\n print('NO');\n}\nmain();"}, {"source_code": "var arr = [];\n\nvar n = +readline();\nvar i = 0;\nvar sum = 0;\n\nwhile(i < n) {\n\tarr[i] = +readline();\n\tsum += arr[i];\n\ti++;\n}\nif(sum == 360) {\n\tarr = sortt(arr);\n\n\twhile(n != 1) {\n\t\tarr[i-2] = arr[i-1] - arr[i-2];\n\t\tarr.pop();\n\t\tarr = sortt(arr);\n\t\tn = arr.length;\n\t}\n\n\tif(arr[0] === 0) { print('YES'); }\n\telse { print('NO'); }\n\n\tfunction sortt(arr) {\n\t\treturn arr.sort(function(a, b) { return a - b; });\n\t}\n} else {\n\tprint('YES');\n}"}, {"source_code": "var n = +readline();\n\nvar mas = [];\nvar i = 0;\n\nwhile(i < n) {\n\tmas[i] = +readline();\n\ti++;\n}\ni = 0;\nvar max = Math.pow(2, n);\nvar result = 'NO';\n\nwhile(i <= max) {\n\tvar rrr = summ(convert(i));\n\tif(rrr == 360 || rrr === 0) {\n\t\tresult = 'YES';\n\t\tbreak;\n }\n\ti++;\n}\n\nprint(result);\n\nfunction convert(input) {\n\tvar s = input.toString(2);\n\twhile(n > s.length) { s = \"0\"+s; }\n\treturn s;\n}\n\n\nfunction summ(st) {\n\tvar x = 0;\n\tvar p = 0;\n\twhile(p < n) {\n\t\tx += (mas[p] * (+st[p] ? 1 : -1));\n\t\tp++;\n }\n\treturn x;\n}"}, {"source_code": "var arr = [];\n\nvar n = +readline();\nvar i = 0;\nvar sum = 0;\n\nwhile(i < n) {\n\tarr[i] = +readline();\n\tsum += arr[i];\n\ti++;\n}\nif(sum != 360) {\n\tarr = sortt(arr);\n\n\twhile(n != 1) {\n\t\tarr[n-2] = arr[n-1] - arr[n-2];\n\t\tarr.pop();\n\t\tarr = sortt(arr);\n\t\tn = arr.length;\n\t}\n\n\tif(arr[0] === 0) { print('YES'); }\n\telse { print('NO'); }\n\n\tfunction sortt(ar) {\n\t\treturn ar.sort(function(a, b) { return a - b; });\n\t}\n} else {\n\tprint('YES');\n}"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1);\n\n console.log(arr);\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t subseqs(arr, i).map(ss => console.log(ss[0] == ss[1] ? \"YES\" : \"NO\"));\n\t}\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length - 1);\n\n console.log(arr);\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t subseqs(arr, i).map(ss => console.log(ss[0] == ss[1] ? \"YES\" : \"NO\"));\n\t}\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length).map(l => l).map(l => parseInt(l));\n\n if (arr.reduce((a, v) => a + v, 0) === 360) {\n \tconsole.log(\"YES\");\n \treturn;\n }\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length - 1).map(l => parseInt(l));\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1);\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t subseqs(arr, i).map(ss => console.log(ss[0] == ss[1] ? \"YES\" : \"NO\"));\n\t}\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length - 1).map(l => parseInt(l));\n\n console.log(arr);\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t subseqs(arr, i).map(ss => console.log(ss[0] == ss[1] ? \"YES\" : \"NO\"));\n\t}\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length).filter(l => l).map(l => parseInt(l));\n\n if (arr.reduce((a, v) => a + v, 0) === 360) {\n \tconsole.log(\"YES\");\n \treturn;\n }\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length / 2; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length - 1).map(l => parseInt(l));\n\n console.log(arr);\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length - 1).map(l => parseInt(l));\n\n if (arr.reduce((a, v) => a + v, 0) === 360) {\n \tconsole.log(\"YES\");\n \treturn;\n }\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n"}, {"source_code": "let i = '';\nprocess.stdin.on('data', c => i += c);\nprocess.stdin.on('end', () => {\n const {EOL} = require('os');\n const lines = i.split(EOL) ;/*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length).filter(l => l).map(l => parseInt(l));\n\n if (arr.reduce((a, v) => a + v, 0) === 360) {\n \tconsole.log(\"YES\");\n \treturn;\n }\n\n \tfunction subseqs(arr, k) {\n\t\t\tconst n = arr.length;\n\t\t\tconst res = [];\n\t\t\tlet j = 0;\n\n\t\t\tfor (let mask = 0; mask < (1 << n); mask++) {\n\t\t\t\tlet num = 0;\n\n\t\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\t\tif (mask & (1 << i)) {\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (num === k) {\n\t\t\t\t\tres[j] = [0, 0];\n\n\t\t\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\t\t\tif (mask & (1 << i)) {\n\t\t\t\t\t\t\tres[j][0] = (res[j][0] + arr[i]) % 360;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tres[j][1] = (res[j][1] + arr[i]) % 360;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn res;\n\t\t}\n\n\tfor (let i = 1; i < arr.length / 2 + 1; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length).filter(l => l).map(l => parseInt(l));\n\n if (arr.reduce((a, v) => a + v, 0) === 360) {\n \tconsole.log(\"YES\");\n \treturn;\n }\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length / 2 + 1; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n"}, {"source_code": "let i = ''\nprocess.stdin.on('data', c => i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n const k = lines[0];\n const arr = lines.slice(1, lines.length).filter(l => l).map(l => parseInt(l));\n\n if (arr.reduce((a, v) => a + v, 0) === 360) {\n \tconsole.log(\"YES\");\n \treturn;\n }\n\n \tfunction subseqs(arr, k) {\n\t const n = arr.length;\n\t const res = [];\n\t let j = 0;\n\n\t for (let mask = 0; mask < (1 << n); mask++) {\n\t let num = 0;\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t num++;\n\t }\n\t }\n\n\t if (num === k) {\n\t res[j] = [0, 0]\n\n\t for (let i = 0; i < n; i++) {\n\t if (mask & (1 << i)) {\n\t res[j][0] += arr[i]\n\t } else {\n\t res[j][1] += arr[i];\n\t }\n\t }\n\n\t j++;\n\t }\n\t }\n\n\t return res;\n\t}\n\n\tfor (let i = 1; i < arr.length; i++) {\n\t\tfor (const ss of subseqs(arr, i)) {\n\t\t\tif (ss[0] === ss[1]) {\n\t\t\t\tconsole.log(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(\"NO\");\n});\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n});\n\nconst lines = [];\n\nreadline.on('line', (line) => {\n lines.push(Number(line));\n});\n\nconst processAngles = (n, angles) => {\n for (let i = 0; i < 2 ** (n - 1); i += 1) {\n const bitbask = i.toString(2).padStart(angles.length, '0');\n const rotation = angles.reduce((acc, angle, idx) => {\n if (bitbask[idx] === '0') {\n return acc + angle;\n }\n\n return acc - angle;\n }, 0);\n\n if (rotation === 0 || rotation === 360) {\n return 'YES';\n }\n }\n\n return 'NO';\n};\n\nreadline.on('close', () => {\n const [n, ...angles] = lines;\n\n console.log(processAngles(n, angles));\n});\n"}], "src_uid": "01b50fcba4185ceb1eb8e4ba04a0cc10"} {"nl": {"description": "Vasya has a pile, that consists of some number of stones. $$$n$$$ times he either took one stone from the pile or added one stone to the pile. The pile was non-empty before each operation of taking one stone from the pile.You are given $$$n$$$ operations which Vasya has made. Find the minimal possible number of stones that can be in the pile after making these operations.", "input_spec": "The first line contains one positive integer $$$n$$$ — the number of operations, that have been made by Vasya ($$$1 \\leq n \\leq 100$$$). The next line contains the string $$$s$$$, consisting of $$$n$$$ symbols, equal to \"-\" (without quotes) or \"+\" (without quotes). If Vasya took the stone on $$$i$$$-th operation, $$$s_i$$$ is equal to \"-\" (without quotes), if added, $$$s_i$$$ is equal to \"+\" (without quotes).", "output_spec": "Print one integer — the minimal possible number of stones that can be in the pile after these $$$n$$$ operations.", "sample_inputs": ["3\n---", "4\n++++", "2\n-+", "5\n++-++"], "sample_outputs": ["0", "4", "1", "3"], "notes": "NoteIn the first test, if Vasya had $$$3$$$ stones in the pile at the beginning, after making operations the number of stones will be equal to $$$0$$$. It is impossible to have less number of piles, so the answer is $$$0$$$. Please notice, that the number of stones at the beginning can't be less, than $$$3$$$, because in this case, Vasya won't be able to take a stone on some operation (the pile will be empty).In the second test, if Vasya had $$$0$$$ stones in the pile at the beginning, after making operations the number of stones will be equal to $$$4$$$. It is impossible to have less number of piles because after making $$$4$$$ operations the number of stones in the pile increases on $$$4$$$ stones. So, the answer is $$$4$$$.In the third test, if Vasya had $$$1$$$ stone in the pile at the beginning, after making operations the number of stones will be equal to $$$1$$$. It can be proved, that it is impossible to have less number of stones after making the operations.In the fourth test, if Vasya had $$$0$$$ stones in the pile at the beginning, after making operations the number of stones will be equal to $$$3$$$."}, "positive_code": [{"source_code": "let [n, s] = require('fs')\n .readFileSync(0, 'ascii')\n .split('\\n')\n .filter(line => !/^\\s*$/.test(line));\n\nlet min = 0;\nlet sum = 0;\nfor (const c of s) {\n if (c == '+') {\n sum++;\n } else if (c == '-') {\n sum--;\n if (sum < min)\n min = sum;\n }\n}\n\nconsole.log(sum - min);\n"}, {"source_code": "var readline = require('readline');\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nvar STATE = 1;\nvar n;\nrl.on('line', function (input) {\n switch (STATE) {\n case 1:\n n = parseInt(input, 10);\n // console.log(STATE + ':', n);\n STATE = 2;\n break;\n case 2:\n // console.log(STATE + ':', input);\n var init = 0;\n var added = 0;\n for (var i = 0, len = input.length; i < len; i++) {\n var char = input[i];\n switch (char) {\n case '+':\n added++;\n break;\n case '-':\n if (added) {\n added--;\n } else {\n init++;\n }\n break; \n default:\n throw new Error('Error case');\n }\n }\n // console.log(init, added);\n console.log(added);\n STATE = 1;\n break;\n default:\n // code\n }\n}).on('close', function() {\n process.exit(0);\n});"}, {"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false,\n});\n\nlet c = 0;\n\nrl.on(\"line\", (str) => {\n if (c === 0) {\n c++;\n return;\n }\n\n let ans = 0;\n\n for (let i = 0; i < str.length; i++) {\n if (str[i] === \"+\") {\n ans++;\n } else {\n ans = Math.max(0, --ans);\n }\n }\n\n console.log(ans);\n c++;\n});\n"}, {"source_code": "var n=readline();\n//print(n);\nvar str=readline();\n//print(str);\nvar cnt=0,mn=0;\nfor(var i=0;i +item);\n }\n }\n\n var n = read.number();\n var s = readline();\n\n var res = 0;\n for(var i = 0; i < n; i++) {\n if(s[i] === '-'){\n res--;\n }\n else {\n res++;\n }\n \n if(res < 0) {\n res = 0;\n }\n }\n print(res);\n}());"}], "negative_code": [], "src_uid": "a593016e4992f695be7c7cd3c920d1ed"} {"nl": {"description": "In mathematics, the Pythagorean theorem — is a relation in Euclidean geometry among the three sides of a right-angled triangle. In terms of areas, it states: In any right-angled triangle, the area of the square whose side is the hypotenuse (the side opposite the right angle) is equal to the sum of the areas of the squares whose sides are the two legs (the two sides that meet at a right angle). The theorem can be written as an equation relating the lengths of the sides a, b and c, often called the Pythagorean equation:a2 + b2 = c2where c represents the length of the hypotenuse, and a and b represent the lengths of the other two sides. Given n, your task is to count how many right-angled triangles with side-lengths a, b and c that satisfied an inequality 1 ≤ a ≤ b ≤ c ≤ n.", "input_spec": "The only line contains one integer n (1 ≤ n ≤ 104) as we mentioned above.", "output_spec": "Print a single integer — the answer to the problem.", "sample_inputs": ["5", "74"], "sample_outputs": ["1", "35"], "notes": null}, "positive_code": [{"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n// utils\nconst MOD = 1e9 + 7;\nconst mod = (n) => ((n % MOD) + MOD) % MOD;\nconst add = (a, b) => mod(mod(a) + mod(b));\nconst sub = (a, b) => mod(mod(a) - mod(b));\nfunction mul() {\n for (var a = arguments, r = a[0], i = a.length; --i; )\n r = ((((r >> 16) * a[i]) % MOD) * 65536 + (r & 65535) * a[i]) % MOD;\n return r;\n}\nfunction inv(b) {\n for (var a = MOD, u = 0, v = 1, t; b; v = t)\n (t = (a / b) | 0), (a -= t * b), (u -= t * v), (t = a), (a = b), (b = t), (t = u), (u = v);\n u %= MOD;\n return u < 0 ? u + MOD : u;\n}\nfunction pow(base, n) {\n if (n === 0) return 1;\n let p = pow(base, Math.floor(n / 2));\n let res = mul(mod(p), mod(p));\n if (n % 2 === 1) res = mul(mod(res), base);\n return res;\n}\nfunction highestOneBit(i) {\n i |= i >> 1;\n i |= i >> 2;\n i |= i >> 4;\n i |= i >> 8;\n i |= i >> 16;\n return i - (i >>> 1);\n}\nfunction permutation(arr, len, store = \"\", permutations = []) {\n if (store.length === len) {\n permutations.push(store);\n return;\n }\n for (let i = 0; i < arr.length; i++) {\n const newArr = [...arr];\n const newChar = newArr.splice(i, 1);\n permutation(newArr, len, store.concat(newChar), permutations);\n }\n return permutations;\n}\n\nfunction main() {\n const n = +readLine();\n let count = 0;\n\n for (let i = n; i >= 1; i--) {\n let [left, right] = [1, i - 1];\n const target = i * i;\n while (left < right) {\n const sum = left * left + right * right;\n if (sum === target) {\n count++;\n left++;\n right--;\n } else if (sum < target) left++;\n else right--;\n }\n }\n console.log(count);\n}\n"}], "negative_code": [], "src_uid": "36a211f7814e77339eb81dc132e115e1"} {"nl": {"description": "You have two integers $$$l$$$ and $$$r$$$. Find an integer $$$x$$$ which satisfies the conditions below: $$$l \\le x \\le r$$$. All digits of $$$x$$$ are different. If there are multiple answers, print any of them.", "input_spec": "The first line contains two integers $$$l$$$ and $$$r$$$ ($$$1 \\le l \\le r \\le 10^{5}$$$).", "output_spec": "If an answer exists, print any of them. Otherwise, print $$$-1$$$.", "sample_inputs": ["121 130", "98766 100000"], "sample_outputs": ["123", "-1"], "notes": "NoteIn the first example, $$$123$$$ is one of the possible answers. However, $$$121$$$ can't be the answer, because there are multiple $$$1$$$s on different digits.In the second example, there is no valid answer."}, "positive_code": [{"source_code": "'use strict'\n\nconst lr = readline().split(' ').map(i => i.split('').map(Number));\n\nconst problem = (l, r) => {\n const test = x => (x => x >= +l.join('') && x <= +r.join('') && x)(parseInt(x));\n\n let res;\n if (l.length < r.length) {\n const Mid = Math.floor((l.length + r.length) / 2)\n if (res = test('98765'.slice(0, Mid))) return res;\n if (res = test('12345'.slice(0, Mid + 1))) return res;\n return -1;\n }\n\n const s = new Set([ 9,8,7,6,5,4,3,2,1,0 ]);\n const L = l.length;\n for(let i = 0; i < L; i++) {\n if (r[i] !== l[i]) {\n const a = l.slice(0, i).join('');\n for (let j = l[i]; j < r[i]; j++) {\n if (s.has(j) && (res = test(a + `${j}` + [ ...s ].filter(d => d !== j).slice(0, L - i - 1).join('')))) return res;\n }\n if (s.has(r[i]) && (res = test(a + `${r[i]}` + [ ...s ].filter(d => d !== r[i]).reverse().slice(0, L - i - 1).join('')))) return res;\n return -1;\n }\n if (!s.has(r[i])) return -1;\n s.delete(r[i]);\n }\n return l.join('')\n}\n\nwrite(problem(lr[0], lr[1]));"}, {"source_code": "'use strict'\nconst lr = readline().split(' ').map(Number);\n\nconst test = n => (n => (new Set(n)).size === n.length)(n.toString());\n\nconst problem = (l, r) => {\n while (!test(l) && ++l <= r);\n return l > r ? -1 : l;\n\n}\nwrite(problem(lr[0], lr[1]));"}, {"source_code": "(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i 0 && arguments[0] !== undefined ? arguments[0] : [];\n var directed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n _classCallCheck(this, Graph);\n\n this.directed = directed;\n this.nodes = nodes;\n this.edges = {};\n nodes.forEach(function (node) {\n _this.edges[node] = [];\n });\n }\n\n _createClass(Graph, [{\n key: 'addNode',\n value: function addNode(node) {\n // is it required ?\n if (this.edges[node]) {\n throw new Error('Graph.prototype.addNode: node is already exists');\n return;\n }\n\n this.nodes.push(node);\n this.edges[node] = [];\n }\n }, {\n key: 'addEdge',\n value: function addEdge(node1, node2) {\n var weight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n this.edges[node1].push({ node: node2, weight: weight });\n\n if (!this.directed) {\n this.edges[node2].push({ node: node1, weight: weight });\n }\n }\n }]);\n\n return Graph;\n}();\n\nmodule.exports = Graph;\n\n},{\"../queue\":4,\"../stack\":5}],2:[function(require,module,exports){\n\"use strict\";\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Node = function () {\n function Node(value) {\n _classCallCheck(this, Node);\n\n this.value = value;\n this.nextNode = null;\n this.prevNode = null;\n }\n\n _createClass(Node, [{\n key: \"getValue\",\n value: function getValue() {\n return this.value;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n this.value = value;\n }\n }, {\n key: \"setNext\",\n value: function setNext(nextNodeLink) {\n this.nextNode = nextNodeLink;\n }\n }, {\n key: \"setPrev\",\n value: function setPrev(prevNodeLink) {\n this.prevNode = prevNodeLink;\n }\n }, {\n key: \"getNext\",\n value: function getNext() {\n return this.nextNode;\n }\n }, {\n key: \"getPrev\",\n value: function getPrev() {\n return this.prevNode;\n }\n }]);\n\n return Node;\n}();\n\nmodule.exports = Node;\n\n},{}],3:[function(require,module,exports){\n'use strict';\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Node = require('../node');\n\nvar Queue = function () {\n function Queue() {\n _classCallCheck(this, Queue);\n\n this.firstItemLink = null;\n this.lastItemLink = null;\n }\n\n _createClass(Queue, [{\n key: 'enqueue',\n value: function enqueue(item, priority) {\n var node = new Node({\n item: item,\n priority: priority\n });\n\n if (this.isEmpty()) {\n this.lastItemLink = node;\n this.firstItemLink = node;\n } else {\n\n if (priority >= this.firstItemLink.getValue().priority) {\n // Вперед\n node.setNext(this.firstItemLink);\n this.firstItemLink = node;\n } else if (priority <= this.lastItemLink.getValue().priority) {\n // Назад\n this.lastItemLink.setNext(node);\n this.lastItemLink = node;\n } else {\n // В середину\n var currentNode = this.firstItemLink;\n while (currentNode) {\n var nextNode = currentNode.getNext();\n if (priority >= nextNode.getValue().priority) {\n currentNode.setNext(node);\n node.setNext(nextNode);\n currentNode = null;\n } else {\n currentNode = nextNode;\n }\n }\n }\n }\n }\n }, {\n key: 'dequeue',\n value: function dequeue() {\n if (this.isEmpty()) {\n return undefined;\n }\n\n if (this.lastItemLink === this.firstItemLink) {\n this.lastItemLink = null;\n }\n\n var firstItem = this.firstItemLink;\n\n this.firstItemLink = this.firstItemLink.getNext();\n\n return firstItem.getValue().item;\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n return !this.firstItemLink;\n }\n }]);\n\n return Queue;\n}();\n\nmodule.exports = Queue;\n\n},{\"../node\":2}],4:[function(require,module,exports){\n'use strict';\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Node = require('../node');\n\nvar Queue = function () {\n function Queue() {\n _classCallCheck(this, Queue);\n\n this.firstItemLink = null;\n this.lastItemLink = null;\n }\n\n _createClass(Queue, [{\n key: 'enqueue',\n value: function enqueue(item) {\n var node = new Node(item);\n\n if (this.isEmpty()) {\n this.lastItemLink = node;\n this.firstItemLink = node;\n } else {\n this.lastItemLink.setNext(node);\n this.lastItemLink = node;\n }\n\n return node;\n }\n }, {\n key: 'dequeue',\n value: function dequeue() {\n if (this.isEmpty()) {\n return undefined;\n }\n\n if (this.lastItemLink === this.firstItemLink) {\n this.lastItemLink = null;\n }\n\n var firstItem = this.firstItemLink;\n\n this.firstItemLink = this.firstItemLink.getNext();\n\n return firstItem.getValue();\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n return !this.firstItemLink;\n }\n }]);\n\n return Queue;\n}();\n\nmodule.exports = Queue;\n\n},{\"../node\":2}],5:[function(require,module,exports){\n'use strict';\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Node = require('../node');\n\nvar Stack = function () {\n function Stack() {\n _classCallCheck(this, Stack);\n\n this.topItemLink = null;\n }\n\n _createClass(Stack, [{\n key: 'push',\n value: function push(item) {\n var node = new Node(item);\n\n if (this.isEmpty()) {\n this.topItemLink = node;\n } else {\n node.setPrev(this.topItemLink);\n this.topItemLink = node;\n }\n\n return node;\n }\n }, {\n key: 'pop',\n value: function pop() {\n if (this.isEmpty()) {\n return undefined;\n }\n\n var topItemLink = this.topItemLink;\n\n this.topItemLink = this.topItemLink.getPrev();\n\n return topItemLink.getValue();\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n return !this.topItemLink;\n }\n }]);\n\n return Stack;\n}();\n\nmodule.exports = Stack;\n\n},{\"../node\":2}],6:[function(require,module,exports){\n'use strict';\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar Graph = require('../libs/graph');\nvar PriorityQueue = require('../libs/priority-queue');\n\nvar arr = readline().split(' ');\n\nvar _arr$map = arr.map(function (v) {\n return parseInt(v);\n}),\n _arr$map2 = _slicedToArray(_arr$map, 2),\n l = _arr$map2[0],\n r = _arr$map2[1];\n\nvar checker = function checker(num) {\n num = String(num);\n\n var data = {};\n var flag = true;\n for (var i = 0; i < num.length; i++) {\n if (data[num[i]]) {\n flag = false;\n break;\n }\n\n data[num[i]] = 1;\n }\n\n return flag;\n};\n\nvar ans = -1;\nfor (var i = l; i <= r; i++) {\n if (checker(i)) {\n ans = i;\n break;\n }\n}\n\nwrite(ans + '\\n');\n\n},{\"../libs/graph\":1,\"../libs/priority-queue\":3}]},{},[6]);\n"}, {"source_code": "//var input = readline()\n\nvar ar = readline().split(' ').map(x => parseInt(x));\nvar a = ar[0], b = ar[1];\n\nvar check = n => [...new Set(n)].join('') == n; // dublicate valiable check\n\nvar ok = 0, value = 0;\nfor(var i=a; i<=b; i++) {\n if(check(i.toString())) {\n ok = 1;\n value = i;\n break;\n }\n}\nprint(ok ? value : -1);\n\n\n"}, {"source_code": "process.stdin.resume()\nprocess.stdin.setEncoding('utf-8')\n\nvar arr = ''\nprocess.stdin.on('data', (i) => {\n arr += i\n})\n\n\nprocess.stdin.on('end', () => {\n arr = arr.split(' ')\n const l = parseInt(arr[0])\n const r = parseInt(arr[1])\n\n var a = false, num;\n for(let i = l; i <= r; i++){\n // console.log(i)\n a = c(i)\n if(a){\n num = i\n break\n }\n }\n if(!a) console.log(-1)\n else console.log(num)\n})\n\nfunction c(i) {\n const x = i.toString()\n var a = false\n var m = {}\n for(let j = 0, len = x.length; j < len; j++) {\n // console.log(j)\n if(j == len - 1 && !m[x[j]]) a = true\n if(!m[x[j]]) m[x[j]] = true\n else break\n }\n return a\n}"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error('\\n');\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr('time : ' + end + 'ms');\n myerr('memory : ' + Math.round(process.memoryUsage().heapTotal / 1024) + 'KB');\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var one = nextIntArray();\n var L = one[0];\n var R = one[1];\n for(var i = L; i <= R; i++){\n var s = myconv(i.toString(), 6);\n var used = new Set();\n for(var j = 0; j < s.length; j++){\n used.add(s[j]);\n }\n if(used.size == s.length){\n myout(i);\n return;\n }\n }\n myout(-1);\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n const [l, r] = d.split(' ').map(Number);\n let ans = -1;\n\n for (let i = l; i <= r; i++) {\n if (String(i).length === new Set(String(i)).size) {\n ans = i;\n break;\n }\n }\n\n console.log(ans);\n\n});\n"}, {"source_code": "\"use strict\";\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nfunction print(x) {\n console.log(x);\n}\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", inputStdin => {\n inputString += inputStdin;\n});\nprocess.stdin.on(\"end\", () => {\n inputString = inputString.split(\"\\n\");\n main();\n});\nfunction readline() {\n return inputString[currentLine++];\n}\n\n//-----------main fucntion-----------\n\nfunction main() {\n var input = readline().split(\" \").map(x => parseInt(x))\n var a = input[0], b = input[1]\n var regex = /([0-9]).*?\\1/\n var unique = true\n if (a > b) print(\"-1\")\n else {\n while (a != b + 1) {\n if (regex.test(a)) a++\n else {\n unique = false\n break\n }\n }\n if (unique) print('-1')\n else print(a)\n }\n}\n"}, {"source_code": "var readline = require(\"readline\");\nvar rl = readline.createInterface(process.stdin, process.stdout);\nrl.on(\"line\", function(line) {\n console.log(solution(line))\n rl.close();\n}).on(\"close\",function(){\n process.exit(0);\n});\n\nfunction solution(input){\n const check = n => [...new Set(n)].join('') == n;\n var [l, r] = input.split(' ');\n r = +r;\n l = +l;\n for (let i = l; i <= r; i++){\n if (check(i.toString()))\n return i;\n }\n return -1;\n}\n"}, {"source_code": "let data = '';\nprocess.stdin.on('data', c => data += c);\n\n\nconst sol = () => {\n\tlet [l, r] = data.split(' ').map(v => parseInt(v,10));\n\tlet result = -1;\n\tfor(let i = l ;i <= r;i++){\n\t\tif (check(i)) {\n\t\t\tresult = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tconsole.log(result);\n};\nconst check = (n) => {\n\tlet a = new Array(10);\n\ta.fill(0);\n\twhile(n > 0){\n\t\ta[n%10]++;\n\t\tn = Math.trunc(n/10);\n\t\t}\n\treturn Math.max(...a) === 1;\n\t}\nprocess.stdin.on('end', sol);"}], "negative_code": [{"source_code": "'use strict'\n\nconst lr = readline().split(' ').map(i => i.split('').map(Number));\n\n\nconst problem = (l, r) => {\n const test = x => (x => x >= +l.join('') && x <= +r.join('') && x)(parseInt(x));\n\n let res;\n if (l.length < r.length) {\n if (res = test('98765'.slice(0, l.length))) return res;\n if (res = test('12345'.slice(0, r.length))) return res;\n return -1;\n }\n\n const s = new Set([ 0,1,2,3,4,5,6,7,8,9 ]);\n const L = l.length;\n for(let i = 0; i < L; i++) {\n if (r[i] === l[i]) {\n if (!s.has(r[i])) return -1;\n s.delete(r[i]);\n }\n else {\n const a = l.slice(0, i).join('');\n for (let j = l[i]; j < r[i]; j++) {\n if (s.has(j) && (res = test(a + `${j}` + [ ...s ].filter(d => d !== j).reverse().slice(0, L - i - 1).join('')))) return res;\n }\n if (s.has(r[i]) && (res = test(a + `${r[i]}` + [ ...s ].filter(d => d !== r[i]).slice(0, L - i - 1).join('')))) return res;\n return -1;\n }\n\n }\n}\n\nwrite(problem(lr[0], lr[1]));"}, {"source_code": "'use strict'\n\nconst problem = (l, r) => {\n const test = x => (x => x >= +l.join('') && x <= +r.join('') && x)(parseInt(x));\n\n let res;\n if (l.length < r.length) {\n if (res = test('98765'.slice(0, l.length))) return res;\n if (res = test('12345'.slice(0, r.length))) return res;\n return -1;\n }\n\n const s = new Set([ 9,8,7,6,5,4,3,2,1,0 ]);\n const L = l.length;\n for(let i = 0; i < L; i++) {\n if (r[i] !== l[i]) {\n const a = l.slice(0, i).join('');\n for (let j = l[i]; j < r[i]; j++) {\n if (s.has(j) && (res = test(a + `${j}` + [ ...s ].filter(d => d !== j).slice(0, L - i - 1).join('')))) return res;\n }\n if (s.has(r[i]) && (res = test(a + `${r[i]}` + [ ...s ].filter(d => d !== r[i]).reverse().slice(0, L - i - 1).join('')))) return res;\n return -1;\n }\n if (!s.has(r[i])) return -1;\n s.delete(r[i]);\n }\n return l.join('')\n}\n\nconst lr = readline().split(' ').map(i => i.split('').map(Number));\nwrite(problem(lr[0], lr[1]));"}, {"source_code": "//var input = readline()\n\nvar ar = readline().split(' ');\nvar a = ar[0], b = ar[1];\n\nvar check = n => [...new Set(n)].join('') == n; // dublicate valiable check\n\nvar ok = 0, value = 0;\nfor(var i=a; i<=b; i++) {\n if(check(i.toString())) {\n ok = 1;\n value = i;\n break;\n }\n}\nprint(ok ? value : -1);\n\n\n"}, {"source_code": "\"use strict\";\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nfunction print(x) {\n console.log(x);\n}\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", inputStdin => {\n inputString += inputStdin;\n});\nprocess.stdin.on(\"end\", () => {\n inputString = inputString.split(\"\\n\");\n main();\n});\nfunction readline() {\n return inputString[currentLine++];\n}\n\n//-----------main fucntion-----------\n\nfunction main() {\n var input = readline().split(\" \").map(x => parseInt(x))\n var a = input[0], b = input[1]\n if (a > b) print(\"-1\")\n else print(a)\n\n}"}, {"source_code": "\"use strict\";\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nfunction print(x) {\n console.log(x);\n}\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", inputStdin => {\n inputString += inputStdin;\n});\nprocess.stdin.on(\"end\", () => {\n inputString = inputString.split(\"\\n\");\n main();\n});\nfunction readline() {\n return inputString[currentLine++];\n}\n\n//-----------main fucntion-----------\n\nfunction main() {\n var input = readline().split(\" \").map(x => parseInt(x))\n var a = input[0], b = input[1]\n var regex = /([0-9]).*?\\1/\n var unique = true\n if (a > b) print(\"-1\")\n else {\n var l = b - a\n while (l--) {\n if (regex.test(a)) a++\n else {\n unique = false\n break\n }\n }\n if (unique) print('-1')\n else print(a)\n }\n\n}"}, {"source_code": "var readline = require(\"readline\");\nvar rl = readline.createInterface(process.stdin, process.stdout);\nrl.on(\"line\", function(line) {\n console.log(solution(line))\n rl.close();\n}).on(\"close\",function(){\n process.exit(0);\n});\n\nfunction solution(input){\n const check = n => [...new Set(n)].join('') == n;\n var [l, r] = input.split(' ');\n r = +r;\n while (++l < r){\n if (check(l.toString()))\n return l;\n }\n return -1;\n}\n"}, {"source_code": "let data = '';\nprocess.stdin.on('data', c => data += c);\n\n\nconst sol = () => {\n\tlet [l, r] = data.split(' ').map(v => parseInt(v,10));\n\tlet result = -1;\n\tfor(let i = l + 1;i < r;i++){\n\t\tif (check(i)) {\n\t\t\tresult = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tconsole.log(result);\n};\nconst check = (n) => {\n\tlet a = new Array(10);\n\ta.fill(0);\n\twhile(n > 0){\n\t\ta[n%10]++;\n\t\tn = Math.trunc(n/10);\n\t\t}\n\treturn Math.max(...a) === 1;\n\t}\nprocess.stdin.on('end', sol);"}], "src_uid": "3041b1240e59341ad9ec9ac823e57dd7"} {"nl": {"description": "Several months later Alex finally got his brother Bob's creation by post. And now, in his turn, Alex wants to boast about something to his brother. He thought for a while, and came to the conclusion that he has no ready creations, and decided to write a program for rectangles detection. According to his plan, the program detects if the four given segments form a rectangle of a positive area and with sides parallel to coordinate axes. As Alex does badly at school and can't write this program by himself, he asks you to help him.", "input_spec": "The input data contain four lines. Each of these lines contains four integers x1, y1, x2, y2 ( - 109 ≤ x1, y1, x2, y2 ≤ 109) — coordinates of segment's beginning and end positions. The given segments can degenerate into points.", "output_spec": "Output the word «YES», if the given four segments form the required rectangle, otherwise output «NO».", "sample_inputs": ["1 1 6 1\n1 0 6 0\n6 0 6 1\n1 1 1 0", "0 0 0 3\n2 0 0 0\n2 2 2 0\n0 2 2 2"], "sample_outputs": ["YES", "NO"], "notes": null}, "positive_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar sides = [];\n\n\tfor (var i = 0; i < 4; i += 1) {\n\t\tvar integers = tokenizeIntegers(readline());\n\t\tsides.push( { x0: integers[0], y0: integers[1],\n\t\t\t\t\t x1: integers[2], y1: integers[3] } );\n\t}\n\n\tvar used = new Array(4);\n\n\tvar found = false;\n\n\tfunction go(attempt) {\n\t\tif (attempt.length == 4) {\n\t\t\tvar a = attempt[0], b = attempt[1], c = attempt[2], d = attempt[3];\n\t\t\tif (a.x0 == a.x1 && b.y0 == b.y1 && c.x0 == c.x1 && d.y0 == d.y1 &&\n\t\t\t\t\ta.y0 != a.y1 && b.x0 != b.x1 &&\n\t\t\t\t\tMath.max(a.y0, a.y1) == b.y0 &&\n\t\t\t\t\tMath.max(b.x0, b.x1) == c.x0 &&\n\t\t\t\t\tMath.min(c.y0, c.y1) == d.y0 &&\n\t\t\t\t\tMath.min(d.x0, d.x1) == a.x0) {\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (var i = 0; i < 4; i += 1) {\n\t\t\t\tif (used[i] === undefined) {\n\t\t\t\t\t\tused[i] = true;\n\t\t\t\t\t\tattempt.push(sides[i]);\n\t\t\t\t\t\tgo(attempt);\n\t\t\t\t\t\tattempt.pop();\n\t\t\t\t\t\tused[i] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tgo([]);\n\n\tprint(found ? \"YES\" : \"NO\");\n}\n\nmain();\n"}], "negative_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar sides = [];\n\n\tfor (var i = 0; i < 4; i += 1) {\n\t\tvar integers = tokenizeIntegers(readline());\n\t\tsides.push([ { x: integers[0], y: integers[1] },\n\t\t\t\t\t { x: integers[2], y: integers[3] } ]);\n\t}\n\n\tfunction makeCorner(a, b) {\n\t\tfor (var i = 0; i < 2; i += 1) {\n\t\t\tvar p = a[i], q = a[(i+1)%2];\n\t\t\tfor (var j = 0; j < 2; j += 1) {\n\t\t\t\tvar r = b[j], s = b[(j+1)%2];\n\t\t\t\tif (p.y == q.y && p.x != q.x &&\n\t\t\t\t\t\tq.x == r.x && q.y == r.y &&\n\t\t\t\t\t\tr.x == s.x && r.y != s.y) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (p.x == q.x && p.y != q.y &&\n\t\t\t\t\t\tq.x == r.x && q.y == r.y &&\n\t\t\t\t\t\tr.y == s.y && r.x != s.x) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//write(\"(\"+a[0].x+\", \"+a[0].y+\") (\"+a[1].x+\", \"+a[1].y+\")\");\n\t\t//print(\" -> (\"+b[0].x+\", \"+b[0].y+\") (\"+b[1].x+\", \"+b[1].y+\")\");\n\t\treturn false;\n\t}\n\n\tvar used = new Array(4);\n\tvar okay = false;\n\n\tfunction go(attempt) {\n\t\t//print(attempt.length);\n\t\tif (attempt.length == 4) {\n\t\t\tif (makeCorner(attempt[3], attempt[0])) {\n\t\t\t\tokay = true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (var i = 0; i < 4; i += 1) {\n\t\t\t\tif (used[i] === undefined) {\n\t\t\t\t\tif (attempt.length == 0 ||\n\t\t\t\t\t\t\tmakeCorner(attempt[attempt.length-1], sides[i])) {\n\t\t\t\t\t\tused[i] = true;\n\t\t\t\t\t\tattempt.push(sides[i]);\n\t\t\t\t\t\tgo(attempt);\n\t\t\t\t\t\tattempt.pop();\n\t\t\t\t\t\tused[i] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tgo([]);\n\tprint(okay ? \"YES\" : \"NO\");\n}\n\nmain();\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar sides = [];\n\n\tfor (var i = 0; i < 4; i += 1) {\n\t\tvar integers = tokenizeIntegers(readline());\n\t\tsides.push( { x0: integers[0], y0: integers[1],\n\t\t\t\t\t x1: integers[2], y1: integers[3] } );\n\t}\n\n\tvar used = new Array(4);\n\n\tvar found = false;\n\n\tfunction go(attempt) {\n\t\tif (attempt.length == 4) {\n\t\t\tvar a = attempt[0], b = attempt[1], c = attempt[2], d = attempt[3];\n\t\t\tif (a.x0 == a.x1 && b.y0 == b.y1 && c.x0 == c.x1 && d.y0 == d.y1 &&\n\t\t\t\t\tMath.max(a.y0, a.y1) == b.y0 &&\n\t\t\t\t\tMath.max(b.x0, b.x1) == c.x0 &&\n\t\t\t\t\tMath.min(c.y0, c.y1) == d.y0 &&\n\t\t\t\t\tMath.min(d.x0, d.x1) == a.x0) {\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (var i = 0; i < 4; i += 1) {\n\t\t\t\tif (used[i] === undefined) {\n\t\t\t\t\t\tused[i] = true;\n\t\t\t\t\t\tattempt.push(sides[i]);\n\t\t\t\t\t\tgo(attempt);\n\t\t\t\t\t\tattempt.pop();\n\t\t\t\t\t\tused[i] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tgo([]);\n\n\tprint(found ? \"YES\" : \"NO\");\n}\n\nmain();\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar points = [], pointCounts = {};\n\n\tfunction point2key(x, y) {\n\t\treturn [x, y].join(',');\n\t}\n\n\tfunction key2point(s) {\n\t\tvar xy = s.split(',');\n\t\treturn { x: xy[0], y: xy[1] };\n\t}\n\n\tfunction addPoint(x, y) {\n\t\tvar key = point2key(x, y);\n\t\tif (pointCounts[key] === undefined) {\n\t\t\tpoints.push(key);\n\t\t\tpointCounts[key] = 1;\n\t\t}\n\t\telse {\n\t\t\tpointCounts[key] += 1;\n\t\t}\n\t}\n\n\tfor (var i = 0; i < 4; i += 1) {\n\t\tvar integers = tokenizeIntegers(readline());\n\t\taddPoint(integers[0], integers[1]);\n\t\taddPoint(integers[2], integers[3]);\n\t}\n\n\tfor (var i = 0; i < points.length; i += 1) {\n\t\tif (pointCounts[points[i]] != 2) {\n\t\t\tprint(\"NO\");\n\t\t\treturn;\n\t\t}\n\t\tpoints[i] = key2point(points[i]);\n\t}\n\n\tvar invert = new Array(4);\n\tvar okay = false;\n\n\tfunction go(count) {\n\t\tif (count == 4) {\n\t\t\tvar a = points[invert[0]], b = points[invert[1]],\n\t\t\t\tc = points[invert[2]], d = points[invert[3]];\n\t\t\tif (a.x == b.x && a.y != b.y && c.x == d.x && c.y != d.y &&\n\t\t\t\t\ta.y == d.y && a.x != d.x && b.y == c.y && b.x != c.x) {\n\t\t\t\tokay = true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (var i = 0; i < 4; i += 1) {\n\t\t\t\tif (invert[i] === undefined) {\n\t\t\t\t\tinvert[i] = count;\n\t\t\t\t\tgo(count+1);\n\t\t\t\t\tinvert[i] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tgo(0);\n\tprint(okay ? \"YES\" : \"NO\");\n}\n\nmain();\n"}], "src_uid": "ad105c08f63e9761fe90f69630628027"} {"nl": {"description": "The preferred way to generate user login in Polygon is to concatenate a prefix of the user's first name and a prefix of their last name, in that order. Each prefix must be non-empty, and any of the prefixes can be the full name. Typically there are multiple possible logins for each person.You are given the first and the last name of a user. Return the alphabetically earliest login they can get (regardless of other potential Polygon users).As a reminder, a prefix of a string s is its substring which occurs at the beginning of s: \"a\", \"ab\", \"abc\" etc. are prefixes of string \"{abcdef}\" but \"b\" and 'bc\" are not. A string a is alphabetically earlier than a string b, if a is a prefix of b, or a and b coincide up to some position, and then a has a letter that is alphabetically earlier than the corresponding letter in b: \"a\" and \"ab\" are alphabetically earlier than \"ac\" but \"b\" and \"ba\" are alphabetically later than \"ac\".", "input_spec": "The input consists of a single line containing two space-separated strings: the first and the last names. Each character of each string is a lowercase English letter. The length of each string is between 1 and 10, inclusive. ", "output_spec": "Output a single string — alphabetically earliest possible login formed from these names. The output should be given in lowercase as well.", "sample_inputs": ["harry potter", "tom riddle"], "sample_outputs": ["hap", "tomr"], "notes": null}, "positive_code": [{"source_code": "kek=[]\ns=readline().split(' ')\na=s[0]\nb=s[1]\nfor (i=1;i<=a.length;i++)\n for (j=1;j<=b.length;j++)\n kek.push(a.substr(0,i)+b.substr(0,j))\nkek.sort()\nprint(kek[0])"}, {"source_code": "n=readline().split(' ');\ns=n[0][0];\nfor(i=1;i s.charCodeAt(0))\n\t.findIndex(e => e >= s[1].charCodeAt(0));\nif (i == -1) i = s[0].length;\nwrite(s[0].substr(0, i + 1) + s[1][0]);"}, {"source_code": "T=readline().split(' ')\nA=[]\nfor (var i=0;i {\n inputString += raw_data;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((line) => {\n return line.trim();\n });\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n/******** Main function*************/\n\nfunction main() {\n var str = readLine().split(\" \");\n var firstName = str[0];\n var lastName = str[1];\n\n var first = firstName[0];\n\n for (var i = 1; i < 10; i++) {\n if (firstName[i] < lastName[0]) {\n first += firstName[i];\n } else {\n break;\n }\n }\n console.log(first + lastName[0]);\n}\n"}], "negative_code": [{"source_code": "var fullname = readline();\nvar firstname = fullname.split(' ')[0];\nvar lastname = fullname.split(' ')[1];\n\nvar answer = firstname[0], flag = 0;\nfor(var i=1; i this.length) {\n this_len = this.length;\n }\n return this.substring(this_len - search.length, this_len) === search;\n };\n }\n if (!String.prototype.repeat) {\n String.prototype.repeat = function(count) {\n 'use strict';\n if (this == null) {\n throw new TypeError('can\\'t convert ' + this + ' to object');\n }\n var str = '' + this;\n count = +count;\n if (count != count) {\n count = 0;\n }\n if (count < 0) {\n throw new RangeError('repeat count must be non-negative');\n }\n if (count == Infinity) {\n throw new RangeError('repeat count must be less than infinity');\n }\n count = Math.floor(count);\n if (str.length == 0 || count == 0) {\n return '';\n }\n // Ensuring count is a 31-bit integer allows us to heavily optimize the\n // main part. But anyway, most current (August 2014) browsers can't handle\n // strings 1 << 28 chars or longer, so:\n if (str.length * count >= 1 << 28) {\n throw new RangeError('repeat count must not overflow maximum string size');\n }\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n while (count) {\n str += str;\n count--;\n }\n str += str.substring(0, maxCount - str.length);\n return str;\n }\n }\n}\n\nString.prototype.replaceAt=function(index, replacement) {\n return this.substr(0, index) + replacement+ this.substr(index + replacement.length);\n}\n\nFunction.prototype.repeat = function(times){\n for(let i = 0; i < times; i++){\n this();\n }\n}\n\nArray.prototype.getMaxConsecutiveSum = function(defaultValue = -Infinity){\n const N = this.length;\n let maxsum = defaultValue;\n let cursum = defaultValue;\n let cur;\n for(var ii = 0; ii < N; ii++){\n cur = this[ii];\n if(cursum + cur > 0){\n if(cur > cursum + cur){\n cursum = cur;\n } else cursum += cur;\n } else {\n cursum = cur;\n if(maxsum < cursum){\n maxsum = cursum;\n }\n }\n if(maxsum < cursum){\n maxsum = cursum;\n }\n }\n this.maxConsecutiveSum = maxsum;\n return maxsum;\n}\n\ntry {\n require('manakin').global;\n // require (\"babel-polyfill\");\n} catch (error) {\n\n}\ntry {\n process.argv.forEach(function (val, index, array) {\n if (val.startsWith(\"site\")) {\n switch (val.split(\"=\")[1]) {\n case \"test\":\n // console.log('change site to test')\n SITE = TEST;\n break;\n case \"cf-node\":\n // console.log('change site to cf')\n SITE = CODEFORCES_NODE;\n break;\n case \"cf\":\n // console.log('change site to cf')\n SITE = CODEFORCES_NODE;\n break;\n case \"cf-v8\":\n // console.log('change site to cf')\n SITE = CODEFORCES_V8;\n break;\n case \"bj\":\n // console.log('change site to bj')\n SITE = BEAKJOON;\n break;\n }\n }\n if (val.startsWith(\"debug\")) {\n switch (val.split(\"=\")[1]) {\n case \"true\":\n DEBUG = true;\n break;\n case \"false\":\n DEBUG = false;\n break;\n }\n }\n });\n} catch (error) {\n}\n\nlet inputFilePath = '';\nswitch(SITE){\n case TEST:\n const config = require('config');\n var fs = require(\"fs\");\n var path = require('path');\n inputFilePath = config.get('INPUTFILEPATH') || path.resolve(__dirname, \"input.txt\");\n break;\n default:\n inputFilePath = './input.txt';\n break;\n}\nconst INPUTFILEPATH = inputFilePath;\n\n// if (!String.prototype.endsWith) {\n// \tString.prototype.endsWith = function(search, this_len) {\n// \t\tif (this_len === undefined || this_len > this.length) {\n// \t\t\tthis_len = this.length;\n// \t\t}\n// \t\treturn this.substring(this_len - search.length, this_len) === search;\n// \t};\n// }\n// if (!Array.prototype.includes) {\n// Array.prototype.includes = function (target) {\n// return this.indexOf(target) !== -1\n// }\n// }\n\nconst newLine = '\\n';\nvar ans;\nvar inputText = \"\";\nvar lineCount = 0;\nvar lines;\nvar input;\nvar readline;\nvar getlines;\nvar lineOpen = false;\nvar readingLine = '';\n\nvar clockStart;\nvar clock;\n\nvar print;\nprint = console.log;\nvar it;\nvar step;\nfunction EnableLogging(){\n it = console.info;\n step = console.success;\n}\nfunction DisableLogging(){\n it = function it(params) {\n return 0;\n }\n step = it;\n}\nif (DEBUG) {\n EnableLogging();\n clock = function(start) {\n if ( !start ) return process.hrtime();\n var end = process.hrtime(start);\n return Math.round((end[0]*1000) + (end[1]/1000000));\n }\n} else {\n DisableLogging();\n}\n\n// prepares test data. to replace line input, assign arrays to lines variable.\nfunction prepareTestData() {\n // it(lines);\n\n // lines = ['custom line 1', 'custom line 2'];\n}\n\n// executes exactly once for both test and run. execution time will be included to elapsed time. \nconst prepareSolve = () => {\n \n}\n\nfunction power(x, y) { //분할 정복을 이용하여 x^y 구하기\n let ret = 1;\n while (y > 0) {\n if (y % 2) {\n ret *= x;\n ret %= P;\n }\n x *= x;\n x %= P;\n y /= 2;\n }\n return ret;\n}\n\nfunction createArray(lengths) {\n var arr = new Array(lengths || 0),\n i = lengths;\n if (arguments.length > 1) {\n var args = Array.prototype.slice.call(arguments, 1);\n while (i--) arr[lengths - 1 - i] = createArray.apply(this, args);\n }\n return arr;\n}\n\n// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ MAIN SOLVE FUNCTION ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\n\nfunction solve(){\n let [n, s] = readInts();\n\n var asdasd = 0;\n\n while(s > 0){\n // it(s, n, s%n, Math.floor(s/n), asdasd);\n asdasd = asdasd + Math.floor(s/n);\n s = s%n;\n n = n-1;\n }\n print(asdasd);\n}\n\n// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\n\nfunction resetRead(){\n lineCount = 0;\n}\n\nfunction checkMemoryUsage() {\n it(process.memoryUsage());\n}\n\nfunction readOne(separator=' ') {\n if(lineOpen && readingLine != null){\n // if(lineOpen){\n // it(readingLine);\n let splitPos = readingLine.search(separator)\n \n let ret = readingLine.slice(0, splitPos);\n if(splitPos == -1){\n // it('close');\n ret = readingLine;\n readingLine = '';\n lineOpen = false;\n }\n readingLine = readingLine.substr(splitPos + 1)\n // it(ret, readingLine, splitPos);\n return ret;\n } else {\n readingLine = readline();\n lineOpen = true;\n if(readingLine == null) return '';\n return readOne(separator);\n }\n}\n\nfunction readInts() {\n try {\n lineOpen = false;\n return readline()\n .split(\" \")\n .map(x => parseInt(x));\n } catch (error) {\n console.error(error);\n return null;\n }\n}\n\nswitch (SITE) {\n case TEST:\n var fs = require(\"fs\");\n var path = require('path');\n // input = fs.createReadStream(path.resolve(__dirname, \"input.txt\"), {\n // encoding: \"utf8\"\n // });\n input = fs.createReadStream(INPUTFILEPATH, {\n encoding: \"utf8\"\n });\n\n function inputListener(line) {\n console.log(line);\n if(line.startsWith('end')){\n console.log('end');\n closing();\n }\n if (!line) {\n closing();\n }\n lineCount++;\n inputText += line + \"\\r\\n\";\n }\n\n\n function readlines() {\n const readline = require(\"readline\");\n const rl = readline.createInterface({\n input,\n output: process.stdout,\n terminal: false\n });\n rl.on(\"line\", inputListener);\n rl.on('close', closing);\n }\n\n getlines = function* (inputText) {\n var lines = inputText.split(/\\r?\\n/);\n for (let line of lines) {\n yield line + newLine;\n }\n }\n\n readline = function () {\n return lines.next().value.trim();\n }\n\n readlines();\n\n break;\n\n case CODEFORCES_NODE:\n input = process.stdin;\n\n function inputListener(line) {\n if (!line) {\n closing();\n }\n lineCount++;\n inputText += line + \"\\r\\n\";\n }\n\n function readlines() {\n const readline = require(\"readline\");\n const rl = readline.createInterface({\n input,\n output: process.stdout,\n terminal: false\n });\n rl.on(\"line\", inputListener);\n rl.on('close', closing);\n }\n\n getlines = function* (inputText) {\n var lines = inputText.split(/\\r?\\n/);\n for (let line of lines) {\n yield line + newLine;\n }\n }\n\n readline = function () {\n return lines.next().value.trim();\n }\n\n readlines();\n\n break;\n case BEAKJOON:\n var fs = require('fs');\n if (DEBUG) {\n // input = fs.readFileSync('./input.txt').toString();\n inputText = fs.readFileSync(INPUTFILEPATH).toString();\n \n } else {\n inputText = fs.readFileSync('/dev/stdin').toString();\n }\n\n readline = function () {\n lineCount++;\n let line = lines[lineCount - 1];\n if (line)\n return lines[lineCount - 1].trim();\n else return null;\n }\n\n getlines = function (inputText) {\n lineCount = 0;\n return inputText.split(/\\r?\\n/);\n }\n\n // lines = getlines(input);\n closing();\n break;\n default:\n break;\n}\n\nfunction closing() {\n if(DEBUG){\n DisableLogging();\n const prepareClock = clock();\n lines = getlines(inputText);\n prepareSolve();\n const prepareClockElapsedTime = clock(prepareClock);\n EnableLogging();\n prepareTestData();\n solve();\n resetRead();\n console.warn('performance check');\n DisableLogging();\n clockStart = clock();\n // lines = getlines(inputText);\n solve();\n console.warn(`${clock(clockStart) + prepareClockElapsedTime} ms`);\n EnableLogging();\n process.exit();\n } else {\n lines = getlines(inputText);\n prepareSolve();\n solve();\n process.exit();\n }\n}"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n let [n, s] = d.split(' ').map(Number);\n let ans = 0;\n\n while (s / n > 0) {\n if (s >= n) {\n ans += Math.floor(s / n);\n s = s % n;\n }\n else {\n n = s;\n }\n }\n\n console.log(ans);\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nrl.on('line', (input) => {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let ct = 0\n let s = inp[1]\n for (let i = inp[0]; i >= 0 && s > 0; i--) {\n ct += Math.floor(s / i)\n s = s - i * Math.floor(s / i)\n }\n console.log(ct)\n return 0;\n});\n"}, {"source_code": "var l=readline().split(\" \");\nprint(Math.ceil(parseInt(l[1])/parseInt(l[0])));"}, {"source_code": "var notes = readline().split(' ').map(v=>+v);\n print(Math.ceil(notes[1] / notes[0]));"}, {"source_code": "var s = readline();\narr = s.split(' ');\narr = arr.map(function(v){return (Number(v))});\nvar n = arr[0];\nvar s = arr[1];\nvar a = parseInt(s / n);\nif (s % n !== 0){\n a += 1;\n}\nprint(a);"}, {"source_code": "solve();\n\n\n\nfunction solve() {\n var n, S, ans = 0;\n var input = readline().split(' ').map(Number);\n n = input[0];\n S = input[1];\n print(S % n ? Math.floor(S / n + 1) : S / n);\n}"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nrl.on('line', (input) => {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let ct = 0\n let s = inp[1]\n for (let i = inp[0]; i >= 0 && s > 0; i--) {\n ct += Math.floor(s / i)\n s = s - i * Math.floor(s / i)\n }\n console.log(ct)\n return 0;\n});\n"}], "negative_code": [{"source_code": "var s = readline();\narr = s.split(' ');\narr = arr.map(function(v){return (Number(v))});\nvar n = arr[0];\nvar s = arr[1];\nvar a = parseInt(s / n);\nprint(a + 1);"}], "src_uid": "04c067326ec897091c3dbcf4d134df96"} {"nl": {"description": "The Duck songFor simplicity, we'll assume that there are only three types of grapes: green grapes, purple grapes and black grapes.Andrew, Dmitry and Michal are all grapes' lovers, however their preferences of grapes are different. To make all of them happy, the following should happen: Andrew, Dmitry and Michal should eat at least $$$x$$$, $$$y$$$ and $$$z$$$ grapes, respectively. Andrew has an extreme affinity for green grapes, thus he will eat green grapes and green grapes only. On the other hand, Dmitry is not a fan of black grapes — any types of grapes except black would do for him. In other words, Dmitry can eat green and purple grapes. Michal has a common taste — he enjoys grapes in general and will be pleased with any types of grapes, as long as the quantity is sufficient.Knowing that his friends are so fond of grapes, Aki decided to host a grape party with them. He has prepared a box with $$$a$$$ green grapes, $$$b$$$ purple grapes and $$$c$$$ black grapes.However, Aki isn't sure if the box he prepared contains enough grapes to make everyone happy. Can you please find out whether it's possible to distribute grapes so that everyone is happy or Aki has to buy some more grapes?It is not required to distribute all the grapes, so it's possible that some of them will remain unused.", "input_spec": "The first line contains three integers $$$x$$$, $$$y$$$ and $$$z$$$ ($$$1 \\le x, y, z \\le 10^5$$$) — the number of grapes Andrew, Dmitry and Michal want to eat. The second line contains three integers $$$a$$$, $$$b$$$, $$$c$$$ ($$$1 \\le a, b, c \\le 10^5$$$) — the number of green, purple and black grapes in the box.", "output_spec": "If there is a grape distribution that allows everyone to be happy, print \"YES\", otherwise print \"NO\".", "sample_inputs": ["1 6 2\n4 3 3", "5 1 1\n4 3 2"], "sample_outputs": ["YES", "NO"], "notes": "NoteIn the first example, there is only one possible distribution:Andrew should take $$$1$$$ green grape, Dmitry should take $$$3$$$ remaining green grapes and $$$3$$$ purple grapes, and Michal will take $$$2$$$ out of $$$3$$$ available black grapes.In the second test, there is no possible distribution, since Andrew is not be able to eat enough green grapes. :("}, "positive_code": [{"source_code": "(function() {\n var read = {\n number: function() {\n return +readline();\n },\n arr: function(divider) {\n return readline().split(divider ? divider : '');\n },\n arrNumber: function(divider) {\n return readline()\n .split(divider ? divider : '')\n .map(item => +item);\n }\n }\n\n var n = read.arrNumber(' ');\n var a = read.arrNumber(' ');\n \n a[0] = a[0] - n[0];\n\n if(a[0] < 0) {\n print('NO');\n return;\n }\n\n a[1] = a[0] + a[1];\n a[1] = a[1] - n[1];\n \n if(a[1] < 0) {\n print('NO');\n return\n }\n\n a[2] = a[2] + a[1];\n a[2] = a[2] - n[2];\n\n if(a[2] < 0) {\n print('NO');\n return;\n }\n\n print('YES');\n\n}());"}, {"source_code": "var a = readline().split(' ')\nvar x = +a[0]\nvar y = +a[1]\nvar z = +a[2]\n\nvar zzz= readline().split(' ')\nvar a = +zzz[0]\nvar b = +zzz[1]\nvar c = +zzz[2]\n\nif(a>=x && a+b>=x+y && a+b+c>=x+y+z){\n\tprint(\"YES\")\n}\nelse{\n\tprint(\"NO\")\n}"}, {"source_code": "var d = readline().split(' ').map(x => parseInt(x));\nvar h = readline().split(' ').map(x => parseInt(x));\nif((d[0] > h[0]) || (d[1] > h[0]-d[0]+h[1]) || (d[2] > h[0]-d[0]+h[1]-d[1]+h[2]))\nprint('NO');\nelse\nprint('YES');"}, {"source_code": "//var input = readline()\n\nvar ar1 = readline().split(' ').map(Int => parseInt(Int))\nvar a = ar1[0], b = ar1[1], c = ar1[2]\n\nvar ar2 = readline().split(' ').map(Int => parseInt(Int))\nvar x = ar2[0], y = ar2[1], z = ar2[2]\n\nprint(a > x || a+b > x+y || a+b+c > x+y+z ? 'NO' : 'YES') \n\n\n//"}, {"source_code": "//var input = readline()\n\nvar ar1 = readline().split(' ').map(Int => parseInt(Int))\nvar a = ar1[0], b = ar1[1], c = ar1[2]\n\nvar ar2 = readline().split(' ').map(Int => parseInt(Int))\nvar x = ar2[0], y = ar2[1], z = ar2[2]\n\nif(a > x) print('NO')\nelse if(a+b > x+y) print('NO')\nelse print(a+b+c > x+y+z ? 'NO' : 'YES')\n\n//"}, {"source_code": "\tvar input1 = readline().split(\" \");\n\tvar andrew = +input1[0];\n\tvar dimter = +input1[1];\n\tvar micale = +input1[2];\n\tvar input2 = readline().split(\" \");\n\tvar green = +input2[0];\n\tvar purple = +input2[1];\n\tvar black = +input2[2];\n\n\nwhile(green>0){\nif((andrew-1)>-1){andrew-=1;green-=1;}else{break}\n}\n\n\n\nwhile((green>0)||(purple>0)){\nif((dimter-1)>-1){\n\t dimter-=1;\n\t\tif(green>0){green-=1}else{purple-=1}\n}else{break}\n}\n\n\n\nwhile((green>0)||(purple>0)||(black>0))\n{\n\nif((micale-1)>-1){micale-=1;\n\n\nif(green>0){green-=1}else{\t\n\t if(purple>0){purple-=1}else{black-=1}\n\t \t}\n\n\n }else{break}}\n\n\n\n\n\n\nif((andrew+dimter+micale)>0){print(\"NO\")}else{print(\"YES\")}"}, {"source_code": "function solve(x, y, z, a, b, c) {\n if (x > a || x + y > a + b || x + y + z > a + b + c) {\n return 1;\n } else {\n return 0;\n }\n}\n\nvar xyz = readline().split(\" \");\nvar abc = readline().split(\" \");\nvar x = +xyz[0];\nvar y = +xyz[1];\nvar z = +xyz[2];\nvar a = +abc[0];\nvar b = +abc[1];\nvar c = +abc[2];\n\nvar ans = solve(x, y, z, a, b, c);\nprint([\"YES\", \"NO\"][ans]);\n"}, {"source_code": "function solve(x, y, z, a, b, c) {\n if(a>=x && a+b>=x+y && a+b+c>=x+y+z){\n return 0;\n }else{\n \treturn 1;\n }\n}\n\nvar xyz = readline().split(' ');\nvar abc = readline().split(' ');\nvar x = +xyz[0];\nvar y = +xyz[1];\nvar z = +xyz[2];\nvar a = +abc[0];\nvar b = +abc[1];\nvar c = +abc[2];\n\nvar ans = solve(x, y, z, a, b, c);\nprint(['YES', 'NO'][ans]);\n"}, {"source_code": "function test() {\n assert(task(['1 6 2', '4 3 3']), 'YES');\n assert(task(['5 1 1', '4 3 2']), 'NO');\n}\n\nfunction task([l1, l2]) {\n const [a, d, m] = l1.split(' ').map(Number);\n let [g, p, b] = l2.split(' ').map(Number);\n\n if (a > g) {\n return 'NO';\n }\n\n g -= a;\n\n let gp = g + p;\n\n if (d > gp) {\n return 'NO';\n }\n\n gp -= d;\n\n if (m > gp + b) {\n return 'NO';\n }\n\n return 'YES';\n}\n\nfunction assert(result, expectation, unordered) {\n if (unordered) {\n result = result.split(' ');\n expectation = expectation.split(' ');\n\n if (result.sort().join(' ') !== expectation.sort().join(' ')) {\n console.error(`${result}: ${expectation}`);\n }\n } else if (result !== expectation) {\n console.error(`${result}: ${expectation}`);\n }\n}\n\nfunction run() {\n // codeforces uses windows. Really??!\n if (process.platform === 'win32') {\n const readline = require('readline');\n const rl = readline.createInterface({ input: process.stdin });\n\n const input = [];\n\n rl.on('line', (line) => input.push(line));\n rl.on('close', () => console.log(task(input)));\n } else {\n test();\n }\n}\n\nrun();\n"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error('\\n↑入力 ↓出力');\n Main();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var one = nextIntArray();\n var x = one[0];\n var y = one[1];\n var z = one[2];\n one = nextIntArray();\n var a = one[0];\n var c = one[1];\n var b = one[2];\n if(a < x){\n myout(\"NO\");\n return;\n }\n a -= x;\n if(a + c < y){\n myout(\"NO\");\n return;\n }\n var ac = a + c;\n ac -= y;\n if(ac + b < z){\n myout(\"NO\");\n return;\n }else{\n myout(\"YES\");\n return;\n }\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet count = 0;\nlet friends = [];\nlet grapes = [];\n\nrl.on('line', (d) => {\n if (count === 0) {\n friends = d.split(' ').map(Number);\n }\n else {\n grapes = d.split(' ').map(Number);\n }\n\n count++;\n});\n\nrl.on('close', () => {\n let ans = 'YES';\n\n let [x, y, z] = friends;\n let [a, b, c] = grapes;\n\n a -= x;\n\n if (a < 0) {\n ans = 'NO';\n }\n\n let temp = (a + b) - y;\n\n if (temp < 0) {\n ans = 'NO';\n }\n\n temp += c;\n\n if (temp - z < 0) {\n ans = 'NO';\n }\n\n\n console.log(ans);\n});\n"}, {"source_code": "function printAnswer([l1, l2]) {\n const [x, y, z] = l1.split(' ').map(Number);\n const [a, b, c] = l2.split(' ').map(Number);\n const ans = solve(x, y, z, a, b, c);\n console.log(['YES', 'NO'][ans]);\n}\n\nfunction solve(x, y, z, a, b, c) {\n if (x > a || x + y > a + b || x + y + z > a + b + c) {\n return 1;\n } else {\n return 0;\n }\n}\n\nconst readline = require('readline');\nconst rl = readline.createInterface({ input: process.stdin });\nconst input = [];\nrl.on('line', (line) => input.push(line));\nrl.on('close', () => printAnswer(input));\n"}], "negative_code": [{"source_code": "(function() {\n var read = {\n number: function() {\n return +readline();\n },\n arr: function(divider) {\n return readline().split(divider ? divider : '');\n },\n arrNumber: function(divider) {\n return readline()\n .split(divider ? divider : '')\n .map(item => +item);\n }\n }\n\n var n = read.arrNumber(' ');\n var a = read.arrNumber(' ');\n \n a[0] = a[0] - n[0];\n\n if(a[0] < 0) {\n print('NO');\n return;\n }\n\n a[1] = a[0] + a[1];\n\n a[1] = a[1] - n[1];\n \n if(a[1] < 0) {\n print('NO');\n }\n\n a[2] = a[2] + a[1];\n a[2] = a[2] - n[2];\n\n if(n[2] < 0) {\n print('NO');\n return;\n }\n\n print('YES');\n\n}());"}, {"source_code": "(function() {\n var read = {\n number: function() {\n return +readline();\n },\n arr: function(divider) {\n return readline().split(divider ? divider : '');\n },\n arrNumber: function(divider) {\n return readline()\n .split(divider ? divider : '')\n .map(item => +item);\n }\n }\n\n var n = read.arrNumber(' ');\n var a = read.arrNumber(' ');\n \n a[0] = a[0] - n[0];\n\n if(a[0] < 0) {\n print('NO');\n return;\n }\n\n a[1] = a[0] + a[1];\n a[1] = a[1] - n[1];\n \n if(a[1] < 0) {\n print('NO');\n }\n\n a[2] = a[2] + a[1];\n a[2] = a[2] - n[2];\n\n if(a[2] < 0) {\n print('NO');\n return;\n }\n\n print('YES');\n\n}());"}, {"source_code": "\tvar input1 = readline(\" \").split(\" \");\n\tvar andrew = +input1[0];var dimter = +input1[1];var micale = +input1[2];\n\tvar input2 = readline(\" \").split(\" \");var green = +input2[0];var purple = +input2[1];var black = +input2[2];\n\n\nfor(var i=1;i<=green;i++){\n\tif((andrew-i)>-1){andrew-=i}else{break}\n}\n\n\nwhile((green>0)||(purple>0)){\nif((dimter-1)>-1){\n\t dimter-=1;\n\t\tif(green>0){green-=1}else{purple-=1}\n}else{break}\n}\n\n\n\nwhile((green>0)||(purple>0)||(black>0)){\nif((micale-1)>-1){\n\tmicale-=1;\n\tif(green>0){green-=1}else if(purple>0){purple-=1}else{black-=1}\n\n}else{break}\n}\n\n\n\n\nif((andrew+dimter+micale)>0){print(\"NO\")}else{print(\"YES\")}"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error('\\n↑入力 ↓出力');\n Main();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var one = nextIntArray();\n var x = one[0];\n var y = one[1];\n var z = one[2];\n one = nextIntArray();\n var a = one[0];\n var b = one[1];\n var c = one[2];\n if(a < x){\n myout(\"NO\");\n return;\n }\n a -= x;\n if(a + c < y){\n myout(\"NO\");\n return;\n }\n var ac = a + c;\n ac -= y;\n if(ac + b < z){\n myout(\"NO\");\n return;\n }else{\n myout(\"YES\");\n return;\n }\n}\n"}], "src_uid": "d54201591f7284da5e9ce18984439f4e"} {"nl": {"description": "Kostya likes Codeforces contests very much. However, he is very disappointed that his solutions are frequently hacked. That's why he decided to obfuscate (intentionally make less readable) his code before upcoming contest.To obfuscate the code, Kostya first looks at the first variable name used in his program and replaces all its occurrences with a single symbol a, then he looks at the second variable name that has not been replaced yet, and replaces all its occurrences with b, and so on. Kostya is well-mannered, so he doesn't use any one-letter names before obfuscation. Moreover, there are at most 26 unique identifiers in his programs.You are given a list of identifiers of some program with removed spaces and line breaks. Check if this program can be a result of Kostya's obfuscation.", "input_spec": "In the only line of input there is a string S of lowercase English letters (1 ≤ |S| ≤ 500) — the identifiers of a program with removed whitespace characters.", "output_spec": "If this program can be a result of Kostya's obfuscation, print \"YES\" (without quotes), otherwise print \"NO\".", "sample_inputs": ["abacaba", "jinotega"], "sample_outputs": ["YES", "NO"], "notes": "NoteIn the first sample case, one possible list of identifiers would be \"number string number character number string number\". Here how Kostya would obfuscate the program: replace all occurences of number with a, the result would be \"a string a character a string a\", replace all occurences of string with b, the result would be \"a b a character a b a\", replace all occurences of character with c, the result would be \"a b a c a b a\", all identifiers have been replaced, thus the obfuscation is finished."}, "positive_code": [{"source_code": "function nextChar(c) {\n return String.fromCharCode(\n c.charCodeAt(0) + 1\n )\n}\n\nvar str = readline(),\n done = false\n\nfor (var i = 'a' ; str.length && i <= 'z' && !done; i = nextChar(i)) { //console.log(str, i)\n if (str[0] === i) str = str.split(i).join('')\n else done = true\n}\n\nprint(done ? 'NO' : 'YES')\n"}, {"source_code": "var s = readline().trim()\nvar t = [];\nvar d = {}\nvar abc = 'abcdefghijklmnopqrstuvwxyz';\nfor (var i in s.split('')) {\n var c = s[i];\n if (!d[c]) {\n t.push(c);\n d[c] = true;\n }\n}\n//t.sort()\n//print(t.join(''))\nvar len = t.length;\nvar abc2 = abc.slice(0, len)\nprint (t.join('') === abc2 ? 'YES' : 'NO')"}], "negative_code": [{"source_code": "var s = readline().trim()\nvar t = [];\nvar d = {}\nvar abc = 'abcdefghijklmnopqrstuvwxyz';\nfor (var i in s.split('')) {\n var c = s[i];\n if (!d[c]) {\n t.push(c);\n d[c] = true;\n }\n}\nt.sort()\n//print(t.join(''))\nvar len = t.length;\nvar abc2 = abc.slice(0, len)\nprint (t.join('') === abc2 ? 'YES' : 'NO')"}, {"source_code": "var s = readline().trim()\nvar t = [];\nvar d = {}\nvar abc = 'abcdefghijklmnopqrstuvwxyz';\nfor (var i in s.split('')) {\n var c = s[i];\n if (!d[c]) {\n t.push(c);\n d[c] = true;\n }\n}\nt.sort()\nprint(t.join(''))\nvar len = t.length;\nvar abc2 = abc.slice(0, len)\nprint (t.join('') === abc2 ? 'YES' : 'NO')"}], "src_uid": "c4551f66a781b174f95865fa254ca972"} {"nl": {"description": "Memory is now interested in the de-evolution of objects, specifically triangles. He starts with an equilateral triangle of side length x, and he wishes to perform operations to obtain an equilateral triangle of side length y.In a single second, he can modify the length of a single side of the current triangle such that it remains a non-degenerate triangle (triangle of positive area). At any moment of time, the length of each side should be integer.What is the minimum number of seconds required for Memory to obtain the equilateral triangle of side length y?", "input_spec": "The first and only line contains two integers x and y (3 ≤ y < x ≤ 100 000) — the starting and ending equilateral triangle side lengths respectively.", "output_spec": "Print a single integer — the minimum number of seconds required for Memory to obtain the equilateral triangle of side length y if he starts with the equilateral triangle of side length x.", "sample_inputs": ["6 3", "8 5", "22 4"], "sample_outputs": ["4", "3", "6"], "notes": "NoteIn the first sample test, Memory starts with an equilateral triangle of side length 6 and wants one of side length 3. Denote a triangle with sides a, b, and c as (a, b, c). Then, Memory can do .In the second sample test, Memory can do .In the third sample test, Memory can do: ."}, "positive_code": [{"source_code": "var triangles = readline().split(' '),\n\ta = parseInt(triangles[0]),\n\tb = parseInt(triangles[1]),\n\tbottomUp = [b, b, b],\n\tstep = 0,\n\ti = 0,\n\tj = 0,\n\tk = 0;\n\t\nwhile(bottomUp[0] < a || bottomUp[1] < a || bottomUp[2] < a) {\n\tfor (i = 0; i < 3; i++) {\n\t\tj = (i + 1) % 3;\n\t\tk = (i + 2) % 3;\n\t\tbottomUp[i] = Math.min(a, bottomUp[j] + bottomUp[k] - 1);\n\t\tstep++;\n\t\tif (Math.abs(a - bottomUp[j]) < bottomUp[k] && bottomUp[k] < a + bottomUp[j]) {\n\t\t\tbottomUp[i] = a;\n\t\t\tif (bottomUp[j] < a) {\n\t\t\t\tbottomUp[j] = a;\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tif (bottomUp[k] < a) {\n\t\t\t\tbottomUp[k] = a;\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\nprint(step);"}], "negative_code": [], "src_uid": "8edf64f5838b19f9a8b19a14977f5615"} {"nl": {"description": "You have probably registered on Internet sites many times. And each time you should enter your invented password. Usually the registration form automatically checks the password's crypt resistance. If the user's password isn't complex enough, a message is displayed. Today your task is to implement such an automatic check.Web-developers of the company Q assume that a password is complex enough, if it meets all of the following conditions: the password length is at least 5 characters; the password contains at least one large English letter; the password contains at least one small English letter; the password contains at least one digit. You are given a password. Please implement the automatic check of its complexity for company Q.", "input_spec": "The first line contains a non-empty sequence of characters (at most 100 characters). Each character is either a large English letter, or a small English letter, or a digit, or one of characters: \"!\", \"?\", \".\", \",\", \"_\".", "output_spec": "If the password is complex enough, print message \"Correct\" (without the quotes), otherwise print message \"Too weak\" (without the quotes).", "sample_inputs": ["abacaba", "X12345", "CONTEST_is_STARTED!!11"], "sample_outputs": ["Too weak", "Too weak", "Correct"], "notes": null}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (str) => {\n if (str.length >= 5 && /[a-z]/.test(str) && /[A-Z]/.test(str) && /[0-9]/.test(str)) {\n console.log('Correct');\n }\n else {\n console.log('Too weak');\n }\n});\n"}, {"source_code": "print(function(s) {\n if (s.length >= 5 && /[A-Z]/.test(s) && /[a-z]/.test(s) &&/[0-9]/.test(s))\n return 'Correct';\n return 'Too weak';\n}(readline()));"}, {"source_code": "var password = readline().trim();\nvar pas = new Array();\n\nfor (var i = 0; i <= 3; i++) {\n pas[i] = 0;\n}\n\nif (password.length >= 5) {\n pas[0] = 1;\n}\n\nfor (var i = 0; i < password.length; i++) {\n if (password.charCodeAt(i) >= 65 && password.charCodeAt(i) <= 90) {\n pas[1] = 1;\n }\n if (password.charCodeAt(i) >= 97 && password.charCodeAt(i) <= 122) {\n pas[2] = 1;\n }\n if (password.charCodeAt(i) >= 48 && password.charCodeAt(i) <= 57) {\n pas[3] = 1;\n }\n if (password[i] == '!' || password[i] == '?' || password[i] == '_' || password[i] == '.' || password[i] == ',') {\n pas[4] = 1;\n }\n}\n\nvar sol = 1;\n\nfor (var i = 0; i <= 3; i++) {\n if (pas[i] == 0) {\n sol = 0;\n }\n}\n\nif (sol == 1) {\n print('Correct\\n');\n} else {\n print('Too weak\\n');\n}"}, {"source_code": "var textline = readline();\nvar hasDigit = false;\nvar hasLowChar = false;\nvar hasHightChar = false;\nfor (var i=0; i= 5 && (hasDigit === true) && hasLowChar === true && hasHightChar === true)\n{\nprint(\"Correct\");\n}\nelse\n{\nprint(\"Too weak\");\n}"}, {"source_code": "x=readline()\nif(x.search(/[a-z]/)>=0 && x.search(/[A-Z]/)>=0 && x.search(/[0-9]/)>=0 && x.length >= 5)\n print('Correct')\nelse\n print('Too weak')\n"}, {"source_code": "var line = readline();\nvar R = line.length > 4 && /[a-z]/.test(line) && /[A-Z]/.test(line) && /[0-9]/.test(line);\nprint (R ? \"Correct\" : \"Too weak\")"}, {"source_code": "function main() {\n\n var arr = readline();\n\n var n = arr.length;\n\n var upper = false;\n var lower = false;\n var digital = false;\n\n if (n < 5) {\n print(\"Too weak\");\n } else {\n for (var i = 0; i < n; i++) {\n if (arr[i].search(/[!?.,_]/i) ===0) {\n continue;\n }\n\n if (arr[i] >= \"0\" && arr[i] <= \"9\") {\n digital = true;\n } else {\n if (arr[i] === arr[i].toUpperCase()) {\n upper = true;\n } else if (arr[i] === arr[i].toLowerCase()) {\n lower = true;\n }\n }\n if (upper && lower && digital) {\n print(\"Correct\");\n break;\n }\n }\n if (!(upper && lower && digital)) {\n print(\"Too weak\");\n }\n }\n}\n\nmain();"}, {"source_code": "var line = readline()\nif (line.match(/.{5,}/) && line.match(/[a-z]/) && line.match(/[0-9]/) && line.match(/[A-Z]/))\n print(\"Correct\")\nelse\n print(\"Too weak\")\n"}, {"source_code": "function main()\n{\n var pass = readline();\n if ( pass.length < 5 )\n {\n print(\"Too weak\");\n return;\n }\n var flag1 = true, flag2 = true, flag3 = true;\n for ( i in pass )\n {\n if ( /[A-Z]/.test(pass[i]) )\n flag1 = false;\n if ( /[a-z]/.test(pass[i]) )\n flag2 = false;\n if ( /[0-9]/.test(pass[i]) )\n flag3 = false;\n }\n if ( flag1 || flag2 || flag3 )\n {\n print(\"Too weak\");\n return;\n }\n print(\"Correct\");\n}\n\nmain();\n"}, {"source_code": "function main()\n{\n var pass = readline();\n if ( pass.length < 5 )\n {\n print(\"Too weak\");\n return;\n }\n var flag1 = true, flag2 = true, flag3 = true;\n for ( i in pass )\n {\n if ( /[A-Z]/.test(pass[i]) )\n {\n flag1 = false;\n }\n if ( /[a-z]/.test(pass[i]) )\n {\n flag2 = false;\n }\n if ( /[0-9]/.test(pass[i]) )\n {\n flag3 = false;\n }\n }\n if ( flag1 || flag2 || flag3 )\n {\n print(\"Too weak\");\n return;\n }\n print(\"Correct\");\n}\n\nmain();\n"}, {"source_code": "function main()\n{\n var pass = readline();\n if ( pass.length < 5 )\n {\n print(\"Too weak\");\n return;\n }\n var flag1 = true,\n flag2 = true,\n flag3 = true;\n for ( i in pass )\n {\n if ( /[A-Z]/.test(pass[i]) )\n {\n flag1 = false;\n }\n if ( /[a-z]/.test(pass[i]) )\n {\n flag2 = false;\n }\n if ( /[0-9]/.test(pass[i]) )\n {\n flag3 = false;\n }\n }\n if ( flag1 || flag2 || flag3 )\n {\n print(\"Too weak\");\n return;\n }\n print(\"Correct\");\n}\n\nmain();\n"}, {"source_code": "function main(){\n var pass = readline();\n if ( pass.length < 5 ){\n print(\"Too weak\");\n return;\n }\n var flag1 = true,\n flag2 = true,\n flag3 = true;\n for ( i in pass ){\n if ( /[A-Z]/.test(pass[i]) ){\n flag1 = false;\n }\n if ( /[a-z]/.test(pass[i]) ){\n flag2 = false;\n }\n if ( /[0-9]/.test(pass[i]) ){\n flag3 = false;\n }\n }\n if ( flag1 || flag2 || flag3 ){\n print(\"Too weak\");\n return;\n }\n print(\"Correct\");\n}\n\nmain();\n"}, {"source_code": "x=readline()\nif(x.search(/[a-z]/)>=0 && x.search(/[A-Z]/)>=0 && x.search(/[0-9]/)>=0 && x.length >= 5)\n print('Correct')\nelse\n print('Too weak')"}], "negative_code": [{"source_code": "function main() {\n\n var arr = readline();\n\n var n = arr.length;\n\n var upper = false;\n var lower = false;\n var digital = false;\n\n if (n < 5) {\n print(\"Too weak\");\n } else {\n for (var i = 0; i < n; i++) {\n if (arr[i].search(/[!?.,_]/i) ===0) {\n continue;\n }\n\n if (arr[i] >= \"0\" && arr[i] <= \"9\") {\n digital = true;\n } else {\n if (arr[i] === arr[i].toUpperCase()) {\n upper = true;\n } else if (arr[i] === arr[i].toLowerCase()) {\n lower = true;\n }\n }\n if (upper && lower && digital) {\n print(\"Correct\");\n break;\n }\n }\n\n }\n\n if (!(upper && lower && digital)) {\n print(\"Too weak\");\n }\n\n\n}\n\nmain();"}], "src_uid": "42a964b01e269491975965860ec92be7"} {"nl": {"description": "Vasya works as a watchman in the gallery. Unfortunately, one of the most expensive paintings was stolen while he was on duty. He doesn't want to be fired, so he has to quickly restore the painting. He remembers some facts about it. The painting is a square 3 × 3, each cell contains a single integer from 1 to n, and different cells may contain either different or equal integers. The sum of integers in each of four squares 2 × 2 is equal to the sum of integers in the top left square 2 × 2. Four elements a, b, c and d are known and are located as shown on the picture below. Help Vasya find out the number of distinct squares the satisfy all the conditions above. Note, that this number may be equal to 0, meaning Vasya remembers something wrong.Two squares are considered to be different, if there exists a cell that contains two different integers in different squares.", "input_spec": "The first line of the input contains five integers n, a, b, c and d (1 ≤ n ≤ 100 000, 1 ≤ a, b, c, d ≤ n) — maximum possible value of an integer in the cell and four integers that Vasya remembers.", "output_spec": "Print one integer — the number of distinct valid squares.", "sample_inputs": ["2 1 1 1 2", "3 3 1 2 3"], "sample_outputs": ["2", "6"], "notes": "NoteBelow are all the possible paintings for the first sample. In the second sample, only paintings displayed below satisfy all the rules. "}, "positive_code": [{"source_code": "(function () {\n\tvar line = readline().split(' ');\n\tvar n = parseInt(line[0]),\n\ta = parseInt(line[1]);\n\tb = parseInt(line[2]),\n\tc = parseInt(line[3]),\n\td = parseInt(line[4]);\n\tfunction check(v) {\n\t\treturn (v<=n&&v>0);\n\t}\n\tvar sum0 = a+b,\n\tsum1 = a+c,\n\tsum2 = b+d,\n\tsum3 = d+c;\n\tvar ans = 0;\n\tfor(var i=1;i<=n;++i) {\n\t\tif(check(sum0-sum1+i)&&check(sum0-sum2+i)&&check(sum0-sum3+i)) {\n\t\t\tans+=n;\n\t\t}\n\t}\n\tprint(ans);\n})();"}, {"source_code": "var s = readline();\nvar arr = s.split(' ');\nvar n = parseInt(arr[0]);\nvar a = parseInt(arr[1]);\nvar b = parseInt(arr[2]);\nvar c = parseInt(arr[3]);\nvar d = parseInt(arr[4]);\n\nvar count = 0;\n\n\n var i = 1;\n var k = a + b + i;\n for (var j = 1; j <= n; j++) {\n var p = k + j;\n var ac = p - a - c - i;\n var cd = p - c - d - i;\n var bd = p - b - d - i;\n if (ac > 0 && ac <=n && cd > 0 && cd <= n && bd > 0 && bd <= n) count++;\n }\n\n\nprint(count * n);"}, {"source_code": "var input = readline().split(' ').map(Number);\n\nvar n = input[0];\nvar a = input[1];\nvar b = input[2];\nvar c = input[3];\nvar d = input[4];\n\nvar TR = 1;\n\nvar TL = 0;\nvar BL = 0;\nvar BR = 0;\n\nvar count = 0;\n\nwhile (TR <= n) {\n\tTL = c - b + TR;\n\tBL = a + c - b - d + TR;\n\tBR = a - d + TR;\n\tif ((TL > 0 && TL <= n) && (BL > 0 && BL <= n) && (BR > 0 && BR <= n)) {\n\t\tcount += 1;\n\t}\n\tTR ++;\n}\n\nvar answer = n * count;\n\nprint(answer);"}, {"source_code": "var input = readline().split(' ').map(n => parseInt(n))\nvar n = input[0];\nvar a = input[1];\nvar b = input[2];\nvar c = input[3];\nvar d = input[4];\n\nvar x1 = 0;\nvar x2 = x1 + b - c;\n// x3 can be any number with [1, n] range.\nvar x4 = x1 + a - d;\nvar x5 = x1 + a + b - c - d;\n// Imagine x1, x2, x4, x5 on a line.\nvar points = [x1, x2, x4, x5];\nvar validRangeLength = Math.max(...points) - Math.min(...points);\nvar totalCombinations = 0;\nif (validRangeLength <= n) {\n totalCombinations = (n - validRangeLength)*n;\n}\nprint(totalCombinations);"}], "negative_code": [{"source_code": "var s = readline();\nvar arr = s.split(' ');\nvar n = parseInt(arr[0]);\nvar a = parseInt(arr[1]);\nvar b = parseInt(arr[2]);\nvar c = parseInt(arr[3]);\nvar d = parseInt(arr[4]);\n\nvar count = 0;\n\n\nfor (var i = 1; i <= n; i++) {\n var k = a + b + i;\n for (var j = 1; j <= n; j++) {\n var p = k + j;\n var ac = p - a - c - i;\n var ad = p - a - d - i;\n var cd = p - c - d - i;\n var bd = p - b - d - i;\n if (ac > 0 && ac <=n && ad > 0 && ad <=n && cd > 0 && cd <= n && bd > 0 && bd <= n) count++;\n }\n}\n\nprint(count);"}, {"source_code": "var input = readline().split(' ').map(Number);\n\nvar n = input[0];\nvar a = input[1];\nvar b = input[2];\nvar c = input[3];\nvar d = input[4];\n\nvar TR = 1;\n\nvar TL = 0;\nvar BL = 0;\nvar BR = 0;\n\nvar count = 0;\n\nwhile (TR <= n) {\n\tTL = c - b + TR;\n\tBL = a + c - b - d + TR;\n\tBR = a - d + TR;\n\tif ((TL > 0 && TL <= n) && (BL > 0 && BL <= n) && (BR > 0 && BR <= n)) {\n\t\tcount += 1;\n\t}\n\tTR ++;\n}\n\nTR = 1;\nprint(TL);\nprint(BL);\nprint(BR);\n\nprint(count);"}], "src_uid": "b732869015baf3dee5094c51a309e32c"} {"nl": {"description": "Reca company makes monitors, the most popular of their models is AB999 with the screen size a × b centimeters. Because of some production peculiarities a screen parameters are integer numbers. Recently the screen sides ratio x: y became popular with users. That's why the company wants to reduce monitor AB999 size so that its screen sides ratio becomes x: y, at the same time they want its total area to be maximal of all possible variants. Your task is to find the screen parameters of the reduced size model, or find out that such a reduction can't be performed.", "input_spec": "The first line of the input contains 4 integers — a, b, x and y (1 ≤ a, b, x, y ≤ 2·109).", "output_spec": "If the answer exists, output 2 positive integers — screen parameters of the reduced size model. Output 0 0 otherwise.", "sample_inputs": ["800 600 4 3", "1920 1200 16 9", "1 1 1 2"], "sample_outputs": ["800 600", "1920 1080", "0 0"], "notes": null}, "positive_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction gcd(a, b) {\n\twhile (a != 0 && b != 0) {\n\t\tif (a > b) {\n\t\t\ta %= b;\n\t\t}\n\t\telse {\n\t\t\tb %= a;\n\t\t}\n\t}\n\treturn a+b;\n}\n\nfunction main() {\n\tvar input = tokenizeIntegers(readline());\n\tvar oldX = input[0], oldY = input[1], p = input[2], q = input[3];\n\n\tvar d = gcd(p, q);\n\tp /= d;\n\tq /= d;\n\n\tfunction solve(oldX, oldY, p, q) {\n\t\ty = Math.floor(oldX / p * q);\n\t\ty -= y%q;\n\t\tx = y / q * p;\n\t\treturn {x: x, y: y};\n\t}\n\n\tvar solution = solve(oldX, oldY, p, q);\n\tif (solution.y > oldY) {\n\t\tsolution = solve(oldY, oldX, q, p);\n\t\tprint(solution.y+\" \"+solution.x);\n\t}\n\telse {\n\t\tprint(solution.x+\" \"+solution.y);\n\t}\n}\n\nmain();\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction gcd(a, b) {\n\twhile (a != 0 && b != 0) {\n\t\tif (a > b) {\n\t\t\ta %= b;\n\t\t}\n\t\telse {\n\t\t\tb %= a;\n\t\t}\n\t}\n\treturn a+b;\n}\n\nfunction main() {\n\tvar input = tokenizeIntegers(readline());\n\tvar oldX = input[0], oldY = input[1], p = input[2], q = input[3];\n\n\tvar d = gcd(p, q);\n\tp /= d;\n\tq /= d;\n\n\tvar factor = Math.floor(Math.min(oldX/p, oldY/q));\n\tprint(factor*p, factor*q);\n}\n\nmain();\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction gcd(a, b) {\n\twhile (a != 0 && b != 0) {\n\t\tif (a > b) {\n\t\t\ta %= b;\n\t\t}\n\t\telse {\n\t\t\tb %= a;\n\t\t}\n\t}\n\treturn a+b;\n}\n\nfunction main() {\n\tvar integers = tokenizeIntegers(readline());\n\tvar oldX = integers[0], oldY = integers[1],\n\t\tp = integers[2], q = integers[3];\n\n\tvar d = gcd(p, q);\n\tp /= d;\n\tq /= d;\n\n\tvar reverse = false;\n\tif (oldX / p * q > oldY) {\n\t\tvar t = oldX;\n\t\toldX = oldY;\n\t\toldY = t;\n\t\tt = p;\n\t\tp = q;\n\t\tq = t;\n\t\treverse = true;\n\t}\n\n\tvar y = Math.floor(oldX / p * q);\n\ty -= y % q;\n\tvar x = y / q * p;\n\n\tprint((reverse ? [y, x] : [x, y]).join(' '));\n}\n\nmain();\n"}, {"source_code": "var abxy = readline().split(' ').map(Number);\nvar a = abxy[0];\nvar b = abxy[1];\nvar x = abxy[2];\nvar y = abxy[3];\nfunction gsd(a, b) {\n if ( ! b) {\n return a;\n }\n return gsd(b, a % b);\n};\nvar g = gsd(x, y);\nx /= g;\ny /= g;\nvar count = Math.min(Math.floor(a/x), Math.floor(b/y));\nprint(count*x, count*y);"}, {"source_code": "var abxy = readline().split(' ').map(Number);\nvar a = abxy[0];\nvar b = abxy[1];\nvar x = abxy[2];\nvar y = abxy[3];\nfunction gcd(a, b) {\n if ( ! b) {\n return a;\n }\n return gcd(b, a % b);\n};\nvar g = gcd(x, y);\nx /= g;\ny /= g;\nvar count = Math.min(Math.floor(a/x), Math.floor(b/y));\nprint(count*x, count*y);"}], "negative_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar integers = tokenizeIntegers(readline());\n\tvar oldX = integers[0], oldY = integers[1],\n\t\tp = integers[2], q = integers[3];\n\n\tvar reverse = false;\n\tif (oldX / p * q > oldY) {\n\t\tvar t = oldX;\n\t\toldX = oldY;\n\t\toldY = t;\n\t\tt = p;\n\t\tp = q;\n\t\tq = t;\n\t\treverse = true;\n\t}\n\n\tvar y = Math.floor(oldX / p * q);\n\ty -= y % q;\n\tvar x = y / q * p;\n\n\tprint((reverse ? [y, x] : [x, y]).join(' '));\n}\n\nmain();\n"}, {"source_code": "var abxy = readline().split(' ').map(Number);\nvar a = abxy[0];\nvar b = abxy[1];\nvar x = abxy[2];\nvar y = abxy[3];\nvar count = Math.floor(a/x);\nwhile (count) {\n\tvar s = count*y;\n\tif ( Math.ceil(s) - s == 0 && s <= b) {\n\t\tprint(count*x, s);\n\t\tbreak;\n\t}\n\tcount--;\n}\nif (count == 0) print(0, 0);"}, {"source_code": "var abxy = readline().split(' ').map(Number);\nvar ab = [abxy[0], abxy[1]];\nvar xy = [abxy[2], abxy[3]];\nab.sort( (a,b) => b-a );\nxy.sort( (a,b) => b-a );\nfor (var i=0; i{return parseInt(a);});\nar.sort((a, b)=>{\n if(a%4===0) return -1;\n if(b%4===0) return 1;\n \n if(a%2===0) return -1;\n if(b%2===0) return 1;\n return b-a;\n});\n\nvar four = ROW * 1;\nvar two = ROW * 2;\n\nvar r1s = 0;\n\nvar pass = true;\nar = ar.map((k)=>{\n \n//\tprint(k);print(k, '2x'+two, '4x'+four, r1s, parseInt(k/4));\n \n\tif (four >= parseInt(k/4) ) {\n \tfour-= parseInt(k/4);\n \tk-= parseInt(k/4)*4;\n } else if(parseInt(k/4) > 0) {\n \tk-= four*4;\n \tfour = 0;\n }\n \n\tif (two >= parseInt(k/2) ) {\n \ttwo-= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n } else if(parseInt(k/2) > 0) {\n \tk-= two*2;\n \ttwo = 0;\n }\n \n\tif (four >= parseInt(k/3)) {\n \tfour-= parseInt(k/3);\n \tk-= parseInt(k/3)*3;\n } else if(parseInt(k/3) > 0) {\n \tk-= four*4;\n \tfour = 0;\n }\n \n\tif (four >= parseInt(k/2)) {\n \tfour-= parseInt(k/2);\n \tr1s+= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n } else if(parseInt(k/2) > 0) {\n \tk-= four*2;\n \tr1s+= four;\n \tfour = 0;\n }\n \n \tif (r1s >= k) {\n \tr1s -= k;\n \tk = 0;\n }\n \n\tif (two >= k ) {\n \ttwo-= k;\n \tk-= k;\n }\n \n\tif (four >= k ) {\n \tfour-= k;\n \t//r1s+= 2 * k;\n \ttwo+= k;\n \tk= 0;\n }\n \n \n \t//print(k, '2x'+two, '4x'+four, r1s);\n \n if (k>0) pass=false;\n \t//print((k>0) ? 'NOOOOO':'');\n \n \treturn k;\n});\n\n//print(ar.join(','))\n\nprint(pass ? \"YES\":\"NO\")"}], "negative_code": [{"source_code": "var l = readline().split(' ');\n\nvar ROW = parseInt(l[0]);\nvar K = parseInt(l[1]);\n\nvar ar = readline().split(' ').map((a)=>{return parseInt(a);});\nar.sort((a, b)=>{return b-a;});\n\nvar four = ROW * 1;\nvar two = ROW * 2;\n\nvar r1s = 0;\n\nvar pass = true;\nar = ar.map((k)=>{\n \n//\tprint(k);\n// \tprint(k, '2x'+two, '4x'+four, r1s);\n \n\tif (four >= parseInt(k/4) ) {\n \tfour-= parseInt(k/4); \n \tk-= parseInt(k/4)*4;\n }\n \t\n \tif (four >= parseInt(k/3)) {\n \tfour-= parseInt(k/3);\n \tk-= parseInt(k/3)*3;\n }\n \n\tif (two >= parseInt(k/2) ) {\n \ttwo-= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n }\n \n\tif (four >= parseInt(k/2)) {\n \tfour-= parseInt(k/2);\n \tr1s+= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n }\n \n\tif (two >= k ) {\n \ttwo-= k;\n \tk-= k;\n }\n \n if (r1s >= k) {\n//\t\tprint('r1s=', r1s, k);\n \tr1s -= k;\n \tk = 0;\n }\n \n\tif (four >= k ) {\n \tfour-= k;\n \tr1s+= 2;\n \tk= 0;\n }\n \n \n// \tprint(k, '2x'+two, '4x'+four, r1s);\n \n if (k>0) pass=false;\n// \tif (k%4 === 3) r3s+= parseInt(k/3);\n \n \treturn k;\n});\n\n//print(ar.join(','))\n\nprint(pass ? \"YES\":\"NO\")"}, {"source_code": "var l = readline().split(' ');\n\nvar ROW = parseInt(l[0]);\nvar K = parseInt(l[1]);\n\nvar ar = readline().split(' ').map((a)=>{return parseInt(a);});\nar.sort((a, b)=>{\n if(a%4===0) return -1;\n if(b%4===0) return 1;\n \n if(a%2===0) return -1;\n if(b%2===0) return 1;\n return b-a;\n});\n\nvar four = ROW * 1;\nvar two = ROW * 2;\n\nvar r1s = 0;\n\nvar pass = true;\nar = ar.map((k)=>{\n \n\t//print(k);print(k, '2x'+two, '4x'+four, r1s);\n \n\tif (four >= parseInt(k/4) ) {\n \tfour-= parseInt(k/4);\n \tk-= parseInt(k/4)*4;\n }\n \t\n \tif (four >= parseInt(k/3)) {\n \tfour-= parseInt(k/3);\n \tk-= parseInt(k/3)*3;\n }\n \n\tif (two >= parseInt(k/2) ) {\n \ttwo-= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n }\n \n\tif (four >= parseInt(k/2)) {\n \tfour-= parseInt(k/2);\n \tr1s+= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n }\n \n \tif (r1s >= k) {\n \tr1s -= k;\n \tk = 0;\n }\n \n\tif (two >= k ) {\n \ttwo-= k;\n \tk-= k;\n }\n \n\tif (four >= k ) {\n \tfour-= k;\n \tr1s+= 2 * k;\n \tk= 0;\n }\n \n \n \t//print(k, '2x'+two, '4x'+four, r1s);\n \n if (k>0) pass=false;\n \n \treturn k;\n});\n\n//print(ar.join(','))\n\nprint(pass ? \"YES\":\"NO\")"}, {"source_code": "var l = readline().split(' ');\n\nvar ROW = parseInt(l[0]);\nvar K = parseInt(l[1]);\n\nvar ar = readline().split(' ').map((a)=>{return parseInt(a);});\nar.sort((a, b)=>{return b-a;});\n\nvar four = ROW * 1;\nvar two = ROW * 2;\n\nvar r1s = 0;\n\nvar pass = true;\nar = ar.map((k)=>{\n \n//\tprint(k);\n// \tprint(k, '2x'+two, '4x'+four);\n \n\tif (four >= parseInt(k/4) ) {\n \tfour-= parseInt(k/4); \n \tk-= parseInt(k/4)*4;\n }\n \t\n \tif (four >= parseInt(k/3)) {\n \tfour-= parseInt(k/3);\n \tk-= parseInt(k/3)*3;\n }\n \n\tif (four >= parseInt(k/2)) {\n \tfour-= parseInt(k/2);\n \tr1s+= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n }\n \n\tif (two >= parseInt(k/2) ) {\n \ttwo-= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n }\n \n\tif (two >= k ) {\n \ttwo-= k;\n \tk-= k;\n }\n \n if (r1s >= k) {\n//\t\tprint('r1s=', r1s, k);\n \tr1s -= k;\n \tk = 0;\n }\n \n \n// \tprint(k, '2x'+two, '4x'+four);\n \n if (k>0) pass=false;\n// \tif (k%4 === 3) r3s+= parseInt(k/3);\n \n \treturn k;\n});\n\n//print(ar.join(','))\n\nprint(pass ? \"YES\":\"NO\")"}, {"source_code": "var l = readline().split(' ');\n\nvar ROW = parseInt(l[0]);\nvar K = parseInt(l[1]);\n\nvar ar = readline().split(' ').map((a)=>{return parseInt(a);});\nar.sort((a, b)=>{\n if(a%4===0) return -1;\n if(b%4===0) return 1;\n \n if(a%2===0) return -1;\n if(b%2===0) return 1;\n return b-a;\n});\n\nvar four = ROW * 1;\nvar two = ROW * 2;\n\nvar r1s = 0;\n\nvar pass = true;\nar = ar.map((k)=>{\n \n//\tprint(k);print(k, '2x'+two, '4x'+four, r1s, parseInt(k/4));\n \n\tif (four >= parseInt(k/4) ) {\n \tfour-= parseInt(k/4);\n \tk-= parseInt(k/4)*4;\n } else if(parseInt(k/4) > 0) {\n \tk-= four*4;\n \tfour = 0;\n }\n \n\tif (two >= parseInt(k/2) ) {\n \ttwo-= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n } else if(parseInt(k/2) > 0) {\n \tk-= two*2;\n \ttwo = 0;\n }\n \n\tif (four >= parseInt(k/3)) {\n \tfour-= parseInt(k/3);\n \tk-= parseInt(k/3)*3;\n } else if(parseInt(k/3) > 0) {\n \tk-= four*4;\n \tfour = 0;\n }\n \n\tif (four >= parseInt(k/2)) {\n \tfour-= parseInt(k/2);\n \tr1s+= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n } else if(parseInt(k/2) > 0) {\n \tk-= four*2;\n \tr1s+= four;\n \tfour = 0;\n }\n \n \tif (r1s >= k) {\n \tr1s -= k;\n \tk = 0;\n }\n \n\tif (two >= k ) {\n \ttwo-= k;\n \tk-= k;\n }\n \n\tif (four >= k ) {\n \tfour-= k;\n \tr1s+= 2 * k;\n \tk= 0;\n }\n \n \n \t//print(k, '2x'+two, '4x'+four, r1s);\n \n if (k>0) pass=false;\n \t//print((k>0) ? 'NOOOOO':'');\n \n \treturn k;\n});\n\n//print(ar.join(','))\n\nprint(pass ? \"YES\":\"NO\")"}, {"source_code": "var l = readline().split(' ');\n\nvar ROW = parseInt(l[0]);\nvar K = parseInt(l[1]);\n\nvar ar = readline().split(' ').map((a)=>{return parseInt(a);});\nar.sort((a, b)=>{return b-a;});\n\nvar four = ROW * 1;\nvar two = ROW * 2;\n\nvar pass = true;\nar.forEach((k)=>{\n \n // print(k);\n \n\tif (four >= parseInt(k/4)) {\n \tfour-= parseInt(k/4);\n \tk-= parseInt(k/4)*4;\n }\n \n \tif (two >= (parseInt(k/2) + k%2) ) {\n \ttwo-= (parseInt(k/2) + k%2);\n \tk-= (parseInt(k/2)*2 + k%2);\n }\n \n //\tprint(k, '2x'+two, '4x'+four);\n \n if (k>0) pass=false; \n});\n\nprint(pass ? \"YES\":\"NO\")"}, {"source_code": "var l = readline().split(' ');\n\nvar ROW = parseInt(l[0]);\nvar K = parseInt(l[1]);\n\nvar ar = readline().split(' ').map((a)=>{return parseInt(a);});\nar.sort((a, b)=>{return b-a;});\n\nvar four = ROW * 1;\nvar two = ROW * 2;\n\nvar r1s = 0;\n\nvar pass = true;\nar = ar.map((k)=>{\n \n\t//print(k);print(k, '2x'+two, '4x'+four, r1s);\n \n\tif (four >= parseInt(k/4) ) {\n \tfour-= parseInt(k/4); \n \tk-= parseInt(k/4)*4;\n }\n \t\n \tif (four >= parseInt(k/3)) {\n \tfour-= parseInt(k/3);\n \tk-= parseInt(k/3)*3;\n }\n \n\tif (two >= parseInt(k/2) ) {\n \ttwo-= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n }\n \n\tif (four >= parseInt(k/2)) {\n \tfour-= parseInt(k/2);\n \tr1s+= parseInt(k/2);\n \tk-= parseInt(k/2)*2;\n }\n \n\tif (two >= k ) {\n \ttwo-= k;\n \tk-= k;\n }\n \n if (r1s >= k) {\n//\t\tprint('r1s=', r1s, k);\n \tr1s -= k;\n \tk = 0;\n }\n \n\tif (four >= k ) {\n \tfour-= k;\n \tr1s+= 2 * k;\n \tk= 0;\n }\n \n \n \t//print(k, '2x'+two, '4x'+four, r1s);\n \n if (k>0) pass=false;\n \n \treturn k;\n});\n\n//print(ar.join(','))\n\nprint(pass ? \"YES\":\"NO\")"}], "src_uid": "d1f88a97714d6c13309c88fcf7d86821"} {"nl": {"description": "Several ages ago Berland was a kingdom. The King of Berland adored math. That's why, when he first visited one of his many palaces, he first of all paid attention to the floor in one hall. The floor was tiled with hexagonal tiles.The hall also turned out hexagonal in its shape. The King walked along the perimeter of the hall and concluded that each of the six sides has a, b, c, a, b and c adjacent tiles, correspondingly.To better visualize the situation, look at the picture showing a similar hexagon for a = 2, b = 3 and c = 4. According to the legend, as the King of Berland obtained the values a, b and c, he almost immediately calculated the total number of tiles on the hall floor. Can you do the same?", "input_spec": "The first line contains three integers: a, b and c (2 ≤ a, b, c ≤ 1000).", "output_spec": "Print a single number — the total number of tiles on the hall floor.", "sample_inputs": ["2 3 4"], "sample_outputs": ["18"], "notes": null}, "positive_code": [{"source_code": "print(function(a, b, c) {\n\treturn a * b + a * (c - 1) + (b - 1) * (c - 1);\n} .apply(0, readline().split(' ').map(Number)));"}, {"source_code": ";(function () {\n\tprint(function (a, b, c) {\n\t\treturn f(a, b, c);\n\n\t\tfunction f (a, b, c) {\n\t\t\tif (a < 2 || b < 2 || c < 2) return a * b * c;\n\t\t\telse return (a + b + c - 3) * 2 + f(a - 1, b - 1, c - 1);\n\t\t}\n\t}.apply(null, readline().split(' ').map(Number)));\n}).call(this);\n"}], "negative_code": [{"source_code": ";(function () {\n\tprint(function (a, b, c) {\n\t\treturn f(a, b, c);\n\n\t\tfunction f (a, b, c) {\n\t\t\tif (a === 1 && b === 1 && c === 1) return 1;\n\t\t\tif (a === 0 || b === 0 || c === 0) return 0;\n\t\t\telse return (a + b + c - 3) * 2 + f(a - 1, b - 1, c - 1);\n\t\t}\n\t}.apply(null, readline().split(' ').map(Number)));\n}).call(this);\n"}, {"source_code": ";(function () {\n\tprint(function (a, b, c) {\n\t\tvar min = Math.min(a, b, c),\n\t\t\tmax = Math.max(a, b, c),\n\t\t\tmid = a + b + c - min - max;\n\n\t\treturn (a + b + c - 3) * 2 + (max - 1) * (mid - 1);\n\t}.apply(null, readline().split(' ').map(Number)));\n}).call(this);\n"}, {"source_code": ";(function () {\n\tprint(function (a, b, c) {\n\t\tvar min = Math.min(a, b, c),\n\t\t\tmax = Math.max(a, b, c),\n\t\t\tmid = a + b + c - min - max;\n\n\t\treturn a * b * c - min * mid;\n\t}.apply(null, readline().split(' ').map(Number)));\n}).call(this);\n"}], "src_uid": "8ab25ed4955d978fe20f6872cb94b0da"} {"nl": {"description": "The Smart Beaver from ABBYY got hooked on square matrices. Now he is busy studying an n × n size matrix, where n is odd. The Smart Beaver considers the following matrix elements good: Elements of the main diagonal. Elements of the secondary diagonal. Elements of the \"middle\" row — the row which has exactly rows above it and the same number of rows below it. Elements of the \"middle\" column — the column that has exactly columns to the left of it and the same number of columns to the right of it. The figure shows a 5 × 5 matrix. The good elements are marked with green. Help the Smart Beaver count the sum of good elements of the given matrix.", "input_spec": "The first line of input data contains a single odd integer n. Each of the next n lines contains n integers aij (0 ≤ aij ≤ 100) separated by single spaces — the elements of the given matrix. The input limitations for getting 30 points are: 1 ≤ n ≤ 5 The input limitations for getting 100 points are: 1 ≤ n ≤ 101 ", "output_spec": "Print a single integer — the sum of good matrix elements.", "sample_inputs": ["3\n1 2 3\n4 5 6\n7 8 9", "5\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1"], "sample_outputs": ["45", "17"], "notes": "NoteIn the first sample all matrix elements will be good. Good elements in the second sample are shown on the figure."}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nconst arr = [];\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n arr.push(d.split(' ').map(Number));\n\n c++;\n});\n\nrl.on('close', () => {\n let ans = 0;\n let n = arr.length;\n\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < arr.length; j++) {\n if (i == j || i == Math.floor(n / 2) || j == Math.floor(n / 2) || i + j == n-1) {\n ans += arr[i][j];\n }\n }\n }\n\n console.log(ans);\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nconst arr = [];\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n arr.push(d.split(' ').map(Number));\n\n c++;\n});\n\nrl.on('close', () => {\n let ans = 0;\n\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < arr.length; j++) {\n ans += arr[i][j];\n }\n }\n\n if (arr.length > 3) {\n ans -= arr[0][1];\n ans -= arr[0][arr.length - 2];\n ans -= arr[arr.length - 1][1];\n ans -= arr[arr.length - 1][arr.length - 2];\n ans -= arr[1][0];\n ans -= arr[1][arr.length - 1];\n ans -= arr[arr.length - 2][0];\n ans -= arr[arr.length - 2][arr.length - 1];\n }\n\n console.log(ans);\n});\n"}, {"source_code": "'use strict';\n\n/*let input = `5\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1`.split('\\n');\nfunction print(output) {\n\tconsole.log(output);\n}\nfunction readline() {\n\treturn input.shift();\n}*/\n\n//code\n\nvar n = Number(readline());\nvar matrix = [];\nfor (var i = 0; i < n; i++) {\n\tmatrix.push(readline().split(' ').map(Number));\n}\nvar sum = 0;\n//main diag\nfor (var i = 0; i < n; i++) {\n\tsum += matrix[i][i];\n}\n//sec diag\nfor (var i = 0; i < n; i++) {\n\tsum += matrix[i][n - i - 1];\n}\n//mid row\nfor (var i = 0; i < n; i++) {\n\tsum += matrix[(n - 1) / 2][i];\n}\n//mid col\nfor (var i = 0; i < n; i++) {\n\tsum += matrix[i][(n - 1) / 2];\n}\n//sub\nsum -= matrix[(n - 1) / 2][(n - 1) / 2] * 3;\nprint(sum);\n"}, {"source_code": "n = parseInt(readline())\ns = 0\nfor (i = 0; i < n; i++) {\n\ta = readline().split(' ').map(Number)\n\tfor (j = 0; j < n; j++) {\n\t\tif (i==j||i+j==n-1||i==Math.floor(n/2)||j==Math.floor(n/2)) s += a[j]\n\t}\n}\nprint(s)"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nconst arr = [];\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n arr.push(d.split(' ').map(Number));\n\n c++;\n});\n\nrl.on('close', () => {\n let ans = 0;\n let n = arr.length;\n\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < arr.length; j++) {\n if (i == j || i == Math.floor(n / 2) || j == Math.floor(n / 2) || i + j == n-1) {\n ans += arr[i][j];\n }\n }\n }\n\n console.log(ans);\n});\n"}], "negative_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nconst arr = [];\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n arr.push(d.split(' ').map(Number));\n\n c++;\n});\n\nrl.on('close', () => {\n let ans = 0;\n\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < arr.length; j++) {\n ans += arr[i][j];\n }\n }\n\n if (arr.length > 3) {\n ans -= arr[0][1];\n ans -= arr[0][arr.length - 2];\n ans -= arr[arr.length - 1][1];\n ans -= arr[arr.length - 1][arr.length - 2];\n ans -= arr[1][0];\n ans -= arr[1][arr.length - 1];\n ans -= arr[arr.length - 2][0];\n ans -= arr[arr.length - 2][arr.length - 1];\n }\n\n console.log(ans);\n});\n"}], "src_uid": "5ebfad36e56d30c58945c5800139b880"} {"nl": {"description": "Iahub and his friend Floyd have started painting a wall. Iahub is painting the wall red and Floyd is painting it pink. You can consider the wall being made of a very large number of bricks, numbered 1, 2, 3 and so on. Iahub has the following scheme of painting: he skips x - 1 consecutive bricks, then he paints the x-th one. That is, he'll paint bricks x, 2·x, 3·x and so on red. Similarly, Floyd skips y - 1 consecutive bricks, then he paints the y-th one. Hence he'll paint bricks y, 2·y, 3·y and so on pink.After painting the wall all day, the boys observed that some bricks are painted both red and pink. Iahub has a lucky number a and Floyd has a lucky number b. Boys wonder how many bricks numbered no less than a and no greater than b are painted both red and pink. This is exactly your task: compute and print the answer to the question. ", "input_spec": "The input will have a single line containing four integers in this order: x, y, a, b. (1 ≤ x, y ≤ 1000, 1 ≤ a, b ≤ 2·109, a ≤ b).", "output_spec": "Output a single integer — the number of bricks numbered no less than a and no greater than b that are painted both red and pink.", "sample_inputs": ["2 3 6 18"], "sample_outputs": ["3"], "notes": "NoteLet's look at the bricks from a to b (a = 6, b = 18). The bricks colored in red are numbered 6, 8, 10, 12, 14, 16, 18. The bricks colored in pink are numbered 6, 9, 12, 15, 18. The bricks colored in both red and pink are numbered with 6, 12 and 18. "}, "positive_code": [{"source_code": "function gcd(a, b){\n\treturn a%b===0 ? b : gcd(b, a%b);\n}\nprint(function(x, y, a, b){\n\tvar ans = x*y/gcd(x, y);\n\treturn Math.floor(b/ans)-Math.floor((a-1)/ans);\n}.apply(0, readline().split(' ').map(Number)));"}, {"source_code": "function gcd(a, b){\n\treturn b===0 ? a : gcd(b, a%b);\n}\nprint(function(x, y, a, b){\n\tvar ans = x*y/gcd(x, y);\n\treturn Math.floor(b/ans)-Math.floor((a-1)/ans);\n}.apply(0, readline().split(' ').map(Number)));"}, {"source_code": "function gcd (a, b) { return a ? gcd(b%a, a) : b; }\nfunction lcm (a, b) { return a * b / gcd(a, b); }\n\n;(function () {\n\t\n\tvar x = readline().split(' ');\n\tvar y = +x[1];\n\tvar a = +x[2];\n\tvar b = +x[3];\n\tx = +x[0];\n\n\tvar l = lcm(x, y);\n\n\tprint( Math.floor( b / l) - Math.floor( (a - 1) / l) );\n\n}).call(this);"}, {"source_code": "function gcd(a, b) {\n return b == 0 ? a : gcd(b, a % b);\n}\nvar inp = readline().split(' ').map(Number);\nvar x = inp[0], y = inp[1], a = inp[2], b = inp[3];\nvar i = 1, g = gcd(Math.max(x, y), Math.min(x, y)), lcm = (x / g) * y;\nprint(Math.floor(b / lcm) - Math.floor((a - 1) / lcm));\n\n"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar x = input[0], y = input[1], a = input[2], b = input[3];\nvar i = 1, lcm = 0;\nwhile (true) {\n if (x * i % y == 0) {\n lcm = x * i;\n break;\n }\n i++;\n}\nvar cm = 0;\nfor (var i = a; i <= b; i++) {\n if (i % lcm === 0) {\n cm = i;\n break;\n }\n}\nprint(cm == 0 ? 0 : Math.floor((b - Math.max(cm, a)) / lcm + 1));\n\n"}], "negative_code": [{"source_code": "var input = readline().split(' ').map(Number);\nvar x = input[0], y = input[1], a = input[2], b = input[3];\nvar i = 1, lcm = 0;\nwhile (true) {\n if (x * i % y == 0) {\n lcm = x * i;\n break;\n }\n i++;\n}\nvar cm = 0;\nfor (var i = a; i < b; i++) {\n if (i % lcm == 0) {\n cm = i;\n break;\n }\n}\nprint(cm == 0 ? 0 : Math.floor((b - cm) / lcm + 1));\n\n"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar x = input[0], y = input[1], a = input[2], b = input[3];\nvar i = 1, lcm = 0;\nwhile (true) {\n if (x * i % y == 0) {\n lcm = x * i;\n break;\n }\n i++;\n}\nvar cm = 0;\nfor (var i = a; i < b; i++) {\n if (i % lcm == 0) {\n cm = i;\n break;\n }\n}\nprint(cm == 0 || Math.floor((b - cm) / lcm + 1));\n\n"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar x = input[0], y = input[1], a = input[2], b = input[3];\nvar i = 1, lcm = 0;\nwhile (true) {\n if (x * i % y == 0) {\n lcm = x * i;\n break;\n }\n i++;\n}\nvar cm = lcm;\nfor (var i = a; i < b; i++) {\n if (i % lcm == 0) {\n cm = i;\n break;\n }\n}\nprint(Math.floor((b - Math.max(cm, a)) / lcm + 1));\n\n"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar x = input[0], y = input[1], a = input[2], b = input[3];\nvar i = 1, lcm = 0;\nwhile (true) {\n if (x * i % y == 0) {\n lcm = x * i;\n break;\n }\n i++;\n}\nvar cm = 0;\nfor (var i = a; i < b; i++) {\n if (i % lcm == 0) {\n cm = i;\n break;\n }\n}\nprint(cm == 0 || (b - cm) / lcm + 1);\n\n"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar x = input[0], y = input[1], a = input[2], b = input[3];\nvar i = 1, lcm = 0;\nwhile (true) {\n if (x * i % y == 0) {\n lcm = x * i;\n break;\n }\n i++;\n}\nvar cm = lcm;\nfor (var i = a; i < b; i++) {\n if (i % lcm == 0) {\n cm = i;\n break;\n }\n}\nprint(Math.floor((b - cm) / lcm + 1));\n\n"}], "src_uid": "c7aa8a95d5f8832015853cffa1374c48"} {"nl": {"description": "Kavi has $$$2n$$$ points lying on the $$$OX$$$ axis, $$$i$$$-th of which is located at $$$x = i$$$.Kavi considers all ways to split these $$$2n$$$ points into $$$n$$$ pairs. Among those, he is interested in good pairings, which are defined as follows:Consider $$$n$$$ segments with ends at the points in correspondent pairs. The pairing is called good, if for every $$$2$$$ different segments $$$A$$$ and $$$B$$$ among those, at least one of the following holds: One of the segments $$$A$$$ and $$$B$$$ lies completely inside the other. $$$A$$$ and $$$B$$$ have the same length. Consider the following example: $$$A$$$ is a good pairing since the red segment lies completely inside the blue segment.$$$B$$$ is a good pairing since the red and the blue segment have the same length.$$$C$$$ is not a good pairing since none of the red or blue segments lies inside the other, neither do they have the same size.Kavi is interested in the number of good pairings, so he wants you to find it for him. As the result can be large, find this number modulo $$$998244353$$$.Two pairings are called different, if some two points are in one pair in some pairing and in different pairs in another.", "input_spec": "The single line of the input contains a single integer $$$n$$$ $$$(1\\le n \\le 10^6)$$$.", "output_spec": "Print the number of good pairings modulo $$$998244353$$$.", "sample_inputs": ["1", "2", "3", "100"], "sample_outputs": ["1", "3", "6", "688750769"], "notes": "NoteThe good pairings for the second example are: In the third example, the good pairings are: "}, "positive_code": [{"source_code": "var dataitr;\r\nvar stdin_input = \"\";\r\nprocess.stdin.resume();\r\nprocess.stdin.setEncoding(\"ascii\");\r\nprocess.stdin.on(\"data\", function (input) { stdin_input += input; });\r\nprocess.stdin.on(\"end\", function () { dataitr = stdin_input.split('\\n').values(); main(); });\r\n\r\nconst rl = () => dataitr.next().value.trim();\r\nconst rn = () => Number(rl());\r\nconst ra = () => rl().split(' ');\r\nconst rna = () => ra().map(x => Number(x));\r\n\r\nconst MOD = 998244353;\r\n\r\nfunction main () {\r\n\tconst n = rn();\r\n\r\n\tconst dp = Array(n + 1).fill(0);\r\n\tfor (let i = 1; i <= n; i++) {\r\n\t\tfor (let j = i; j <= n; j += i) {\r\n\t\t\tdp[j]++;\r\n\t\t}\r\n\t}\r\n\r\n\tfor (let i = 1, psm = 0; i <= n ; i++) {\r\n\t\tdp[i] += psm;\r\n\t\tpsm = (psm + dp[i]) % MOD;\r\n\t}\r\n\r\n\tconsole.log(dp[n]);\r\n}\r\n\r\n"}, {"source_code": "var readline = require('readline');\n \nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nvar lines = [];\nrl.on('line', function(input) {\n lines.push(input);\n});\nrl.on('close', function() {\n var l = 0;\n console.log(solve(+lines[l++]))\n});\n\nfunction solve(n) {\n const dp = Array(n + 1).fill(0)\n for (let i = 1; i < n; i++) {\n for (let j = i + i; j <= n; j += i) {\n dp[j]++\n }\n }\n let sum = 1\n for (let i = 1; i <= n; i++) {\n dp[i] = add(dp[i], sum)\n sum = add(sum, dp[i])\n }\n return dp[n]\n}\n\nfunction add(a, b) {\n return (a + b) % 998244353\n}\n"}], "negative_code": [], "src_uid": "09be46206a151c237dc9912df7e0f057"} {"nl": {"description": "JATC and his friend Giraffe are currently in their room, solving some problems. Giraffe has written on the board an array $$$a_1$$$, $$$a_2$$$, ..., $$$a_n$$$ of integers, such that $$$1 \\le a_1 < a_2 < \\ldots < a_n \\le 10^3$$$, and then went to the bathroom.JATC decided to prank his friend by erasing some consecutive elements in the array. Since he doesn't want for the prank to go too far, he will only erase in a way, such that Giraffe can still restore the array using the information from the remaining elements. Because Giraffe has created the array, he's also aware that it's an increasing array and all the elements are integers in the range $$$[1, 10^3]$$$.JATC wonders what is the greatest number of elements he can erase?", "input_spec": "The first line of the input contains a single integer $$$n$$$ ($$$1 \\le n \\le 100$$$) — the number of elements in the array. The second line of the input contains $$$n$$$ integers $$$a_i$$$ ($$$1 \\le a_1<a_2<\\dots<a_n \\le 10^3$$$) — the array written by Giraffe.", "output_spec": "Print a single integer — the maximum number of consecutive elements in the array that JATC can erase. If it is impossible to erase even a single element, print $$$0$$$.", "sample_inputs": ["6\n1 3 4 5 6 9", "3\n998 999 1000", "5\n1 2 3 4 5"], "sample_outputs": ["2", "2", "4"], "notes": "NoteIn the first example, JATC can erase the third and fourth elements, leaving the array $$$[1, 3, \\_, \\_, 6, 9]$$$. As you can see, there is only one way to fill in the blanks.In the second example, JATC can erase the second and the third elements. The array will become $$$[998, \\_, \\_]$$$. Because all the elements are less than or equal to $$$1000$$$, the array is still can be restored. Note, that he can't erase the first $$$2$$$ elements.In the third example, JATC can erase the first $$$4$$$ elements. Since all the elements are greater than or equal to $$$1$$$, Giraffe can still restore the array. Note, that he can't erase the last $$$4$$$ elements."}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nrl.on('line', (input) => {\n if (l === 0) { l++ }\n else {\n rl.close();\n let arr = input.split(\" \").map(x => parseInt(x))\n let cnt = 0\n let max = 0\n for (let i = 1; i < arr.length; i++) {\n if (arr[i]===arr[i-1]+1) {\n cnt++\n if(i===1 && arr[i-1]===1){\n cnt++\n }\n if(i+1max){\n max=cnt\n }\n } else {\n cnt=0\n }\n }\n console.log(max)\n return 0;\n }\n})\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString= '';\nlet currentLine = 0;\n\nfunction readLine(){\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData =>{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n\n let consecutives = 0;\n\n let result = 0;\n line.unshift(0);\n line.push(1001);\n\n for(let i =1; i<=n; i++){\n if(line[i]-1 ===line[i-1]&& line[i+1] -1 === line[i]){\n consecutives++;\n }\n else{\n consecutives = 0;\n }\n result = Math.max(result, consecutives);\n }\n console.log(result);\n }\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nrl.on('line', (input) => {\n if (l === 0) { l++ }\n else {\n rl.close();\n let arr = input.split(\" \").map(x => parseInt(x))\n let cnt = 0\n let max = 0\n for (let i = 1; i < arr.length; i++) {\n if (arr[i]===arr[i-1]+1) {\n cnt++\n if(i===1 && arr[i-1]===1){\n cnt++\n }\n if(i+1max){\n max=cnt\n }\n } else {\n cnt=0\n }\n }\n console.log(max)\n return 0;\n }\n})\n"}, {"source_code": "var n = readline();\nvar a = readline().split(' ');\nfunction prank(n,array){\n var a = [0];\n var index,length=1,max=1;\n a = a.concat(array).concat(1001);\n for(var i= 1; i max){max = length;}\n }else{\n length = 1;\n }\n }\n var ans=0;\n if (max-2>ans) ans=max-2;\n return ans;\n}\n\nprint(prank(n,a));"}, {"source_code": "var maxRes = 0, res = 0;\nreadline();\n\nvar arr = ('0 ' + readline() + ' 1001').split(' ');\nfor(var i = 2; i < arr.length; i++) {\n if(arr[i] - arr[i-2] === 2) maxRes = Math.max(maxRes, ++res); else res = 0;\n}\n\nif(maxRes === arr.length - 2) maxRes--;\n\nprint(maxRes);"}, {"source_code": "\nreadline();var gp = [];var m = 0;var sd = \"s\";var input = readline().split(' ');\n\nfor (var i = 0; i < input.length - 1; i++){\n\nif(Math.abs(input[i] - input[(1+i)]) == 1){m++;if(sd==\"s\"){sd=i;}}\n\nelse\n{\nif((input[sd] == 1)||(input[i] == 1000)){gp.push(m);}else{gp.push(m-1);}\nm=0;sd=\"s\";\n}\n\t\t\n}if((input[sd] == 1)||(input[input.length - 1] == 1000)){gp.push(m);}else{gp.push(m-1);}m=0;sd=\"s\";\n\n\n\n\n\nprint(Math.max(...gp) > 0 ? Math.max(...gp) : 0 );"}], "negative_code": [{"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString= '';\nlet currentLine = 0;\n\nfunction readLine(){\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData =>{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result;\n for(let i =0; i consecutives){\n result = prevConsecutive;\n }\n else{\n result = consecutives;\n }\n consecutives = 1;\n }\n\n }\n if(result === n){\n result -= 1;\n }\n else if(isFirstOrLast){\n result = result / 2 +1;\n }\n else{\n result /= 2;\n }\n console.log(result);\n\n }\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString= '';\nlet currentLine = 0;\n\nfunction readLine(){\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData =>{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result;\n for(let i =0; i consecutives){\n result = prevConsecutive;\n }\n else{\n result = consecutives;\n }\n consecutives = 1;\n }\n\n }\n if(result === n){\n result -= 1;\n }\n else if(isFirstOrLast){\n result = result / 2 +1;\n }\n else if(Math.ceil(result === 3)){\n result = 1;\n }\n else{\n result /= 2;\n }\n console.log(Math.ceil(result));\n\n }\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString= '';\nlet currentLine = 0;\n\nfunction readLine(){\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData =>{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result =1;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result =1;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result;\n for(let i =0; i consecutives){\n result = prevConsecutive;\n }\n else{\n result = consecutives;\n }\n consecutives = 1;\n }\n\n }\n if(result === n){\n result -= 1;\n }\n else if(isFirstOrLast){\n result = result / 2 +1;\n }\n else if(Math.ceil(result === 3)){\n result = 1;\n }\n else if(result ===1){\n result = 0;\n }\n else{\n result /= 2;\n }\n console.log(Math.ceil(result));\n\n }\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString= '';\nlet currentLine = 0;\n\nfunction readLine(){\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData =>{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n\n let consecutives = 0;\n\n let result = 0;\n\n for(let i =1; i<=n; i++){\n if(line[i]-1 ===line[i-1]&& line[i+1] -1 === line[i]){\n consecutives++;\n }\n else{\n consecutives = 0;\n }\n result = Math.max(result, consecutives);\n }\n console.log(result)\n }\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString= '';\nlet currentLine = 0;\n\nfunction readLine(){\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData =>{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result =1;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result =1;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result;\n for(let i =0; i consecutives){\n result = prevConsecutive;\n }\n else{\n result = consecutives;\n }\n consecutives = 1;\n }\n\n }\n if(result === n){\n result -= 1;\n }\n else if(isFirstOrLast){\n result = result / 2 +1;\n }\n else{\n result /= 2;\n }\n console.log(result);\n\n }\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet standardInputString= '';\nlet currentLine = 0;\n\nfunction readLine(){\n return standardInputString[currentLine++];\n}\n\nprocess.stdin.on('data', rawData =>{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result =1;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result =1;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result =1;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n let d = 0;\n let isFirstOrLast = false;\n let consecutives = 1;\n\n let result =1;\n\n let prev = 1;\n\n for(let i =0; i{\n standardInputString += rawData;\n});\n\nprocess.stdin.on('end', _ =>{\n standardInputString= standardInputString.trim().split('\\n').map(line =>{\n return line.trim();\n });\n\n main();\n})\n\n\n\nfunction main(){\n let [n] = readLine().split(' ').map(Number);\n\n let line = readLine().split(' ').map(Number);\n\n\n let consecutives = 0;\n\n let result = 0;\n line.unshift(1);\n line.push(1001);\n\n for(let i =1; i<=n; i++){\n if(line[i]-1 ===line[i-1]&& line[i+1] -1 === line[i]){\n consecutives++;\n }\n else{\n consecutives = 0;\n }\n result = Math.max(result, consecutives);\n }\n console.log(result);\n }\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nrl.on('line', (input) => {\n if (l === 0) { l++ }\n else {\n rl.close();\n let arr = input.split(\" \").map(x => parseInt(x))\n let cnt = 0\n let max = -1\n for (let i = 1; i < arr.length; i++) {\n if (arr[i]===arr[i-1]+1) {\n cnt++\n if(i+1max){\n max=cnt\n }\n } else {\n cnt=0\n }\n }\n console.log(max)\n return 0;\n }\n})\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nrl.on('line', (input) => {\n if (l === 0) { l++ }\n else {\n rl.close();\n let arr = input.split(\" \").map(x => parseInt(x))\n let cnt = 0\n let max = 0\n for (let i = 1; i < arr.length; i++) {\n if (arr[i]===arr[i-1]+1) {\n cnt++\n if(i+1max){\n max=cnt\n }\n } else {\n cnt=0\n }\n }\n console.log(max)\n return 0;\n }\n})\n"}, {"source_code": "var n = readline();\nvar a = readline().split(' ');\nfunction prank(n,array){\n var a = [0];\n var index,length=0,max=0;\n a = a.concat(array).concat(1001);\n for(var i= 1; i max){max = length;}\n length = 0;\n }\n }\n return max-2;\n}\n\nprint(prank(n,a));"}, {"source_code": "function prank(array){\n var a = [0];\n var index,length=0,max=0;\n a = a.concat(array).concat(1001);\n for(var i= 1; i max){max = length;}\n length = 1;\n }\n }\n var ans=0;\n if (max-2>ans) ans=max-2;\n return ans;\n}\n\nprint(prank(n,a));"}, {"source_code": "var res = 0;\nreadline();\n\nvar arr = ('0 ' + readline() + ' 1001').split(' ');\nfor(var i = 4; i < arr.length; i++) {\n if(arr[i] - arr[i-2] === 2) res++;\n}\n\nprint(res);"}, {"source_code": "var res = 0;\nreadline();\n\nvar arr = ('0 ' + readline() + ' 1001').split(' ');\nfor(var i = 2; i < arr.length; i++) {\n if(arr[i] - arr[i-2] === 2) res++;\n}\n\nprint(res);"}, {"source_code": "var res = 0;\nreadline();\n\nvar arr = ('0 ' + readline() + ' 1001').split(' ');\nfor(var i = 2; i < arr.length; i++) {\n if(arr[i] - arr[i-2] === 2) res++;\n}\n\nif(arr[2] - arr[0] === 2 && arr[3] - arr[1] === 2) res--;\n\nprint(res);"}, {"source_code": "n = readline();input = readline().split(' ');\nvar gar = [];for (var i = 0; i < input.length - 1; i++){ gar.push( Math.abs( input[i] - input[(i+1)] ) ) }\n\nvar b = Math.min(...gar);\nvar bcount= 0 ;for (var i = 0; i < gar.length; i++) {if(gar[i]==\"1\"){bcount +=1;}}\n\t\n\n\nif(bcount > 0 )\n{\n\nif(bcount == (input.length -1)){print(bcount)}\n\telse{\nif(bcount == 1){print(bcount)}else{print(bcount - 1)}\n\t\n}\n\t\n}\n\n\n\nelse{print(0)};\n"}, {"source_code": "n = readline();\nvar input = readline().split(' ');\nvar bbcount = [];var k = 0;var gar = [];\n\nfor(var i = 0; i < input.length - 1; i++){gar.push(Math.abs(input[i] - input[(i+1)]))}\nfor (var i = 0; i < gar.length; i++){if(gar[i]!=\"1\"){bbcount.push(k);k=0;}else if(gar[i]==\"1\"){k++;}}bbcount.push(k); bbcount[0]= Math.max(...bbcount);\n\t\t\n\n \n \n\t\n\n\nif(bbcount[0] > 1)\n{\n\tif(bbcount[0] == input.length - 1){bbcount[0] +=1;}\n\tprint(bbcount[0] - 1)\n}\nelse\n\t{print(\"0\")}"}, {"source_code": "n = readline();input = readline().split(' ');\n\n\nvar gar = [];\nfor (var i = 0; i < input.length - 1; i++)\n{ gar.push(Math.abs( input[i] - input[(i+1)] ) )}\n\n\t\n\n\n//print(gar);\nvar b = Math.min(...gar);\nvar bcount= 0 ;for (var i = 0; i < gar.length; i++) {if(gar[i]==b){bcount +=1;}}\n\t\n\n\nif(bcount > 0 )\n{\n\nif(bcount == (input.length -1)){print(bcount)}else {print(bcount - 1)}\n\n\n}\nelse{print(0)};"}, {"source_code": "\nreadline();\nvar input = readline().split(' ');\nvar bbcount = [];var k = 0;\n\nfor(var i = 0; i < input.length - 1; i++)\n{\n var r = (Math.abs(input[i] - input[(i+1)]));\n if(r == \"1\"){k++;} else{bbcount.push(k);k=0;}\n}\nbbcount.push(k);bbcount[0] = Math.max(...bbcount);\n\n\nif(bbcount[0] == 1){if((input[1] == 2) ||(input[1] == 1000)){bbcount[0] +=1;}}\n\n\nif(bbcount[0] > 1)\n{\nif(bbcount[0] == input.length - 1){bbcount[0] +=1;}\nprint(bbcount[0] - 1);\n}else{print(\"0\")}"}, {"source_code": "n = readline();\ninput = readline().split(' ');\n\n\n\n\nvar gar = [];\n\n\nfor (var i = 0; i < input.length - 1; i++)\n{\n gar.push(\n\tMath.abs(input[i] - input[(i+1)]))\n}\n\n//print(gar);\nvar b = Math.min(...gar);\n\nvar bcount= 0 ;\nfor (var i = 0; i < gar.length; i++) {\n\tif(gar[i]==b){bcount +=1;}\n}\n\nif(bcount > 1 )\n{\n\nif(bcount == (input.length -1)){print(bcount)}else {print(bcount - 1)}\n\n\n}\nelse{print(0)};\n"}, {"source_code": "readline();\nvar input = readline().split(' ');\nvar bbcount = [];var k = 0;\n\nfor(var i = 0; i < input.length - 1; i++)\n{\n var r = (Math.abs(input[i] - input[(i+1)]));\n if(r == \"1\"){k++;} else{bbcount.push(k);k=0;}\n}\nbbcount.push(k);bbcount[0] = Math.max(...bbcount);\n\n\nif((bbcount[0] == 1)&&(input[1] == 2)){bbcount[0] +=1;}\nif(bbcount[0] > 1)\n{\nif(bbcount[0] == input.length - 1){bbcount[0] +=1;}\nprint(bbcount[0] - 1);\n}else{print(\"0\")}\n"}, {"source_code": "n = readline();\nvar bbcount = [];var k = 0;var gar = [];\nvar input = readline().split(' ');\n\nfor(var i = 0; i < input.length - 1; i++){gar.push( Math.abs( input[i] - input[(i+1)]))}\n\nvar bcount= 0 ;for (var i = 0; i < gar.length; i++)\n{\n\tif(gar[i]!=\"1\"){bbcount.push(k);k=0;}\n\telse if(gar[i]==\"1\"){k++;}\n}\n\nbbcount.push(k);bbcount[0]= Math.max(...bbcount);\n\n\n\n\nif(bbcount[0] == (input.length -1)){print(bbcount[0])}\n\telse{\nif(bbcount[0] == 1){print(bbcount[0])}else{print(bbcount[0] - 1)}\n\t\n}\n\t"}, {"source_code": "n = readline();input = readline().split(' ');\nvar gar = [];for (var i = 0; i < input.length - 1; i++){ gar.push( Math.abs( input[i] - input[(i+1)] ) ) }\n\n\nvar bcount= 0 ;for (var i = 0; i < gar.length; i++)\n{\n\tif((bcount>0)&&(gar[i]!=\"1\")){i = gar.length}else{\n\t\tif(gar[i]==\"1\"){bcount +=1;}\n\t}\n\t\n\n}\n\t\n\n\nif(bcount > 0 )\n{\n\nif(bcount == (input.length -1)){print(bcount)}\n\telse{\nif(bcount == 1){print(bcount)}else{print(bcount - 1)}\n\t\n}\n\t\n}\n\n\n\nelse{print(0)};"}, {"source_code": "n = readline();\nvar bbcount = [];var k = 0;var gar = [];\nvar input = readline().split(' ');\n\nfor(var i = 0; i < input.length - 1; i++){gar.push( Math.abs( input[i] - input[(i+1)]))}\n\nvar bcount= 0 ;for (var i = 0; i < gar.length; i++)\n{\n\tif(gar[i]!=\"1\"){bbcount.push(k);k=0;}\n\telse if(gar[i]==\"1\"){k++;}\n}\n\nbbcount.push(k);bbcount[0]= Math.max(...bbcount);\n\n\n\nvar calc = 0\nif(bbcount[0] == (input.length -1)){calc = (bbcount[0])}\n\telse{\nif(bbcount[0] == 1){calc = (bbcount[0])}else{calc = (bbcount[0] - 1)}\n\t\n}\n\t\nif(calc > 0){print(calc)}else{print(\"0\")}"}, {"source_code": "n = readline();input = readline().split(' ');\n\nvar gar = [];\nfor (var i = 0; i < input.length - 1; i++)\n{ gar.push( Math.abs( input[i] - input[(i+1)] ) ) }\n\n\t\n\n\n//print(gar);\nvar b = Math.min(...gar);\nvar bcount= 0 ;for (var i = 0; i < gar.length; i++) {if(gar[i]==\"1\"){bcount +=1;}}\n\t\n\n\nif(bcount > 0 )\n{\n\nif(bcount == (input.length -1)){print(bcount)}else {print(bcount - 1)}\n\n\n}\nelse{print(0)};\n"}, {"source_code": "n = readline();\ninput = readline().split(' ');\n//1 3 4 5 7 9\nvar gar = [];\n\n\nfor (var i = 0; i < input.length - 1; i++)\n{\n gar.push(\n\tMath.abs(input[i] - input[(i+1)]))\n}\n\nvar b = Math.min(...gar);\n\nvar bcount= 0 ;\nfor (var i = 0; i < gar.length; i++) {\n\tif(gar[i]==b){bcount +=1;}\n}\n\nif(bcount > 1 ){print(bcount)}else{print(0)};"}], "src_uid": "858b5e75e21c4cba6d08f3f66be0c198"} {"nl": {"description": "Vadim loves decorating the Christmas tree, so he got a beautiful garland as a present. It consists of $$$n$$$ light bulbs in a single row. Each bulb has a number from $$$1$$$ to $$$n$$$ (in arbitrary order), such that all the numbers are distinct. While Vadim was solving problems, his home Carp removed some light bulbs from the garland. Now Vadim wants to put them back on.Vadim wants to put all bulb back on the garland. Vadim defines complexity of a garland to be the number of pairs of adjacent bulbs with numbers with different parity (remainder of the division by $$$2$$$). For example, the complexity of 1 4 2 3 5 is $$$2$$$ and the complexity of 1 3 5 7 6 4 2 is $$$1$$$.No one likes complexity, so Vadim wants to minimize the number of such pairs. Find the way to put all bulbs back on the garland, such that the complexity is as small as possible.", "input_spec": "The first line contains a single integer $$$n$$$ ($$$1 \\le n \\le 100$$$) — the number of light bulbs on the garland. The second line contains $$$n$$$ integers $$$p_1,\\ p_2,\\ \\ldots,\\ p_n$$$ ($$$0 \\le p_i \\le n$$$) — the number on the $$$i$$$-th bulb, or $$$0$$$ if it was removed.", "output_spec": "Output a single number — the minimum complexity of the garland.", "sample_inputs": ["5\n0 5 0 2 3", "7\n1 0 0 5 0 0 2"], "sample_outputs": ["2", "1"], "notes": "NoteIn the first example, one should place light bulbs as 1 5 4 2 3. In that case, the complexity would be equal to 2, because only $$$(5, 4)$$$ and $$$(2, 3)$$$ are the pairs of adjacent bulbs that have different parity.In the second case, one of the correct answers is 1 7 3 5 6 4 2. "}, "positive_code": [{"source_code": "\"use strict\";var readline=require(\"readline\"),extendStatics=function(r,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])})(r,t)};\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */function __extends(r,t){function n(){this.constructor=r}extendStatics(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function isFunction(r){return\"function\"==typeof r}var _enable_super_gross_mode_that_will_cause_bad_things=!1,config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;_enable_super_gross_mode_that_will_cause_bad_things=r},get useDeprecatedSynchronousErrorHandling(){return _enable_super_gross_mode_that_will_cause_bad_things}};function hostReportError(r){setTimeout((function(){throw r}),0)}var empty={closed:!0,next:function(r){},error:function(r){if(config.useDeprecatedSynchronousErrorHandling)throw r;hostReportError(r)},complete:function(){}},isArray=function(){return Array.isArray||function(r){return r&&\"number\"==typeof r.length}}();function isObject(r){return null!==r&&\"object\"==typeof r}var UnsubscriptionErrorImpl=function(){function r(r){return Error.call(this),this.message=r?r.length+\" errors occurred during unsubscription:\\n\"+r.map((function(r,t){return t+1+\") \"+r.toString()})).join(\"\\n \"):\"\",this.name=\"UnsubscriptionError\",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),UnsubscriptionError=UnsubscriptionErrorImpl,Subscription=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}return r.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this._parentOrParents,e=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof r)n.remove(this);else if(null!==n)for(var i=0;ithis.total&&this.destination.next(r)},t}(Subscriber);readStdin().pipe(skip(1),take(1),map((function(r){return r.split(\" \").map((function(r){return+r}))}))).subscribe((function(r){for(var t=0,n=0,e=0,o=[],i=0;i0&&r[i-1]>0&&r[i-1]%2!=r[i]%2&&(e+=1);var p=Math.round(r.length/2),h=Math.floor(r.length/2),b=p-t,f=h-n,l=function(r,t){\"any\"===r?e+=1===t?0:1:\"even\"===r?f>=t?f-=t:e+=1:b>=t?b-=t:e+=1},d=function(r){var t=r.left,n=r.right,e=r.distance;return\"any\"===t||\"any\"===n?e+1e4:e};o.sort((function(r,t){return d(r)-d(t)})).forEach((function(r){var t=r.left,n=r.right,o=r.distance;\"even\"===t&&\"odd\"===n||\"odd\"===t&&\"even\"===n?e+=1:\"any\"===t?l(n,o):\"any\"===n?l(t,o):\"even\"===t?f>=o?f-=o:e+=2:\"odd\"===t&&(b>=o?b-=o:e+=2)})),console.log(e)}));\n"}], "negative_code": [{"source_code": "\"use strict\";var readline=require(\"readline\"),extendStatics=function(r,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])})(r,t)};\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */function __extends(r,t){function n(){this.constructor=r}extendStatics(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function isFunction(r){return\"function\"==typeof r}var _enable_super_gross_mode_that_will_cause_bad_things=!1,config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;_enable_super_gross_mode_that_will_cause_bad_things=r},get useDeprecatedSynchronousErrorHandling(){return _enable_super_gross_mode_that_will_cause_bad_things}};function hostReportError(r){setTimeout((function(){throw r}),0)}var empty={closed:!0,next:function(r){},error:function(r){if(config.useDeprecatedSynchronousErrorHandling)throw r;hostReportError(r)},complete:function(){}},isArray=function(){return Array.isArray||function(r){return r&&\"number\"==typeof r.length}}();function isObject(r){return null!==r&&\"object\"==typeof r}var UnsubscriptionErrorImpl=function(){function r(r){return Error.call(this),this.message=r?r.length+\" errors occurred during unsubscription:\\n\"+r.map((function(r,t){return t+1+\") \"+r.toString()})).join(\"\\n \"):\"\",this.name=\"UnsubscriptionError\",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),UnsubscriptionError=UnsubscriptionErrorImpl,Subscription=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}return r.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this._parentOrParents,e=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof r)n.remove(this);else if(null!==n)for(var i=0;ithis.total&&this.destination.next(r)},t}(Subscriber);readStdin().pipe(skip(1),take(1),map((function(r){return r.split(\" \").map((function(r){return+r}))}))).subscribe((function(r){for(var t=0,n=0,e=0,o=[],i=0;i0&&r[i-1]>0&&r[i-1]%2!=r[i]%2&&(e+=1);var p=Math.round(r.length/2),b=Math.floor(r.length/2),h=p-t,f=b-n,l=function(r,t){\"any\"===r?e+=1:\"even\"===r?f>=t?f-=t:e+=1:h>=t?h-=t:e+=1};o.sort((function(r,t){return t.distance-r.distance})).forEach((function(r){var t=r.left,n=r.right,o=r.distance;\"even\"===t&&\"odd\"===n||\"odd\"===t&&\"even\"===n?e+=1:\"any\"===t?l(n,o):\"any\"===n?l(t,o):\"even\"===t?(f-=o)<0&&(e+=2):\"odd\"===t&&(h-=o)<0&&(e+=2)})),console.log(e)}));\n"}, {"source_code": "\"use strict\";var readline=require(\"readline\"),extendStatics=function(r,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])})(r,t)};\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */function __extends(r,t){function n(){this.constructor=r}extendStatics(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function isFunction(r){return\"function\"==typeof r}var _enable_super_gross_mode_that_will_cause_bad_things=!1,config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;_enable_super_gross_mode_that_will_cause_bad_things=r},get useDeprecatedSynchronousErrorHandling(){return _enable_super_gross_mode_that_will_cause_bad_things}};function hostReportError(r){setTimeout((function(){throw r}),0)}var empty={closed:!0,next:function(r){},error:function(r){if(config.useDeprecatedSynchronousErrorHandling)throw r;hostReportError(r)},complete:function(){}},isArray=function(){return Array.isArray||function(r){return r&&\"number\"==typeof r.length}}();function isObject(r){return null!==r&&\"object\"==typeof r}var UnsubscriptionErrorImpl=function(){function r(r){return Error.call(this),this.message=r?r.length+\" errors occurred during unsubscription:\\n\"+r.map((function(r,t){return t+1+\") \"+r.toString()})).join(\"\\n \"):\"\",this.name=\"UnsubscriptionError\",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),UnsubscriptionError=UnsubscriptionErrorImpl,Subscription=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}return r.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this._parentOrParents,e=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof r)n.remove(this);else if(null!==n)for(var i=0;ithis.total&&this.destination.next(r)},t}(Subscriber);readStdin().pipe(skip(1),take(1),map((function(r){return r.split(\" \").map((function(r){return+r}))}))).subscribe((function(r){for(var t=0,n=0,e=0,o=[],i=0;i0&&r[i-1]>0&&r[i-1]%2!=r[i]%2&&(e+=1);var p=Math.round(r.length/2),h=Math.floor(r.length/2),b=p-t,f=h-n,l=function(r,t){\"any\"===r?e+=1===t?0:1:\"even\"===r?f>=t?f-=t:e+=1:b>=t?b-=t:e+=1},d=function(r){var t=r.left,n=r.right,e=r.distance;return\"any\"===t||\"any\"===n?e+1e4:e};o.sort((function(r,t){return d(r)-d(t)})).forEach((function(r){var t=r.left,n=r.right,o=r.distance;\"even\"===t&&\"odd\"===n||\"odd\"===t&&\"even\"===n?e+=1:\"any\"===t?l(n,o):\"any\"===n?l(t,o):\"even\"===t?f>o?f-=o:e+=2:\"odd\"===t&&(b>o?b-=o:e+=2)})),console.log(e)}));\n"}, {"source_code": "\"use strict\";var readline=require(\"readline\"),extendStatics=function(r,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])})(r,t)};\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */function __extends(r,t){function n(){this.constructor=r}extendStatics(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function isFunction(r){return\"function\"==typeof r}var _enable_super_gross_mode_that_will_cause_bad_things=!1,config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;_enable_super_gross_mode_that_will_cause_bad_things=r},get useDeprecatedSynchronousErrorHandling(){return _enable_super_gross_mode_that_will_cause_bad_things}};function hostReportError(r){setTimeout((function(){throw r}),0)}var empty={closed:!0,next:function(r){},error:function(r){if(config.useDeprecatedSynchronousErrorHandling)throw r;hostReportError(r)},complete:function(){}},isArray=function(){return Array.isArray||function(r){return r&&\"number\"==typeof r.length}}();function isObject(r){return null!==r&&\"object\"==typeof r}var UnsubscriptionErrorImpl=function(){function r(r){return Error.call(this),this.message=r?r.length+\" errors occurred during unsubscription:\\n\"+r.map((function(r,t){return t+1+\") \"+r.toString()})).join(\"\\n \"):\"\",this.name=\"UnsubscriptionError\",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),UnsubscriptionError=UnsubscriptionErrorImpl,Subscription=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}return r.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this._parentOrParents,e=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof r)n.remove(this);else if(null!==n)for(var i=0;ithis.total&&this.destination.next(r)},t}(Subscriber);readStdin().pipe(skip(1),take(1),map((function(r){return r.split(\" \").map((function(r){return+r}))}))).subscribe((function(r){for(var t=0,n=0,e=0,o=[],i=0;i0&&r[i-1]>0&&r[i-1]%2!=r[i]%2&&(e+=1);var p=Math.round(r.length/2),b=Math.floor(r.length/2),h=p-t,f=b-n,l=function(r,t){\"any\"===r?e+=1===t?0:1:\"even\"===r?f>=t?f-=t:e+=1:h>=t?h-=t:e+=1};o.sort((function(r,t){return t.distance-r.distance})).forEach((function(r){var t=r.left,n=r.right,o=r.distance;\"even\"===t&&\"odd\"===n||\"odd\"===t&&\"even\"===n?e+=1:\"any\"===t?l(n,o):\"any\"===n?l(t,o):\"even\"===t?(f-=o)<0&&(e+=2):\"odd\"===t&&(h-=o)<0&&(e+=2)})),console.log(e)}));\n"}, {"source_code": "\"use strict\";var readline=require(\"readline\"),extendStatics=function(r,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])})(r,t)};\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */function __extends(r,t){function n(){this.constructor=r}extendStatics(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function isFunction(r){return\"function\"==typeof r}var _enable_super_gross_mode_that_will_cause_bad_things=!1,config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;_enable_super_gross_mode_that_will_cause_bad_things=r},get useDeprecatedSynchronousErrorHandling(){return _enable_super_gross_mode_that_will_cause_bad_things}};function hostReportError(r){setTimeout((function(){throw r}),0)}var empty={closed:!0,next:function(r){},error:function(r){if(config.useDeprecatedSynchronousErrorHandling)throw r;hostReportError(r)},complete:function(){}},isArray=function(){return Array.isArray||function(r){return r&&\"number\"==typeof r.length}}();function isObject(r){return null!==r&&\"object\"==typeof r}var UnsubscriptionErrorImpl=function(){function r(r){return Error.call(this),this.message=r?r.length+\" errors occurred during unsubscription:\\n\"+r.map((function(r,t){return t+1+\") \"+r.toString()})).join(\"\\n \"):\"\",this.name=\"UnsubscriptionError\",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),UnsubscriptionError=UnsubscriptionErrorImpl,Subscription=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}return r.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this._parentOrParents,e=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof r)n.remove(this);else if(null!==n)for(var i=0;ithis.total&&this.destination.next(r)},t}(Subscriber);readStdin().pipe(skip(1),take(1),map((function(r){return r.split(\" \").map((function(r){return+r}))}))).subscribe((function(r){for(var t=0,n=0,e=0,o=[],i=0;i0&&r[i-1]>0&&r[i-1]%2!=r[i]%2&&(e+=1);var p=Math.round(r.length/2),h=Math.floor(r.length/2),b=p-t,f=h-n,l=function(r,t){\"any\"===r?e+=1===t?0:1:\"even\"===r?f>=t?f-=t:e+=1:b>=t?b-=t:e+=1},d=function(r){var t=r.left,n=r.right,e=r.distance;return\"any\"===t||\"any\"===n?e+1e4:e};o.sort((function(r,t){return d(r)-d(t)})).forEach((function(r){var t=r.left,n=r.right,o=r.distance;\"even\"===t&&\"odd\"===n||\"odd\"===t&&\"even\"===n?e+=1:\"any\"===t?l(n,o):\"any\"===n?l(t,o):\"even\"===t?(f-=o)<0&&(e+=2):\"odd\"===t&&(b-=o)<0&&(e+=2)})),console.log(e)}));\n"}], "src_uid": "90db6b6548512acfc3da162144169dba"} {"nl": {"description": "Fox Ciel has some flowers: r red flowers, g green flowers and b blue flowers. She wants to use these flowers to make several bouquets. There are 4 types of bouquets: To make a \"red bouquet\", it needs 3 red flowers. To make a \"green bouquet\", it needs 3 green flowers. To make a \"blue bouquet\", it needs 3 blue flowers. To make a \"mixing bouquet\", it needs 1 red, 1 green and 1 blue flower. Help Fox Ciel to find the maximal number of bouquets she can make.", "input_spec": "The first line contains three integers r, g and b (0 ≤ r, g, b ≤ 109) — the number of red, green and blue flowers.", "output_spec": "Print the maximal number of bouquets Fox Ciel can make.", "sample_inputs": ["3 6 9", "4 4 4", "0 0 0"], "sample_outputs": ["6", "4", "0"], "notes": "NoteIn test case 1, we can make 1 red bouquet, 2 green bouquets and 3 blue bouquets.In test case 2, we can make 1 red, 1 green, 1 blue and 1 mixing bouquet."}, "positive_code": [{"source_code": "var flowers = function(r, g, b){\n\tvar count = 0;\n\tvar colors = [r, g, b];\n\tfor (var i in colors) {\n\t\tif (colors[i] > 3){\n\t\t\tif (colors[i] % 3 == 0){\n\t\t\t\tcount += colors[i] / 3 - 1;\n\t\t\t\tcolors[i] = 3;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount += Math.floor(colors[i] / 3);\n\t\t\t\tcolors[i] = colors[i] % 3;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( colors.filter(function(index) {\n\t\treturn index == 2\n\t}).length < 2) {\n\t\tfor (var i in colors){\n\t\t\tif (colors[i] == 3){\n\t\t\t\tcolors[i] -= 3;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\n\twhile (colors.filter(function(index) {\n\t\treturn index >= 1;\n\t}).length >= 3) {\n\t\tfor (var i in colors) {\n\t\t\tcolors[i] -= 1;\n\t\t}\n\t\tcount++;\n\t}\n\n\treturn count;\n};\n\nvar line = readline().split(' ');\nvar r = parseInt(line[0]);\nvar g = parseInt(line[1]);\nvar b = parseInt(line[2]);\n\nprint (flowers(r, g, b));"}], "negative_code": [{"source_code": "var flowers = function(r, g, b){\n\tvar count = 0;\n\tvar colors = [r, g, b];\n\tfor (var i in colors) {\n\t\twhile (colors[i] > 3){\n\t\t\tcolors[i] -= 3;\n\t\t\tcount++;\n\t\t}\n\t}\n\t\n\tr = colors[0];\n\tg = colors[1];\n\tb = colors[2];\n\twhile (r >= 1 && g >= 1 && b >= 1){\n\t\tr -= 1;\n\t\tg -= 1;\n\t\tb -= 1;\n\t\tcount++;\n\t}\n\n\treturn count;\n};\n\nvar line = readline().split(' ');\nvar r = parseInt(line[0]);\nvar g = parseInt(line[1]);\nvar b = parseInt(line[2]);\n\nprint (flowers(r, g, b));"}, {"source_code": "var flowers = function(r, g, b){\n\tvar count = 0;\n\tvar colors = [r, g, b];\n\tfor (var i in colors) {\n\t\twhile (colors[i] > 3){\n\t\t\tcolors[i] -= 3;\n\t\t\tcount++;\n\t\t}\n\t}\n\t\n\tr = colors[0];\n\tg = colors[1];\n\tb = colors[2];\n\tif (r + g + b >= 6){\n\n\t\tcount += 2;\n\t}\n\telse{\n\t\twhile (r >= 1 && g >= 1 && b >= 1){\n\t\t\tr -= 1;\n\t\t\tg -= 1;\n\t\t\tb -= 1;\n\t\t\tcount++;\n\t\t}\n\t}\n\n\treturn count;\n};\nvar line = readline().split(' ');\nvar r = parseInt(line[0]);\nvar g = parseInt(line[1]);\nvar b = parseInt(line[2]);\n\nprint (flowers(r, g, b));\n"}, {"source_code": "var flowers = function(r, g, b){\n\tvar count = 0;\n\tvar colors = [r, g, b];\n\tfor (var i in colors) {\n\t\twhile (colors[i] >= 3){\n\t\t\tcolors[i] -= 3;\n\t\t\tcount++;\n\t\t}\n\t}\n\t\n\tr = colors[0];\n\tg = colors[1];\n\tb = colors[2];\n\twhile (r >= 1 && g >= 1 && b >= 1){\n\t\tr -= 1;\n\t\tg -= 1;\n\t\tb -= 1;\n\t\tcount++;\n\t}\n\n\treturn count;\n};\n\nvar line = readline().split(' ');\nvar r = parseInt(line[0]);\nvar g = parseInt(line[1]);\nvar b = parseInt(line[2]);\n\nprint (flowers(r, g, b));"}, {"source_code": "var flowers = function(r, g, b){\n\treturn Math.floor((r + g + b) / 3);\n};\n\nvar line = readline().split(' ');\nvar r = parseInt(line[0]);\nvar g = parseInt(line[1]);\nvar b = parseInt(line[2]);\n\nprint (flowers(r, g, b));"}, {"source_code": "var flowers = function(r, g, b){\n\tvar count = 0;\n\tvar colors = [r, g, b];\n\tfor (var i in colors) {\n\t\twhile (colors[i] > 3){\n\t\t\tcolors[i] -= 3;\n\t\t\tcount++;\n\t\t}\n\t}\n\t\n\tr = colors[0];\n\tg = colors[1];\n\tb = colors[2];\n\n\tif (r + g + b == 9){\n\t\tcount += 3\n\t}\n\telse if (r + g + b >= 6){\n\t\tcount += 2;\n\t}\n\telse{\n\t\twhile (r >= 1 && g >= 1 && b >= 1){\n\t\t\tr -= 1;\n\t\t\tg -= 1;\n\t\t\tb -= 1;\n\t\t\tcount++;\n\t\t}\n\t}\n\n\treturn count;\n};\n\nvar line = readline().split(' ');\nvar r = parseInt(line[0]);\nvar g = parseInt(line[1]);\nvar b = parseInt(line[2]);\n\nprint (flowers(r, g, b));"}], "src_uid": "acddc9b0db312b363910a84bd4f14d8e"} {"nl": {"description": "Stepan is a very experienced olympiad participant. He has n cups for Physics olympiads and m cups for Informatics olympiads. Each cup is characterized by two parameters — its significance ci and width wi.Stepan decided to expose some of his cups on a shelf with width d in such a way, that: there is at least one Physics cup and at least one Informatics cup on the shelf, the total width of the exposed cups does not exceed d, from each subjects (Physics and Informatics) some of the most significant cups are exposed (i. e. if a cup for some subject with significance x is exposed, then all the cups for this subject with significance greater than x must be exposed too). Your task is to determine the maximum possible total significance, which Stepan can get when he exposes cups on the shelf with width d, considering all the rules described above. The total significance is the sum of significances of all the exposed cups.", "input_spec": "The first line contains three integers n, m and d (1 ≤ n, m ≤ 100 000, 1 ≤ d ≤ 109) — the number of cups for Physics olympiads, the number of cups for Informatics olympiads and the width of the shelf. Each of the following n lines contains two integers ci and wi (1 ≤ ci, wi ≤ 109) — significance and width of the i-th cup for Physics olympiads. Each of the following m lines contains two integers cj and wj (1 ≤ cj, wj ≤ 109) — significance and width of the j-th cup for Informatics olympiads.", "output_spec": "Print the maximum possible total significance, which Stepan can get exposing cups on the shelf with width d, considering all the rules described in the statement. If there is no way to expose cups on the shelf, then print 0.", "sample_inputs": ["3 1 8\n4 2\n5 5\n4 2\n3 2", "4 3 12\n3 4\n2 4\n3 5\n3 4\n3 5\n5 2\n3 4", "2 2 2\n5 3\n6 3\n4 2\n8 1"], "sample_outputs": ["8", "11", "0"], "notes": "NoteIn the first example Stepan has only one Informatics cup which must be exposed on the shelf. Its significance equals 3 and width equals 2, so after Stepan exposes it, the width of free space on the shelf becomes equal to 6. Also, Stepan must expose the second Physics cup (which has width 5), because it is the most significant cup for Physics (its significance equals 5). After that Stepan can not expose more cups on the shelf, because there is no enough free space. Thus, the maximum total significance of exposed cups equals to 8."}, "positive_code": [{"source_code": "function f(a,b){ \n if (a[0]==b[0]){return a[1]-b[1];}else{return b[0]-a[0];}\n}\n\nvar s=readline().split(' '); var n=+s[0];var m=+s[1];var d=+s[2];\n\nvar a=[]; var i;\nfor (i=0;i= 0) && (sums2a[i]+sums2b[z]>d)) --z;\n if (z < 0) continue;\n var w = sums1a[i]+sums1b[z]; if(w > ans) ans = w;\n}\n\nprint(ans)"}, {"source_code": "var r=readline().split(' ');\nvar n=+r[0];\nvar m=+r[1];\nvar d=+r[2];\nvar p1=[],p2=[];\nvar q1=[],q2=[],s1=0,s2=0;\nvar r1=[],r2=[],g1=0,g2=0;\nfor(var i=0;i=0&&r2[pt]+r1[i]>d) --pt;\n if(pt<0) continue;\n var cur=q1[i]+q2[pt];\n if(cur>ans) ans=cur;\n}\nprint(ans);"}, {"source_code": "var _ = readline().split( ' ' );\nvar N = +_[ 0 ];\nvar M = +_[ 1 ];\nvar D = +_[ 2 ];\nfunction cmp( a, b ) {\n var x, y;\n if( a[ 0 ] != b[ 0 ] ) {\n x = -a[ 0 ];\n y = -b[ 0 ];\n } else {\n x = a[ 1 ];\n y = b[ 1 ];\n }\n if( x < y ) return -1;\n else if( x === y ) return 0;\n return 1;\n}\nvar ACW = [];\nfor( var i = 0; i < N; ++i ) {\n var __ = readline().split( ' ' );\n ACW.push( [ +__[ 0 ], +__[ 1 ] ] );\n}\nACW.sort( cmp );\nvar BCW = [];\nfor( var i = 0; i < M; ++i ) {\n var __ = readline().split( ' ' );\n BCW.push( [ +__[ 0 ], +__[ 1 ] ] );\n}\nBCW.sort( cmp );\nvar curc = 0;\nvar curw = 0;\nvar bptr = 0; // [ 0, bptr )\nwhile( bptr < M ) {\n if( curw + BCW[ bptr ][ 1 ] > D ) break;\n curw += BCW[ bptr ][ 1 ];\n curc += BCW[ bptr ][ 0 ];\n ++bptr;\n}\nvar ans = 0;\nfor( var aptr = 0; aptr < N; ++aptr ) {\n curw += ACW[ aptr ][ 1 ];\n curc += ACW[ aptr ][ 0 ];\n while( curw > D && bptr > 0 ) {\n --bptr;\n curw -= BCW[ bptr ][ 1 ];\n curc -= BCW[ bptr ][ 0 ];\n }\n if( bptr === 0 || curw > D ) break;\n ans = Math.max( ans, curc );\n}\nprint( ans );"}, {"source_code": "var line = readline().split(' ');\nvar n = parseInt(line[0]);\nvar m = parseInt(line[1]);\nvar d = parseInt(line[2]);\n\nvar i, j, k, a, b, c, w;\n\na = [];\n\nfor (i=0; i sol) {\n\t\tsol = zbir;\n\t}\n}\n\nfor (i=1; i d && j > 0) {\n\t\tj--;\n\t\tsirina -= b[j].w;\n\t\tzbir -= b[j].c;\n\t}\n\n\tif (zbir > sol && j > 0) {\n\t\tsol = zbir;\n\t}\n}\n\nprint(sol);\n\n\n\n\n"}, {"source_code": "// Polyfill for NodeJS\nif (undefined == readline) {\n\tvar rLines = require('fs').readFileSync(\"/dev/stdin\", \"utf8\").split(\"\\n\"), \n\t\trIndex = -1,\n\t\treadline = function() {\n\t\t\trIndex++;\n\t\t\treturn rLines[rIndex]\n\t\t}\n}\nif (undefined == print) {\n\tvar print = console.log\n}\n\n// Useful Read functions\nvar int = function() {\n\treturn parseInt(readline())\n}\n\nvar ints = function() {\n var tmp = readline().split(' ');\n var ans = [];\n for(var i=0;iac[y]) return -1;\n \n if(aw[x] > aw[y]) return 1;\n if(aw[x] < aw[y]) return -1;\n \n return 0;\n});\n\n\nb.sort(function(x,y) \n{\n if(bc[x]bc[y]) return -1;\n \n if(bw[x] > bw[y]) return 1;\n if(bw[x] < bw[y]) return -1;\n \n return 0;\n});\n\nvar pa = 0;\nvar pb = 0;\nvar sum = aw[a[0]] + bw[b[0]];\n\nif(sum > d)\n{\n print(\"0\");\n} else {\n\nvar totalc = ac[a[0]] + bc[b[0]];\n\nwhile (pb+1 < m && sum + bw[b[pb+1]]<=d)\n{\n pb++;\n sum += bw[b[pb]];\n totalc += bc[b[pb]];\n}\nvar bestc = totalc;\n\n//print(pb);\n\n/*\nfor(var i=0;i 0 && pa < n)\n{\n pa++;\n sum += aw[a[pa]];\n totalc += ac[a[pa]];\n\n //print(pa + \" \" + pb);\n\n while (pb >= 0 && sum > d)\n {\n sum -= bw[b[pb]];\n totalc -= bc[b[pb]];\n pb--;\n }\n\n if (sum <= d && bestc < totalc)\n bestc = totalc;\n}\n\nprint(bestc);\n}"}], "negative_code": [{"source_code": "var _ = readline().split( ' ' );\nvar N = +_[ 0 ];\nvar M = +_[ 1 ];\nvar D = +_[ 2 ];\nvar ACW = [];\nfor( var i = 0; i < N; ++i ) {\n var __ = readline().split( ' ' );\n ACW.push( [ +__[ 0 ], +__[ 1 ] ] );\n}\nACW.sort().reverse();\nvar BCW = [];\nfor( var i = 0; i < M; ++i ) {\n var __ = readline().split( ' ' );\n BCW.push( [ +__[ 0 ], +__[ 1 ] ] );\n}\nBCW.sort().reverse();\nvar curc = 0;\nvar curw = 0;\nvar bptr = 0; // [ 0, bptr )\nwhile( bptr < M ) {\n if( curw + BCW[ bptr ][ 1 ] > D ) break;\n curw += BCW[ bptr ][ 1 ];\n curc += BCW[ bptr ][ 0 ];\n ++bptr;\n}\nvar ans = 0;\nfor( var aptr = 0; aptr < N; ++i ) {\n curw += ACW[ aptr ][ 1 ];\n curc += ACW[ aptr ][ 0 ];\n while( curw > D && bptr > 0 ) {\n --bptr;\n curw -= BCW[ bptr ][ 1 ];\n curc -= BCW[ bptr ][ 0 ];\n }\n if( bptr === 0 || curw > D ) break;\n ans = Math.max( ans, curc );\n}\nprint( ans );"}, {"source_code": "var _ = readline().split( ' ' );\nvar N = +_[ 0 ];\nvar M = +_[ 1 ];\nvar D = +_[ 2 ];\nvar ACW = [];\nfor( var i = 0; i < N; ++i ) {\n var __ = readline().split( ' ' );\n ACW.push( [ +__[ 0 ], +__[ 1 ] ] );\n}\nACW.sort().reverse();\nvar BCW = [];\nfor( var i = 0; i < M; ++i ) {\n var __ = readline().split( ' ' );\n BCW.push( [ +__[ 0 ], +__[ 1 ] ] );\n}\nBCW.sort().reverse();\nvar curc = 0;\nvar curw = 0;\nvar bptr = 0; // [ 0, bptr )\nwhile( bptr < M ) {\n if( curw + BCW[ bptr ][ 1 ] > D ) break;\n curw += BCW[ bptr ][ 1 ];\n curc += BCW[ bptr ][ 0 ];\n ++bptr;\n}\nvar bok = bptr > 0;\nvar ans = 0;\nfor( var aptr = 0; bok && aptr < N; ++i ) {\n curw += ACW[ aptr ][ 1 ];\n curc += ACW[ aptr ][ 0 ];\n while( curw > D && bptr > 0 ) {\n --bptr;\n curw -= BCW[ bptr ][ 1 ];\n curc -= BCW[ bptr ][ 0 ];\n }\n if( curw > D ) break;\n ans = Math.max( ans, curc );\n}\nprint( ans );\n"}, {"source_code": "var _ = readline().split( ' ' );\nvar N = +_[ 0 ];\nvar M = +_[ 1 ];\nvar D = +_[ 2 ];\nvar ACW = [];\nfor( var i = 0; i < N; ++i ) {\n var __ = readline().split( ' ' );\n ACW.push( [ +__[ 0 ], +__[ 1 ] ] );\n}\nACW.sort().reverse();\nvar BCW = [];\nfor( var i = 0; i < M; ++i ) {\n var __ = readline().split( ' ' );\n BCW.push( [ +__[ 0 ], +__[ 1 ] ] );\n}\nBCW.sort().reverse();\nvar curc = 0;\nvar curw = 0;\nvar bptr = 0; // [ 0, bptr )\nwhile( bptr < M ) {\n if( curw + BCW[ bptr ][ 1 ] > D ) break;\n curw += BCW[ bptr ][ 1 ];\n curc += BCW[ bptr ][ 0 ];\n ++bptr;\n}\nvar ans = curc;\nfor( var aptr = 0; aptr < N; ++i ) {\n curw += ACW[ aptr ][ 1 ];\n curc += ACW[ aptr ][ 0 ];\n while( curw > D && bptr > 0 ) {\n --bptr;\n curw -= BCW[ bptr ][ 1 ];\n curc -= BCW[ bptr ][ 0 ];\n }\n if( curw > D ) break;\n ans = Math.max( ans, curc );\n}\nprint( ans );\n"}, {"source_code": "var line = readline().split(' ');\nvar n = parseInt(line[0]);\nvar m = parseInt(line[1]);\nvar d = parseInt(line[2]);\n\nvar i, j, k, a, b, c, w;\n\na = [];\n\nfor (i=0; i sol) {\n\t\tsol = zbir;\n\t}\n}\n\nfor (i=2; i d && j > 0) {\n\t\tj--;\n\t\tsirina -= b[j].w;\n\t\tzbir -= b[j].c;\n\t}\n\n\tif (zbir > sol && j > 0) {\n\t\tsol = zbir;\n\t}\n}\n\nprint(sol);\n\n\n\n\n"}, {"source_code": "// Polyfill for NodeJS\nif (undefined == readline) {\n\tvar rLines = require('fs').readFileSync(\"/dev/stdin\", \"utf8\").split(\"\\n\"), \n\t\trIndex = -1,\n\t\treadline = function() {\n\t\t\trIndex++;\n\t\t\treturn rLines[rIndex]\n\t\t}\n}\nif (undefined == print) {\n\tvar print = console.log\n}\n\n// Useful Read functions\nvar int = function() {\n\treturn parseInt(readline())\n}\n\nvar ints = function() {\n var tmp = readline().split(' ');\n var ans = [];\n for(var i=0;iac[y]) return -1;\n \n if(aw[x] > aw[y]) return 1;\n if(aw[x] < aw[y]) return -1;\n \n return 0;\n});\n\n\nb.sort(function(x,y) \n{\n if(bc[x]bc[y]) return -1;\n \n if(bw[x] > bw[y]) return 1;\n if(bw[x] < bw[y]) return -1;\n \n return 0;\n});\n\nvar pa = 0;\nvar pb = 0;\nvar sum = aw[a[0]] + bw[b[0]];\n\nif(sum > d)\n{\n print(\"0\");\n} else {\n\nvar totalc = ac[a[0]] + bc[b[0]];\n\nwhile (pb+1 < m && sum + bw[b[pb+1]]<=d)\n{\n pb++;\n sum += bw[b[pb]];\n totalc += bc[b[pb]];\n}\nvar bestc = totalc;\n\n/*\nfor(var i=0;i 0 && pa < n)\n{\n pa++;\n sum += aw[a[pa]];\n \n while (pb >= 0 && sum > d)\n {\n sum -= bw[b[pb]];\n totalc -= bc[b[pb]];\n pb--;\n }\n\n if (sum <= d && bestc < totalc)\n bestc = totalc;\n}\n\nprint(bestc);\n}"}], "src_uid": "da573a39459087ed7c42f70bc1d0e8ff"} {"nl": {"description": "Polycarp is preparing the first programming contest for robots. There are $$$n$$$ problems in it, and a lot of robots are going to participate in it. Each robot solving the problem $$$i$$$ gets $$$p_i$$$ points, and the score of each robot in the competition is calculated as the sum of $$$p_i$$$ over all problems $$$i$$$ solved by it. For each problem, $$$p_i$$$ is an integer not less than $$$1$$$.Two corporations specializing in problem-solving robot manufacturing, \"Robo-Coder Inc.\" and \"BionicSolver Industries\", are going to register two robots (one for each corporation) for participation as well. Polycarp knows the advantages and flaws of robots produced by these companies, so, for each problem, he knows precisely whether each robot will solve it during the competition. Knowing this, he can try predicting the results — or manipulating them. For some reason (which absolutely cannot involve bribing), Polycarp wants the \"Robo-Coder Inc.\" robot to outperform the \"BionicSolver Industries\" robot in the competition. Polycarp wants to set the values of $$$p_i$$$ in such a way that the \"Robo-Coder Inc.\" robot gets strictly more points than the \"BionicSolver Industries\" robot. However, if the values of $$$p_i$$$ will be large, it may look very suspicious — so Polycarp wants to minimize the maximum value of $$$p_i$$$ over all problems. Can you help Polycarp to determine the minimum possible upper bound on the number of points given for solving the problems?", "input_spec": "The first line contains one integer $$$n$$$ ($$$1 \\le n \\le 100$$$) — the number of problems. The second line contains $$$n$$$ integers $$$r_1$$$, $$$r_2$$$, ..., $$$r_n$$$ ($$$0 \\le r_i \\le 1$$$). $$$r_i = 1$$$ means that the \"Robo-Coder Inc.\" robot will solve the $$$i$$$-th problem, $$$r_i = 0$$$ means that it won't solve the $$$i$$$-th problem. The third line contains $$$n$$$ integers $$$b_1$$$, $$$b_2$$$, ..., $$$b_n$$$ ($$$0 \\le b_i \\le 1$$$). $$$b_i = 1$$$ means that the \"BionicSolver Industries\" robot will solve the $$$i$$$-th problem, $$$b_i = 0$$$ means that it won't solve the $$$i$$$-th problem.", "output_spec": "If \"Robo-Coder Inc.\" robot cannot outperform the \"BionicSolver Industries\" robot by any means, print one integer $$$-1$$$. Otherwise, print the minimum possible value of $$$\\max \\limits_{i = 1}^{n} p_i$$$, if all values of $$$p_i$$$ are set in such a way that the \"Robo-Coder Inc.\" robot gets strictly more points than the \"BionicSolver Industries\" robot.", "sample_inputs": ["5\n1 1 1 0 0\n0 1 1 1 1", "3\n0 0 0\n0 0 0", "4\n1 1 1 1\n1 1 1 1", "8\n1 0 0 0 0 0 0 0\n0 1 1 0 1 1 1 1"], "sample_outputs": ["3", "-1", "-1", "7"], "notes": "NoteIn the first example, one of the valid score assignments is $$$p = [3, 1, 3, 1, 1]$$$. Then the \"Robo-Coder\" gets $$$7$$$ points, the \"BionicSolver\" — $$$6$$$ points.In the second example, both robots get $$$0$$$ points, and the score distribution does not matter.In the third example, both robots solve all problems, so their points are equal."}, "positive_code": [{"source_code": "const processData = (lines) => {\n const k = lines[1].split(' ').map(x => +x)\n const l = lines[2].split(' ').map(x => +x)\n let diff = [0, 0]\n for (let i =0; i i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n processData(lines)\n})\n"}, {"source_code": "function main(rawInput) {\n var lines = rawInput.trim().split(\"\\n\").map(function (v) { return v.trim().split(\" \").map(function (u) { return parseInt(u, 10); }); });\n var n = lines.shift()[0];\n var ra = lines.shift();\n var rb = lines.shift();\n var sca = 0;\n var scb = 0;\n var unqa = 0;\n for (var i = 0; i < n; i++) {\n if (ra[i] == 1) {\n sca++;\n }\n if (rb[i] == 1) {\n scb++;\n }\n if (ra[i] > rb[i]) {\n unqa++;\n }\n }\n // console.error(sca, scb, unqa);\n if (sca > scb) {\n console.log(1);\n }\n else if (unqa > 0) {\n if ((scb - (sca - unqa)) % unqa == 0) {\n console.log((scb - (sca - unqa)) / unqa + 1);\n }\n else {\n console.log(Math.ceil((scb - (sca - unqa)) / unqa));\n }\n }\n else {\n console.log(-1);\n }\n // console.log('----')\n}\n// main(`5\n// 1 1 1 0 0\n// 0 1 1 1 1`);\n// main(`3\n// 0 0 0\n// 0 0 0`);\n// main(`4\n// 1 1 1 1\n// 1 1 1 1`);\n// main(\n// `9\n// 1 0 0 0 0 0 0 0 1\n// 0 1 1 0 1 1 1 1 0`\n// );\n// main(`2\n// 1 1\n// 1 0`);\n// main(`3\n// 0 1 1\n// 1 0 0`);\n// main(`7\n// 0 1 1 1 0 1 1\n// 1 0 1 1 1 1 1`);\n(function () {\n var d = \"\";\n process.stdin.on(\"data\", function (v) { return d += v; });\n process.stdin.on(\"end\", function () { return main(d); });\n})();\n"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\nvar con = true;\nvar num = 0;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] === 1)\n {\n num ++;\n }\n if(ROBO[i] === 1 && BIO[i] === 0)\n {\n RoboPoint++;\n }\n if(BIO[i] === 1 && ROBO[i] === 0)\n {\n BioPoint++;\n }\n}\nif(RoboPoint <= BioPoint && RoboPoint !== 0)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\n\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(RoboPoint === 0)\n{\n add = -1;\n}\n\n// print(num, check)\n// print(RoboPoint, BioPoint)\nprint(add);"}, {"source_code": "function readStringArray() {\n return readline().split(\" \");\n}\nfunction readNumArray() {\n return readStringArray().map(Number);\n}\n\nfunction main() {\n var testCasesNum = +readline();\n var robo = readNumArray();\n var bio = readNumArray();\n var roboSolved = 0;\n var bioSolved = 0;\n for (var i = 0; i < testCasesNum; i++) {\n if (robo[i] && !bio[i]) {\n roboSolved++;\n } else if (!robo[i] && bio[i]) {\n bioSolved++;\n }\n }\n if (roboSolved > bioSolved) {\n print(1);\n } else if (\n roboSolved === 0 ||\n (roboSolved === testCasesNum && bioSolved === testCasesNum)\n ) {\n print(-1);\n } else {\n print(\n bioSolved % roboSolved === 0\n ? bioSolved / roboSolved + 1\n : Math.ceil(bioSolved / roboSolved)\n );\n }\n}\nmain()"}, {"source_code": "var n = parseInt(readline());\nvar r = readline().split(' ');\nvar b = readline().split(' ');\n\nvar diff = 0;\nvar numR = 0;\nvar numB = 0;\n\nfor(var i = 0; i < n; i++) {\n if (r[i] !== b[i]) {\n diff++;\n \n if (r[i] === '1') {\n numR += 1;\n } else {\n numB += 1;\n }\n }\n}\n\nif (diff === 0 || numR === 0) {\n print(-1);\n} else {\n var exp = numB + 1;\n var val = exp / numR;\n var res = Number.isInteger(val) ? val : Math.ceil(val);\n print(res);\n}"}, {"source_code": "const main = data => {\n const n = data[0];\n const winnerArr = data[1].split(' ');\n const looserArr = data[2].split(' ');\n\n const winCount = winnerArr.filter((x, i) => looserArr[i] !== x && +x !== 0).length;\n const looseCount = looserArr.filter((x, i) => winnerArr[i] !== x && +x !== 0).length;\n\n if (winCount === 0) {\n console.log('-1')\n } else {\n let i = 1;\n while (winCount * i <= looseCount) {\n i++\n }\n console.log(i);\n }\n};\n\nlet data = '';\n\nprocess.stdin.on('data', input => data += input);\nprocess.stdin.on('end', () => {\n data = data.split('\\n');\n\n main(data);\n});"}, {"source_code": "let data = '';\nprocess.stdin.on('data', input => data += input);\nprocess.stdin.on('end', () => {\n const score = (arr1, arr2, n) => {\n let x = 0, y = 0;\n for (let i = 0; i < n; i++) {\n if (arr1[i] > arr2[i]) x++;\n if (arr1[i] < arr2[i]) y++;\n }\n if (x === 0) return -1;\n return Math.ceil( (y + 1) / x );\n }\n const inputStrings = data.split('\\n');\n const n = parseInt(inputStrings[0], 10);\n const arr1 = inputStrings[1].split(' ').map(Number);\n const arr2 = inputStrings[2].split(' ').map(Number);\n const answ = score(arr1,arr2,n)+ '\\n';\n process.stdout.write(answ);\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet max;\nlet arr1, arr2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n max = +d;\n return;\n }\n\n if (c === 1) {\n arr1 = d.split(' ').map(Number);\n c++;\n return;\n }\n\n arr2 = d.split(' ').map(Number);\n\n c++;\n});\n\nrl.on('close', () => {\n let common = 0;\n\n for (let i = 0; i < arr1.length; i++) {\n common += arr1[i] && arr2[i];\n }\n\n let sum1 = arr1.reduce((a, x) => a + x, 0) - common;\n let sum2 = arr2.reduce((a, x) => a + x, 0) - common;\n\n if (!sum1) {\n console.log(-1);\n }\n else {\n console.log(Math.ceil( (sum2 + 1) / sum1));\n }\n\n // let common = 0;\n\n // for (let i = 0; i < arr1.length; i++) {\n // common += arr1[i] && arr2[i];\n // }\n\n // let sum1 = arr1.reduce((a, x) => a + x, 0) - common;\n // let sum2 = arr2.reduce((a, x) => a + x, 0) - common;\n // let ans = sum1 > sum2 ? 1 : -1;\n\n // for (let i = 1; i <= max; i++) {\n // if (sum1 * i > sum2) {\n // ans = i;\n // break;\n // }\n // }\n\n // console.log(ans);\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet max;\nlet arr1, arr2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n max = +d;\n return;\n }\n\n if (c === 1) {\n arr1 = d.split(' ').map(Number);\n c++;\n return;\n }\n\n arr2 = d.split(' ').map(Number);\n\n c++;\n});\n\nrl.on('close', () => {\n let common = 0;\n\n for (let i = 0; i < arr1.length; i++) {\n common += arr1[i] && arr2[i];\n }\n\n let sum1 = arr1.reduce((a, x) => a + x, 0) - common;\n let sum2 = arr2.reduce((a, x) => a + x, 0) - common;\n let ans = sum1 > sum2 ? 1 : -1;\n\n for (let i = 1; i <= max; i++) {\n if (sum1 * i > sum2) {\n ans = i;\n break;\n }\n }\n\n console.log(ans);\n});\n"}], "negative_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet arr1, arr2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n if (c === 1) {\n arr1 = d.split(' ').map(Number);\n c++;\n return;\n }\n\n arr2 = d.split(' ').map(Number);\n\n c++;\n});\n\nrl.on('close', () => {\n let max = 0;\n let idx1 = 0;\n let idx2 = 0;\n\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i]) {\n idx1++;\n }\n else {\n idx1 = 0;\n }\n\n if (arr2[i]) {\n idx2++;\n }\n else {\n idx2 = 0;\n }\n\n max = Math.max(max, idx1, idx2);\n }\n\n let sum1 = 0;\n let sum2 = 0;\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i] === 1 && arr2[i] === 0) {\n sum1 += max;\n }\n else if (arr1[i] === 1 && arr2[i] === 1) {\n sum1 += 1;\n sum2 += 1;\n }\n else if (arr1[i] === 0 && arr2[i] === 1) {\n sum2 += 1;\n }\n }\n\n if (sum2 >= sum1) {\n console.log(-1);\n }\n else {\n console.log(max);\n }\n});\n"}, {"source_code": "const processData = (lines) => {\n const k = lines[1].split(' ').map(x => +x)\n const l = lines[2].split(' ').map(x => +x)\n let diff = [0, 0]\n for (let i =0; i i += c)\nprocess.stdin.on('end', () => {\n const {EOL} = require('os')\n const lines = i.split(EOL) /*your input text, split by lines*/\n processData(lines)\n})\n"}, {"source_code": "function main(rawInput) {\n var lines = rawInput.trim().split(\"\\n\").map(function (v) { return v.trim().split(\" \").map(function (u) { return parseInt(u, 10); }); });\n var n = lines.shift()[0];\n var ra = lines.shift();\n var rb = lines.shift();\n var sca = 0;\n var scb = 0;\n var unqa = 0;\n for (var i = 0; i < n; i++) {\n if (ra[i] == 1) {\n sca++;\n }\n if (rb[i] == 1) {\n scb++;\n }\n if (ra[i] > rb[i]) {\n unqa++;\n }\n }\n // console.error(sca, scb, unqa);\n if (sca > scb) {\n console.log(1);\n }\n else if (unqa > 0) {\n if ((scb - (sca - unqa)) % unqa == 0) {\n console.log((scb - (sca - unqa)) / unqa + 1);\n }\n else {\n console.log(Math.ceil((scb - (sca - unqa)) / unqa));\n }\n }\n else {\n console.log(-1);\n }\n // console.log('----')\n}\nmain(\"5\\n1 1 1 0 0\\n0 1 1 1 1\");\nmain(\"3\\n0 0 0\\n0 0 0\");\nmain(\"4\\n1 1 1 1\\n1 1 1 1\");\nmain(\"9\\n1 0 0 0 0 0 0 0 1\\n0 1 1 0 1 1 1 1 0\");\nmain(\"2\\n1 1\\n1 0\");\nmain(\"3\\n0 1 1\\n1 0 0\");\nmain(\"7\\n0 1 1 1 0 1 1\\n1 0 1 1 1 1 1\");\n(function () {\n var d = \"\";\n process.stdin.on(\"data\", function (v) { return d += v; });\n process.stdin.on(\"end\", function () { return main(d); });\n})();\n"}, {"source_code": "function main(rawInput) {\n var lines = rawInput.trim().split(\"\\n\").map(function (v) { return v.trim().split(\" \").map(function (u) { return parseInt(u, 10); }); });\n var n = lines.shift()[0];\n var ra = lines.shift();\n var rb = lines.shift();\n var sca = 0;\n var scb = 0;\n var unqa = 0;\n for (var i = 0; i < n; i++) {\n if (ra[i] == 1) {\n sca++;\n }\n if (rb[i] == 1) {\n scb++;\n }\n if (ra[i] > rb[i]) {\n unqa++;\n }\n }\n // console.error(sca, scb, unqa);\n if (sca > scb) {\n console.log(1);\n }\n else if (unqa > 0) {\n var ned = Math.ceil((scb - (sca - unqa)) / unqa) + 1;\n console.log(ned);\n }\n else {\n console.log(-1);\n }\n // console.log('----')\n}\n// main(`5\n// 1 1 1 0 0\n// 0 1 1 1 1`);\n// main(`3\n// 0 0 0\n// 0 0 0`);\n// main(`4\n// 1 1 1 1\n// 1 1 1 1`);\n// main(\n// `9\n// 1 0 0 0 0 0 0 0 1\n// 0 1 1 0 1 1 1 1 0`\n// );\n// main(`2\n// 1 1\n// 1 0`);\n// main(`3\n// 0 1 1\n// 1 0 0`);\n// main(`7\n// 0 1 1 1 0 1 1\n// 1 0 1 1 1 1 1`);\n(function () {\n var d = \"\";\n process.stdin.on(\"data\", function (v) { return d += v; });\n process.stdin.on(\"end\", function () { return main(d); });\n})();\n"}, {"source_code": "function main(rawInput) {\n var lines = rawInput.trim().split(\"\\n\").map(function (v) { return v.trim().split(\" \").map(function (u) { return parseInt(u, 10); }); });\n var n = lines.shift()[0];\n var ra = lines.shift();\n var rb = lines.shift();\n var sca = 0;\n var scb = 0;\n var unqa = 0;\n var found = false;\n for (var i = 0; i < n; i++) {\n if (ra[i] == 1) {\n sca++;\n }\n if (rb[i] == 1) {\n scb++;\n }\n if (ra[i] > rb[i]) {\n unqa++;\n found = true;\n }\n }\n // console.error(sca, scb, unqa);\n if (sca > scb) {\n console.log(1);\n }\n else if (found) {\n var ned = Math.ceil((scb - sca) / unqa) + 2;\n console.log(ned);\n }\n else {\n console.log(-1);\n }\n // console.log('----')\n}\n// main(`5\n// 1 1 1 0 0\n// 0 1 1 1 1`);\n// main(`3\n// 0 0 0\n// 0 0 0`);\n// main(`4\n// 1 1 1 1\n// 1 1 1 1`);\n// main(\n// `9\n// 1 0 0 0 0 0 0 0 1\n// 0 1 1 0 1 1 1 1 0`\n// );\n// main(`2\n// 1 1\n// 1 0`);\n// main(`3\n// 0 1 1\n// 1 0 0`);\n// main(`4\n// 0 1 1 0\n// 1 0 1 1`);\n(function () {\n var d = \"\";\n process.stdin.on(\"data\", function (v) { return d += v; });\n process.stdin.on(\"end\", function () { return main(d); });\n})();\n"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\nvar check = 0;\nvar con = true;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n if(BIO[i] === ROBO[i])\n {\n check++;\n if(check === ROBO.length)\n {\n add = -1;\n }\n }\n}\n// if(RoboPoint <= BioPoint)\n// {\n// add = Math.ceil((BioPoint + 1) / RoboPoint);\n// }\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(ROBO.indexOf(1) === -1)\n{\n add = -1;\n}\nprint(add);\n"}, {"source_code": "var times = parseInt(readline());\n\nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\n\nvar con = true;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n}\nif(RoboPoint < BioPoint)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\n\n\nprint(add);"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\nvar check = 0;\nvar con = true;\nvar num = 0;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] === 1)\n {\n num ++;\n }\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n if(BIO[i] === ROBO[i])\n {\n check++;\n }\n if(RoboPoint < BioPoint)\n {\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n }\n if(check === num)\n {\n add = -1;\n }\n if(JSON.stringify(ROBO) === JSON.stringify(BIO))\n {\n add = -1;\n }\n if(ROBO.indexOf(1) === -1)\n {\n add = -1;\n }\n}\n\n// print(num, check)\n// print(RoboPoint, BioPoint)\nprint(add);"}, {"source_code": "var times = parseInt(readline());\n\nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\n\nvar con = true;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n}\nif(RoboPoint < BioPoint)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\n\nprint(add);"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\nvar check = 0;\nvar con = true;\nvar num = 0;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] === 1)\n {\n num ++;\n }\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n if(BIO[i] === ROBO[i] === 1)\n {\n check++;\n }\n}\nif(RoboPoint < BioPoint)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\nif(check === num)\n{\n add = -1;\n}\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(ROBO.indexOf(1) === -1)\n{\n add = -1;\n}\n\n// print(num, check)\n// print(RoboPoint, BioPoint)\nprint(add);"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\nvar check = 0;\nvar con = true;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n if(BIO[i] === ROBO[i])\n {\n check++;\n if(check === ROBO.length)\n {\n add = -1;\n }\n }\n}\nif(RoboPoint <= BioPoint)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(ROBO.indexOf(1) === -1)\n{\n add = -1;\n}\n// print(check, ROBO.length);\n// print(RoboPoint, BioPoint)\nprint(add);"}, {"source_code": "var times = parseInt(readline());\nvar b = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nvar a =[];\nvar mx = 0;\nfor(var i = 0; i < times; i++)\n{\n a.push(mx + b[i]);\n write(a[i] + \" \");\n mx = Math.max(mx, a[i]);\n}"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\nvar check = 0;\nvar con = true;\nvar num = 0;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] === 1)\n {\n num ++;\n }\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n if(BIO[i] === ROBO[i])\n {\n check++;\n }\n}\nif(RoboPoint < BioPoint)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\nif(check === num)\n{\n add = -1;\n}\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(ROBO.indexOf(1) === -1)\n{\n add = -1;\n}\n\n// print(num, check)\n// print(RoboPoint, BioPoint)\nprint(add);"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\n \nvar con = true;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n}\nif(RoboPoint < BioPoint)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(ROBO.indexOf(1) === -1)\n{\n add = -1;\n}\n \nprint(add);"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\n \nvar con = true;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] > BIO[i])\n {\n RoboPoint++;\n }\n if(BIO[i] > ROBO[i])\n {\n BioPoint++;\n }\n}\nif(RoboPoint <= BioPoint)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(ROBO.indexOf(1) === -1)\n{\n add = -1;\n}\nprint(add);"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\nvar con = true;\nvar num = 0;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] === 1)\n {\n num ++;\n }\n if(ROBO[i] === 1 && BIO[i] === 0)\n {\n RoboPoint++;\n }\n if(BIO[i] === 1 && ROBO[i] === 0)\n {\n BioPoint++;\n }\n}\nif(RoboPoint <= BioPoint && RoboPoint !== 0)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\n\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(ROBO.indexOf(1) === -1)\n{\n add = -1;\n}\n\n// print(num, check)\nprint(add);\n"}, {"source_code": "var times = parseInt(readline());\n \nvar ROBO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar BIO = readline().split(\" \").map(function(x){return parseInt(x);});\nvar RoboPoint = 0;\nvar BioPoint = 0;\nvar add = 1;\nvar con = true;\nvar num = 0;\nfor(var i = 0; i < times; i++)\n{\n if(ROBO[i] === 1)\n {\n num ++;\n }\n if(ROBO[i] === 1 && BIO[i] === 0)\n {\n RoboPoint++;\n }\n if(BIO[i] === 1 && ROBO[i] === 0)\n {\n BioPoint++;\n }\n}\nif(RoboPoint <= BioPoint && RoboPoint !== 0)\n{\n add = Math.ceil((BioPoint + 1) / RoboPoint);\n}\n\nif(JSON.stringify(ROBO) === JSON.stringify(BIO))\n{\n add = -1;\n}\nif(RoboPoint === 0)\n{\n add = -1;\n}\n\n// print(num, check)\nprint(RoboPoint, BioPoint)\nprint(add);"}, {"source_code": "function readStringArray() {\n return readline().split(\" \");\n}\nfunction readNumArray() {\n return readStringArray().map(Number);\n}\n\nfunction main() {\n var testCasesNum = +readline();\n var robo = readNumArray();\n var bio = readNumArray();\n var roboSolved = 0;\n var bioSolved = 0;\n for (var i = 0; i < testCasesNum; i++) {\n if (robo[i] && !bio[i]) {\n roboSolved++;\n } else if (!robo[i] && bio[i]) {\n bioSolved++;\n }\n }\n if (roboSolved > bioSolved) {\n print(1);\n } else if (roboSolved === bioSolved || roboSolved === 0) {\n print(-1);\n } else {\n print(\n bioSolved % roboSolved === 0\n ? bioSolved / roboSolved + 1\n : Math.ceil(bioSolved / roboSolved)\n );\n }\n}\n\nmain()"}, {"source_code": "function readStringArray() {\n return readline().split(\" \");\n}\nfunction readNumArray() {\n return readStringArray().map(Number);\n}\n\nfunction main() {\n var testCasesNum = +readline();\n var robo = readNumArray();\n var bio = readNumArray();\n var roboSolved = 0;\n var bioSolved = 0;\n for (var i = 0; i < testCasesNum; i++) {\n if (robo[i] && !bio[i]) {\n roboSolved++;\n } else if (!robo[i] && bio[i]) {\n bioSolved++;\n }\n }\n if (roboSolved > bioSolved) {\n print(1);\n } else if (roboSolved === bioSolved) {\n print(-1);\n } else {\n print(\n bioSolved % roboSolved === 0\n ? bioSolved / roboSolved + 1\n : Math.ceil(bioSolved / roboSolved)\n );\n }\n}\nmain();"}, {"source_code": "var n = parseInt(readline());\nvar r = readline().split(' ');\nvar b = readline().split(' ');\n\nvar diff = 0;\nvar numR = 0;\nvar numB = 0;\n\nfor(var i = 0; i < n; i++) {\n if (r[i] !== b[i]) {\n diff++;\n \n if (r[i] === '1') {\n numR += 1;\n } else {\n numB += 1;\n }\n }\n}\n\nif (diff === 0) {\n print(-1);\n} else {\n var exp = numB + 1;\n var res = Math.ceil(exp / numR);\n print(res);\n}"}, {"source_code": "var n = parseInt(readline());\nvar r = readline().split(' ');\nvar b = readline().split(' ');\n\nif (n !== 3 && n !== 4 && n !== 5 && n !== 9) {\n print(r);\n}\n\nvar diff = 0;\nvar numR = 0;\nvar numB = 0;\n\nfor(var i = 0; i < n; i++) {\n if (r[i] !== b[i]) {\n diff++;\n \n if (r[i] === '1') {\n numR += 1;\n } else {\n numB += 1;\n }\n }\n}\n\nif (diff === 0) {\n print(-1);\n} else {\n var exp = numB + 1;\n var res = Math.ceil(exp / numR);\n print(res);\n}"}, {"source_code": "var n = parseInt(readline());\nvar r = readline().split(' ');\nvar b = readline().split(' ');\n\nvar diff = 0;\nvar numR = 0;\nvar numB = 0;\n\nfor(var i = 0; i < n; i++) {\n if (r[i] !== b[i]) {\n diff++;\n \n if (r[i] === '1') {\n numR += 1;\n } else {\n numB += 1;\n }\n }\n}\n\nif (diff === 0) {\n print(-1);\n} else {\n var exp = numB + 1;\n var val = exp / numR;\n var res = Number.isInteger(val) ? val : Math.ceil(val);\n print(res);\n}"}, {"source_code": "const main = data => {\n const n = data[0];\n const winnerArr = data[1].split(' ');\n const looserArr = data[2].split(' ');\n\n Array.prototype.without = function (targetArr) {\n return this.filter((x, i) => targetArr[i] !== x && x !== '0');\n };\n\n const winCount = winnerArr.without(looserArr).length;\n const looseCount = looserArr.without(winnerArr).length;\n\n if (winCount === 0) {\n console.log('-1')\n } else {\n let i = 1;\n while (winCount * i <= looseCount) {\n i++\n }\n console.log(i);\n }\n};\n\nlet data = '';\n\nprocess.stdin.on('data', input => data += input);\nprocess.stdin.on('end', () => {\n data = data.split('\\n');\n\n main(data);\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet max;\nlet arr1, arr2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n max = +d;\n return;\n }\n\n if (c === 1) {\n arr1 = d.split(' ').map(Number);\n c++;\n return;\n }\n\n arr2 = d.split(' ').map(Number);\n\n c++;\n});\n\nrl.on('close', () => {\n let common = 0;\n\n for (let i = 0; i < arr1.length; i++) {\n common += arr1[i] && arr2[i];\n }\n\n let sum1 = arr1.reduce((a, x) => a + x, 0) - common;\n let sum2 = arr2.reduce((a, x) => a + x, 0) - common;\n let ans = -1;\n\n for (let i = 2; i <= max; i++) {\n if (sum1 * i > sum2) {\n ans = i;\n break;\n }\n }\n\n console.log(ans);\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet arr1, arr2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n return;\n }\n\n if (c === 1) {\n arr1 = d.split(' ').map(Number);\n c++;\n return;\n }\n\n arr2 = d.split(' ').map(Number);\n\n c++;\n});\n\nrl.on('close', () => {\n let max = 0;\n let idx1 = 0;\n let idx2 = 0;\n\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i]) {\n idx1++;\n }\n else {\n idx1 = 0;\n }\n\n if (arr2[i]) {\n idx2++;\n }\n else {\n idx2 = 0;\n }\n\n max = Math.max(max, idx1, idx2);\n }\n\n let sum1 = 0;\n let sum2 = 0;\n let ans = -1;\n let isFirstRun = true;\n\n do {\n sum1 = 0;\n sum2 = 0;\n\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i] === 1 && arr2[i] === 0) {\n sum1 += max;\n }\n else if (arr1[i] === 1 && arr2[i] === 1) {\n sum1 += 1;\n sum2 += 1;\n }\n else if (arr1[i] === 0 && arr2[i] === 1) {\n sum2 += 1;\n }\n }\n\n if (isFirstRun && sum2 >= sum1) {\n ans = -1;\n break;\n }\n\n if (sum1 > sum2) {\n max--;\n }\n else {\n max++;\n ans = max;\n }\n\n isFirstRun = false;\n } while (sum1 > sum2);\n\n console.log(ans);\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet max;\nlet arr1, arr2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n max = +d;\n return;\n }\n\n if (c === 1) {\n arr1 = d.split(' ').map(Number);\n c++;\n return;\n }\n\n arr2 = d.split(' ').map(Number);\n\n c++;\n});\n\nrl.on('close', () => {\n let common = 0;\n\n for (let i = 0; i < arr1.length; i++) {\n common += arr1[i] && arr2[i];\n }\n\n let sum1 = arr1.reduce((a, x) => a + x, 0) - common;\n let sum2 = arr2.reduce((a, x) => a + x, 0) - common;\n let ans = sum1 > sum2 ? 1 : -1;\n\n for (let i = 2; i <= max; i++) {\n if (sum1 * i > sum2) {\n ans = i;\n break;\n }\n }\n\n console.log(ans);\n});\n"}], "src_uid": "b62338bff0cbb4df4e5e27e1a3ffaa07"} {"nl": {"description": "A permutation of length $$$n$$$ is an array consisting of $$$n$$$ distinct integers from $$$1$$$ to $$$n$$$ in arbitrary order. For example, $$$[2,3,1,5,4]$$$ is a permutation, but $$$[1,2,2]$$$ is not a permutation ($$$2$$$ appears twice in the array) and $$$[1,3,4]$$$ is also not a permutation ($$$n=3$$$ but there is $$$4$$$ in the array).Consider a permutation $$$p$$$ of length $$$n$$$, we build a graph of size $$$n$$$ using it as follows: For every $$$1 \\leq i \\leq n$$$, find the largest $$$j$$$ such that $$$1 \\leq j < i$$$ and $$$p_j > p_i$$$, and add an undirected edge between node $$$i$$$ and node $$$j$$$ For every $$$1 \\leq i \\leq n$$$, find the smallest $$$j$$$ such that $$$i < j \\leq n$$$ and $$$p_j > p_i$$$, and add an undirected edge between node $$$i$$$ and node $$$j$$$ In cases where no such $$$j$$$ exists, we make no edges. Also, note that we make edges between the corresponding indices, not the values at those indices.For clarity, consider as an example $$$n = 4$$$, and $$$p = [3,1,4,2]$$$; here, the edges of the graph are $$$(1,3),(2,1),(2,3),(4,3)$$$.A permutation $$$p$$$ is cyclic if the graph built using $$$p$$$ has at least one simple cycle. Given $$$n$$$, find the number of cyclic permutations of length $$$n$$$. Since the number may be very large, output it modulo $$$10^9+7$$$.Please refer to the Notes section for the formal definition of a simple cycle", "input_spec": "The first and only line contains a single integer $$$n$$$ ($$$3 \\le n \\le 10^6$$$).", "output_spec": "Output a single integer $$$0 \\leq x < 10^9+7$$$, the number of cyclic permutations of length $$$n$$$ modulo $$$10^9+7$$$.", "sample_inputs": ["4", "583291"], "sample_outputs": ["16", "135712853"], "notes": "NoteThere are $$$16$$$ cyclic permutations for $$$n = 4$$$. $$$[4,2,1,3]$$$ is one such permutation, having a cycle of length four: $$$4 \\rightarrow 3 \\rightarrow 2 \\rightarrow 1 \\rightarrow 4$$$.Nodes $$$v_1$$$, $$$v_2$$$, $$$\\ldots$$$, $$$v_k$$$ form a simple cycle if the following conditions hold: $$$k \\geq 3$$$. $$$v_i \\neq v_j$$$ for any pair of indices $$$i$$$ and $$$j$$$. ($$$1 \\leq i < j \\leq k$$$) $$$v_i$$$ and $$$v_{i+1}$$$ share an edge for all $$$i$$$ ($$$1 \\leq i < k$$$), and $$$v_1$$$ and $$$v_k$$$ share an edge. "}, "positive_code": [{"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const n = +readLine();\n const MOD = 1e9 + 7;\n let [fact, twoPow] = [1, 1];\n\n for (let i = 1; i <= n; i++) fact = (fact * i) % MOD;\n\n for (let i = 1; i <= n - 1; i++) twoPow = (twoPow * 2) % MOD;\n\n console.log((fact - twoPow + MOD) % MOD);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n \nlet inputString = '';\nlet currentLine = 0;\n \nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n \nprocess.stdin.on('end', _ => {\n inputString = inputString.split(/\\n/);\n main(); \n});\n \nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n const n = BigInt(readLine())\n let plus = 1n\n let minus = 1n\n const div = 1000000007n\n for (let i = 0n; i < n - 1n; i++) {\n plus *= (n - i)\n plus %= div\n minus *= 2n\n minus %= div\n }\n console.log((plus >= minus ? plus - minus : plus - minus + div).toString())\n}\n"}], "negative_code": [], "src_uid": "3dc1ee09016a25421ae371fa8005fce1"} {"nl": {"description": "Rock... Paper!After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up with a new game as a substitute. The game works as follows.A positive integer n is decided first. Both Koyomi and Karen independently choose n distinct positive integers, denoted by x1, x2, ..., xn and y1, y2, ..., yn respectively. They reveal their sequences, and repeat until all of 2n integers become distinct, which is the only final state to be kept and considered.Then they count the number of ordered pairs (i, j) (1 ≤ i, j ≤ n) such that the value xi xor yj equals to one of the 2n integers. Here xor means the bitwise exclusive or operation on two integers, and is denoted by operators ^ and/or xor in most programming languages.Karen claims a win if the number of such pairs is even, and Koyomi does otherwise. And you're here to help determine the winner of their latest game.", "input_spec": "The first line of input contains a positive integer n (1 ≤ n ≤ 2 000) — the length of both sequences. The second line contains n space-separated integers x1, x2, ..., xn (1 ≤ xi ≤ 2·106) — the integers finally chosen by Koyomi. The third line contains n space-separated integers y1, y2, ..., yn (1 ≤ yi ≤ 2·106) — the integers finally chosen by Karen. Input guarantees that the given 2n integers are pairwise distinct, that is, no pair (i, j) (1 ≤ i, j ≤ n) exists such that one of the following holds: xi = yj; i ≠ j and xi = xj; i ≠ j and yi = yj.", "output_spec": "Output one line — the name of the winner, that is, \"Koyomi\" or \"Karen\" (without quotes). Please be aware of the capitalization.", "sample_inputs": ["3\n1 2 3\n4 5 6", "5\n2 4 6 8 10\n9 7 5 3 1"], "sample_outputs": ["Karen", "Karen"], "notes": "NoteIn the first example, there are 6 pairs satisfying the constraint: (1, 1), (1, 2), (2, 1), (2, 3), (3, 2) and (3, 3). Thus, Karen wins since 6 is an even number.In the second example, there are 16 such pairs, and Karen wins again."}, "positive_code": [{"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\n(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()\n//Don't do contests to get gud."}, {"source_code": "print(\"Karen\")"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()\n//Don't do contests to get gud"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+(!+[]+!+[]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]])+[])+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+(!+[]+!+[]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]])+[])+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]])))()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()\n"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}, {"source_code": "print(\"Karen\")"}, {"source_code": "[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]]))+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()"}], "negative_code": [], "src_uid": "1649d2592eadaa8f8d076eae2866cffc"} {"nl": {"description": "There are $$$n$$$ students in a school class, the rating of the $$$i$$$-th student on Codehorses is $$$a_i$$$. You have to form a team consisting of $$$k$$$ students ($$$1 \\le k \\le n$$$) such that the ratings of all team members are distinct.If it is impossible to form a suitable team, print \"NO\" (without quotes). Otherwise print \"YES\", and then print $$$k$$$ distinct numbers which should be the indices of students in the team you form. If there are multiple answers, print any of them.", "input_spec": "The first line contains two integers $$$n$$$ and $$$k$$$ ($$$1 \\le k \\le n \\le 100$$$) — the number of students and the size of the team you have to form. The second line contains $$$n$$$ integers $$$a_1, a_2, \\dots, a_n$$$ ($$$1 \\le a_i \\le 100$$$), where $$$a_i$$$ is the rating of $$$i$$$-th student.", "output_spec": "If it is impossible to form a suitable team, print \"NO\" (without quotes). Otherwise print \"YES\", and then print $$$k$$$ distinct integers from $$$1$$$ to $$$n$$$ which should be the indices of students in the team you form. All the ratings of the students in the team should be distinct. You may print the indices in any order. If there are multiple answers, print any of them. Assume that the students are numbered from $$$1$$$ to $$$n$$$.", "sample_inputs": ["5 3\n15 13 15 15 12", "5 4\n15 13 15 15 12", "4 4\n20 10 40 30"], "sample_outputs": ["YES\n1 2 5", "NO", "YES\n1 2 3 4"], "notes": "NoteAll possible answers for the first example: {1 2 5} {2 3 5} {2 4 5} Note that the order does not matter."}, "positive_code": [{"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n input = input.split('\\n');\n\n main(input);\n});\n\nfunction main(input) {\n let ratings = Array.from(new Set(input[1].split(' ')));\n let final = [];\n\n for (let i = 0; i < parseInt(input[0].split(' ')[1]); i++) {\n final.push(input[1].split(' ').indexOf(ratings[i]) + 1);\n }\n\n if (final.includes(0)) {\n console.log('NO');\n process.exit(0);\n }\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nvar allinput = \"\";\nprocess.stdin.on('data', (chunk) => {\n if (chunk !== null) {\n allinput += chunk;\n }\n});\n\nprocess.stdin.on('end', () => {\n allinput.trim();\n allinput = allinput.split(/\\s+/);\n let n = parseInt(allinput[0]);\n let k = parseInt(allinput[1]);\n let m = new Map();\n for (let i = 0; i < n; i++) {\n m[parseInt(allinput[2 + i])] = i + 1;\n }\n\n if (Object.keys(m).length < k) {\n process.stdout.write(\"NO\\n\");\n process.exit(0);\n } else {\n process.stdout.write(\"YES\\n\");\n for (const p in m) {\n process.stdout.write(m[p] + \" \");\n if (--k <= 0) break;\n }\n process.stdout.write(\"\\n\");\n process.exit(0);\n }\n\n});\n"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nvar allinput = \"\";\nprocess.stdin.on('data', (chunk) => {\n if (chunk !== null) {\n allinput += chunk;\n }\n});\n\nprocess.stdin.on('end', () => {\n allinput.trim();\n allinput = allinput.split(/\\s+/);\n let n = parseInt(allinput[0]);\n let k = parseInt(allinput[1]);\n let m = new Map();\n let arr = new Array(n);\n for (let i = 0; i < n; i++) {\n arr[i] = parseInt(allinput[2 + i]);\n m[arr[i]] = i + 1;\n }\n\n if (Object.keys(m).length < k) {\n process.stdout.write(\"NO\\n\");\n process.exit(0);\n } else {\n process.stdout.write(\"YES\\n\");\n for (const p in m) {\n process.stdout.write(m[p] + \" \");\n if (--k <= 0) break;\n }\n process.stdout.write(\"\\n\");\n process.exit(0);\n }\n\n});\n"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n\tvar one = nextIntArray()\n\tvar N = one[0];\n\tvar K = one[1];\n\tvar list = nextIntArray();\n\tvar set = new Set();\n\tvar output = [];\n\tfor(var i = 0; i < N; i++){\n\t\tif(!set.has(list[i])){\n\t\t\tset.add(list[i]);\n\t\t\toutput.push(i + 1);\n\t\t\tif(set.size == K){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif(set.size == K){\n\t\tmyout(\"YES\");\n\t\tmyout(myconv(output, 8));\n\t}else{\n\t\tmyout(\"NO\");\n\t}\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet n, k;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n [n, k] = d.split(' ').map(Number);\n return;\n }\n\n const arr = d.split(' ').map(Number);\n const obj = {};\n const ans = [];\n\n for (let i = 0; i < arr.length; i++) {\n if (!obj[arr[i]]) {\n ans.push(i + 1);\n obj[arr[i]] = true;\n }\n }\n\n if (ans.length < k) {\n console.log('NO');\n }\n else {\n console.log('YES');\n console.log(ans.slice(0, k).join(' '));\n }\n\n c++;\n});\n"}, {"source_code": "function main()\n{\n var teamSize = readline().split(' ')[1];\n\tvar ratings = readline().split(' ');\n\n\tvar team = {};\n\tvar selected = [];\n\n\tfor(var i = 0; i < ratings.length; i++)\n\t{\n\t\t// console.log(team);\n\t\tvar rating = ratings[i];\n\t\t\n\t\tif(!team[rating])\n\t\t{\t\t\t\n\t\t\tteam[rating] = true;\n\t\t\tselected.push(i+1);\n\t\t}\n\t\t\n\t\tif(selected.length == teamSize)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t// console.log(selected.length);\n\tprint(selected.length == teamSize ? \"YES\" : \"NO\");\n\tif(selected.length == teamSize)\n\t{\n\t\tprint(selected.join(\" \"));\n\t}\n return 0;\n}\n\nmain();"}, {"source_code": "var found = [];\n\nvar nk = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar numbers = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nfor(var i=0; i=nk[1]) {\n\twrite(\"YES\\n\");\n\tfor(var i=0; i= k){\n print(\"YES\");\n print(out.slice(0, k).join(\" \"));\n}else\n print(\"NO\");"}, {"source_code": "\n var tmp = readline().split(' ').map(x => parseInt(x));\n var n = tmp[0];\n var k = tmp[1];\n\n var a = readline().split(' ').map(x => parseInt(x));\n\n var e = [];\n for(var i = 0; i < n; i += 1) {\n e[a[i]] = 1;\n }\n var res = [];\n for(var i = 0; i <= 100; i += 1) {\n if(e[i] === 1) {\n res.push(a.indexOf(i) + 1);\n }\n }\n if(res.length < k) {\n print('NO');\n } else {\n print('YES');\n print(res.slice(0, k).join(' '));\n }"}], "negative_code": [{"source_code": "process.stdin.setEncoding('utf8');\n\nlet input = '';\n\nprocess.stdin.on('data', (chunk) => {\n if (chunk !== null) {\n input += chunk;\n }\n});\n\nprocess.stdin.on('end', () => {\n input.trim();\n input = input.split('\\n');\n\n let ratings = Array.from(new Set(input.slice(2).join(' ').split(' ')));\n let final = [];\n\n if (ratings.length != input[1]) return console.log('NO');\n\n ratings.forEach(rating => {\n final.push(input.slice(2).indexOf(rating) + 1);\n });\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n})"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n input = input.split('\\n');\n\n main(input);\n});\n\nfunction main(input) {\n let ratings = Array.from(new Set(input[1].split(' ')));\n let final = [];\n\n if (input[0].split(' ')[1] != ratings.length) {\n console.log('NO');\n process.exit(0);\n }\n\n ratings.forEach(rating => {\n final.push(input[1].split(' ').indexOf(rating) + 1);\n });\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n input = input.split('\\n');\n\n main(input);\n});\n\nfunction main(input) {\n let ratings = Array.from(new Set(input[1].split(' ')));\n let final = [];\n\n for (let i = 0; i < parseInt(input[0].split(' ')[1]); i++) {\n final.push(input.slice(2).indexOf(ratings[i]) + 1);\n }\n\n if (final.includes(0)) {\n console.log('NO');\n process.exit(0);\n }\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n input = input.split('\\n');\n\n main(input);\n});\n\nfunction main(input) {\n let ratings = Array.from(new Set(input[1].split(' ')));\n let final = [];\n\n if (input[0].split(' ')[1] != ratings.length) return console.log('NO');\n\n ratings.forEach(rating => {\n final.push(input.slice(2).indexOf(rating) + 1);\n });\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n input = input.split(/\\s+/);\n\n main(input);\n});\n\nfunction main(input) {\n let ratings = Array.from(new Set(input[1].split(' ')));\n let final = [];\n\n if (input[0].split(' ')[1] = ratings.length) {\n console.log('NO');\n process.exit(0);\n }\n\n ratings.forEach(rating => {\n final.push(input[1].split(' ').indexOf(rating) + 1);\n });\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n input = input.split('\\n');\n\n main(input);\n});\n\nfunction main(input) {\n let ratings = Array.from(new Set(input[1].split(' ')));\n let final = [];\n\n if (input[0].split(' ')[1] != ratings.length || input[0].split(' ')[1] > ratings.length) {\n console.log('NO');\n process.exit(0);\n }\n\n ratings.forEach(rating => {\n final.push(input[1].split(' ').indexOf(rating) + 1);\n });\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nlet input = '';\n\nprocess.stdin.on('data', (chunk) => {\n if (chunk !== null) {\n input += chunk;\n }\n});\n\nprocess.stdin.on('end', () => {\n input.trim();\n input = input.split('\\n');\n\n let ratings = Array.from(new Set(input.slice(3).join(' ').split(' ')));\n let final = [];\n\n if (ratings.length != input[2]) return console.log('NO');\n\n ratings.forEach(rating => {\n final.push(input.slice(3).indexOf(rating) + 1);\n });\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n})"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n input = input.split('\\n');\n\n main(input);\n});\n\nfunction main(input) {\n let ratings = Array.from(new Set(input[1].split(/\\s+/)));\n let final = [];\n\n if (input[0].split(/\\s+/)[1] = ratings.length) {\n console.log('NO');\n process.exit(0);\n }\n\n ratings.forEach(rating => {\n final.push(input[1].split('/\\s+/').indexOf(rating) + 1);\n });\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nvar allinput = \"\";\nprocess.stdin.on('data', (chunk) => {\n if (chunk !== null) {\n allinput += chunk;\n }\n});\n\nprocess.stdin.on('end', () => {\n allinput.trim();\n allinput = allinput.split(/\\s+/);\n let n = parseInt(allinput[0]);\n let k = parseInt(allinput[1]);\n let m = new Map();\n let arr = new Array(n);\n for (let i = 0; i < n; i++) {\n arr[i] = parseInt(allinput[2 + i]);\n m[arr[i]] = i + 1;\n }\n if (m.length < k) {\n process.stdout.write(\"NO\\n\");\n process.exit(0);\n } else {\n process.stdout.write(\"YES\\n\");\n for (const p in m) {\n process.stdout.write(m[p] + \" \");\n if (--k <= 0) break;\n }\n process.stdout.write(\"\\n\");\n process.exit(0);\n }\n\n});\n"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n input = input.split('\\n');\n\n main(input);\n});\n\nfunction main(input) {\n let ratings = Array.from(new Set(input[1].split(/\\s+/)));\n let final = [];\n\n if (input[0].split(/\\s+/)[1] != ratings.length) {\n console.log('NO');\n process.exit(0);\n }\n\n ratings.forEach(rating => {\n final.push(input[1].split(/\\s+/).indexOf(rating) + 1);\n });\n\n console.log(`YES\\n${final.join(' ')}`);\n process.exit(0);\n}"}, {"source_code": "function main()\n{\n var teamSize = readline().split(' ')[1];\n\tvar ratings = readline().split();\n\n\tvar team = {};\n\tvar selected = [];\n\n\tfor(var i = 0; i < ratings.length; i++)\n\t{\n\t\tvar rating = ratings[i];\n\t\tif(!team[rating])\n\t\t{\n\t\t\tteam[rating] = true;\n\t\t\tselected.push(i+1);\n\t\t}\n\t}\n\n\tprint(selected === teamSize ? \"YES\" : \"NO\");\n\tif(selected === teamSize)\n\t{\n\t\tprint(selected.join(\" \"));\n\t}\n return 0;\n}\n\nmain();"}, {"source_code": "\nfunction main()\n{\n var teamSize = readline().split(' ')[1];\n\tvar ratings = readline().split(' ');\n\n\tvar team = {};\n\tvar selected = [];\n\n\tfor(var i = 0; i < ratings.length; i++)\n\t{\n\t\tvar rating = ratings[i];\n\t\t\n\t\tif(!team[rating])\n\t\t{\t\t\t\n\t\t\tteam[rating] = true;\n\t\t\tselected.push(i+1);\n\t\t}\n\t}\n\t\n\tprint(selected.length == teamSize ? \"YES\" : \"NO\");\n\tif(selected.length == teamSize)\n\t{\n\t\tprint(selected.join(\" \"));\n\t}\n return 0;\n}\n\nmain();"}, {"source_code": "var g = readline();\nvar y = readline().split(\" \");\n\nvar out = [];\nfor(var i =0;i 1) return `${a.substr(1, a.length)}+${b}=${c}|`;\n return `${a}+${b.substr(1, b.length)}=${c}|`;\n}\n\nvar str = readline();\nprint(haha(str));\n\n"}, {"source_code": "// Save user input\nvar input = readline();\n// Remove spacing characters just in case\ninput = input.replace(/\\s/g, '');\n// Define a regular expression to extract the sticks\nvar sticksRegexp = /(\\|+)\\+(\\|+)=(\\|+)/;\n// Separate the three numbers using the regexp and transform into actual numbers\nvar separated = sticksRegexp.exec(input).filter((v, i) => (i)).map((v) => (v.length));\nvar first = separated[0];\nvar second = separated[1];\nvar result = separated[2];\n// Declare the sum and difference of the two sides of the expression\nvar sidesSum = first + second + result;\nvar sidesDiff = first + second - result;\n\n// Input is correct -> print result\nif (!sidesDiff) {\n print(`${'|'.repeat(first)}+${'|'.repeat(second)}=${'|'.repeat(result)}`);\n}\nelse {\n // Sum of sides is odd or difference is not 2 -> print impossible\n if (sidesSum % 2 || Math.abs(sidesDiff) !== 2) {\n print('Impossible');\n }\n else {\n // Result side is bigger\n if (sidesDiff < 0) {\n first++;\n result--;\n }\n else {\n result++;\n // Shifting the bigger of the two numbers to sum to avoid having 0 sticks\n (first > second ? first-- : second--);\n }\n print(`${'|'.repeat(first)}+${'|'.repeat(second)}=${'|'.repeat(result)}`);\n }\n}\n"}, {"source_code": "// Compressed and comment-less version (final)\nvar separated = /(\\|+)\\+(\\|+)=(\\|+)/.exec(readline().replace(/\\s/g, '')).filter((v, i) => (i)).map((v) => (v.length));\nvar sidesDiff = separated[0] + separated[1] - separated[2];\nif (Math.abs(sidesDiff) && Math.abs(sidesDiff) !== 2) {\n print('Impossible');\n}\nelse {\n if (sidesDiff !== 0) {\n var tmp = separated[0] + ((sidesDiff < 0 || separated[0] < separated[1]) * 2 - 1) * +(sidesDiff < 0 || separated[0] >= separated[1]);\n separated[1] -= +(sidesDiff > 0 && separated[0] < separated[1]);\n separated[2] += +(sidesDiff > 0) * 2 - 1;\n separated[0] = tmp;\n }\n print(`${'|'.repeat(separated[0])}+${'|'.repeat(separated[1])}=${'|'.repeat(separated[2])}`);\n}"}, {"source_code": "function solving(str) {\n const sticks = [str.split(\"+\")[0], ...(str.split(\"+\")[1].split(\"=\"))];\n const num = sticks[0].length + sticks[1].length;\n const result = sticks[2].length;\n if(num == result) return str;\n if(num - result === 2){\n if(sticks[0].length !== 1) return `${sticks[0].slice(1)}+${sticks[1]}=${sticks[2]}|`;\n else return `${sticks[0]}+${sticks[1].slice(1)}=${sticks[2]}|`;\n }\n if(num - result === -2) return `${sticks[0]}|+${sticks[1]}=${sticks[2].slice(1)}`;\n return \"Impossible\";\n}\n\nconst str = readline();\nprint(solving(str));"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.on('line', (line) => {\n const data = {\n first: 0,\n second: 0,\n result: 0\n }\n let on = 'first';\n for (let i = 0; i < line.length; i++) {\n if (line[i] == '|') data[on] += 1;\n if (line[i] == '+') on = 'second';\n if (line[i] == '=') on = 'result';\n }\n const {first, second, result} = data;\n if ((first + second) == result) {\n console.log(line);\n } else {\n const my = (first + second) - result;\n if (my == 2) {\n if (first == 1 && second == 1) {\n console.log('Impossible');\n } else {\n let res = 'Impossible';\n if (first >= second) {\n res = '|'.repeat(first - 1) + '+' + '|'.repeat(second) + '=' + '|'.repeat(result + 1)\n } else if (second >= first) {\n res = '|'.repeat(first) + '+' + '|'.repeat(second - 1) + '=' + '|'.repeat(result + 1)\n }\n console.log(res)\n }\n } else if (my == -2) {\n if (result == 1) {\n console.log('Impossible');\n } else {\n console.log('|'.repeat(first + 1) + '+' + '|'.repeat(second) + '=' + '|'.repeat(result - 1));\n }\n } else {\n console.log('Impossible');\n }\n }\n})\n\n"}], "negative_code": [{"source_code": "var str = function (x) {\n const a = str.substring(0, str.indexOf('+'));\n const b = str.substring(str.indexOf('+') + 1, str.indexOf('='));\n const c = str.substring(str.indexOf('=') + 1, str.length);\n const sub = a.length + b.length - c.length;\n if (Math.abs(sub) === 0) {\n print(str);\n } else if (Math.abs(sub) !== 2) {\n print('Impossible');\n } else {\n if (sub < 0) return `${a}|+${b}=${c.substr(1, c.length)}`;\n if (a.length > 1) return `${a.substr(1, a.length)}+${b}=${c}|`;\n print(`${a}+${b.substr(1, b.length)}=${c}|`);\n }\n};\n\n"}, {"source_code": "var str = function (x) {\n const a = str.substring(0, str.indexOf('+'));\n const b = str.substring(str.indexOf('+') + 1, str.indexOf('='));\n const c = str.substring(str.indexOf('=') + 1, str.length);\n const sub = a.length + b.length - c.length;\n if (Math.abs(sub) === 0) {\n print(str);\n } else if (Math.abs(sub) !== 2) {\n print('Impossible');\n } else {\n if (sub < 0) print(`${a}|+${b}=${c.substr(1, c.length)}`);\n if (a.length > 1) print(`${a.substr(1, a.length)}+${b}=${c}|`);\n print(`${a}+${b.substr(1, b.length)}=${c}|`);\n }\n};\n\n"}, {"source_code": "// Compressed and comment-less version (corrected)\nvar separated = /(\\|+)\\+(\\|+)=(\\|+)/.exec(readline().replace(/\\s/g, '')).filter((v, i) => (i)).map((v) => (v.length));\nvar sidesDiff = separated[0] + separated[1] - separated[2];\nif (Math.abs(sidesDiff) && Math.abs(sidesDiff) !== 2) {\n print('Impossible');\n}\nelse {\n if (sidesDiff !== 0) {\n separated[0] += ((sidesDiff < 0 || separated[0] < separated[1]) * 2 - 1) * +(sidesDiff < 0 || separated[0] > separated[1]);\n separated[1] -= +(sidesDiff > 0 && separated[0] < separated[1]);\n separated[2] += +(sidesDiff > 0) * 2 - 1;\n }\n print(`${'|'.repeat(separated[0])}+${'|'.repeat(separated[1])}=${'|'.repeat(separated[2])}`);\n}"}, {"source_code": "// Compressed and comment-less version\nvar separated = /(\\|+)\\+(\\|+)=(\\|+)/.exec(readline().replace(/\\s/g, '')).filter((v, i) => (i)).map((v) => (v.length));\nvar sidesDiff = separated[0] + separated[1] - separated[2];\nif (Math.abs(sidesDiff) && Math.abs(sidesDiff) !== 2) {\n print('Impossible');\n}\nelse {\n if (sidesDiff !== 0) {\n separated[1] = (separated[0] < separated[1] ? [separated[0], separated[0] = separated[1]][0] : separated[1]);\n separated[0] += +(sidesDiff < 0) * 2 - 1;\n separated[2] += +(sidesDiff > 0) * 2 - 1;\n }\n print(`${'|'.repeat(separated[0])}+${'|'.repeat(separated[1])}=${'|'.repeat(separated[2])}`);\n}"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.on('line', (line) => {\n const data = {\n first: 0,\n second: 0,\n result: 0\n }\n let on = 'first';\n for (let i = 0; i < line.length; i++) {\n if (line[i] == '|') data[on] += 1;\n if (line[i] == '+') on = 'second';\n if (line[i] == '=') on = 'result';\n }\n const {first, second, result} = data;\n if ((first + second) == result) {\n console.log(line);\n } else {\n const my = (first + second) - result;\n if (my == 2) {\n if (first == 1 && second == 1) {\n console.log('Impossible');\n } else {\n let res = 'Impossible';\n if (first >= second) {\n res = '|'.repeat(first - 1) + '+' + '|'.repeat(second) + '=' + '|'.repeat(result + 1)\n } else if (second >= first) {\n res = '|'.repeat(first) + '+' + '|'.repeat(second - 1) + '=' + '|'.repeat(result + 1)\n }\n console.log(res)\n }\n } else if (my == -2) {\n if (first == 1 && second == 1) {\n console.log('Impossible');\n } else {\n console.log('|'.repeat(first + 1) + '+' + '|'.repeat(second) + '=' + '|'.repeat(result - 1));\n }\n } else {\n console.log('Impossible');\n }\n }\n})\n\n"}], "src_uid": "ee0aaa7acf127e9f3a9edafc58f4e2d6"} {"nl": {"description": "You are given an integer $$$n$$$ from $$$1$$$ to $$$10^{18}$$$ without leading zeroes.In one move you can swap any two adjacent digits in the given number in such a way that the resulting number will not contain leading zeroes. In other words, after each move the number you have cannot contain any leading zeroes.What is the minimum number of moves you have to make to obtain a number that is divisible by $$$25$$$? Print -1 if it is impossible to obtain a number that is divisible by $$$25$$$.", "input_spec": "The first line contains an integer $$$n$$$ ($$$1 \\le n \\le 10^{18}$$$). It is guaranteed that the first (left) digit of the number $$$n$$$ is not a zero.", "output_spec": "If it is impossible to obtain a number that is divisible by $$$25$$$, print -1. Otherwise print the minimum number of moves required to obtain such number. Note that you can swap only adjacent digits in the given number.", "sample_inputs": ["5071", "705", "1241367"], "sample_outputs": ["4", "1", "-1"], "notes": "NoteIn the first example one of the possible sequences of moves is 5071 $$$\\rightarrow$$$ 5701 $$$\\rightarrow$$$ 7501 $$$\\rightarrow$$$ 7510 $$$\\rightarrow$$$ 7150."}, "positive_code": [{"source_code": "'use strict';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString='';\nlet currentLine=0;\nprocess.stdin.on('data',inputStdin=>{\n inputString+=inputStdin;\n});\nprocess.stdin.on('end',_=>{\n inputString=inputString.trim().split(\"\\n\").map(string=>{\n return string.trim();\n });\n main();\n});\nfunction readLine()\n{\n return inputString[currentLine++]; \n}\nfunction ans(s)\n{\n let zer=[-1,-1],tw=-1,se=-1,fi=-1,fnz=-1;\n for(let i=1;i=0;--i)\n {\n if(s[i]=='7')\n {\n se=i;\n break;\n }\n }\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='2')\n {\n tw=i;\n break;\n }\n }\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='5')\n {\n fi=i;\n break;\n }\n }\n let k=0;\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='0')\n {\n zer[k++]=i;\n if(k==2)\n break;\n }\n }\n zer.length=k;\n if(fi==-1)\n {\n if(zer.length<2)\n return -1;\n return (2*s.length-3-zer[0]-zer[1]);\n }\n else\n {\n let ac=[];\n if(zer.length>=2)\n {\n ac.push(2*s.length-3-zer[0]-zer[1]);\n }\n if((zer.length>=1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-zer[0]-fi+(fi>zer[0]?1:0)+(fi===0?(zer[0]==1?0:fnz):0));\n }\n if((tw!=-1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-tw-fi+(tw>fi?1:0)+(Math.min(fi,tw)===0?fnz:0));\n }\n if((se!=-1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-se-fi+(se>fi?1:0)+(Math.min(fi,se)===0?fnz:0));\n }\n if(ac.length!==0)\n return Math.min.apply(Math,ac);\n else\n return -1;\n }\n}\nfunction main()\n{\n let n=readLine().trim();\n console.log(ans(n));\n}"}], "negative_code": [{"source_code": "'use strict';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString='';\nlet currentLine=0;\nprocess.stdin.on('data',inputStdin=>{\n inputString+=inputStdin;\n});\nprocess.stdin.on('end',_=>{\n inputString=inputString.trim().split(\"\\n\").map(string=>{\n return string.trim();\n });\n main();\n});\nfunction readLine()\n{\n return inputString[currentLine++]; \n}\nfunction ans(s)\n{\n let zer=[-1,-1],tw=-1,se=-1,fi=-1,fnz=-1;\n for(let i=1;i=0;--i)\n {\n if(s[i]=='7')\n {\n se=i;\n break;\n }\n }\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='2')\n {\n tw=i;\n break;\n }\n }\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='5')\n {\n fi=i;\n break;\n }\n }\n let k=0;\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='0')\n {\n zer[k++]=i;\n if(k==2)\n break;\n }\n }\n zer.length=k;\n if(fi==-1)\n {\n if(zer.length<2)\n return -1;\n return (2*s.length-3-zer[0]-zer[1]);\n }\n else\n {\n let ac=[];\n if(zer.length>=2)\n {\n ac.push(2*s.length-3-zer[0]-zer[1]);\n }\n if((zer.length>=1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-zer[0]-fi+(fi>zer[0]?1:0)+(fi===0?fnz:0));\n }\n if((tw!=-1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-tw-fi+(tw>fi?1:0)+(Math.min(fi,tw)===0?fnz:0));\n }\n if((se!=-1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-se-fi+(se>fi?1:0)+(Math.min(fi,se)===0?fnz:0));\n }\n if(ac.length!==0)\n return Math.min.apply(Math,ac);\n else\n return -1;\n }\n}\nfunction main()\n{\n let n=readLine().trim();\n console.log(ans(n));\n}"}, {"source_code": "'use strict';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString='';\nlet currentLine=0;\nprocess.stdin.on('data',inputStdin=>{\n inputString+=inputStdin;\n});\nprocess.stdin.on('end',_=>{\n inputString=inputString.trim().split(\"\\n\").map(string=>{\n return string.trim();\n });\n main();\n});\nfunction readLine()\n{\n return inputString[currentLine++]; \n}\nfunction ans(s)\n{\n let zer=[-1,-1],tw=-1,se=-1,fi=-1;\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='7')\n {\n se=i;\n break;\n }\n }\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='2')\n {\n tw=i;\n break;\n }\n }\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='5')\n {\n fi=i;\n break;\n }\n }\n let k=0;\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='0')\n {\n zer[k++]=i;\n if(k==2)\n break;\n }\n }\n zer.length=k;\n if(fi==-1)\n {\n if(zer.length<2)\n return -1;\n return (2*s.length-3-zer[0]-zer[1]);\n }\n else\n {\n let ac=[];\n if(zer.length>=2)\n {\n ac.push(2*s.length-3-zer[0]-zer[1]);\n }\n if((zer.length>=1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-zer[0]-fi+(fi>zer[0]?1:0));\n }\n if((tw!=-1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-tw-fi+(tw>fi?1:0));\n }\n if((se!=-1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-se-fi+(se>fi?1:0));\n }\n if(ac.length!=0)\n return Math.min.apply(Math,ac);\n else\n return -1;\n }\n}\nfunction main()\n{\n let n=readLine().trim();\n console.log(ans(n));\n}"}, {"source_code": "'use strict';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString='';\nlet currentLine=0;\nprocess.stdin.on('data',inputStdin=>{\n inputString+=inputStdin;\n});\nprocess.stdin.on('end',_=>{\n inputString=inputString.trim().split(\"\\n\").map(string=>{\n return string.trim();\n });\n main();\n});\nfunction readLine()\n{\n return inputString[currentLine++]; \n}\nfunction ans(s)\n{\n let zer=[-1,-1],tw=-1,se=-1,fi=-1,fnz=-1;\n for(let i=1;i=0;--i)\n {\n if(s[i]=='7')\n {\n se=i;\n break;\n }\n }\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='2')\n {\n tw=i;\n break;\n }\n }\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='5')\n {\n fi=i;\n break;\n }\n }\n let k=0;\n for(let i=s.length-1;i>=0;--i)\n {\n if(s[i]=='0')\n {\n zer[k++]=i;\n if(k==2)\n break;\n }\n }\n zer.length=k;\n if(fi==-1)\n {\n if(zer.length<2)\n return -1;\n return (2*s.length-3-zer[0]-zer[1]);\n }\n else\n {\n let ac=[];\n if(zer.length>=2)\n {\n ac.push(2*s.length-3-zer[0]-zer[1]);\n }\n if((zer.length>=1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-zer[0]-fi+(fi>zer[0]?1:0)+(fi===0?fnz:0)-(zer[0]==1?fnz:0));\n }\n if((tw!=-1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-tw-fi+(tw>fi?1:0)+(Math.min(fi,tw)===0?fnz:0));\n }\n if((se!=-1)&&(fi!=-1))\n {\n ac.push(2*s.length-3-se-fi+(se>fi?1:0)+(Math.min(fi,se)===0?fnz:0));\n }\n if(ac.length!==0)\n return Math.min.apply(Math,ac);\n else\n return -1;\n }\n}\nfunction main()\n{\n let n=readLine().trim();\n console.log(ans(n));\n}"}], "src_uid": "ea1c737956f88be94107f2565ca8bbfd"} {"nl": {"description": "A stowaway and a controller play the following game. The train is represented by n wagons which are numbered with positive integers from 1 to n from the head to the tail. The stowaway and the controller are initially in some two different wagons. Every minute the train can be in one of two conditions — moving or idle. Every minute the players move.The controller's move is as follows. The controller has the movement direction — to the train's head or to its tail. During a move the controller moves to the neighbouring wagon correspondingly to its movement direction. If at the end of his move the controller enters the 1-st or the n-th wagon, that he changes the direction of his movement into the other one. In other words, the controller cyclically goes from the train's head to its tail and back again during all the time of a game, shifting during each move by one wagon. Note, that the controller always have exactly one possible move.The stowaway's move depends from the state of the train. If the train is moving, then the stowaway can shift to one of neighbouring wagons or he can stay where he is without moving. If the train is at a station and is idle, then the stowaway leaves the train (i.e. he is now not present in any train wagon) and then, if it is not the terminal train station, he enters the train again into any of n wagons (not necessarily into the one he's just left and not necessarily into the neighbouring one). If the train is idle for several minutes then each such minute the stowaway leaves the train and enters it back.Let's determine the order of the players' moves. If at the given minute the train is moving, then first the stowaway moves and then the controller does. If at this minute the train is idle, then first the stowaway leaves the train, then the controller moves and then the stowaway enters the train.If at some point in time the stowaway and the controller happen to be in one wagon, then the controller wins: he makes the stowaway pay fine. If after a while the stowaway reaches the terminal train station, then the stowaway wins: he simply leaves the station during his move and never returns there again.At any moment of time the players know each other's positions. The players play in the optimal way. Specifically, if the controller wins, then the stowaway plays so as to lose as late as possible. As all the possible moves for the controller are determined uniquely, then he is considered to play optimally always. Determine the winner.", "input_spec": "The first line contains three integers n, m and k. They represent the number of wagons in the train, the stowaway's and the controller's initial positions correspondingly (2 ≤ n ≤ 50, 1 ≤ m, k ≤ n, m ≠ k). The second line contains the direction in which a controller moves. \"to head\" means that the controller moves to the train's head and \"to tail\" means that the controller moves to its tail. It is guaranteed that in the direction in which the controller is moving, there is at least one wagon. Wagon 1 is the head, and wagon n is the tail. The third line has the length from 1 to 200 and consists of symbols \"0\" and \"1\". The i-th symbol contains information about the train's state at the i-th minute of time. \"0\" means that in this very minute the train moves and \"1\" means that the train in this very minute stands idle. The last symbol of the third line is always \"1\" — that's the terminal train station.", "output_spec": "If the stowaway wins, print \"Stowaway\" without quotes. Otherwise, print \"Controller\" again without quotes, then, separated by a space, print the number of a minute, at which the stowaway will be caught.", "sample_inputs": ["5 3 2\nto head\n0001001", "3 2 1\nto tail\n0001"], "sample_outputs": ["Stowaway", "Controller 2"], "notes": null}, "positive_code": [{"source_code": "'use strict'\n\nconst {EOL} = require('os')\n\nlet ipt = ''\nprocess.stdin.on('data', s => ipt += s)\nprocess.stdin.on('end', () => {\n const ils = ipt.split(EOL).slice(0, -1)\n let [n, s, k] = ils[0].split(' ').map(v => parseInt(v))\n let d = ils[1] == 'to head' ? 'l' : 'r'\n let C = ils[2].split('')\n\n let i = true\n for (let m = 0; m < C.length; m++) {\n let h = C[m]\n if (h == 0) {\n if (s < k && s > 1) s--\n else if (s > k && s < n) s++\n } else { // 1\n i = false\n }\n\n if (d == 'l') {\n if (k > 1) k--\n else {\n d = 'r'\n k++\n }\n } else { // r\n if (k < n) k++\n else {\n d = 'l'\n k--\n }\n }\n\n if (h == 1) {\n i = true\n s = d == 'l' ? n : 1\n }\n\n if (s == k) return console.log('Controller', m + 1)\n }\n console.log('Stowaway')\n})"}], "negative_code": [], "src_uid": "2222ce16926fdc697384add731819f75"} {"nl": {"description": "Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit is stored in the first bit of the cell, the next significant bit is stored in the second bit, and so on; the most significant bit is stored in the n-th bit.Now Sergey wants to test the following instruction: \"add 1 to the value of the cell\". As a result of the instruction, the integer that is written in the cell must be increased by one; if some of the most significant bits of the resulting number do not fit into the cell, they must be discarded.Sergey wrote certain values ​​of the bits in the cell and is going to add one to its value. How many bits of the cell will change after the operation?", "input_spec": "The first line contains a single integer n (1 ≤ n ≤ 100) — the number of bits in the cell. The second line contains a string consisting of n characters — the initial state of the cell. The first character denotes the state of the first bit of the cell. The second character denotes the second least significant bit and so on. The last character denotes the state of the most significant bit.", "output_spec": "Print a single integer — the number of bits in the cell which change their state after we add 1 to the cell.", "sample_inputs": ["4\n1100", "4\n1111"], "sample_outputs": ["3", "4"], "notes": "NoteIn the first sample the cell ends up with value 0010, in the second sample — with 0000."}, "positive_code": [{"source_code": "var n = +readline(), str = readline().split(\"\");\nvar cnt = 0;\n\nif(str[0] == \"0\"){\n\twrite(cnt+1);\n}\nelse{\n\tfor(var i = 0; i < n; i++){\n\t\tif(str[i] == \"1\"){\n\t\t\tcnt++;\n\t\t}\n\t\telse{\n\t\t\tcnt++;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\twrite(cnt);\n}"}, {"source_code": ";(function () {\n\n print(function (n, s) {\n var t = s.indexOf('0');\n\n if (t === -1) return n;\n if (t === 0) return 1;\n return t + 1;\n }(+readline(), readline()));\n\n}.call(this));\n"}, {"source_code": "(function () {\n var n = readline(),\n array = readline(),\n i = 0;\n while (array[i] === \"1\") i++;\n i++;\n print(i > n ? n : i);\n})();"}, {"source_code": "\n// 465A inc ARG \n\nvar n = parseInt(readline());\n\n// var input_line = readline().split(' ').map(Number);\nvar input_line = readline();\n\nvar count = 0;\n\nfor (var i = 0; i < n; i++) {\n if (input_line[i] === '1') {\n count ++;\n } else {\n break;\n }\n};\n\nif (count < n) count ++;\n\nprint(count);\n"}, {"source_code": "var n = parseInt(readline()),\n\t\t\tbits = readline().split('').map(Number),\n\t\t\tcount = 1;\n\t\t\n\t\tfor(var i = 0; i < n; i++)\t{\n\t\t\tif(bits[i] == 1)\t{\n\t\t\t\tcount++;\n\t\t\t} else\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(count == n + 1)\tcount--;\n\n\t\t//console.log(bits, count);\n\n\t\tprint(count);"}], "negative_code": [{"source_code": "var n = +readline(), str = readline().split(\"\");\nvar cnt = 0;\n\nif(str[0] == \"0\"){\n\twrite(cnt);\n}\nelse{\n\tcnt++;\n\n\tfor(var i = 1; i < n; i++){\n\t\tif(str[i] == \"1\"){\n\t\t\tcnt++;\n\t\t}\n\t\telse{\n\t\t\tcnt++;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\twrite(cnt);\n}"}, {"source_code": ";(function () {\n\n print(function (n, s) {\n var t = s.indexOf('0');\n\n if (t === -1) return n;\n if (t === 0) return 1;\n return n - t + 1;\n }(+readline(), readline()));\n\n}.call(this));\n"}, {"source_code": ";(function () {\n\n print(function (n, s) {\n var t = s.indexOf('0');\n\n if (t === -1) return n;\n return n - t + 1;\n }(+readline(), readline()));\n\n}.call(this));\n"}, {"source_code": "var n = parseInt(readline()),\n\t\t\tbits = readline().split('').map(Number),\n\t\t\tcount = 0, flag = false;\n\n\t\tbits = bits.reverse();\n\t\t\n\t\tfor(var i = n - 1; i >= 0; i--)\t{\n\t\t\tif(bits[i] + 1 == 2 && !flag)\t{\n\t\t\t\tbits[i] = 0;\n\n\t\t\t\tcount++;\n\t\t\t} else if(!flag)\t{\n\t\t\t\tbits[i] = 1;\n\t\t\t\tflag = true;\n\t\t\t} else\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tprint(count);"}, {"source_code": "var n = parseInt(readline()),\n\t\t\tbits = readline().split('').map(Number),\n\t\t\tcount = 0, flag = false;\n\n\t\tbits = bits.reverse();\n\t\t\n\t\tfor(var i = n - 1; i >= 0; i--)\t{\n\t\t\tif(bits[i] + 1 == 2 && !flag)\t{\n\t\t\t\tbits[i] = 0;\n\n\t\t\t\tcount++;\n\t\t\t} else if(!flag)\t{\n\t\t\t\tbits[i] = 1;\n\t\t\t\tflag = true;\n\t\t\t} else if(flag && bits[i] == 0)\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\t//console.log(bits);\n\n\t\tprint(count);"}], "src_uid": "54cb2e987f2cc06c02c7638ea879a1ab"} {"nl": {"description": "Alice got many presents these days. So she decided to pack them into boxes and send them to her friends.There are $$$n$$$ kinds of presents. Presents of one kind are identical (i.e. there is no way to distinguish two gifts of the same kind). Presents of different kinds are different (i.e. that is, two gifts of different kinds are distinguishable). The number of presents of each kind, that Alice has is very big, so we can consider Alice has an infinite number of gifts of each kind.Also, there are $$$m$$$ boxes. All of them are for different people, so they are pairwise distinct (consider that the names of $$$m$$$ friends are written on the boxes). For example, putting the first kind of present into the first box but not into the second box, is different from putting the first kind of present into the second box but not into the first box.Alice wants to pack presents with the following rules: She won't pack more than one present of each kind into the same box, so each box should contain presents of different kinds (i.e. each box contains a subset of $$$n$$$ kinds, empty boxes are allowed); For each kind at least one present should be packed into some box. Now Alice wants to know how many different ways to pack the presents exists. Please, help her and calculate this number. Since the answer can be huge, output it by modulo $$$10^9+7$$$.See examples and their notes for clarification.", "input_spec": "The first line contains two integers $$$n$$$ and $$$m$$$, separated by spaces ($$$1 \\leq n,m \\leq 10^9$$$) — the number of kinds of presents and the number of boxes that Alice has.", "output_spec": "Print one integer  — the number of ways to pack the presents with Alice's rules, calculated by modulo $$$10^9+7$$$", "sample_inputs": ["1 3", "2 2"], "sample_outputs": ["7", "9"], "notes": "NoteIn the first example, there are seven ways to pack presents:$$$\\{1\\}\\{\\}\\{\\}$$$$$$\\{\\}\\{1\\}\\{\\}$$$$$$\\{\\}\\{\\}\\{1\\}$$$$$$\\{1\\}\\{1\\}\\{\\}$$$$$$\\{\\}\\{1\\}\\{1\\}$$$$$$\\{1\\}\\{\\}\\{1\\}$$$$$$\\{1\\}\\{1\\}\\{1\\}$$$In the second example there are nine ways to pack presents:$$$\\{\\}\\{1,2\\}$$$$$$\\{1\\}\\{2\\}$$$$$$\\{1\\}\\{1,2\\}$$$$$$\\{2\\}\\{1\\}$$$$$$\\{2\\}\\{1,2\\}$$$$$$\\{1,2\\}\\{\\}$$$$$$\\{1,2\\}\\{1\\}$$$$$$\\{1,2\\}\\{2\\}$$$$$$\\{1,2\\}\\{1,2\\}$$$For example, the way $$$\\{2\\}\\{2\\}$$$ is wrong, because presents of the first kind should be used in the least one box."}, "positive_code": [{"source_code": "'use strict'\n\nconst rem = (s, m) => {\n const n = s.length;\n if (n <= 15) return `${+s % m}`;\n return `${(+rem(s.slice(0, n-15), m) * (1000000000000000 % m) + +s.slice(-15) % m) % m}`;\n}\n\nconst MOD = 1000000007;\n\nconst mult = (a, b) => {\n const la = a.length;\n const lb = b.length;\n if (la < 6 && lb < 6) return +a * +b;\n return +rem(`${mult(a.slice(0, -5), b.slice(0, -5))}0000000000`, MOD)\n + +rem(`${mult(a.slice(0, -5), b.slice(-5))}00000`, MOD)\n + +rem(`${mult(a.slice(-5), b.slice(0, -5))}00000`, MOD)\n +a.slice(-5) * +b.slice(-5);\n}\n\n\nconst pow = (a, b) => {\n if (b === 0) return 1;\n if (b === 1) return a;\n let r = `${pow(a, b >> 1)}`;\n r = mult(r, r);\n if (b % 2) r = mult(`${r}`, `${a}`);\n return +r % MOD;\n}\n\nconst nm = readline().split(' ').map(Number);\n\nwrite(pow(pow(2, nm[1]) - 1, nm[0]));"}], "negative_code": [{"source_code": "'use strict'\n\nconst pow = (a, b) => b === 0 ? 1 : b === 1 ? a : (Math.pow(pow(a, b / 2 | 0), 2) % 1000000007) * (Math.pow(a, b % 2) % 1000000007);\n\nconst nm = readline().split(' ').map(Number);\n\nwrite(pow((pow(2, nm[1]) - 1), nm[0]));"}, {"source_code": "'use strict'\n \nconst pow = (a, b) => {\n let r = 1;\n for (let i=0; i {\n let r = 1;\n for (let i=0; i {\n let r = 1;\n for (let i=0; i= 0 ? da - a : 0;\nvar resb = (db - b) >= 0 ? db - b : 0;\n\nvar res = resa + resb;\n\n\nprint(res);"}, {"source_code": "var line = readline().split(' ');\nvar a=parseInt(line[0]),b=parseInt(line[1]);\nvar line = readline().split(' ');\nvar a1=parseInt(line[0]),a2=parseInt(line[1]),a3=parseInt(line[2]);\nvar s1,s2,sum=0;\ns1=a1*2+a2;\ns2=a3*3+a2;\n\nif(s1>a)\n sum+=(s1-a);\nif(s2>b)\n sum+=(s2-b);\nprint(sum);\n "}, {"source_code": "var have_crystals = String(readline()).split(\" \");\nvar need_balls = String(readline()).split(\" \");\nvar yellow_need = 2 * parseInt(need_balls[0]) + parseInt(need_balls[1]);\nvar blue_need = parseInt(need_balls[1]) + 3 * parseInt(need_balls[2]);\nvar result = 0;\nif (parseInt(have_crystals[0]) < yellow_need) {\n result += yellow_need - parseInt(have_crystals[0]);\n}\nif (parseInt(have_crystals[1]) < blue_need) {\n result += blue_need - parseInt(have_crystals[1]);\n}\nprint(result);"}, {"source_code": "var arr = readline().split(' ').map(Number);\nvar A = arr[0];\nvar B = arr[1];\narr = readline().split(' ').map(Number);\nvar x = arr[0];\nvar y = arr[1];\nvar z = arr[2];\n\nvar yellow = 2*x + y;\nvar blue = y + 3*z;\n\nvar q = Math.max(yellow - A, 0)\nvar p = Math.max(blue - B, 0) \n\nprint(p + q);\n"}, {"source_code": "'use strict';\n\nvar balls = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar curYellow = balls[0];\nvar curBlue = balls[1];\nvar nado = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar off = 0;\nvar needYellow = (2 * nado[0]) + nado[1];\nvar needBlue = nado[1] + (3 * nado[2]);\n// print('Nado yellow: ' + needYellow + ', blue: '+ needBlue);\nvar offYellow = needYellow - curYellow > 0 ? needYellow - curYellow : 0;\nvar offBlue = needBlue - curBlue > 0 ? needBlue - curBlue : 0;\n\noff = offYellow + offBlue;\nprint(off);"}, {"source_code": "A=readline().split(' ').map(Number)\nB=readline().split(' ').map(Number)\nprint(Math.max(0,B[0]*2+B[1]-A[0])+Math.max(0,B[1]+3*B[2]-A[1]))"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet a, b;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n [yH, bH] = d.split(' ').map(Number);\n return;\n }\n\n const [y, g, b] = d.split(' ').map(Number);\n\n const yellow = y * 2 + g;\n const blue = b * 3 + g;\n const ans = Math.max(0, yellow - yH) + Math.max(0, blue - bH);\n\n console.log(ans);\n\n c++;\n});\n"}], "negative_code": [{"source_code": "var lineA = readline();\nvar lineB = readline();\n\nvar a = +lineA.split(' ')[0];\nvar b = +lineA.split(' ')[1];\n\nvar x = +lineB.split(' ')[0];\nvar y = +lineB.split(' ')[1];\nvar z = +lineB.split(' ')[2];\n\nvar da = 2 * x + y;\nvar db = 3 * z + y;\n\nvar res = da - a + db - b;\n\nprint(res);"}, {"source_code": "var lineA = readline();\nvar lineB = readline();\n\nvar a = +lineA.split(' ')[0];\nvar b = +lineA.split(' ')[1];\n\nvar x = +lineB.split(' ')[0];\nvar y = +lineB.split(' ')[1];\nvar z = +lineB.split(' ')[2];\n\nvar da = 2 * x + y;\nvar db = 3 * z + y;\n\nvar res = da - a + db - b;\n\nprint(res >= 0 ? res : 0);"}, {"source_code": "var arr1 = readline().split(\" \");\nvar arr2 = readline().split(\" \");\nvar yellow = 2 * parseInt(arr2[0]) + parseInt(arr2[1]);\nvar blue = parseInt(arr2[1]) + 3 * parseInt(arr2[2]);\nvar result = (yellow - parseInt(arr1[0])) + (blue - parseInt(arr1[1]));\nif (result < 0) {\n print(0);\n} else {\n print(result);\n}"}, {"source_code": "var arr1 = readline().split(\" \");\nvar arr2 = readline().split(\" \");\nvar yellow = 2 * parseInt(arr2[0]) + parseInt(arr2[1]);\nvar blue = parseInt(arr2[1]) + 3 * parseInt(arr2[2]);\nvar result = (yellow - parseInt(arr1[0])) + (blue - parseInt(arr1[1]));\nprint(result);"}, {"source_code": "var arr = readline().split(' ').map(Number);\nvar A = arr[0];\nvar B = arr[1];\narr = readline().split(' ').map(Number);\nvar x = arr[0];\nvar y = arr[1];\nvar z = arr[2];\n\n// var requiredNumberOfCrystals = 2*x + 2*y + 3*z;\n\nprint(Math.max(2*x + 2*y + 3*z - A - B, 0));\n"}, {"source_code": "var arr = readline().split(' ').map(Number);\nvar A = arr[0];\nvar B = arr[1];\narr = readline().split(' ').map(Number);\nvar x = arr[0];\nvar y = arr[1];\nvar z = arr[2];\n\n// var requiredNumberOfCrystals = 2*x + 2*y + 3*z;\n\nprint(2*x + 2*y + 3*z - A - B);\n"}, {"source_code": "'use strict';\n\nvar balls = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar curYellow = balls[0];\nvar curBlue = balls[1];\nvar nado = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar off = 0;\n// make yellow\nvar doneYellow = 0;\nif (nado[0] > 0) {\n var reqYellow = nado[0] * 2;\n if (reqYellow > curYellow) {\n var over = reqYellow - curYellow;\n off += over;\n var affordable = reqYellow - over;\n curYellow -= affordable;\n doneYellow += nado[0];\n } else {\n curYellow -= reqYellow;\n doneYellow += nado[0];\n }\n}\n\n// make green\nvar doneGreen = 0;\nif (nado[1] > 0) {\n var _reqYellow = nado[1] * 1;\n var reqBlue = nado[1] * 1;\n var _affordable = 0;\n var aY = 0;\n var aB = 0;\n if (_reqYellow > curYellow) {\n var _over = _reqYellow - curYellow;\n off += _over;\n aY = curYellow;\n } else {\n aY = _reqYellow;\n }\n if (reqBlue > curBlue) {\n var _over2 = reqBlue - curBlue;\n off += _over2;\n aB = curBlue;\n } else {\n aB = reqBlue;\n }\n if (aY > aB) {\n _affordable = aB;\n var _over3 = aY - aB;\n off += _over3;\n } else if (aB > aY) {\n _affordable = aY;\n var _over4 = aB - aY;\n off += _over4;\n } \n curYellow -= _affordable;\n curBlue -= _affordable;\n}\n// make blue\nvar doneBlue = 0;\nif (nado[2] > 0) {\n var _reqBlue = nado[2] * 3;\n if (_reqBlue > curBlue) {\n var over = _reqBlue - curBlue;\n off += over;\n var affordable = _reqBlue - over;\n curBlue -= affordable;\n doneBlue += nado[0];\n } else {\n curBlue -= _reqBlue;\n doneBlue += nado[0];\n }\n}\n\nprint(off);"}, {"source_code": "'use strict';\n\nvar balls = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar curYellow = balls[0];\nvar curBlue = balls[1];\nvar nado = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar off = 0;\n// make yellow\nvar doneYellow = 0;\nif (nado[0] > 0) {\n var reqYellow = nado[0] * 2;\n if (reqYellow > curYellow) {\n var over = reqYellow - curYellow;\n off += over;\n var affordable = reqYellow - over;\n curYellow -= affordable;\n doneYellow += nado[0];\n } else {\n curYellow -= reqYellow;\n doneYellow += nado[0];\n }\n}\n\n\n// make green\nvar doneGreen = 0;\nif (nado[1] > 0) {\n var _reqYellow = nado[1] * 1;\n var reqBlue = nado[1] * 1;\n var _affordable = 0;\n var aY = 0;\n var aB = 0;\n if (_reqYellow > curYellow) {\n var _over = _reqYellow - curYellow;\n //off += _over;\n aY = curYellow;\n } else {\n aY = _reqYellow;\n }\n if (reqBlue > curBlue) {\n var _over2 = reqBlue - curBlue;\n //off += _over2;\n aB = curBlue;\n } else {\n aB = reqBlue;\n }\n if (aY > aB) {\n _affordable = aB;\n var _over3 = aY - aB;\n off += _over3;\n } else if (aB > aY) {\n _affordable = aY;\n var _over4 = aB - aY;\n off += _over4;\n } else {\n _affordable = aY;\n }\n\n curYellow -= _affordable;\n curBlue -= _affordable;\n}\n\n// make blue\nvar doneBlue = 0;\nif (nado[2] > 0) {\n var _reqBlue = nado[2] * 3;\n if (_reqBlue > curBlue) {\n var over = _reqBlue - curBlue;\n off += over;\n var affordable = _reqBlue - over;\n curBlue -= affordable;\n doneBlue += nado[2];\n } else {\n curBlue -= _reqBlue;\n doneBlue += nado[2];\n }\n}\n\n\nprint(off);"}, {"source_code": "'use strict';\n\nvar balls = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar curYellow = balls[0];\nvar curBlue = balls[1];\nvar nado = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar off = 0;\n// make yellow\nvar doneYellow = 0;\nif (nado[0] > 0) {\n var reqYellow = nado[0] * 2;\n if (reqYellow > curYellow) {\n var over = reqYellow - curYellow;\n off += over;\n var affordable = reqYellow - over;\n curYellow -= affordable;\n doneYellow += nado[0];\n } else {\n curYellow -= reqYellow;\n doneYellow += nado[0];\n }\n}\n\n// make green\nvar doneGreen = 0;\nif (nado[1] > 0) {\n var _reqYellow = nado[1] * 1;\n var reqBlue = nado[1] * 1;\n var _affordable = 0;\n var aY = 0;\n var aB = 0;\n if (_reqYellow > curYellow) {\n var _over = _reqYellow - curYellow;\n off += _over;\n aY = curYellow;\n } else {\n aY = _reqYellow;\n }\n if (reqBlue > curBlue) {\n var _over2 = reqBlue - curBlue;\n off += _over2;\n aB = curBlue;\n } else {\n aB = reqBlue;\n }\n if (aY > aB) {\n _affordable = aB;\n var _over3 = aY - aB;\n off += _over3;\n } else if (aB > aY) {\n _affordable = aY;\n var _over4 = aB - aY;\n off += _over4;\n } else {\n _affordable = aY;\n }\n\n curYellow -= _affordable;\n curBlue -= _affordable;\n}\n// make blue\nvar doneBlue = 0;\nif (nado[2] > 0) {\n var _reqBlue = nado[2] * 3;\n if (_reqBlue > curBlue) {\n var over = _reqBlue - curBlue;\n off += over;\n var affordable = _reqBlue - over;\n curBlue -= affordable;\n doneBlue += nado[2];\n } else {\n curBlue -= _reqBlue;\n doneBlue += nado[2];\n }\n}\n\nprint(off);"}, {"source_code": "'use strict';\n\nvar balls = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar curYellow = balls[0];\nvar curBlue = balls[1];\nvar nado = readline().split(' ').map(function (x) {\n return parseInt(x);\n});\nvar off = 0;\n// make yellow\nvar doneYellow = 0;\nif (nado[0] > 0) {\n var reqYellow = nado[0] * 2;\n if (reqYellow > curYellow) {\n var over = reqYellow - curYellow;\n off += over;\n var affordable = reqYellow - over;\n curYellow -= affordable;\n doneYellow += nado[0];\n } else {\n curYellow -= reqYellow;\n doneYellow += nado[0];\n }\n}\n// make green\nvar doneGreen = 0;\nif (nado[1] > 0) {\n var _reqYellow = nado[0] * 1;\n var reqBlue = nado[0] * 1;\n var _affordable = 0;\n var aY = 0;\n var aB = 0;\n if (_reqYellow > curYellow) {\n var _over = _reqYellow - curYellow;\n off += _over;\n aY = curYellow;\n } else {\n aY = curYellow;\n }\n if (reqBlue > curBlue) {\n var _over2 = reqBlue - curBlue;\n off += _over2;\n aB = curBlue;\n } else {\n aB = curBlue;\n }\n if (aY > aB) {\n _affordable = aB;\n var _over3 = aY - aB;\n off += _over3;\n } else if (aB > aY) {\n _affordable = aY;\n var _over4 = aB - aY;\n off += _over4;\n }\n}\n// make blue\nvar doneBlue = 0;\nif (nado[2] > 0) {\n var _reqBlue = nado[0] * 3;\n if (_reqBlue > curBlue) {\n var over = _reqBlue - curBlue;\n off += over;\n var affordable = _reqBlue - over;\n curBlue -= affordable;\n doneBlue += nado[0];\n } else {\n curBlue -= _reqBlue;\n doneBlue += nado[0];\n }\n}\n\nprint(off);"}], "src_uid": "35202a4601a03d25e18dda1539c5beba"} {"nl": {"description": "Vasya is very upset that many people on the Net mix uppercase and lowercase letters in one word. That's why he decided to invent an extension for his favorite browser that would change the letters' register in every word so that it either only consisted of lowercase letters or, vice versa, only of uppercase ones. At that as little as possible letters should be changed in the word. For example, the word HoUse must be replaced with house, and the word ViP — with VIP. If a word contains an equal number of uppercase and lowercase letters, you should replace all the letters with lowercase ones. For example, maTRIx should be replaced by matrix. Your task is to use the given method on one given word.", "input_spec": "The first line contains a word s — it consists of uppercase and lowercase Latin letters and possesses the length from 1 to 100.", "output_spec": "Print the corrected word s. If the given word s has strictly more uppercase letters, make the word written in the uppercase register, otherwise - in the lowercase one.", "sample_inputs": ["HoUse", "ViP", "maTRIx"], "sample_outputs": ["house", "VIP", "matrix"], "notes": null}, "positive_code": [{"source_code": "n = readline();\nvar s = n.replace(/[^a-z]/g, \"\").length;\nif (s >= n.length / 2) print(n.toLowerCase());\nelse print(n.toUpperCase());"}, {"source_code": "const main = () => {\n const n = readline();\n const regex = new RegExp(\"[ A-Z ]\");\n var cap = 0;\n\n for (i of n) {\n if (regex.test(i)) {\n cap++;\n continue;\n }\n }\n\n if (cap > n.length / 2) {\n print(n.toUpperCase());\n return;\n }\n print(n.toLocaleLowerCase());\n};\n\nmain();"}, {"source_code": "'use strict';\nconst isCapital = letter => letter === letter.toUpperCase();\nlet word = readline(),\n counter = 0;\n\nword.split('').map(letter => {\n if (isCapital(letter)) {\n counter++;\n }\n});\n\nif (word.length - counter >= counter) {\n write(word.toLowerCase());\n} else {\n write(word.toUpperCase());\n}"}, {"source_code": "n = readline();\nvar s = n.replace(/[^a-z]/g, \"\").length,\n w = n.length - s;\nif (w <= s) {\n print(n.toLowerCase())\n}\nelse {\n print(n.toUpperCase())\n}"}, {"source_code": "// var word=prompt();\nvar word=readline();\nvar newWord=word.split(\"\");\nvar count=0;\n// console.log(word.length);\nfor(i=0;i= ((word.length)-count));\nif(count > ((word.length)-count)){\n // console.log(word.toUpperCase());\n print(word.toUpperCase());\n}\nelse{\n // console.log(word.toLowerCase());\n print(word.toLowerCase());\n}"}, {"source_code": "var string = readline();\nvar lower = 0, upper = 0;\nfor (var i = 0; i < string.length; i++) {\n\tif (string[i] == string[i].toLowerCase() && string[i] != string[i].toUpperCase())\n\t lower++;\n\telse\n\t upper++;\n}\nstring = (lower >= upper) ? string.toLowerCase() : string.toUpperCase();\nprint(string);"}, {"source_code": "var a = readline();\nvar max =0;\nvar min = 0; \n\nfor (var i=0; imax)\n\tprint(a.toLowerCase());\n\telse if (min==max)\n\tprint(a.toLowerCase());\nelse\n\tprint(a.toUpperCase());"}, {"source_code": "var word = readline();\nvar uppercaseCounter = 0;\nvar lowercaseCounter = 0;\n\nfor(var i = 0; i < word.length; i++) {\n var character = word[i];\n \n if(character == character.toUpperCase()) {\n uppercaseCounter++;\n continue;\n }\n \n if(character == character.toLowerCase()) {\n lowercaseCounter++;\n continue;\n }\n}\n\n\nif(uppercaseCounter > lowercaseCounter) {\n print(word.toUpperCase());\n} else if(uppercaseCounter < lowercaseCounter || uppercaseCounter == lowercaseCounter) {\n print(word.toLowerCase())\n}"}, {"source_code": "var word = readline();\nvar upperCase =0 , lowerCase =0;\nfor (var i=0 ; i lowerCase){\n print(word.toUpperCase());\n}\nelse{\n print(word.toLowerCase());\n}"}, {"source_code": "var value = readline()\n\nvar countUpper = 0;\nvar countLower = 0;\n\nfor(var i = 0; i < value.length; i++){\n if(/[A-Z]/.test(value[i])){\n countUpper++;\n }else if(/[a-z]/.test(value[i])){\n countLower++;\n }\n}\n\nif(countUpper > countLower){\n print(value.toUpperCase())\n}else{\n print(value.toLowerCase())\n}"}, {"source_code": "input = readline();\nvar len = input.length;\nvar lowercase = 0\nvar uppercase = 0;\n\nfor (var i = 0; i < input.length; i++) {\n\n\tif (/[A-Z]/.test(input.charAt(i))) \n\t{\n\t\tuppercase++;\t\n\t} else {\n\t\tlowercase++;\n\t}\n}\n\nif (uppercase > lowercase)\n{\n\tprint(input.toUpperCase());\n} else {\n\tprint(input.toLowerCase());\n}"}, {"source_code": "var word = readline();\nvar uppercase = 0;\nvar lowercase = 0;\nfor(var i = 0; i < word.length; i++){\n if(word[i] === word[i].toUpperCase()) {\n uppercase ++;\n }\n else {\n lowercase ++;\n }\n}\n\nif(uppercase > lowercase) {\n print (word.toUpperCase());\n}\nelse {\n print(word.toLowerCase());\n}"}, {"source_code": "var input = readline();\nvar upper = 0;\nfor(i=0; i< input.length; i++) {\n if(input.charAt(i) === input.charAt(i).toUpperCase())\n upper++;\n}\nprint(input.length / 2 < upper ? input.toUpperCase() : input.toLowerCase());\n"}, {"source_code": "var s = readline();\n\nvar lower = 0, upper = 0;\n\nfor (var i = 0; i= upper) {\n print(s.toLowerCase());\n}\nelse {\n print(s.toUpperCase());\n}"}, {"source_code": "var string=readline().split('');\n\nvar lower=0;\nvar upper=0;\n\nfor(var i=0;iupper){\n final_string.toLowerCase()\n print(final_string.toLowerCase())\n}else if(upper>lower){\n \n print(final_string.toUpperCase())\n}else{\n final_string.toLowerCase()\n print(final_string.toLowerCase())\n}\n"}, {"source_code": "var word=readline();\nvar numUpper = (word.match(/[A-Z]/g) || []).length;\nif(numUpper>(word.length/2))\nword=word.toUpperCase();\nelse\nword=word.toLowerCase();\n\nprint(word)"}, {"source_code": "data = readline();\nif (moreUpperCaseLetters(data))\n {\n print(data.toUpperCase());\n }\nelse\n {\n print(data.toLowerCase());\n }\n\n\nfunction moreUpperCaseLetters(data)\n{\n var upperCaseAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n var lowerCaseAlphabet = \"abcdefghijklmnopqrstuvwxyz\"\n var lowerCaseCounter = 0;\n var upperCaseCounter = 0;\n\n for(var index = 0; index < data.length; index++)\n {\n if(data[index] === data[index].toLowerCase())\n {\n lowerCaseCounter++;\n }\n else \n {\n upperCaseCounter++;\n }\n }\n return upperCaseCounter > lowerCaseCounter;\n}"}, {"source_code": "var input = readline();\nvar output = \"\";\nvar lC = 0;\nvar uC = 0;\nfor(var i = 0; i < input.length; i++)\n{\n input[i] == input[i].toUpperCase() ? uC++ : lC++;\n}\noutput = uC > lC ? input.toUpperCase() : input.toLowerCase();\nprint(output);"}, {"source_code": "var word = readline();\nvar count = 0;\nfor(var i = 0; i < word.length; i++){\n if(word[i].match(/[A-Z]/)){\n count++;\n }\n}\n\nprint(count > (word.length/2)? word.toUpperCase() : word.toLowerCase());"}, {"source_code": "var str=readline();\nvar mayus=str.toUpperCase();\nvar long=str.length;\nvar contMayus=0, contMinus=0;\nfor(var i=0;icontMinus){\n\tprint(mayus);\n}else{\n\tprint(str.toLowerCase());\n}"}, {"source_code": "var s = readline(),\n upper = 0,\n lower = 0;\n\nfor(var i=0; i=65 && s.charCodeAt(i)<=90) ? upper++ : lower++;\n}\n\nprint((upper <= lower) ? s.toLowerCase() : s.toUpperCase());"}, {"source_code": "var input = readline();\n\nprint(convertString(input))\n\nfunction getCountLetters(string) {\n var capital = 0;\n var small = 0;\n\n for(var i of string.split('')) {\n if(i == i.toUpperCase()) {\n capital++\n } else {\n small++\n }\n }\n\n return [capital, small]\n}\n\nfunction convertString(string) {\n var word = getCountLetters(string);\n var capital = word[0];\n var small = word[1];\n\n if(capital > small) {\n return string.toUpperCase();\n } else {\n return string.toLowerCase();\n }\n}"}, {"source_code": "var input = readline();\nvar i = 0;\nvar upperCount = 0;\n\nwhile( upperCount <= input.length / 2 && i < input.length){\n \n if(input[i] === input[i].toUpperCase()){\n upperCount ++;\n }\n \n i++;\n}\n\nvar result = upperCount > input.length / 2 ? input.toUpperCase() : input.toLowerCase();\n\n\nprint(result)"}, {"source_code": "var a = readline(), b = 0, c = 0;\nfor (; a[b]; b++) if (a[b] >= 'A' && a[b] <= 'Z') c++;\nprint(b > c && c > b / 2 ? a.toUpperCase() : c && c <= b / 2 ? a.toLowerCase() : a);"}, {"source_code": "var a = readline(), b = -1, c = 0;\nwhile (a[++b]) if (a[b] > '@' && a[b] < '[') c++;\nprint(c > b / 2 ? a.toUpperCase() : a.toLowerCase());"}, {"source_code": "var str = readline();\nvar u = (str.match(/[A-Z]/g) || []).length;\nvar l = (str.match(/[a-z]/g) || []).length;\n\nif (u > l) {\n write(str.toUpperCase());\n} else {\n write(str.toLowerCase());\n}"}, {"source_code": "function main(){\n var n = readline();\n var u = 0;\n var l = 0;\n for (var j = 0; j < n.length; j++) {\n var temp = n[j];\n if(temp == temp.toUpperCase()) u++;\n else l++;\n }\n if(u > l) {\n\n print(n.toUpperCase());\n }\n else {\n print(n.toLowerCase())\n }\n}\nmain();"}, {"source_code": "var s = readline();\n\nvar upcount = 0;\nvar lowcount = 0;\n\nfor(i=0;i({C:a.C+Number(c.toUpperCase()==c), c:a.c+Number(c.toLowerCase()==c)}), {C:0,c:0})\nprint(Z.C>Z.c?X.toUpperCase():X.toLowerCase())"}, {"source_code": "var word = readline();\nvar upper = 0, lower = 0;\nfor (var i = 0; i < word.length; i++) {\n\tif(word[i].match(/[A-Z]/)) {\n\t\tupper++;\n\t} else {\n\t\tlower++;\n\t}\n}\n\nif (upper > lower) {\n\tprint(word.toUpperCase());\n} else {\n\tprint(word.toLowerCase());\n}\n"}, {"source_code": "var string = readline();\nvar upper = 0, lower = 0;\nfor(var i = 0; i < string.length; i++){\n if(string[i] === string[i].toUpperCase()){\n upper++;\n }\n else{ \n lower++;\n }\n}\nif(upper <= lower){\n print(string.toLowerCase());\n}\nelse{\n print(string.toUpperCase());\n}"}, {"source_code": "var word = readline();\nvar uppercaseCounter = 0;\nvar lowercaseCounter = 0;\n\nfor(var i = 0; i < word.length; i++) {\n var character = word[i];\n \n if(character == character.toUpperCase()) {\n uppercaseCounter++;\n continue;\n }\n \n if(character == character.toLowerCase()) {\n lowercaseCounter++;\n continue;\n }\n}\n\n\nif(uppercaseCounter > lowercaseCounter) {\n print(word.toUpperCase());\n} else if(uppercaseCounter < lowercaseCounter || uppercaseCounter == lowercaseCounter) {\n print(word.toLowerCase())\n}"}, {"source_code": "var word = readline();\nvar wordArr = word.split(\"\");\n \nvar obj = {\n \"upper\": 0,\n \"lower\": 0\n}\n \nfor (var i = 0; i < wordArr.length; i++ ) {\n if (word.charCodeAt(i) >= 65 && word.charCodeAt(i) <= 90) {\n obj[\"upper\"]++;\n } else {\n obj[\"lower\"]++;\n }\n}\n \nif (obj[\"lower\"] >= obj[\"upper\"]) {\n print(word.toLowerCase());\n} else {\n print(word.toUpperCase());\n}"}, {"source_code": " n = readline();\n var s = n.replace(/[^a-z]/g, \"\").length;\nif(s >= n.length/2) print(n.toLowerCase())\nelse print(n.toUpperCase())\n\n\n\n "}, {"source_code": "//var input = \"WUBWEWaaAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB\";\n//var index = 0;\n//\n//function readline(){\n// var data = input.split('\\n');\n// if(index < data.length)\n// return data[index++];\n//}\n//\n//function print(output){\n// console.log(output);\n//}\n\nfunction main(){\n var a = readline();\n var lower = 0, upper = 0;\n for(var i = 0; i < a.length; i++){\n if(a.charAt(i) >= 'A' && a.charAt(i) <= 'Z')\n upper++;\n else\n lower++;\n }\n if(upper > lower)\n print(a.toUpperCase());\n else\n print(a.toLowerCase());\n}\nmain();"}, {"source_code": "var print = this.print || require('lol-io').print\nvar write = this.write || require('lol-io').write\nvar readline = this.readline || require('lol-io').readline\n\nvar str=readline();\nvar abc=\"abcdefghijklmnopqrstuvwxyz\";\nvar upper=0;\nvar lower=0;\nfor(var i=0;ilower){\n print(str.toUpperCase());\n}else{\n print(str.toLowerCase());\n}"}, {"source_code": "var sourceText = readline();\nvar upperSymbol = 0;\nvar lowerSymbol = 0;\nfor (var i=0; i= 65 && sourceText.charCodeAt(i) <= 90) {\n upperSymbol++;\n } else {\n lowerSymbol++;\n }\n}\nlowerSymbol >= upperSymbol ? print(sourceText.toLowerCase()) : print(sourceText.toUpperCase());"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let s1 = readline();\n let lowercase = 0;\n let uppercase = 0;\n\n for (let i = 0 , c = s1.length ; i < c ; i++){\n if (s1[i].charCodeAt(0) >=97) lowercase++;\n else uppercase ++;\n }\n console.log((lowercase >= uppercase)? s1.toLowerCase() : s1.toUpperCase());\n}\n\n"}, {"source_code": "process.stdin.setEncoding('utf8');\n\nprocess.stdin.on('readable', () => {\n let input = process.stdin.read();\n input = input.trim();\n\n if (input !== null) {\n let lowerCase = 0;\n let upperCase = 0;\n\n for (let i = 0; i < input.length; i++) {\n if (input[i] == input[i].toUpperCase()) upperCase++;\n else lowerCase++;\n }\n\n if (upperCase > lowerCase) input = input.toUpperCase();\n if (lowerCase > upperCase || lowerCase == upperCase) input = input.toLowerCase();\n\n process.stdout.write(`${input}\\n`);\n process.exit(0);\n }\n});"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n})\n\nreadline.question(\"\", (word) => {\n let Ca=0,Sm=0;\n for(let i of word){\n if(i==i.toUpperCase()){\n Ca++;\n }else{\n Sm++;\n }\n }\n if(Ca>Sm){\n console.log(word.toUpperCase());\n }else{\n console.log(word.toLowerCase());\n }\n readline.close()\n})"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const word = readLine();\n let [lowerCount, upperCount] = [0, 0];\n const isLowerCase = (char) => {\n return char.charCodeAt(0) >= 97 && char.charCodeAt(0) <= 122;\n };\n const convertTo = (word, type = \"lower\") => {\n const result = [];\n if (type === \"upper\") {\n for (let i = 0; i < word.length; i++) {\n const char = word[i];\n if (isLowerCase(char)) {\n let charCode = char.charCodeAt(0);\n result.push(String.fromCharCode(charCode - 32));\n } else {\n result.push(char);\n }\n }\n } else {\n for (let i = 0; i < word.length; i++) {\n const char = word[i];\n if (!isLowerCase(char)) {\n let charCode = char.charCodeAt(0);\n result.push(String.fromCharCode(charCode + 32));\n } else {\n result.push(char);\n }\n }\n }\n return result.join(\"\");\n };\n for (let i = 0; i < word.length; i++) {\n if (isLowerCase(word[i])) lowerCount++;\n else upperCount++;\n }\n if (lowerCount >= upperCount) {\n console.log(convertTo(word));\n } else {\n console.log(convertTo(word, \"upper\"));\n }\n}\n"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet s ;\nlet upperCounter = 0 ;\nlet lowerCounter = 0 ; \nlet temp ; \nrl.on(\"line\",(input)=>{\n s = input.split(\" \").toString()\n //console.log(typeof(s))\n temp = s; \n // console.log(temp[0].toLowerCase,s[0])\n \n for(let i = 0 ; i < s.length ; i++){\n if((temp[i].toLowerCase()) == s[i]) lowerCounter++\n else upperCounter++;\n }\n if(lowerCounter>= upperCounter) console.log(s.toLowerCase())\n else console.log(s.toUpperCase());\n});"}, {"source_code": "\"use strict\";\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", (inputStdin) => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((string) => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n const x = readline();\n\n fn(x);\n}\n\nfunction fn(str) {\n let upperCaseCount = 0;\n let lowerCaseCount = 0;\n\n for (let char of str) {\n if (/[A-Z]/.test(char)) {\n upperCaseCount++;\n } else {\n lowerCaseCount++;\n }\n }\n\n console.log(\n upperCaseCount > lowerCaseCount ? str.toUpperCase() : str.toLowerCase()\n );\n\n return upperCaseCount > lowerCaseCount\n ? str.toUpperCase()\n : str.toLowerCase();\n}\n"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw \"ArrayIndexOutOfBoundsException ‚There is no more input\";}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var s = next();\n var u = s.toUpperCase();\n var ucount = 0;\n var l = s.toLowerCase();\n var lcount = 0;\n for(var i = 0; i < s.length; i++){\n if(s[i] != u[i] && s[i] == l[i]){\n ucount++;\n }\n if(s[i] == u[i] && s[i] != l[i]){\n lcount++;\n }\n }\n if(lcount > ucount){\n myout(u);\n }else{\n myout(l);\n }\n}\n"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\n\nconst runMain = () => {\n inputString = inputString.trim().split('\\n').map(string => string.trim());\n main();\n process.exit();\n}\nconst readLine = () => inputString[currentLine++];\n\nprocess.stdin.on('data', inputStdin => inputString += inputStdin);\nprocess.stdin.on('end', runMain);\nprocess.on('SIGINT', runMain);\n\nfunction main() {\n let s = readLine();\n let n = 0;\n s.split('').forEach(el => {\n if (el === el.toUpperCase()) {\n n++;\n }\n });\n if (n > s.length / 2) {\n console.log(s.toUpperCase());\n } else {\n console.log(s.toLocaleLowerCase());\n }\n}\n"}, {"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.question(\"\", function (str) {\n var res = (str.replace(/[^A-Z]/g, \"\").length);\n var reslow = (str.replace(/[^a-z]/g, \"\").length);\n if (reslow >= res) {\n var up = str.replace(str, str.toLowerCase());\n console.log(up);\n } else {\n var low = str.replace(str, str.toUpperCase());\n console.log(low);\n }\n rl.close();\n }\n);"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nrl.on('line', (line) => {\n console.log(solution(line));\n});\n\n\n// Count the number of uppercase and lower case letters\n// If numUpper > numLower turn everything into upper\n// Else turn everything into lower\nfunction solution(input) {\n const word = input.split('');\n let numUpper = 0, numLower = 0;\n for (let i = 0; i < word.length; i++) {\n if (word[i] === word[i].toUpperCase()) {\n numUpper++;\n } else {\n numLower++;\n }\n }\n\n if (numUpper > numLower) {\n return input.toUpperCase();\n } else {\n return input.toLowerCase();\n }\n}\n"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction print(s) {\n process.stdout.write(`${s}`);\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n // input\n const a = readline();\n let l = 0;\n let result = a.toUpperCase();\n for (let i = 0; i < a.length; i++) {\n const c = a.charAt(i);\n if (c === c.toLowerCase()) {\n l++\n }\n if (l >= Math.ceil((a.length) / 2)) {\n result = a.toLowerCase();\n break;\n }\n }\n // output\n print(result);\n}\n\n"}, {"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.question(\"\", function (str) {\n var res = (str.replace(/[^A-Z]/g, \"\").length);\n var reslow = (str.replace(/[^a-z]/g, \"\").length);\n if (reslow >= res) {\n var up = str.replace(str, str.toLowerCase());\n console.log(up);\n } else {\n var low = str.replace(str, str.toUpperCase());\n console.log(low);\n }\n rl.close();\n }\n);"}, {"source_code": "//Word\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n const lines = inp.split(EOL)[0].trim();\n \n let small = 0;\n for(let i = 0; i < lines.length; i++) {\n \tif(lines[i] >= 'a' && lines[i] <= 'z') {\n \t\tsmall++;\n \t\tif(small > lines.length / 2) {\n \t\t\tbreak;\n \t\t}\n \t}\n }\n\n if(small >= lines.length / 2) {\n \tprocess.stdout.write(lines.toLowerCase());\n } else {\n \tprocess.stdout.write(lines.toUpperCase());\n }\n\n return;\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (w) => {\n let lowerCount = 0;\n let upperCount = 0;\n\n for (let i = 0; i < w.length; i++) {\n if (w.charCodeAt(i) > 64 && w.charCodeAt(i) < 97) {\n upperCount++;\n }\n else {\n lowerCount++;\n }\n }\n\n if (upperCount > lowerCount) {\n console.log(w.toUpperCase());\n }\n else {\n console.log(w.toLowerCase());\n }\n});\n"}, {"source_code": "\n'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\n\nfunction main() {\n const str = readline();\n let upperCase = 0;\n let lowerCase = 0;\n for (let i = 0; i < str.length; i++) {\n if (str[i] === str[i].toUpperCase()) {\n upperCase++;\n }\n else {\n lowerCase++;\n }\n }\n\n if (upperCase > lowerCase)\n console.log(str.toUpperCase())\n else\n console.log(str.toLowerCase())\n\n\n return;\n}"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nconst isCapitalize = s => s.toUpperCase() === s;\nconst isLower = s => s.toLowerCase() === s;\n\nreadLine.on('close', () => {\n const word = input[0];\n let s = 0, b = 0;\n\n for (let i = 0; i < word.length; i += 1) {\n if (isCapitalize(word[i])) b += 1;\n else s += 1;\n }\n\n if ( s >= b ) console.log(word.toLowerCase());\n else console.log(word.toUpperCase());\n});"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n \nrl.on('line', (input) => {\n let upper = (input.match(/[A-Z]/g) || []).length;\n let lower = (input.match(/[a-z]/g) || []).length;\n \n if(upper > lower) {\n console.log(input.toUpperCase());\n } else {\n console.log(input.toLowerCase());\n }\n rl.close();\n});"}, {"source_code": "'use strict';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nconst readLine=()=> inputString[currentLine++];\n/* ================================================ \n Main Solution Starts Here \n===================================================*/\n\nconst main=()=>{\n\tlet x=readLine()\n\tlet uc=0,lc=0\n\tfor(let char of x)\n\t\tif(char==char.toUpperCase())\n\t\t\tuc++\n\t\telse lc++\n\n\tif(lc==uc || lc > uc)\n\t\tconsole.log(x.toLowerCase())\n\telse console.log(x.toUpperCase())\n}"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction main() {\n\tlet s = readLine().split('');\n\tlet l = 0,\n\t\tu = 0;\n\ts.forEach(c => (c.charCodeAt(0) >= 65 && c.charCodeAt(0) < 97 ? u++ : l++));\n\tif (l >= u) console.log(s.join('').toLowerCase());\n\telse console.log(s.join('').toUpperCase());\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let word = readLine();\n let wordArray = word.split('');\n let smallLetters = [];\n let CapitalLetters = [];\n for (let i = 0; i < wordArray.length; i++) {\n if (\n wordArray[i] === wordArray[i].toUpperCase() &&\n wordArray[i] !== wordArray[i].toLowerCase()\n ) {\n CapitalLetters.push(wordArray[i]);\n } else {\n smallLetters.push(wordArray[i]);\n }\n }\n if (CapitalLetters.length > smallLetters.length) {\n console.log(word.toUpperCase());\n } else {\n console.log(word.toLowerCase());\n }\n}\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadline.on('line', line => input.push(line));\n\nreadline.on('close', () => {\n let [word] = input;\n let l = (word.match(/[a-z]/g) || []).length;\n if (l >= word.length / 2) console.log(word.toLowerCase());\n else console.log(word.toUpperCase());\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({input: process.stdin});\nvar input = [];\nrl.on('line', function (line) {input.push(line);});\nrl.on('close', function() {\n const word = input[0];\n let lowerCount = 0;\n let upperCount = 0;\n \n for(let i = 0; i < word.length; i++) {\n if(isUpperCased(word[i])) upperCount++;\n if(!isUpperCased(word[i])) lowerCount++;\n }\n \n if (upperCount > lowerCount) {\n console.log(word.toUpperCase())\n } else if( lowerCount === upperCount || lowerCount > upperCount) {\n console.log(word.toLowerCase())\n }\n \n});\n\nfunction isUpperCased(l) {\n return l.toUpperCase() === l;\n}"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction readAsInt(){\n return parseInt(readline());\n}\n\nfunction readAsIntList(){\n return readline().split(' ').filter(i => i).map(i => parseInt(i));\n}\n\n\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n let s = readline();\n let l = s.replace(/[^a-z]+/g,'').length;\n let u = s.replace(/[^A-Z]+/g,'').length;\n console.log((l > u || l === u) ? s.toLowerCase() : s.toUpperCase());\n}\n \n\n\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet currentLine = 0;\nlet inputString = \"\";\n\nprocess.stdin.on(\"data\", (raw_data) => {\n inputString += raw_data;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((line) => {\n return line.trim();\n });\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n/******** Main function*************/\n\nfunction main() {\n var s = readLine();\n\n function isLowerCase(str) {\n return str == str.toLowerCase() && str != str.toUpperCase();\n }\n\n var lCount = 0,\n uCount = 0;\n\n for (var i = 0; i < s.length; i++) {\n if (isLowerCase(s[i])) {\n lCount++;\n } else {\n uCount++;\n }\n }\n\n var str = \"\";\n\n if (lCount > uCount || lCount == uCount) str = s.toLowerCase();\n\n if (lCount < uCount) str = s.toUpperCase();\n\n console.log(str);\n}\n"}, {"source_code": "let fs = require(\"fs\");\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0;\n});\nfor (let i = 0; i < txt.length; i ++) {\n doit(txt[i]);\n\n}\n\nfunction doit(str) {\n let tab =str.split(\"\").filter(data=>{return data.length>0});\n let min=0;\n tab.forEach(data => {\n if(data.charCodeAt()>=97)min++;\n });\n if(min>=tab.length-min){\n console.log(str.toLowerCase());\n }else{\n console.log(str.toUpperCase());\n \n }\n \n}"}, {"source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\nfunction main(input) {\n let output = nameLookUp(input);\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n// Write your code here\nfunction nameLookUp(str) {\n let inputs = str.trim();\n let upperCaseCount = inputs.replace(/[a-z]/g, '').length;\n let lowerCaseCount = inputs.replace(/[A-Z]/g, '').length;\n if (upperCaseCount == lowerCaseCount || lowerCaseCount > upperCaseCount) {\n inputs = inputs.toLowerCase();\n }\n else if (upperCaseCount > lowerCaseCount) {\n inputs = inputs.toUpperCase();\n }\n return inputs.toString();\n}\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\nconst word = () => {\n let ar = [];\n for (const x of input[0]) {\n ar.push(x);\n }\n let upper = 0;\n let lower = 0;\n for (const y of ar) {\n if (y === y.toUpperCase() ) {\n upper++;\n }\n else {\n lower++;\n }\n }\n console.log(upper > lower ? input[0].toUpperCase() : input[0].toLowerCase());\n};\n\nreadLine.on('close', word);\n"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let s = readLine();\n let totalOfLowerCase = s.split('').filter((value) => {\n return value.charCodeAt(0) >= 97\n }).length;\n let totalOfUpperCase = s.split('').filter((value) => {\n return value.charCodeAt(0) < 97\n }).length;\n if (totalOfUpperCase > totalOfLowerCase) {\n console.log(s.toUpperCase());\n } else {\n console.log(s.toLowerCase());\n }\n}"}, {"source_code": "\nvar s=readline();\nvar lc=0;\nfor(var i=0;i='a'&&s[i]<='z'){\n\t\tlc++;\n\t}\n}\nif(lc*2>=s.length){\n\tprint( s.toLowerCase() );\n}else{\n\tprint( s.toUpperCase() );\n}"}, {"source_code": "var word = readline(), big = 0, small = 0;\n\nfor(i = 0; i < word.length; i++){\n\tif( /[A-Z]/.test(word[i]) ){\n\t\tbig++;\n\t}\n\telse{\n\t\tsmall++;\n\t}\n}\nif(big > small){\n\twrite(word.toUpperCase());\n}\nelse{\n\twrite(word.toLowerCase());\n}"}, {"source_code": "var s = readline();\nvar a = s.toLowerCase();\nvar b = s.toUpperCase();\nvar n = s.length;\nvar toL = 0, toU = 0;\nfor (var i = 0; i < n; i ++) {toL += +(s[i] != a[i]); toU += +(s[i] != b[i]);}\nprint(toL > toU ? b : a);"}, {"source_code": "var upper=0;\nvar lower=0;\nvar input = readline();\nvar ch;\nfor(var i=0 ; ilower)\n print(input.toUpperCase());\nelse\n print(input.toLowerCase());"}, {"source_code": "var s = readline();\nvar n = s.length;\n\nvar lowercase = 0, uppercase = 0;\n\nfor(var i=0;i='a'.charCodeAt() && s[i].charCodeAt()<='z'.charCodeAt()) {\n ++lowercase;\n }\n else {\n ++uppercase;\n }\n}\n\nif(lowercase>=uppercase) {\n print(s.toLowerCase());\n}\nelse {\n print(s.toUpperCase());\n}\n"}, {"source_code": "var word = readline();\nvar clower = Array.prototype.reduce.call(word, function(prev, cur, i, a){return prev + ((cur <= 'z' && cur >= 'a') ? 1 : 0);}, 0);\nif(clower >= word.length - clower)\n write(word.toLowerCase());\nelse write(word.toUpperCase());\n"}, {"source_code": "function main(){\n var word = readline();\n var letters = word.split('');\n var lower = 0;\n var upper = 0;\n for(var i = 0; i < letters.length; ++i){\n if(letters[i].match(/[A-Z]/)) ++upper;\n else ++lower;\n }\n if(lower >= upper){\n print(word.toLowerCase());\n }\n else{\n print(word.toUpperCase());\n }\n \n}\n\nmain();"}, {"source_code": "function transform (text) {\n \n var lowerCount = 0, upperCount =0;\n for(var i =0; i < text.length; ++i){\n \n if(\"A\".charCodeAt(0) <= text.charCodeAt(i) && \"Z\".charCodeAt(0) >= text.charCodeAt(i) ){\n ++upperCount;\n } else {\n ++lowerCount;\n }\n }\n return (lowerCount < upperCount) ? text.toUpperCase() : text.toLowerCase();\n}\n \nprint(transform(readline()))"}, {"source_code": "var word= readline();\nvar lowerString = 0;\nvar upperString = 0;\n\nfor (var i = 0; i < word.length; i++) {\n if (word.charAt(i).toLowerCase() == word.charAt(i)) {\n lowerString++;\n } else {\n upperString++;\n }\n} \nif(lowerString >= upperString) print(word.toLowerCase());\nelse {\n print(word.toUpperCase())\n \n}"}, {"source_code": "var s = readline();\n\nvar upperCounter = 0;\nvar lowerCounter = 0;\n\nfor (var i = 0; i < s.length; i++) {\n if (s[i] == s[i].toUpperCase()) upperCounter++;\n else lowerCounter++;\n}\n\nif (upperCounter > lowerCounter) print(s.toUpperCase())\nelse print(s.toLowerCase())"}, {"source_code": "print(answer(readline()));\n\nfunction answer(input){\n var capitalArr = input.match(/[A-Z]{1}/g)\n if(capitalArr){\n var capitalNum = input.match(/[A-Z]{1}/g).length;\n var lowerNum = input.length - capitalNum;\n if(capitalNum > lowerNum){\n return input.toUpperCase();\n } else{\n return input.toLowerCase();\n }\n } else{\n return input;\n }\n}\n"}, {"source_code": "var s = readline();\n\nvar lcc = 0;\nvar ucc = 0;\n\nfor (var i = 0; i < s.length; i++) {\n\n var lCode = s.charCodeAt(i);\n if (lCode >= 65 && lCode <= 90) {\n ucc += 1;\n } else if (lCode >= 97 && lCode <= 122) {\n lcc += 1;\n }\n\n}\n\nif (lcc >= ucc) {\n print(s.toLowerCase());\n} else {\n print(s.toUpperCase());\n}"}, {"source_code": "var input = readline()\nvar lowerCounter = 0 \nvar upperCounter = 0 \n \nfor (var i = 0; i < input.length; i++) { \n if (input.charCodeAt(i) >= 'a'.charCodeAt(0) && input.charCodeAt(0) <= 'z'.charCodeAt(0)) { \n lowerCounter += 1 \n } else { \n upperCounter += 1 \n } \n} \n \nif (upperCounter > lowerCounter) { \n print(input.toUpperCase()) \n} else { \n print(input.toLowerCase()) \n}"}, {"source_code": "var input = readline();\nvar small = 0;\nvar big = 0;\n\nfor(var i=0; i=65 && input.charCodeAt(i)<=90)big++;\n if(input.charCodeAt(i)>=97 && input.charCodeAt(i)<=122)small++;\n}\nvar output='';\nif(big>small){\n print(input.toUpperCase());\n}else{\n print(input.toLowerCase());\n}"}, {"source_code": "// parameter \"input\" gets all data\nfunction Main() {\n\tvar s = readline().trim();\n\tvar nbr = 0;\n\tfor (var i = 0; i < s.length;i++) {\n\t\tnbr+=s[i].toLowerCase()==s[i];\n\t}\n\tprint((nbr= b ? s.toLowerCase() : s.toUpperCase() );\n\n}).call(this);"}, {"source_code": "'use strict'\n\nlet lll = readline()\n\nlet s = 0\nlet b = 0\n\nfor (let l of lll) l == l.toUpperCase() ? b++ : s++\n\nprint(s >= b ? lll.toLowerCase() : lll.toUpperCase())"}, {"source_code": "\n var word = readline().split(\"\"),\n lower = 0,\n upper = 0;\n for (var i = 0; i < word.length; i++) {\n if (word[i] == word[i].toLowerCase()) {\n lower++;\n } else {\n upper++;\n }\n }\n if (lower > upper) {\n word = word.join(\"\").toLowerCase();\n } else if (lower == upper) {\n word = word.join(\"\").toLowerCase();\n } else {\n word = word.join(\"\").toUpperCase();\n }\n\n print(word);\n "}], "negative_code": [{"source_code": "n = readline();\nvar s = n.replace(/[^a-z]/g).length;\nif (s >= n.length / 2) print(n.toLowerCase());\nelse print(n.toUpperCase());"}, {"source_code": "const main = () => {\n const n = readline();\n const regex = new RegExp(\"[ A-Z ]\");\n var cap = 0;\n\n for (i of n) {\n print(i, regex.test(i));\n if (regex.test(i)) {\n cap++;\n continue;\n }\n }\n\n if (cap > n.length / 2) {\n print(n.toUpperCase());\n return;\n }\n print(n.toLocaleLowerCase());\n};\nmain();"}, {"source_code": "const main = () => {\n const n = readline();\n const regex = new RegExp(\"a-z\");\n var cap = 0;\n\n for (i of n) {\n if (regex.test(i)) {\n cap++;\n continue;\n }\n }\n\n if (cap > n.length / 2) {\n print(n.toUpperCase());\n return;\n }\n print(n.toLocaleLowerCase());\n};\nmain()"}, {"source_code": "'use strict';\nconst isCapital = letter => letter === letter.toUpperCase();\nlet word = readline(),\n counter = 0;\n\nword.split().map(letter => {\n if (isCapital(letter)) {\n counter++;\n }\n});\n\nif (word.length - counter >= counter) {\n write(word.toLowerCase());\n} else {\n write(word.toUpperCase());\n}"}, {"source_code": "n = readline();\nvar s = n.replace(/[^a-z]/g, \"\").length,\n w = n.length - s;\nprint(s);\nprint(w);"}, {"source_code": "n = readline();\nvar s = n.replace(/[^a-z]/g, \"\").length,\n w = n.length - s;\nif (s <= w) {\n print(n.toLowerCase())\n}\nelse {\n print(n.toUpperCase())\n}"}, {"source_code": "n = readline();\nvar s = n.replace(/[^a-z]/g, \"\")\nprint(s)"}, {"source_code": "n = readline();\nvar s = n.replace(/[^a-z]/g, \"\").length,\n w = n.length - 5;\nif (s <= w) {\n print(n.toLowerCase())\n}\nelse {\n print(n.toUpperCase())\n}"}, {"source_code": "// var word=prompt();\nvar word=readline();\nvar newWord=word.split(\"\");\nvar count=0;\n// console.log(word.length);\nfor(i=0;i= ((word.length)-count));\nif(count >= ((word.length)-count)){\n // console.log(word.toUpperCase());\n print(word.toUpperCase());\n}\nelse{\n // console.log(word.toLowerCase());\n print(word.toLowerCase());\n}"}, {"source_code": "var string = readline();\nvar lower = 0, upper = 0;\nfor (var i = 0; i < string.length; i++) {\n\tif (string[i] == string[i].toLowerCase())\n\t lower++;\n\telse\n\t upper++;\n}\nif (lower >= upper)\n string.toLowerCase();\nelse\n string.toUpperCase();\nprint(string);\n\n"}, {"source_code": "var a = readline();\nvar max =0;\nvar min = 0; \n\nfor (var i=0; imax)\n\tprint(a.toLowerCase());\n\telse if (min=max)\n\tprint(a.toLowerCase());\nelse\n\tprint(a.toUpperCase());"}, {"source_code": "var word = readline();\nvar uppercase = 0;\nvar lowercase = 0;\nfor(var i = 0; i < word.length; i++){\n if(word[i] > 'A' && word[i] < 'Z') {\n uppercase ++;\n }\n else {\n lowercase ++;\n }\n}\n\nif(uppercase > lowercase) {\n print (word.toUpperCase());\n}\nelse {\n print(word.toLowerCase());\n}"}, {"source_code": "var word = readline();\nvar count = 0;\nfor(var i = 0; i < word.length; i++){\n if(word[i].match(/[A-Z]/)){\n count++;\n }\n}\n\nprint(count);"}, {"source_code": "var a = readline(), b = 0, c = 0;\nfor (; a[b]; b++) if (a[b] >= 'A' && a[b] <= 'Z') c++;\nprint(b > c && c > b / 2 ? a.toUpperCase() : c && c <= b / 2 ? a.toLowerCase() : '');"}, {"source_code": "var string = readline();\nvar upper = 0, lower = 0;\nfor(var i = 0; i < string.length; i++){\n if(string[i] === string[i].toUpperCase){\n upper++;\n }\n else{ \n lower++;\n }\n}\nif(upper < lower){\n print(string.toLowerCase());\n}\nelse{\n print(string.toUpperCase());\n}"}, {"source_code": "var string = readline();\nvar upper = 0, lower = 0;\nfor(var i = 0; i < string.length; i++){\n if(string[i] === string[i].toUpperCase()){\n upper++;\n }\n else{ \n lower++;\n }\n}\nif(upper < lower){\n print(string.toLowerCase());\n}\nelse{\n print(string.toUpperCase());\n}"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let num = readLine()\n .split(\"\")\n .map((n) => parseInt(n));\n const map = {};\n for (let i = 0; i < num.length; i++) {\n if (!map[num[i]]) map[num[i]] = 1;\n else map[num[i]]++;\n }\n function isLucky(num) {\n if (!num) return false;\n while (num) {\n if (num % 10 !== 4 && num % 10 !== 7) return false;\n num = parseInt(num / 10);\n }\n return true;\n }\n let [four, seven] = [map[\"4\"] || 0, map[7] || 0];\n const total = four + seven;\n if (isLucky(total)) console.log(\"YES\");\n else console.log(\"NO\");\n}\n"}, {"source_code": "var str = \"HoUse\"; \n var res = (str.replace(/[^A-Z]/g, \"\").length);\n var reslow = (str.replace(/[^a-z]/g, \"\").length);\n if(reslow >= res){\n var up = str.replace(str , str.toLowerCase() );\n console.log(up);\n }else{\n var low = str.replace(str , str.toUpperCase() ); \n console.log(low);\n }"}, {"source_code": "var str = \"AAAAdel\"; \n var res = (str.replace(/[^A-Z]/g, \"\").length);\n var reslow = (str.replace(/[^a-z]/g, \"\").length);\n if(reslow >= res){\n var up = str.replace(str , str.toLowerCase() );\n console.log(up);\n }else{\n var low = str.replace(str , str.toUpperCase() ); \n console.log(low);\n }"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n \nrl.on('line', (input) => {\n console.log(input.toLowerCase());\n rl.close();\n});"}, {"source_code": "var word = readline();\nvar clower = Array.prototype.reduce.call(word, function(prev, cur, i, a){return prev + ((cur <= 'z' && cur >= 'a') ? 1 : 0);}, 0);\nif(clower >= word.length - clower)\n write(word.toLowerCase());\nelse write(word.toLowerCase());\n"}, {"source_code": "function transform (text) {\n \n var lowerCount = 0, upperCount =0;\n for(var i =0; i <= text.length; ++i){\n \n if(\"A\".charCodeAt(0) <= text.charCodeAt(i) && \"Z\".charCodeAt(0) >= text.charCodeAt(i) ){\n ++upperCount;\n } else {\n ++lowerCount;\n }\n }\n return (lowerCount < upperCount) ? text.toUpperCase() : text.toLowerCase();\n}\n \nprint(transform(readline()))"}, {"source_code": "\nfunction transform (text) {\n \n var lowerCount = 0, upperCount =0;\n for(var i =0; i <= text.length; ++i){\n \n if(\"A\".charCodeAt(0) <= text.charCodeAt(i) && \"Z\".charCodeAt(0) >= text.charCodeAt(i) ){\n ++upperCount;\n } else {\n ++lowerCount;\n }\n }\n return (lowerCount < upperCount) ? text.toUpperCase() : text.toLowerCase();\n}\n \ntransform(readline())"}, {"source_code": "var input = readline();\nvar small = 0;\nvar big = 0;\n\nfor(var i=0; i=65 || input.charCodeAt(i)>=90)big++;\n if(input.charCodeAt(i)>=97 || input.charCodeAt(i)>=122)small++;\n}\nvar output='';\nif(big>small){\n print(input.toUpperCase());\n}else{\n print(inpu.toLowerCase());\n}"}, {"source_code": "var input = readline();\nvar small = 0;\nvar big = 0;\n\nfor(var i=0; i=65 || input.charCodeAt(i)<=90)big++;\n if(input.charCodeAt(i)>=97 || input.charCodeAt(i)<=122)small++;\n}\nvar output='';\nif(big>small){\n print(input.toUpperCase());\n}else{\n print(input.toLowerCase());\n}"}], "src_uid": "b432dfa66bae2b542342f0b42c0a2598"} {"nl": {"description": "Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.Petya loves tickets very much. As we know, each ticket has a number that is a positive integer. Its length equals n (n is always even). Petya calls a ticket lucky if the ticket's number is a lucky number and the sum of digits in the first half (the sum of the first n / 2 digits) equals the sum of digits in the second half (the sum of the last n / 2 digits). Check if the given ticket is lucky.", "input_spec": "The first line contains an even integer n (2 ≤ n ≤ 50) — the length of the ticket number that needs to be checked. The second line contains an integer whose length equals exactly n — the ticket number. The number may contain leading zeros.", "output_spec": "On the first line print \"YES\" if the given ticket number is lucky. Otherwise, print \"NO\" (without the quotes).", "sample_inputs": ["2\n47", "4\n4738", "4\n4774"], "sample_outputs": ["NO", "NO", "YES"], "notes": "NoteIn the first sample the sum of digits in the first half does not equal the sum of digits in the second half (4 ≠ 7).In the second sample the ticket number is not the lucky number."}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\n\nrl.on('line', (str) => {\n if (c === 0) {\n c++;\n return;\n }\n\n let ans = 'YES';\n let sevens = 0;\n let fours = 0;\n\n for (let i = 0; i < str.length / 2; i++) {\n if (str[i] === '4') {\n fours++;\n }\n else if (str[i] === '7') {\n sevens++;\n }\n else {\n ans = 'NO';\n }\n }\n\n for (let i = str.length / 2; i < str.length; i++) {\n if (str[i] === '4') {\n fours--;\n }\n else if (str[i] === '7') {\n sevens--;\n }\n else {\n ans = 'NO';\n }\n }\n\n if (fours === 0 && sevens === 0) {\n console.log(ans);\n }\n else {\n console.log('NO');\n }\n\n c++;\n});\n"}, {"source_code": "var n=+readline();\nvar t=readline();\nif(/^[47]+$/.test(t)){\n\tt=t.split('').map(Number);\n\tvar sum=t.reduce(add);\n\tprint( sum/2===t.slice(0, n/2).reduce(add)?'YES':'NO' )\n}else{\n\tprint('NO');\n}\nfunction add(a,b){return a+b;};"}, {"source_code": "String.prototype.happy=function(){return/^(4|7)+$/.test(this)};String.prototype.firstHalf=function(){var e=this.toString().split(\"\");return e.slice(0,e.length/2)};String.prototype.laseHalf=function(){var e=this.toString().split(\"\");return e.slice(e.length/2)};Array.prototype.sum=function(){var e=this.length,t=0;while(e--)t+=+this[e];return t}\n\n;(function () {\n\t\n\treadline();\n\tvar s = readline();\n\n\tprint( s.happy() && s.firstHalf().sum() == s.laseHalf().sum() ? 'YES' : 'NO' );\n\n}).call(this)"}], "negative_code": [], "src_uid": "435b6d48f99d90caab828049a2c9e2a7"} {"nl": {"description": "One day Vasya came across three Berland coins. They didn't have any numbers that's why Vasya didn't understand how their denominations differ. He supposed that if one coin is heavier than the other one, then it should be worth more. Vasya weighed all the three pairs of coins on pan balance scales and told you the results. Find out how the deminations of the coins differ or if Vasya has a mistake in the weighting results. No two coins are equal.", "input_spec": "The input data contains the results of all the weighting, one result on each line. It is guaranteed that every coin pair was weighted exactly once. Vasya labelled the coins with letters «A», «B» and «C». Each result is a line that appears as (letter)(> or < sign)(letter). For example, if coin \"A\" proved lighter than coin \"B\", the result of the weighting is A<B.", "output_spec": "It the results are contradictory, print Impossible. Otherwise, print without spaces the rearrangement of letters «A», «B» and «C» which represent the coins in the increasing order of their weights.", "sample_inputs": ["A>B\nC<B\nA>C", "A<B\nB>C\nC>A"], "sample_outputs": ["CBA", "ACB"], "notes": null}, "positive_code": [{"source_code": "var array = [];\nfor( var i =0; i<3; i++) {\n array.push(readline());\n}\nvar characters = 'ABC';\nvar options = [],\n prevOptions, result;\nfor (var i = 0; i < array.length; i++) {\n var biggerIndex, lessIndex;\n prevOptions = options;\n var thirdChar = characters.replace(array[i][0], '').replace(array[i][2], '');\n\n if (array[i][1] === '>') {\n result = array[i][2] + array[i][0];\n } else {\n result = array[i][0] + array[i][2];\n }\n \n options = [thirdChar + result, result + thirdChar,\n result[0] + thirdChar + result[1]\n ];\n if (prevOptions.length) {\n for (var j = 0; j < options.length; j++) {\n var index = prevOptions.indexOf(options[j]);\n if (index === -1) {\n options.splice(j, 1);\n j--;\n }\n }\n\n }\n\n\n}\nif(options.length) {\n print(options[0]);\n} else {\n print('Impossible');\n}\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i]);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar characters = \"ABC\",\n\t\tcharacterNum = characters.length,\n\t\tpairNum = characterNum * (characterNum-1) / 2;\n\n\tvar counts = {};\n\tfor (var characterIndex = 0; characterIndex < characterNum; ++characterIndex) {\n\t\tcounts[characters.charAt(characterIndex)] = 0;\n\t}\n\n\tfor (var lineIndex = 0; lineIndex < pairNum; ++lineIndex) {\n\t\tvar line = readline();\n\t\tvar indexHeavier = (line.charAt(1) == '>' ? 0 : 2);\n\t\tvar characterHeavier = line.charAt(indexHeavier);\n\t\tcounts[characterHeavier] += 1;\n\t}\n\n\tvar countList = [];\n\tvar allCountsOne = true;\n\tfor (var characterIndex = 0; characterIndex < characterNum; ++characterIndex) {\n\t\tvar name = characters.charAt(characterIndex);\n\t\tvar count = counts[name];\n\t\tif (count != 1) {\n\t\t\tallCountsOne = false;\n\t\t}\n\t\tcountList.push({ name: name, count: count });\n\t}\n\n\tif (allCountsOne) {\n\t\tprint(\"Impossible\");\n\t\treturn;\n\t}\n\n\tcountList.sort(function (a, b) {\n\t\treturn a.count - b.count;\n\t});\n\n\tvar parts = [];\n\tfor (var partIndex = 0; partIndex < characterNum; ++partIndex) {\n\t\tparts.push(countList[partIndex].name);\n\t}\n\tprint(parts.join(\"\"));\n}\n\nmain();\n"}, {"source_code": "'use strict'\n\nlet lll\nlet ps = []\n\nwhile (lll = readline()) {\n lll = lll.split('')\n let s = lll[1]\n ps.push(s == '<' ? [lll[0], lll[2]] : [lll[2], lll[0]])\n}\n\n(function () {\n for (let i = 0; i < ps.length; i++) {\n for (let j = 0; j < ps.length; j++) {\n if (i == j) {if (ps[i][0] == ps[i][1]) {return print('Impossible')} else {continue}}\n let k = 3 - i - j\n if (ps[i][0] == ps[j][1]) {\n if (ps[k][1] == ps[i][1]) {\n return print(ps[j][0] + ps[j][1] + ps[i][1])\n } else {\n return print('Impossible')\n }\n }\n }\n }\n print('Impossible')\n})()"}, {"source_code": "var lt = {}, gt = {};\nvar a = new Array(3).fill('').map(x=>(readline()));\nvar w = {};\n'ABC'.split('').forEach(c=> (w[c]=''));\n\na.forEach(l=>{\n if (l[1]==='>') {\n w[l[0]]+=l[2];\n } else {\n w[l[2]]+=l[0];\n }\n});\n\nvar sol = 'ABC'.split('').sort((a, b)=> (w[a].indexOf(b)>-1 ? 1:-1)).join('');\nvar sol2 = 'ABC'.split('').sort((a, b)=> (w[b].indexOf(a)>-1 ? 1:-1)).reverse().join('');\n\nprint( (sol===sol2)? sol:'Impossible');"}, {"source_code": "'use strict';\n\n/*let input = `A' ? -1 : 1);\n\t} else if (values[var1] == undefined || values[var2] == undefined) {\n\t\tif (values[var1] === undefined) {\n\t\t\tvalues[var1] = values[var2] + (sign === '<' ? -1 : 1);\n\t\t} else {\n\t\t\tvalues[var2] = values[var1] + (sign === '>' ? -1 : 1);\n\t\t}\n\t} else {\n\t\tif (values[var1] === values[var2]) {\n\t\t\tvalues[var2] = values[var1] + (sign === '>' ? -0.5 : 0.5);\n\t\t} else if (!(sign === '>' && values[var1] > values[var2]) && !(sign === '<' && values[var1] < values[var2])) {\n\t\t\tprint(\"Impossible\");\n\t\t\tisImpossible = true;\n\t\t}\n\t}\n}\nif (!isImpossible) {\n\tprint(Object.keys(values).sort(function (a, b) {\n\t\treturn values[a] - values[b];\n\t}).join(''));\n}\n"}], "negative_code": [{"source_code": "'use strict'\n\nlet lll\nlet ps = []\n\nwhile (lll = readline()) {\n lll = lll.split('')\n let s = lll[1]\n ps.push(s == '<' ? [lll[0], lll[2]] : [lll[2], lll[0]])\n}\n\n(function () {\n for (let i = 0; i < ps.length; i++) {\n for (let j = 0; j < ps.length; j++) {\n if (i == j) {if (ps[i][0] == ps[i][1]) {return print('Impossible')} else {continue}}\n if (ps[i][0] == ps[j][1]) return print(ps[j][0] + ps[j][1] + ps[i][1])\n }\n }\n print('Impossible')\n})()"}, {"source_code": "var lt = {}, gt = {};\nvar a = new Array(3).fill('').map(x=>(readline()));\nvar w = {};\n'ABC'.split('').forEach(c=> (w[c]=''));\n\na.forEach(l=>{\n if (l[1]==='>') {\n w[l[0]]+=l[2];\n } else {\n w[l[2]]+=l[0];\n }\n});\nprint('ABC'.split('').sort((a, b)=> (w[a].indexOf(b)>-1 ? 1:-1)).join(''));"}], "src_uid": "97fd9123d0fb511da165b900afbde5dc"} {"nl": {"description": "Alice likes word \"nineteen\" very much. She has a string s and wants the string to contain as many such words as possible. For that reason she can rearrange the letters of the string.For example, if she has string \"xiineteenppnnnewtnee\", she can get string \"xnineteenppnineteenw\", containing (the occurrences marked) two such words. More formally, word \"nineteen\" occurs in the string the number of times you can read it starting from some letter of the string. Of course, you shouldn't skip letters.Help her to find the maximum number of \"nineteen\"s that she can get in her string.", "input_spec": "The first line contains a non-empty string s, consisting only of lowercase English letters. The length of string s doesn't exceed 100.", "output_spec": "Print a single integer — the maximum number of \"nineteen\"s that she can get in her string.", "sample_inputs": ["nniinneetteeeenn", "nneteenabcnneteenabcnneteenabcnneteenabcnneteenabcii", "nineteenineteen"], "sample_outputs": ["2", "2", "2"], "notes": null}, "positive_code": [{"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n const word = readline();\n \n let minChar = {\n n: 3,\n i: 1,\n e: 3,\n t: 1\n }\n \n let quantChar = {\n n: word.split(\"n\").length-1,\n i: word.split(\"i\").length-1,\n e: word.split(\"e\").length-1,\n t: word.split(\"t\").length-1\n }\n \n console.log(countNineteen(minChar, quantChar))\n}\n\n\nfunction countNineteen(min, quant) {\n let count = 0\n \n while (quant.n >= min.n && quant.i >= min.i && quant.e >= min.e && quant.t >= min.t) {\n quant.n -= min.n\n quant.i -= min.i\n quant.e -= min.e\n quant.t -= min.t\n \n quant.n += 1\n \n count += 1\n }\n \n return count\n}"}, {"source_code": "process.stdin.on(\"data\", (d)=>{\n let s = d.toString();\n let counterOfChars = {n: 0, e: 0, i: 0, t: 0};\n for(let char of s){\n switch(char){\n case 'n': \n counterOfChars.n++;\n break;\n case 'e': \n counterOfChars.e++;\n break;\n case 'i': \n counterOfChars.i++;\n break;\n case 't':\n counterOfChars.t++;\n break;\n }\n }\n if(counterOfChars.n < 3){\n console.log(0);\n return;\n }\n let maxCount = Math.floor((counterOfChars.n - 1) / 2);\n if(counterOfChars.i < maxCount) maxCount = counterOfChars.i;\n if(Math.floor(counterOfChars.e / 3) < maxCount) maxCount = Math.floor(counterOfChars.e / 3);\n if(counterOfChars.t < maxCount) maxCount = counterOfChars.t;\n console.log(maxCount);\n});"}, {"source_code": "const readline = require('readline');\n\nconst fin = readline.createInterface(process.stdin, process.stdout, undefined, false);\n\nfin.on('line', function(str) {\n const map = new Map();\n for (let i=0; i=3 && m['i']>=1 && m['e']>=3 && m['t']>=1){\n //Increasing count and removing from HashMap.\n m['n']-=2;m['i']-=1;m['e']-=3;m['t']-=1;\n nineteenCount+=1;\n}\nprint(nineteenCount);\n"}, {"source_code": "var str = readline();\nconst countN = str.split('n').length - 1;\nconst countI = str.split('i').length - 1;\nconst countE = str.split('e').length - 1;\nconst countT = str.split('t').length - 1;\nprint(Math.min(parseInt((countN - 1) / 2), countI, parseInt(countE / 3), countT));"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\tvar c = 0;\n\t_break:\n\twhile(1) {\n\t\tfor(var i = 0; i < target.length; i++) {\n\t\t\tif ( !map[target[i]]-- ) {\n\t\t\t\tbreak _break;\n\t\t\t}\n\t\t}\n\t\tif ( !c )\n\t\t\ttarget.shift();\n\t\tc++;\n\t}\n\treturn c;\n\t\n\treturn Math.min(map[\"n\"]/2|0, map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n\t\n\t//const arr = target.map(c => map[c]);\n\t//return Math.min.apply(null, arr);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n \n var nValue = Math.max(Math.floor((countedN - 1) / 2), 0);\n \n var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}], "negative_code": [{"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\n\nfunction main() {\n const word = readline();\n \n let minChar = {\n n: 3,\n i: 1,\n e: 3,\n t: 1\n }\n \n let quantChar = {\n n: word.split(\"n\").length-1,\n i: word.split(\"i\").length-1,\n e: word.split(\"e\").length-1,\n t: word.split(\"t\").length-1\n }\n \n console.log(countNineteen(minChar, quantChar))\n}\n\n\nfunction countNineteen(min, quant) {\n let count = 0\n \n while (quant.n >= min.n && quant.i >= min.i && quant.e >= min.e && quant.t >= min.t) {\n quant.n -= min.n\n quant.i -= min.i\n quant.e -= min.e\n quant.t -= min.t\n \n count += 1\n }\n \n return count\n}"}, {"source_code": "process.stdin.on(\"data\", (d)=>{\n let s = d.toString();\n let counterOfChars = {n: 0, e: 0, i: 0, t: 0};\n for(let char of s){\n switch(char){\n case 'n': \n counterOfChars.n++;\n break;\n case 'e': \n counterOfChars.e++;\n break;\n case 'i': \n counterOfChars.i++;\n break;\n case 't':\n counterOfChars.t++;\n break;\n }\n }\n if(counterOfChars.n < 3 || counterOfChars.i === 0 || counterOfChars.e === 0 || counterOfChars.t === 0){\n console.log(0);\n return;\n }\n let minCount = Math.floor(counterOfChars.n - 3, 2) + 1;\n if(counterOfChars.i < minCount) minCount = counterOfChars.i;\n if(Math.floor(counterOfChars.e, 3) < minCount) minCount = counterOfChars.e;\n if(counterOfChars.t < minCount) minCount = counterOfChars.t;\n console.log(minCount);\n});"}, {"source_code": "process.stdin.on(\"data\", (d)=>{\n let s = d.toString();\n let counterOfChars = {n: 0, e: 0, i: 0, t: 0};\n for(let char of s){\n switch(char){\n case 'n': \n counterOfChars.n++;\n break;\n case 'e': \n counterOfChars.e++;\n break;\n case 'i': \n counterOfChars.i++;\n break;\n case 't':\n counterOfChars.t++;\n break;\n }\n }\n if(counterOfChars.n < 3){\n console.log(0);\n return;\n }\n let maxCount = Math.floor((counterOfChars.n - 1) / 2);\n if(counterOfChars.i < maxCount) maxCount = counterOfChars.i;\n if(Math.floor(counterOfChars.e / 3) < maxCount) maxCount = counterOfChars.e;\n if(counterOfChars.t < maxCount) maxCount = counterOfChars.t;\n console.log(maxCount);\n});"}, {"source_code": "process.stdin.on(\"data\", (d)=>{\n let s = d.toString();\n let counterOfChars = {n: 0, e: 0, i: 0, t: 0};\n for(let char of s){\n switch(char){\n case 'n': \n counterOfChars.n++;\n break;\n case 'e': \n counterOfChars.e++;\n break;\n case 'i': \n counterOfChars.i++;\n break;\n case 't':\n counterOfChars.t++;\n break;\n }\n }\n if(counterOfChars.n < 3 || counterOfChars.i === 0 || counterOfChars.e === 0 || counterOfChars.t === 0){\n console.log(0);\n return;\n }\n let minCount = Math.floor((counterOfChars.n - 3) / 2) + 1;\n if(counterOfChars.i < minCount) minCount = counterOfChars.i;\n if(Math.floor(counterOfChars.e / 3) < minCount) minCount = counterOfChars.e;\n if(counterOfChars.t < minCount) minCount = counterOfChars.t;\n console.log(minCount);\n});"}, {"source_code": "process.stdin.on(\"data\", (d)=>{\n let s = d.toString();\n let counterOfChars = {n: 0, e: 0, i: 0, t: 0};\n for(let char of s){\n switch(char){\n case 'n': \n counterOfChars.n++;\n break;\n case 'e': \n counterOfChars.e++;\n break;\n case 'i': \n counterOfChars.i++;\n break;\n case 't':\n counterOfChars.t++;\n break;\n }\n }\n if(counterOfChars.n > 3 || counterOfChars.i === 0 || counterOfChars.e === 0 || counterOfChars.t === 0){\n console.log(0);\n return;\n }\n let minCount = Math.floor(counterOfChars.n - 3, 2) + 1;\n if(counterOfChars.i < minCount) minCount = counterOfChars.i;\n if(Math.floor(counterOfChars.e, 3) < minCount) minCount = counterOfChars.e;\n if(counterOfChars.t < minCount) minCount = counterOfChars.t;\n console.log(minCount);\n});"}, {"source_code": "process.stdin.on(\"data\", (d)=>{\n let s = d.toString();\n let counterOfChars = {n: 0, e: 0, i: 0, t: 0};\n for(let char of s){\n switch(char){\n case 'n': \n counterOfChars.n++;\n break;\n case 'e': \n counterOfChars.e++;\n break;\n case 'i': \n counterOfChars.i++;\n break;\n case 't':\n counterOfChars.t++;\n break;\n }\n }\n if(counterOfChars.n === 0 || counterOfChars.i === 0 || counterOfChars.e === 0 || counterOfChars.t === 0){\n console.log(0);\n return;\n }\n let minCount = Math.floor(counterOfChars.n - 3, 2) + 1;\n if(counterOfChars.i < minCount) minCount = counterOfChars.i;\n if(Math.floor(counterOfChars.e, 3) < minCount) minCount = counterOfChars.e;\n if(counterOfChars.t < minCount) minCount = counterOfChars.t;\n console.log(minCount);\n});"}, {"source_code": "process.stdin.on(\"data\", (d)=>{\n let s = d.toString();\n let counterOfChars = {n: 0, e: 0, i: 0, t: 0};\n for(let char of s){\n switch(char){\n case 'n': \n counterOfChars.n++;\n break;\n case 'e': \n counterOfChars.e++;\n break;\n case 'i': \n counterOfChars.i++;\n break;\n case 't':\n counterOfChars.t++;\n break;\n }\n }\n if(counterOfChars.n === 0){\n console.log(0);\n return;\n }\n let minCount = Math.floor(counterOfChars.n - 3, 2) + 1;\n if(counterOfChars.i < minCount) minCount = counterOfChars.i;\n if(Math.floor(counterOfChars.e, 3) < minCount) minCount = counterOfChars.e;\n if(counterOfChars.t < minCount) minCount = counterOfChars.t;\n console.log(minCount);\n});"}, {"source_code": "const readline = require('readline');\n\nconst fin = readline.createInterface(process.stdin, process.stdout, undefined, false);\n\nfin.on('line', function(str) {\n const map = new Map();\n for (let i=0; i 0) nValue += (countedN % 2);//Math.floor(countedN / n);\n if ((countedN % 2) === 0) {\n nValue = Math.floor(countedN / n);\n }\n var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n //var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n // console.log('num before', num)\n //num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}, {"source_code": "//////////////////\n// July 25th 2019.\n//////////////////\n\n///////////////////////////////////////////////////////////////\n// Getting Problem Data from Codeforces.\nvar inputString = 'wara';\n// Setting up and populating HashMap.\nvar nineteenHashMap = {'n':0,'i':0,'e':0,'t':0};\nfor (var index = 0;index=3 && m['i']>=1 && m['e']>=3 && m['t']>=1){\n //Increasing count and removing from HashMap.\n m['n']-=2;m['i']-=1;m['e']-=3;m['t']-=1;\n nineteenCount+=1;\n}\nprint(nineteenCount);\n///////////////////////////////////////////////////////////////\n\n /////////////////////////////////////////\n // Programming-Credits atifcppprogrammer.\n /////////////////////////////////////////\n"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};\n\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n\noutput(getCm(readLines()[0]));"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\tvar c = 0;\n\t_break:\n\twhile(1) {\n\t\tfor(var i = 0; i < target.length; i++) {\n\t\t\tif ( !map[target[i]]-- ) {\n\t\t\t\tbreak _break;\n\t\t\t}\n\t\t}\n\t\tc++;\n\t}\n\treturn c;\n\t\n\treturn Math.min(map[\"n\"]/2|0, map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n\t\n\t//const arr = target.map(c => map[c]);\n\t//return Math.min.apply(null, arr);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\treturn Math.min(((map[\"n\"] - 3)/2|0) + +!!(map[\"n\"] - 3), map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\treturn Math.min(Math.max(0, (map[\"n\"] - 3)/2|0) + +!!Math.max(0, map[\"n\"] - 3), map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = [\"n\", \"i\", \"n\", \"e\", \"t\", \"e\", \"e\", \"n\"];\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\treturn Math.min(map[\"n\"]/3|0, map[\"3\"]/3|0, map[\"t\"], map[\"i\"]);\n\t\n\t//const arr = target.map(c => map[c]);\n\t//return Math.min.apply(null, arr);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\tconst n = map[\"n\"];\n\tif ( n < 3 ) return 0;\n\tif ( n === 3 ) return 1;\n\t\n\treturn Math.min(Math.max(0, (n - 3)/2|0) + 1, map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\treturn Math.min(map[\"n\"]/2|0, map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n\t\n\t//const arr = target.map(c => map[c]);\n\t//return Math.min.apply(null, arr);\n}"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\ttarget.pop();\n\tvar c = 0;\n\t_break:\n\twhile(1) {\n\t\tfor(var i = 0; i < target.length; i++) {\n\t\t\tif ( !map[target[i]]-- ) {\n\t\t\t\tbreak _break;\n\t\t\t}\n\t\t}\n\t\tc++;\n\t}\n\treturn c;\n\t\n\treturn Math.min(map[\"n\"]/2|0, map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n\t\n\t//const arr = target.map(c => map[c]);\n\t//return Math.min.apply(null, arr);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\treturn Math.min(((map[\"n\"] - 3)/2|0) + +!!Math.max(0, map[\"n\"] - 3), map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\treturn Math.min(((map[\"n\"] - 3)/2|0) + !!(map[\"n\"] - 3), map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};\n\n\n\n\nfunction getCm(text) {\n\tconst target = [\"n\", \"i\", \"n\", \"e\", \"t\", \"e\", \"e\", \"n\"];\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\tconst arr = target.map(c => map[c]);\n\treturn Math.min.apply(null, arr);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\treturn Math.min((map[\"n\"]/2|0) + 1, map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": "const readLines = () => {\n\ttry {\n\t\treturn require(\"fs\").readFileSync(\"input.txt\", \"utf8\").split(/[\\r\\n]+/);\n\t} catch(e) {}\n\tconst lines = [];\n\tfor(var line; undefined !== (line = readline()); )\n\t\tlines.push(line);\n\treturn lines;\n};\nconst output = (text) => {\n\ttry {\n\t\tconsole.log(text);\n\t} catch(e) {}\n\ttry {\n\t\ttext.toString().split(/[\\r\\n]+/).map(s => print(s));\n\t} catch(e) {}\n};;\n\n\n\n\nfunction getCm(text) {\n\tconst target = \"nineteen\".split(\"\");\n\tconst map = {};\n for(var i = 0; i < text.length; i++)\n\t\tmap[text[i]] = (map[text[i]]||0)+1;\n\t\n\treturn Math.min(map[\"n\"]/3|0, map[\"e\"]/3|0, map[\"t\"], map[\"i\"]);\n\t\n\t//const arr = target.map(c => map[c]);\n\t//return Math.min.apply(null, arr);\n}\n\n/**\nfunction getCm(text) {\n\tconst target = \"nineteen\";\n\tconst map = new Map();\n for(const char of text)\n\t\tmap.set(char, (map.get(char)||0)+1);\n\t\n\tconst arr = [...target].map(c => map.get(c));\n\treturn Math.min(...arr);\n}\n*/\noutput(getCm(readLines()[0]))"}, {"source_code": " var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n if (countedN >= n) {\n countedN++;\n }\n print(Math.min(Math.floor(countedN / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n"}, {"source_code": "var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n \n // console.log(countedN);\n // console.log(countedI);\n // console.log(countedE);\n // console.log(countedT);\n var nValue = (countedN / 2) + (countedN % 2);//Math.floor(countedN / n);\n var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n // console.log('num before', num)\n num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}, {"source_code": "var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n \n // console.log(countedN);\n // console.log(countedI);\n // console.log(countedE);\n // console.log(countedT);\n var nValue = Math.floor((countedN / 2));\n if ((countedN % 2) === 0) {\n nValue = Math.floor(countedN / n);\n } else if (nValue > 0 && (countedN % 2) > 1) {\n nValue += (countedN % 2);\n }\n var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n //var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n // console.log('num before', num)\n //num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}, {"source_code": " var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n \n // console.log(countedN);\n // console.log(countedI);\n // console.log(countedE);\n // console.log(countedT);\n var nValue = (countedN / 2) + (countedN % 2);//Math.floor(countedN / n);\n var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n // console.log('num before', num)\n //num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}, {"source_code": " var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n if (countedN >= n) {\n countedN++;\n }\n // console.log(countedN);\n // console.log(countedI);\n // console.log(countedE);\n // console.log(countedT);\n var num = (Math.min(Math.floor(countedN / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}, {"source_code": "function main() {\n var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n\n print(Math.min(Math.floor(countedN / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n}\nmain();"}, {"source_code": "var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n \n // console.log(countedN);\n // console.log(countedI);\n // console.log(countedE);\n // console.log(countedT);\n var nValue = Math.floor((countedN / 2));\n if (nValue > 0) nValue += (countedN % 2);//Math.floor(countedN / n);\n //var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n // console.log('num before', num)\n //num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(nValue);"}, {"source_code": "var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n \n // console.log(countedN);\n // console.log(countedI);\n // console.log(countedE);\n // console.log(countedT);\n var num = (Math.min(Math.floor(countedN / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n // console.log('num before', num)\n num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}, {"source_code": "var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n \n var nValue = Math.floor((countedN - 1) / 2);\n \n var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}, {"source_code": "var letters = readline().split(\"\");\n var n = 3;\n var i = 1;\n var e = 3;\n var t = 1;\n var countedN = 0;\n var countedI = 0;\n var countedE = 0;\n var countedT = 0;\n\n for (var j = 0; j < letters.length; j++) {\n switch(letters[j]) {\n case 'n':\n countedN++;\n break;\n case 'i':\n countedI++;\n break;\n case 'e':\n countedE++;\n break;\n case 't':\n countedT++;\n break;\n default:\n break;\n }\n }\n \n // console.log(countedN);\n // console.log(countedI);\n // console.log(countedE);\n // console.log(countedT);\n var nValue = Math.floor((countedN / 2));\n if (nValue > 0) nValue += (countedN % 2);//Math.floor(countedN / n);\n var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n //var num = (Math.min(nValue, Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n // console.log('num before', num)\n //num = (Math.min(Math.floor((countedN + num) / n), Math.floor(countedI / i), Math.floor(countedE / e), Math.floor(countedT / t)));\n print(num);"}], "src_uid": "bb433cdb8299afcf46cb2797cbfbf724"} {"nl": {"description": "Polycarp has interviewed Oleg and has written the interview down without punctuation marks and spaces to save time. Thus, the interview is now a string s consisting of n lowercase English letters.There is a filler word ogo in Oleg's speech. All words that can be obtained from ogo by adding go several times to the end of it are also considered to be fillers. For example, the words ogo, ogogo, ogogogo are fillers, but the words go, og, ogog, ogogog and oggo are not fillers.The fillers have maximal size, for example, for ogogoo speech we can't consider ogo a filler and goo as a normal phrase. We should consider ogogo as a filler here.To print the interview, Polycarp has to replace each of the fillers with three asterisks. Note that a filler word is replaced with exactly three asterisks regardless of its length.Polycarp has dealt with this problem in no time. Can you do the same? The clock is ticking!", "input_spec": "The first line contains a positive integer n (1 ≤ n ≤ 100) — the length of the interview. The second line contains the string s of length n, consisting of lowercase English letters.", "output_spec": "Print the interview text after the replacement of each of the fillers with \"***\". It is allowed for the substring \"***\" to have several consecutive occurences.", "sample_inputs": ["7\naogogob", "13\nogogmgogogogo", "9\nogoogoogo"], "sample_outputs": ["a***b", "***gmg***", "*********"], "notes": "NoteThe first sample contains one filler word ogogo, so the interview for printing is \"a***b\".The second sample contains two fillers ogo and ogogogo. Thus, the interview is transformed to \"***gmg***\"."}, "positive_code": [{"source_code": "function main() {\n\n var n = Number(readline());\n\n var s = readline();\n\n var flag=new Array(s.length);\n var result='';\n for(var i=0;i=0; nu--){\n var ogo = \"ogo\";\n for(var nn = nu; nn>0; nn--){\n ogo = ogo+\"go\";\n }\n inputs = inputs.replace(new RegExp(ogo,'g'), \"***\");\n}\n\nprint(inputs);"}, {"source_code": "readline();\nprint(readline().replace(/o(go)+/g, '***'));"}, {"source_code": "var n = readline();\nvar a = readline();\nvar b = /ogo(go){0,}/g;\nwrite(a.replace(b,\"***\"));"}, {"source_code": "readline();\nprint(readline().replace(/o(go)+/g, '***'));"}, {"source_code": "readline()\ns = readline().split(' ')[0]\na = s.replace(/ogo(go)*/g, \"***\")\nprint(a)\n"}], "negative_code": [{"source_code": "function checkForParazit(str)\n{\n\tvar change = false, arr = [];\n\tfor (var i = 0; i <= str.length - 1; i++)\n\t{\n\t\tif (str[i] == 'o')\n\t\t\t{\n\t\t\t\tvar i1 = i + 1;\n\t\t\t\twhile (str[i1] + str[i1 + 1] == 'go')\n\t\t\t\t{\n\t\t\t\t\ti1 += 2;\n\t\t\t\t\tchange = true;\n\t\t\t\t}\n\t\t\t}\n\t\telse arr.push(str[i]);\n\t\tif (change === true) \n\t\t\t{\n\t\t\t\tarr.push('***');\n\t\t\t\tchange = false;\n\t\t\t\ti += i1 - i - 1;\n\t\t\t}\n\t}\n\treturn arr.join('');\n}\n\n{\nvar num = readline();\nvar input = readline();\nprint(input);\n}"}, {"source_code": "function checkForParazit(str)\n{\n\tvar change = false, arr = [];\n\tfor (var i = 0; i <= str.length - 1; i++)\n\t{\n\t\tif (str[i] == 'o')\n\t\t\t{\n\t\t\t\tvar i1 = i + 1;\n\t\t\t\twhile (str[i1] + str[i1 + 1] == 'go')\n\t\t\t\t{\n\t\t\t\t\ti1 += 2;\n\t\t\t\t\tchange = true;\n\t\t\t\t}\n\t\t\t}\n\t\telse arr.push(str[i]);\n\t\tif (change === true) \n\t\t\t{\n\t\t\t\tarr.push('***');\n\t\t\t\tchange = false;\n\t\t\t\ti += i1 - i - 1;\n\t\t\t}\n\t}\n\treturn arr.join('');\n}\n\n{\nvar num = readline();\nvar input = readline();\nprint(checkForParazit(input));\n}"}, {"source_code": "function checkForParazit(str)\n{\n\tvar change = false, arr = [];\n\tfor (var i = 0; i <= str.length - 1; i++)\n\t{\n\t\tif (str[i] == 'o')\n\t\t\t{\n\t\t\t\tvar i1 = i + 1;\n\t\t\t\twhile (str[i1] + str[i1 + 1] == 'go')\n\t\t\t\t{\n\t\t\t\t\ti1 += 2;\n\t\t\t\t\tchange = true;\n\t\t\t\t}\n\t\t\t}\n\t\telse arr.push(str[i]);\n\t\tif (change === true) \n\t\t\t{\n\t\t\t\tarr.push('***');\n\t\t\t\tchange = false;\n\t\t\t\ti += i1 - i - 1;\n\t\t\t}\n\t}\n\treturn arr.join('');\n}\n\n{\nvar input = readline();\nprint(input);\n}"}, {"source_code": "function parazit(str)\n{\n arr = str.split('');\n\tvar i = 0;\n while (i !== arr.length)\n\t{\n\t\tif (arr[i] === 'o')\n\t\t{\n\t\t\tvar count = 1;\n\t\t\tvar i1 = i;\n\t\t\twhile (i1 !== arr.length)\n\t\t\t{\n\t\t\t\ti1++;\n\t\t\t\tif ((arr[i1] == 'g' ) && (count == 1)) count--;\n\t\t\t\telse if ((arr[i1] === 'o') && (count === 0)) count++;\n\t\t\t\telse break;\n\t\t\t}\n\t\t\tif (count === 1) arr.splice(i, i1 - i, '***');\n\t\t}\n\t\ti++;\n\t}\n return arr.join('');\n}\n\nvar number = readline();\nvar input = readline();\nif (input === 'ogogmgogogogo') print('***gmg***');\nprint(parazit(input));"}, {"source_code": "function parazit(str)\n{\n arr = str.split('');\n\tvar i = 0;\n while (i !== arr.length)\n\t{\n\t\tif (arr[i] === 'o')\n\t\t{\n\t\t\tvar count = 1;\n\t\t\tvar i1 = i;\n\t\t\twhile (i1 !== arr.length)\n\t\t\t{\n\t\t\t\ti1++;\n\t\t\t\tif ((arr[i1] == 'g' ) && (count == 1)) count--;\n\t\t\t\telse if ((arr[i1] === 'o') && (count === 0)) count++;\n\t\t\t\telse break;\n\t\t\t}\n\t\t\tif (count === 1) arr.splice(i, i1 - i, '***');\n\t\t}\n\t\ti++;\n\t}\n return arr.join('');\n}\nvar number = readline();\nvar input = readline();\nprint(parazit(input));"}], "src_uid": "619665bed79ecf77b083251fe6fe7eb3"} {"nl": {"description": "Bob loves everything sweet. His favorite chocolate bar consists of pieces, each piece may contain a nut. Bob wants to break the bar of chocolate into multiple pieces so that each part would contain exactly one nut and any break line goes between two adjacent pieces.You are asked to calculate the number of ways he can do it. Two ways to break chocolate are considered distinct if one of them contains a break between some two adjacent pieces and the other one doesn't. Please note, that if Bob doesn't make any breaks, all the bar will form one piece and it still has to have exactly one nut.", "input_spec": "The first line of the input contains integer n (1 ≤ n ≤ 100) — the number of pieces in the chocolate bar. The second line contains n integers ai (0 ≤ ai ≤ 1), where 0 represents a piece without the nut and 1 stands for a piece with the nut.", "output_spec": "Print the number of ways to break the chocolate into multiple parts so that each part would contain exactly one nut.", "sample_inputs": ["3\n0 1 0", "5\n1 0 1 0 1"], "sample_outputs": ["1", "4"], "notes": "NoteIn the first sample there is exactly one nut, so the number of ways equals 1 — Bob shouldn't make any breaks.In the second sample you can break the bar in four ways:10|10|11|010|110|1|011|01|01"}, "positive_code": [{"source_code": "function rda(){ return readline().split(\" \").map(Number); };\nfunction rdn(){ return +readline(); };\n\nvar n = rdn(), a = rda();\n\nvar was = false;\nfor(var i = 0; i < n; i++){\n if(a[i] == 0 || a[i] == -1){\n a[i] = -1;\n }else{\n was = true;\n break;\n }\n}\nfor(var i = n-1; i >= 0; i--){\n if(a[i] == 0 || a[i] == -1){\n a[i] = -1;\n }else{\n was = true;\n break;\n }\n}\n\nvar ans = 1;\nfor(var i = 0, zeroes = 1; i < n; i++){\n if(a[i] == 0){\n zeroes++;\n }else{\n ans *= zeroes;\n zeroes = 1;\n }\n}\n\nif(was){\n write(ans);\n}else{\n write(0);\n}"}, {"source_code": "readline();\nvar str = readline().replace(/ /g, '').replace(/0/g, ' ').trim();\nif (str) {\n var ans = 1;\n str.split(1).forEach(zero => ans *= zero.length + 1);\n print(ans);\n} else {\n print(0);\n}\n"}, {"source_code": "\nvar N = parseInt(readline());\nvar choc = readline().split(' ');\n\nvar firstOne = N, lastOne = -1;\nfor (var i = 0; i < N-i; ++i) {\n if (choc[i] === '1' && i < firstOne) {\n firstOne = i;\n }\n if (choc[N-i-1] === '1' && N-i-1 > lastOne) {\n lastOne = N-i-1;\n }\n}\n\nvar cntZero = 0, ans = 1;\nfor (var i = firstOne; i <= lastOne; ++i) {\n if (choc[i] === '1') {\n ans *= cntZero+1;\n cntZero = 0;\n } else if (choc[i] === '0') {\n cntZero += 1;\n }\n}\nprint(lastOne === -1 ? 0 : ans);\n"}, {"source_code": "var n = parseInt(readline());\nvar a = readline().split(\" \").map(Number);\n\nvar ans = 1;\nvar count = 0;\nvar left = -1;\nfor (var i = 0; i =0;i--){\n if(a[i]=='1')\n break;\n a.pop();\n}\n\nwhile(true){\n if(a=='')\n break;\n if(a[0]=='1')\n break;\n a.shift();\n}\n\nif(a=='')\nprint(0);\nelse{\n var ans=1;\n var current=1\n for(var i=0;i=0) {\n ans *= i-prev;\n }\n prev = i;\n }\n}\n\nif(prev == -1) {\n print(0);\n} else {\n print(ans);\n}"}, {"source_code": "/* TEST CASE\ninput\n3\n0 1 0\noutput\n1\ninput\n5\n1 0 1 0 1\noutput\n4\n */\nfunction main() {\n\tvar n = parseInt(readline()); \n\tvar splitted = readline().split(' ');\n\tvar i;\n\tvar answer = 0;\n\tvar oneIndices = [];\n\tfor (i = 0; i < n; i++) {\n\t\tif (splitted[i] == '1') {\n\t\t\toneIndices.push(i);\n\t\t}\n\t}\n\n\tvar m = oneIndices.length;\n\t\n\tif (m > 0) {\n\t\tanswer = 1;\n\t\tfor (i = 1; i < m; i++) {\n\t\t\tanswer *= oneIndices[i] - oneIndices[i - 1];\n\t\t}\n\t}\n\t\n\tprint(answer);\n}\n\nmain();"}, {"source_code": " //Reader\n var words = [];\n var tok = 0;\n var next = function () {\n if (tok == words.length) {\n words = readline().split(\" \").map(function (x) {\n return x;\n });\n tok = 0;\n }\n var res = words[tok];\n tok++;\n return res;\n }\n var nextInt = function () {\n return parseInt(next());\n }\n\n //Main function\n var main = function () {\n var n = nextInt();\n var a = [];\n var isNoWay = true;\n for (var i = 0; i < n; i++) {\n a[i] = nextInt();\n if (a[i] == 1) {\n isNoWay = false;\n }\n }\n if (isNoWay) {\n print(0);\n return;\n }\n for (var i = 0; i < n; i++) {\n if (a[i] == 0) {\n a[i] = 1;\n } else {\n break;\n }\n }\n for (var i = n - 1; i >= 0; i--) {\n if (a[i] == 0) {\n a[i] = 1;\n } else {\n break;\n }\n }\n\n var res = 1;\n var tmp = 1;\n for (var i = 0; i < n; i++) {\n if (a[i] == 1) {\n res *= tmp;\n tmp = 1;\n } else {\n tmp++;\n }\n }\n print(res);\n }\n\n //Execute main function\n main();"}, {"source_code": "var n = readline();\nvar input = readline().split(\" \");\nvar one = new Array(n);\nvar one_count = 0;\n\nfor(var i = 0; i < n; i++){\n\tif(input[i] == 1)\n\t\tone[one_count++] = i;\n}\nans = (one_count) ? 1 : 0;\nfor(var i = 0; i < one_count-1; i++)\n\tans *= (one[i+1]-one[i]); \n\nprint(ans);"}, {"source_code": "n = +readline();\na = readline().split(\" \").map(Number);\npre = -1;\nres = 1;\nfor (i = 0 ; i < n ; i++)\n{\n if (a[i] == 1){\n if (pre !== -1){\n res *= i - pre;\n \n }\n pre = i;\n }\n}\nif (pre == -1)\n{\n write(0);\n}\nelse\n{\n write(res);\n}"}, {"source_code": "'use strict';\n\nconst N = readline();\nconst A = readline().split(' ').join('').replace(/(^0+|0+$)/g, '');\n\nwrite(A.match(/1/g) === null ? 0 : A.match(/1/g).length === A.length ? 1 : A.match(/(0+)/g).reduce((p, c) => (c.length + 1) * p, 1))\n\n"}, {"source_code": "var n = Number(readline());\nvar arr = readline().split(\" \", n).map(Number);\n\nvar notFirst = false, ans = 1;\nif (arr.reduce(function(prev, cur, index, array) {\n if (cur === 1) {\n if (notFirst) {\n ans *= prev + 1;\n } else {\n notFirst = true;\n }\n return 0;\n } else {\n return prev + 1;\n }\n}, 0) === n) {\n print(0);\n} else {\n print(ans);\n}"}, {"source_code": "var n = Number(readline());\nvar arr = readline().split(\" \", n);\n\nvar first = false, num = 0, ans = 1;\nfor (var i = 0; i < n; ++i) {\n if (arr[i] === \"1\") {\n if (first) {\n ans *= num + 1;\n } else {\n first = true;\n }\n num = 0;\n } else {\n ++num;\n }\n}\n\nif (num === n) {\n print(0);\n} else {\n print(ans);\n}"}, {"source_code": "var result = 0;\n\nvar n = parseInt(readline());\nvar pices = readline().split(' ').map(Number);\nvar prev = -1;\n\nfor (var i = 0; i < n; i++) {\n if (pices[i] == 1) {\n if (prev == -1) {\n result = 1;\n prev = i;\n }\n result *= (i + 1 - prev);\n prev = i + 1; \n }\n}\n\nprint(result);"}, {"source_code": "var result = 0;\n\nvar n = parseInt(readline());\nvar pices = readline().split(' ').map(Number);\nvar prev = -1;\n\nfor (var i = 0; i < n; i++) {\n if (pices[i] == 1) {\n if (prev == -1) {\n result = 1;\n } else {\n result *= (i - prev); \n }\n prev = i; \n }\n}\n\nprint(result);"}], "negative_code": [{"source_code": "function rda(){ return readline().split(\" \").map(Number); };\nfunction rdn(){ return +readline(); };\n\nvar n = rdn(), a = rda();\n\nvar was = false;\nfor(var i = 0; i < n; i++){\n if(a[i] == 0){\n a[i] = -1;\n }else{\n was = true;\n break;\n }\n}\nfor(var i = n-1; i >= 0; i--){\n if(a[i] == 0){\n a[i] = -1;\n }else{\n was = true;\n break;\n }\n}\n\nvar ans = 1;\nfor(var i = 0, zeroes = 1; i < n; i++){\n if(a[i] == 0){\n zeroes++;\n }else{\n ans *= zeroes;\n zeroes = 1;\n }\n}\n\nif(was){\n write(ans);\n}else{\n write(0);\n}"}, {"source_code": "\nvar N = parseInt(readline());\nvar choc = readline().split(' ');\n\nvar firstOne = N, lastOne = -1;\nfor (var i = 0; i <= N-i; ++i) {\n if (choc[i] === '1' && i < firstOne) {\n firstOne = i;\n }\n if (choc[N-i] === '1' && N-i > lastOne) {\n lastOne = N-i;\n }\n}\n\nvar cntZero = 0, ans = 1;\nfor (var i = firstOne; i <= lastOne; ++i) {\n if (choc[i] === '1') {\n ans *= cntZero+1;\n cntZero = 0;\n } else if (choc[i] === '0') {\n cntZero += 1;\n }\n}\nprint(ans);\n"}, {"source_code": "var n = parseInt(readline());\nvar a = readline().split(\" \").map(Number);\n\nvar ans = 1;\nvar left = -1;\nfor (var i = 0; i (c.length + 1) * p, 1))\n\n"}, {"source_code": "'use strict';\n\nconst N = readline();\nconst A = readline();\n\nwrite(A.match(/1/g).length === 1 ? 1 : A.replace(/(^0+|0+$)/g, '').match(/(0+)/g).reduce((p, c) => (c.length + 1) * p, 1))\n\n"}, {"source_code": "'use strict';\n\nconst N = readline();\nconst A = readline().split(' ');\nlet count = 0;\n\nfunction solve(a) {\n if (a.length === 0) {\n return 1;\n }\n\n let _a = a.slice(a.indexOf('1') + 1)\n if (_a.indexOf('1') === -1) {\n return 1;\n }\n\n for (var i = 0; i < _a.indexOf('1')+1; i++) {\n let _ = solve(_a.slice(i));\n count += _;\n }\n return 0; \n}\n\nif (A.filter((a) => a === 1).length === 1) {\n write(1);\n} else {\n solve(A);\n print(count);\n}\n"}], "src_uid": "58242665476f1c4fa723848ff0ecda98"} {"nl": {"description": "Stepan has a very big positive integer.Let's consider all cyclic shifts of Stepan's integer (if we look at his integer like at a string) which are also integers (i.e. they do not have leading zeros). Let's call such shifts as good shifts. For example, for the integer 10203 the good shifts are the integer itself 10203 and integers 20310 and 31020.Stepan wants to know the minimum remainder of the division by the given number m among all good shifts. Your task is to determine the minimum remainder of the division by m.", "input_spec": "The first line contains the integer which Stepan has. The length of Stepan's integer is between 2 and 200 000 digits, inclusive. It is guaranteed that Stepan's integer does not contain leading zeros. The second line contains the integer m (2 ≤ m ≤ 108) — the number by which Stepan divides good shifts of his integer.", "output_spec": "Print the minimum remainder which Stepan can get if he divides all good shifts of his integer by the given number m.", "sample_inputs": ["521\n3", "1001\n5", "5678901234567890123456789\n10000"], "sample_outputs": ["2", "0", "123"], "notes": "NoteIn the first example all good shifts of the integer 521 (good shifts are equal to 521, 215 and 152) has same remainder 2 when dividing by 3.In the second example there are only two good shifts: the Stepan's integer itself and the shift by one position to the right. The integer itself is 1001 and the remainder after dividing it by 5 equals 1. The shift by one position to the right equals to 1100 and the remainder after dividing it by 5 equals 0, which is the minimum possible remainder."}, "positive_code": [{"source_code": "s = readline()\nm = +readline()\ncrem = 0\ncpow = 1\nfor (i = s.length-1; i >= 0; i--) {\n\tcrem = (crem + cpow * (+s[i])) % m\n\tif (i !== 0) {\n\t cpow = cpow * 10 % m\n\t}\n}\n\nans = crem\nfor (i = 0; i+1 < s.length; i++) {\n\tcrem = (crem - cpow * (+s[i])) % m\n\tcrem = (crem + m) % m\n\tcrem = (crem * 10) % m\n\tcrem = (crem + (+s[i])) % m\n\tif (s[i+1] != '0') {\n\t if (crem < ans) {\n\t ans = crem\n\t }\n\t}\n}\n\nprint(ans)"}, {"source_code": "number_string = readline()\ndiv = readline()\nk = number_string.length\nmini = 10000000\n\nnumber = []\nfor (var i = 0; i < k; ++i) {\n number.push(Number(number_string[i]));\n}\n\nmodk = 0\nfor (var i = 0; i < k; ++i) {\n modk *= 10\n modk += number[i];\n modk %= div;\n}\n\npower10 = 1;\nfor (var i = 0; i < k-1; ++i) {\n power10 = (power10 * 10) % div;\n}\n\nmini = modk\nfor (var i = 0; i < k; ++i) {\n if (number[i] != 0) {\n if (modk < mini) {\n mini = modk;\n }\n }\n modk -= power10 * number[i];\n modk %= div;\n if (modk < 0) {\n modk -= div * Math.floor(modk / div);\n }\n modk *= 10;\n modk %= div;\n modk = (modk + number[i]) % div;\n}\nprint(mini)\n"}], "negative_code": [{"source_code": "number_string = readline()\ndiv = readline()\nk = number_string.length\nmini = 10000000\n\nnumber = []\nfor (var i = 0; i < k; ++i) {\n number.push(Number(number_string[i]));\n}\n\nmodk = 0\nfor (var i = 0; i < k; ++i) {\n modk *= 10\n modk += number[i];\n modk %= div;\n}\n\npower10 = 1;\nfor (var i = 0; i < k-1; ++i) {\n power10 = (power10 * 10) % div;\n}\n\nmini = modk\nfor (var i = 0; i < k; ++i) {\n if (number[i] != 0) {\n if (modk < mini) {\n mini = modk;\n }\n }\n modk -= power10 * number[i];\n modk %= div;\n modk *= 10;\n modk %= div;\n modk = (modk + number[i]) % div;\n}\nprint(mini)\n"}], "src_uid": "d13c7b5b5fc5c433cc8f374ddb16ef79"} {"nl": {"description": "Sereja owns a restaurant for n people. The restaurant hall has a coat rack with n hooks. Each restaurant visitor can use a hook to hang his clothes on it. Using the i-th hook costs ai rubles. Only one person can hang clothes on one hook.Tonight Sereja expects m guests in the restaurant. Naturally, each guest wants to hang his clothes on an available hook with minimum price (if there are multiple such hooks, he chooses any of them). However if the moment a guest arrives the rack has no available hooks, Sereja must pay a d ruble fine to the guest. Help Sereja find out the profit in rubles (possibly negative) that he will get tonight. You can assume that before the guests arrive, all hooks on the rack are available, all guests come at different time, nobody besides the m guests is visiting Sereja's restaurant tonight.", "input_spec": "The first line contains two integers n and d (1 ≤ n, d ≤ 100). The next line contains integers a1, a2, ..., an (1 ≤ ai ≤ 100). The third line contains integer m (1 ≤ m ≤ 100).", "output_spec": "In a single line print a single integer — the answer to the problem.", "sample_inputs": ["2 1\n2 1\n2", "2 1\n2 1\n10"], "sample_outputs": ["3", "-5"], "notes": "NoteIn the first test both hooks will be used, so Sereja gets 1 + 2 = 3 rubles.In the second test both hooks will be used but Sereja pays a fine 8 times, so the answer is 3 - 8 =  - 5."}, "positive_code": [{"source_code": "print(function(n, d) {\n\n\tvar a = readline().split(' ').map(Number).sort(function(a, b) { return a - b; }),\n\t\tm = +readline(),\n\t\tans = 0;\n\n\tfor (var i = 0; i < m; i++)\n\t\tans += i < n ? a[i] : -d;\n\n\treturn ans;\n\n}.apply(0, readline().split(' ').map(Number)));\n"}, {"source_code": "var inp = readline().split(' ');\nvar n = Number(inp[0]);\nvar d = Number(inp[1]);\nvar A = readline().split(' ').map((x)=>Number(x));\nvar m = Number(readline().split());\nA.sort((x,y) => x-y);\n\nvar ats = 0;\nif(m > n)\n{\nats = -(m-n)*d;\nm=n;\n}\n\nfor(var i=0; i n ? (m - n) * d : 0));\n"}, {"source_code": "'use strict';\n\nvar arr = readline().trim().split(' ').map(Number);\nvar n = arr[0],\n d = arr[1];\nvar costs = readline().trim().split(' ').map(Number).sort(function (a, b) {\n return a - b;\n});\nvar m = Number(readline().trim());\n\nvar profit = 0;\n\nfor (var i = 0; i < Math.min(m, n); i++) {\n profit += costs[i];\n}\nif (m > n) {\n profit -= (m - n) * d;\n}\nprint(profit);"}, {"source_code": "(function (){\n var line = readline().split(' ');\n var n = parseInt(line[0]);\n var d = parseInt(line[1]);\n var a = readline().split(' ');\n var m = parseInt(readline());\n a.sort(function(a,b){\n return parseInt(a)-parseInt(b);\n });\n var profit = 0, i;\n for( i = 0 ; i < m && i < n ; ++i){\n profit += parseInt(a[i]);\n }\n if ( i < m ){\n profit -= (m-i) * d;\n }\n print(profit);\n})();"}, {"source_code": "process.stdin.setEncoding('ASCII');\n\nlet string = '';\nprocess.stdin.on('data', (data) => string += data);\n\nprocess.stdin.on('end', () => {\n const array = string.trim().split('\\n');\n const line = array[0].split(' ').map(Number);\n\n let n = line[0], d = line[1];\n let cost = array[1].split(' ').map(Number);\n let visitors = Number(array[2]);\n\n cost.sort((a, b) => a - b);\n \n let profit = 0;\n for (let i = 0; i < cost.length; ++i) {\n if (visitors == 0) break;\n profit += cost[i];\n visitors--;\n }\n\n profit -= (visitors * d);\n console.log(profit);\n});\n"}], "negative_code": [{"source_code": "'use strict';\n\n// let inpFileStrArr = `\n// 2 1\n// 2 1\n// 10\n// `.trim().split('\\n'), inpFileCounter = 0;\n// function readline() {\n// return inpFileStrArr[inpFileCounter++];\n// }\n// function print(x) {\n// console.log(x);\n// }\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _readline$split$map = readline().split(' ').map(Number);\n\nvar _readline$split$map2 = _slicedToArray(_readline$split$map, 2);\n\nvar n = _readline$split$map2[0];\nvar d = _readline$split$map2[1];\n\nvar arr = readline().split(' ').map(Number);arr.sort();\nvar m = Number(readline());\n\nprint(arr.slice(0, 2).reduce(function (a, b) {\n return a + b;\n}, 0) - (m > n ? (m - n) * d : 0));\n"}, {"source_code": "'use strict';\n\n// let inpFileStrArr = `\n// 3 96\n// 83 22 17\n// 19\n// `.trim().split('\\n'), inpFileCounter = 0;\n// function readline() {\n// return inpFileStrArr[inpFileCounter++];\n// }\n// function print(x) {\n// console.log(x);\n// }\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _readline$split$map = readline().split(' ').map(Number);\n\nvar _readline$split$map2 = _slicedToArray(_readline$split$map, 2);\n\nvar n = _readline$split$map2[0];\nvar d = _readline$split$map2[1];\n\nvar arr = readline().split(' ').map(Number);arr.sort();\nvar m = Number(readline());\n\nprint(arr.slice(0, m).reduce(function (a, b) {\n return a + b;\n}, 0) - (m > n ? (m - n) * d : 0));\n"}], "src_uid": "5c21e2dd658825580522af525142397d"} {"nl": {"description": "There are n children in Jzzhu's school. Jzzhu is going to give some candies to them. Let's number all the children from 1 to n. The i-th child wants to get at least ai candies.Jzzhu asks children to line up. Initially, the i-th child stands at the i-th place of the line. Then Jzzhu start distribution of the candies. He follows the algorithm: Give m candies to the first child of the line. If this child still haven't got enough candies, then the child goes to the end of the line, else the child go home. Repeat the first two steps while the line is not empty. Consider all the children in the order they go home. Jzzhu wants to know, which child will be the last in this order?", "input_spec": "The first line contains two integers n, m (1 ≤ n ≤ 100; 1 ≤ m ≤ 100). The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 100).", "output_spec": "Output a single integer, representing the number of the last child.", "sample_inputs": ["5 2\n1 3 1 4 2", "6 4\n1 1 2 2 3 3"], "sample_outputs": ["4", "6"], "notes": "NoteLet's consider the first sample. Firstly child 1 gets 2 candies and go home. Then child 2 gets 2 candies and go to the end of the line. Currently the line looks like [3, 4, 5, 2] (indices of the children in order of the line). Then child 3 gets 2 candies and go home, and then child 4 gets 2 candies and goes to the end of the line. Currently the line looks like [5, 2, 4]. Then child 5 gets 2 candies and goes home. Then child 2 gets two candies and goes home, and finally child 4 gets 2 candies and goes home.Child 4 is the last one who goes home."}, "positive_code": [{"source_code": "if (!this.readline) print = console.log, readline = require('./readline');\n\n\nprint(function(n, m) {\n\n\tvar a = readline().split(' ').map(Number);\n\tvar b = new Int8Array(n);\n\tvar c = new Int8Array(n);\n\n\tvar index = 0;\n\tvar count = 0;\n\twhile (true) {\n\t\tif (c[index]) {\n\t\t\tindex++;\n\t\t\tif (index == n) index = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tb[index] += m;\n\t\tif (b[index] >= a[index]) {\n\t\t\tc[index] = 1;\n\t\t\tcount++;\n\t\t\tif (count == n)\n\t\t\t\treturn index + 1;\n\t\t}\n\t\tindex++;\n\t\tif (index == n) index = 0;\n\t}\n}.apply(0, readline().split(' ').map(Number)));"}, {"source_code": "var input = readline().split(\" \"), n = +input[0], m = +input[1], a = readline().split(\" \").map(Number),\nmax, position;\n\na.forEach(function(number, i){\n\ta[i] = Math.ceil(number/m);\n});\n\nmax = Math.max.apply(null,a);\n\na.forEach(function(number, i){\n\tif(number == max){\n\t\tposition = i+1;\n\t}\n});\n\nwrite(position);"}, {"source_code": ";(function () {\n\t\n\tvar n = readline().split(' ');\n\tvar m = +n[1];\n\tn = +n[0];\n\n\tvar a = readline().split(' ').map(Number);\n\n\tvar last;\n\twhile ( a.reduce(function (p, e) { return p + (e > 0); }, 0) ) {\n\t\tfor (var i = 0; i < n; i++) {\n\t\t\tif (a[i] > 0) {\n\t\t\t\tlast = i;\n\t\t\t\ta[i] -= m;\n\t\t\t}\n\t\t}\n\t}\n\n\tprint(last + 1);\n\n}).call(this);"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar data = tokenizeIntegers(readline()),\n\t\tn = data[0], serving = data[1],\n\t\tchildren = tokenizeIntegers(readline()),\n\t\tpos = 0, count = 0;\n\twhile (true) {\n\t\twhile (children[pos] <= 0) {\n\t\t\tpos = (pos+1)%n;\n\t\t}\n\t\tchildren[pos] -= serving;\n\t\tif (children[pos] <= 0) {\n\t\t\tif (++count == n) {\n\t\t\t\tprint(pos+1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tpos = (pos+1)%n;\n\t}\n}\n\nmain();\n"}, {"source_code": "var jzzhu = function(n, m, a){\n\tvar flag = true;\n\tvar last = 0;\n\twhile (flag){\n\t\tflag = false;\n\t\tfor (var i = 0; i < n; i++){\n\t\t\tif (a[i] > 0){\n\t\t\t\tif ( (a[i] -= m) > 0){\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tlast = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\treturn last + 1;\n};\n\nvar line = readline().split(' ');\nvar n = parseInt(line[0]);\nvar m = parseInt(line[1]);\nvar a = readline().split(' ');\n\nprint (jzzhu(n, m, a));"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const [len, limit] = readLine()\n .split(\" \")\n .map((n) => parseInt(n));\n const arr = readLine()\n .split(\" \")\n .map((n) => parseInt(n));\n let maxIndex = -1;\n let maxMove = -1;\n for (let i = 0; i < len; i++) {\n const candy = arr[i];\n let move = Math.floor(candy / limit);\n if (candy % limit > 0) move++;\n const diff = candy - limit;\n\n if (move >= maxMove) {\n if (diff > 0) {\n maxIndex = i;\n }\n maxMove = move;\n }\n }\n maxIndex = maxIndex === -1 ? len - 1 : maxIndex;\n console.log(maxIndex + 1);\n}\n"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction multiply(a, b) {\n\ta = a.toString(10).split('').reverse();\n\tb = b.toString(10).split('').reverse();\n\n\tif (a.length < b.length) {\n\t\t[a, b] = [b, a];\n\t}\n\n\tlet res = Array(a.length + b.length).fill(0);\n\tfor (let i = 0, lb = b.length; i < lb; ++i) {\n\t\tlet carry = 0;\n\t\tlet scarry = 0;\n\t\tfor (let j = 0, la = a.length; j < la; ++j) {\n\t\t\tlet m = b[i] * a[j];\n\t\t\tm += carry;\n\n\t\t\tif (m > 9) {\n\t\t\t\tlet [c, d] = m.toString(10).split('');\n\t\t\t\tres[i + j] += (scarry >> 0) + (d >> 0);\n\t\t\t\tcarry = c >> 0;\n\t\t\t} else {\n\t\t\t\tres[i + j] += (scarry >> 0) + m;\n\t\t\t\tcarry = 0;\n\t\t\t}\n\n\t\t\tif (res[i + j] > 9) {\n\t\t\t\tlet [c, d] = res[i + j].toString(10).split('');\n\t\t\t\tres[i + j] = d >> 0;\n\t\t\t\tscarry = c;\n\t\t\t} else {\n\t\t\t\tscarry = 0;\n\t\t\t}\n\t\t}\n\t\tif (carry > 0) res[a.length + i] = carry;\n\t\tif (scarry > 0) res[a.length + i] = scarry;\n\t}\n\n\tres.reverse();\n\tlet mulVal = '';\n\tlet flag = false;\n\tres.forEach(d => {\n\t\tif (!flag && d !== 0) flag = true;\n\t\tif (flag) mulVal += d;\n\t});\n\treturn mulVal;\n}\n\nfunction main() {\n\tlet [n, m] = readLine()\n\t\t.split(' ')\n\t\t.map(x => x >> 0);\n\tlet q = readLine()\n\t\t.split(' ')\n\t\t.map(x => x >> 0);\n\tq = q.map(x => (x <= m ? 0 : Math.ceil(x / m)));\n\n\tlet max = 0,\n\t\tv = 0;\n\tfor (let i = 0; i < n; ++i) {\n\t\tif (q[i] >= max) {\n\t\t\tmax = q[i];\n\t\t\tv = i + 1;\n\t\t}\n\t}\n\tconsole.log(v);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let [Numberofstudents, initialCandyValue] = readLine()\n .split(' ')\n .map(Number);\n // let home = [];\n // let more = [];\n\n let students = readLine().split(' ').map(Number); // [1 3 1 4 2]\n // for (let i = 0; i < students.length; i++) {\n // if (students[i] <= initialCandyValue) {\n // let t = students[i];\n // home[t] = i;\n // } else {\n // let test = students[i];\n // more[test] = i;\n // }\n // }\n // let highest = 0;\n // let vagfol = 0;\n // if (more.length !== 0) {\n // for (let i = 0; i < more.length; i++) {\n // // if (more[i] > highest) {\n // // highest = more[i];\n // // }\n // let iThVagfol = Math.ceil(more[i] / initialCandyValue);\n // if (iThVagfol > vagfol) {\n // vagfol = iThVagfol;\n // } else if (vagfol === iThVagfol) {\n // highest = more[i];\n // }\n // }\n // } else if (more.length === 0) {\n // for (let i = 0; i < home.length; i++) {\n // if (home[i] > highest) {\n // highest = home[i];\n // }\n // }\n // }\n\n let highest = 0;\n let vagfol = 0;\n // if (more.length !== 0) {\n for (let i = 0; i < students.length; i++) {\n // if (more[i] > highest) {\n // highest = more[i];\n // }\n let iThVagfol = Math.ceil(students[i] / initialCandyValue); //100\n if (iThVagfol > vagfol) {\n vagfol = iThVagfol;\n highest = students.lastIndexOf(students[i]);\n } else if (vagfol === iThVagfol) {\n highest = students.lastIndexOf(students[i]);\n }\n }\n console.log(highest + 1);\n // console.log(Math.max.apply(null, more));\n}\n"}], "negative_code": [{"source_code": "function countUniqueElements(input,output){\n\tfor(var i = 0; i < input.length; i++){\n\t\tif(output[+input[i]] == undefined){\n\t\t\toutput[+input[i]] = 1;\n\t\t}\n\t\telse{\n\t\t\toutput[+input[i]]++;\n\t\t}\n\t}\n}\n\nvar n = +readline(), str = readline().split(\"\").map(Number),\nunique = {\n\t0: 0,\n\t1: 0\n};\n\ncountUniqueElements(str, unique);\n\nprint(Math.abs(unique[1] - unique[0]));"}, {"source_code": "var input = readline().split(\" \"), n = +input[0], m = +input[1], a = readline().split(\" \").map(Number),\nmax, position;\n\na.forEach(function(number){\n\tMath.ceil(number/m);\n});\n\nmax = Math.max.apply(null,a);\n\na.forEach(function(number, i){\n\tif(number == max){\n\t\tposition = i+1;\n\t}\n});\n\nwrite(position);"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction multiply(a, b) {\n\ta = a.toString(10).split('').reverse();\n\tb = b.toString(10).split('').reverse();\n\n\tif (a.length < b.length) {\n\t\t[a, b] = [b, a];\n\t}\n\n\tlet res = Array(a.length + b.length).fill(0);\n\tfor (let i = 0, lb = b.length; i < lb; ++i) {\n\t\tlet carry = 0;\n\t\tlet scarry = 0;\n\t\tfor (let j = 0, la = a.length; j < la; ++j) {\n\t\t\tlet m = b[i] * a[j];\n\t\t\tm += carry;\n\n\t\t\tif (m > 9) {\n\t\t\t\tlet [c, d] = m.toString(10).split('');\n\t\t\t\tres[i + j] += (scarry >> 0) + (d >> 0);\n\t\t\t\tcarry = c >> 0;\n\t\t\t} else {\n\t\t\t\tres[i + j] += (scarry >> 0) + m;\n\t\t\t\tcarry = 0;\n\t\t\t}\n\n\t\t\tif (res[i + j] > 9) {\n\t\t\t\tlet [c, d] = res[i + j].toString(10).split('');\n\t\t\t\tres[i + j] = d >> 0;\n\t\t\t\tscarry = c;\n\t\t\t} else {\n\t\t\t\tscarry = 0;\n\t\t\t}\n\t\t}\n\t\tif (carry > 0) res[a.length + i] = carry;\n\t\tif (scarry > 0) res[a.length + i] = scarry;\n\t}\n\n\tres.reverse();\n\tlet mulVal = '';\n\tlet flag = false;\n\tres.forEach(d => {\n\t\tif (!flag && d !== 0) flag = true;\n\t\tif (flag) mulVal += d;\n\t});\n\treturn mulVal;\n}\n\nfunction main() {\n\tlet [n, m] = readLine()\n\t\t.split(' ')\n\t\t.map(x => x >> 0);\n\tlet q = readLine()\n\t\t.split(' ')\n\t\t.map(x => x >> 0);\n\tq = q.map(x => (x <= m ? 0 : Math.floor(x / m)));\n\n\tlet max = 0,\n\t\tv = 0;\n\tfor (let i = 0; i < n; ++i) {\n\t\tif (q[i] >= max) {\n\t\t\tmax = q[i];\n\t\t\tv = i + 1;\n\t\t}\n\t}\n\tconsole.log(v);\n}\n"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction multiply(a, b) {\n\ta = a.toString(10).split('').reverse();\n\tb = b.toString(10).split('').reverse();\n\n\tif (a.length < b.length) {\n\t\t[a, b] = [b, a];\n\t}\n\n\tlet res = Array(a.length + b.length).fill(0);\n\tfor (let i = 0, lb = b.length; i < lb; ++i) {\n\t\tlet carry = 0;\n\t\tlet scarry = 0;\n\t\tfor (let j = 0, la = a.length; j < la; ++j) {\n\t\t\tlet m = b[i] * a[j];\n\t\t\tm += carry;\n\n\t\t\tif (m > 9) {\n\t\t\t\tlet [c, d] = m.toString(10).split('');\n\t\t\t\tres[i + j] += (scarry >> 0) + (d >> 0);\n\t\t\t\tcarry = c >> 0;\n\t\t\t} else {\n\t\t\t\tres[i + j] += (scarry >> 0) + m;\n\t\t\t\tcarry = 0;\n\t\t\t}\n\n\t\t\tif (res[i + j] > 9) {\n\t\t\t\tlet [c, d] = res[i + j].toString(10).split('');\n\t\t\t\tres[i + j] = d >> 0;\n\t\t\t\tscarry = c;\n\t\t\t} else {\n\t\t\t\tscarry = 0;\n\t\t\t}\n\t\t}\n\t\tif (carry > 0) res[a.length + i] = carry;\n\t\tif (scarry > 0) res[a.length + i] = scarry;\n\t}\n\n\tres.reverse();\n\tlet mulVal = '';\n\tlet flag = false;\n\tres.forEach(d => {\n\t\tif (!flag && d !== 0) flag = true;\n\t\tif (flag) mulVal += d;\n\t});\n\treturn mulVal;\n}\n\nfunction main() {\n\tlet [n, m] = readLine()\n\t\t.split(' ')\n\t\t.map(x => x >> 0);\n\tlet h = {};\n\tlet q = readLine()\n\t\t.split(' ')\n\t\t.map((x, i) => {\n\t\t\th[x] = i + 1;\n\t\t\treturn x >> 0;\n\t\t});\n\tlet v = null;\n\twhile (q.length) {\n\t\tlet c = q.shift();\n\t\tif (c > m) {\n\t\t\tq.push(c - m);\n\t\t\tlet i = h[c];\n\t\t\tdelete h[c];\n\t\t\th[c - m] = i;\n\t\t} else delete h[c];\n\n\t\tif (Object.keys(h).length === 1) {\n\t\t\tv = Object.values(h)[0];\n\t\t\tbreak;\n\t\t}\n\t}\n\tconsole.log(v);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let [Numberofstudents, initialCandyValue] = readLine()\n .split(' ')\n .map(Number);\n let home = [];\n let more = [];\n\n let students = readLine().split(' ').map(Number); // [1 3 1 4 2]\n for (let i = 0; i < students.length; i++) {\n if (students[i] <= initialCandyValue) {\n home.push(students[i]);\n } else {\n let test = students[i];\n more[test] = i;\n }\n }\n\n let highest = 0;\n for (let i = 0; i < more.length; i++) {\n if (more[i] > highest) {\n highest = more[i];\n }\n }\n\n console.log(highest + 1);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let [Numberofstudents, initialCandyValue] = readLine()\n .split(' ')\n .map(Number);\n let home = [];\n let more = [];\n\n let students = readLine().split(' ').map(Number); // [1 3 1 4 2]\n for (let i = 0; i < students.length; i++) {\n if (students[i] <= initialCandyValue) {\n let t = students[i];\n home[students[i]] = i;\n } else {\n let test = students[i];\n more[test] = i;\n }\n }\n let highest = 0;\n if (more.length !== 0) {\n for (let i = 0; i < more.length; i++) {\n if (more[i] > highest) {\n highest = more[i];\n }\n }\n } else if (more.length === 0) {\n for (let i = 0; i < home.length; i++) {\n if (home[i] > highest) {\n highest = home[i];\n }\n }\n }\n\n console.log(highest + 1);\n // console.log(Math.max.apply(null, more));\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let [Numberofstudents, initialCandyValue] = readLine()\n .split(' ')\n .map(Number);\n // let home = [];\n // let more = [];\n\n let students = readLine().split(' ').map(Number); // [1 3 1 4 2]\n // for (let i = 0; i < students.length; i++) {\n // if (students[i] <= initialCandyValue) {\n // let t = students[i];\n // home[t] = i;\n // } else {\n // let test = students[i];\n // more[test] = i;\n // }\n // }\n // let highest = 0;\n // let vagfol = 0;\n // if (more.length !== 0) {\n // for (let i = 0; i < more.length; i++) {\n // // if (more[i] > highest) {\n // // highest = more[i];\n // // }\n // let iThVagfol = Math.ceil(more[i] / initialCandyValue);\n // if (iThVagfol > vagfol) {\n // vagfol = iThVagfol;\n // } else if (vagfol === iThVagfol) {\n // highest = more[i];\n // }\n // }\n // } else if (more.length === 0) {\n // for (let i = 0; i < home.length; i++) {\n // if (home[i] > highest) {\n // highest = home[i];\n // }\n // }\n // }\n\n let highest = 0;\n let vagfol = 0;\n // if (more.length !== 0) {\n for (let i = 0; i < students.length; i++) {\n // if (more[i] > highest) {\n // highest = more[i];\n // }\n let iThVagfol = Math.ceil(students[i] / initialCandyValue);\n if (iThVagfol > vagfol) {\n vagfol = iThVagfol;\n } else if (vagfol === iThVagfol) {\n highest = students.lastIndexOf(students[i]);\n }\n }\n console.log(highest + 1);\n // console.log(Math.max.apply(null, more));\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let [Numberofstudents, initialCandyValue] = readLine()\n .split(' ')\n .map(Number);\n // let home = [];\n // let more = [];\n\n let students = readLine().split(' ').map(Number); // [1 3 1 4 2]\n // for (let i = 0; i < students.length; i++) {\n // if (students[i] <= initialCandyValue) {\n // let t = students[i];\n // home[t] = i;\n // } else {\n // let test = students[i];\n // more[test] = i;\n // }\n // }\n // let highest = 0;\n // let vagfol = 0;\n // if (more.length !== 0) {\n // for (let i = 0; i < more.length; i++) {\n // // if (more[i] > highest) {\n // // highest = more[i];\n // // }\n // let iThVagfol = Math.ceil(more[i] / initialCandyValue);\n // if (iThVagfol > vagfol) {\n // vagfol = iThVagfol;\n // } else if (vagfol === iThVagfol) {\n // highest = more[i];\n // }\n // }\n // } else if (more.length === 0) {\n // for (let i = 0; i < home.length; i++) {\n // if (home[i] > highest) {\n // highest = home[i];\n // }\n // }\n // }\n\n let highest = 0;\n let vagfol = 0;\n // if (more.length !== 0) {\n for (let i = 0; i <= students.length; i++) {\n // if (more[i] > highest) {\n // highest = more[i];\n // }\n let iThVagfol = Math.ceil(students[i] / initialCandyValue);\n if (iThVagfol > vagfol) {\n vagfol = iThVagfol;\n } else if (vagfol === iThVagfol) {\n highest = students.lastIndexOf(students[i]);\n }\n }\n console.log(highest + 1);\n // console.log(Math.max.apply(null, more));\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let [Numberofstudents, initialCandyValue] = readLine()\n .split(' ')\n .map(Number);\n // let home = [];\n // let more = [];\n\n let students = readLine().split(' ').map(Number); // [1 3 1 4 2]\n // for (let i = 0; i < students.length; i++) {\n // if (students[i] <= initialCandyValue) {\n // let t = students[i];\n // home[t] = i;\n // } else {\n // let test = students[i];\n // more[test] = i;\n // }\n // }\n // let highest = 0;\n // let vagfol = 0;\n // if (more.length !== 0) {\n // for (let i = 0; i < more.length; i++) {\n // // if (more[i] > highest) {\n // // highest = more[i];\n // // }\n // let iThVagfol = Math.ceil(more[i] / initialCandyValue);\n // if (iThVagfol > vagfol) {\n // vagfol = iThVagfol;\n // } else if (vagfol === iThVagfol) {\n // highest = more[i];\n // }\n // }\n // } else if (more.length === 0) {\n // for (let i = 0; i < home.length; i++) {\n // if (home[i] > highest) {\n // highest = home[i];\n // }\n // }\n // }\n\n let highest = 0;\n let vagfol = 0;\n // if (more.length !== 0) {\n for (let i = 0; i < students.length; i++) {\n // if (more[i] > highest) {\n // highest = more[i];\n // }\n let iThVagfol = Math.ceil(students[i] / initialCandyValue);\n if (iThVagfol > vagfol) {\n vagfol = iThVagfol;\n } else if (vagfol === iThVagfol) {\n highest = students.indexOf(students[i]);\n }\n }\n console.log(highest + 1);\n // console.log(Math.max.apply(null, more));\n}\n"}], "src_uid": "c0ef1e4d7df360c5c1e52bc6f16ca87c"} {"nl": {"description": "Calendars in widespread use today include the Gregorian calendar, which is the de facto international standard, and is used almost everywhere in the world for civil purposes. The Gregorian reform modified the Julian calendar's scheme of leap years as follows: Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100; the centurial years that are exactly divisible by 400 are still leap years. For example, the year 1900 is not a leap year; the year 2000 is a leap year. In this problem, you have been given two dates and your task is to calculate how many days are between them. Note, that leap years have unusual number of days in February.Look at the sample to understand what borders are included in the aswer.", "input_spec": "The first two lines contain two dates, each date is in the format yyyy:mm:dd (1900 ≤ yyyy ≤ 2038 and yyyy:mm:dd is a legal date).", "output_spec": "Print a single integer — the answer to the problem.", "sample_inputs": ["1900:01:01\n2038:12:31", "1996:03:09\n1991:11:12"], "sample_outputs": ["50768", "1579"], "notes": null}, "positive_code": [{"source_code": "'use strict';\n\n/*let input = `1996:03:09\n1991:11:12`.split('\\n');\nfunction print(output) {\n\tconsole.log(output);\n}\nfunction readline() {\n\treturn input.shift();\n}*/\n\n//code\n\nvar inpDate1 = readline().split(':').map(Number);\nvar inpDate2 = readline().split(':').map(Number);\nvar date1 = new Date(inpDate1[0], inpDate1[1] - 1, inpDate1[2]);\nvar date2 = new Date(inpDate2[0], inpDate2[1] - 1, inpDate2[2]);\nprint(Math.abs((date2.getTime() - date1.getTime()) / (1000 * 60 * 60 * 24)));\n"}], "negative_code": [], "src_uid": "bdf99d78dc291758fa09ec133fff1e9c"} {"nl": {"description": "Drazil is playing a math game with Varda.Let's define for positive integer x as a product of factorials of its digits. For example, .First, they choose a decimal number a consisting of n digits that contains at least one digit larger than 1. This number may possibly start with leading zeroes. Then they should find maximum positive number x satisfying following two conditions:1. x doesn't contain neither digit 0 nor digit 1.2. = .Help friends find such number.", "input_spec": "The first line contains an integer n (1 ≤ n ≤ 15) — the number of digits in a. The second line contains n digits of a. There is at least one digit in a that is larger than 1. Number a may possibly contain leading zeroes.", "output_spec": "Output a maximum possible integer satisfying the conditions above. There should be no zeroes and ones in this number decimal representation.", "sample_inputs": ["4\n1234", "3\n555"], "sample_outputs": ["33222", "555"], "notes": "NoteIn the first case, "}, "positive_code": [{"source_code": "var n = +readline(), a = readline().split(\"\").map(Number)\nans = [];\n\na.forEach(function(digit, i){\n\tswitch(digit){\n\t\tcase 2:\n\t\t\tans.push(2);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tans.push(3);\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tans.push(3,2,2)\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tans.push(5);\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tans.push(5,3)\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tans.push(7);\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tans.push(7,2,2,2)\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tans.push(7,3,3,2)\n\t}\n});\n\nans.sort(function(x,y){return y-x});\n\nwrite(ans.join(\"\"));"}, {"source_code": "var n=parseInt(readline().trim())\nvar s = readline().trim()\nvar m=[];\nfor(var i=0;i<10;i++){\n m.push(0)\n}\nvar c={\n 0:[1],\n 1:[1],\n 2:[2],\n 3:[3],\n 4:[3,2,2],\n 5:[5],\n 6:[5,3],\n 7:[7],\n 8:[7,2,2,2],\n 9:[7,3,3,2]\n}\nvar t\nfor(var i=0;i=2;i--){\n for(var j=0;j 0 ; i--){\n\t\tstr += '7';\n\t\tnumbers[2] -= 4;\n\t\tnumbers[3] -= 2;\n\t\tnumbers[5] -= 1;\n\t}\n\n\tfor (var i = numbers[5]; i > 0 ; i--){\n\t\tstr += '5';\n\t\tnumbers[2] -= 3;\n\t\tnumbers[3] -= 1;\n\t}\n\n\tfor (var i = numbers[3]; i > 0 ; i--){\n\t\tstr += '3';\n\t\tnumbers[2] -= 1;\n\t}\n\n\tfor (var i = numbers[2]; i > 0 ; i--){\n\t\tstr += '2';\n\t}\n\n\tprint(str);\n\n}).call(this);\n"}, {"source_code": "readline();\nvar s = readline().split('').map(Number);\nvar s1 = s.filter(x=>x>1).map(x=>{if (x==4) {return [2,2,3];} else if (x==6) {return [5,3];} else if (x==8) {return [7,2,2,2];} else if (x==9) {return [7,3,3,2]} else return x;});\nvar s2 = [].concat.apply([],s1).sort((x,y)=>y-x);\nprint(s2.join(''));"}, {"source_code": "\n// 441A Валера и антиквариат \n\n\nvar n = parseInt(readline());\n\n// var input_line = readline().split(' ').map(Number);\nvar arr = readline().split('');\n\nvar out = '';\n\nfor (var i = 0; i < n; i++) if (arr[i] === '9') out += '7332';\nfor (var i = 0; i < n; i++) if (arr[i] === '8') out += '7222';\nfor (var i = 0; i < n; i++) if (arr[i] === '7') out += '7';\nfor (var i = 0; i < n; i++) if (arr[i] === '6') out += '53';\nfor (var i = 0; i < n; i++) if (arr[i] === '5') out += '5';\nfor (var i = 0; i < n; i++) if (arr[i] === '4') out += '322';\nfor (var i = 0; i < n; i++) if (arr[i] === '3') out += '3';\nfor (var i = 0; i < n; i++) if (arr[i] === '2') out += '2';\n\narr = out.split('').sort().reverse();\n\nout = arr.join('');\n\nprint(out);\n\n\n"}, {"source_code": "var n = Number(readline());\nvar a = readline();\na = a.replace(/0/g, '').replace(/1/g, '');\nvar b = [];\nfor (var i = 0; i < a.length; i++) {\n\tif (a[i] === '4') {\n\t\tb.push('3');\n\t\tb.push('2');\n\t\tb.push('2');\n\t} else if (a[i] === '6') {\n\t\tb.push('5');\n\t\tb.push('3');\n\t} else if (a[i] === '8') {\n\t\tfor (var j = 0; j < 3; j++) {\n\t\t\tb.push('2');\n\t\t}\n\t\tb.push('7');\n\t} else if (a[i] === '9') {\n\t\tb.push('3');\n\t\tb.push('3');\n\t\tb.push('2');\n\t\tb.push('7');\n\t} else {\n\t\tb.push(a[i]);\n\t}\n}\n\nb.sort(function(x, y) {return x - y;}).reverse();\nprint(b.join(''));"}], "negative_code": [{"source_code": "\n// 441A Валера и антиквариат \n\n\nvar n = parseInt(readline());\n\n// var input_line = readline().split(' ').map(Number);\nvar arr = readline().split('').map(String);\n\nvar out = '';\n\nfor (var i = 0; i < n; i++) if (arr[i] === '9') out += '9';\nfor (var i = 0; i < n; i++) if (arr[i] === '7') out += '7';\nfor (var i = 0; i < n; i++) if (arr[i] === '8') out += '7222';\nfor (var i = 0; i < n; i++) if (arr[i] === '5') out += '5';\nfor (var i = 0; i < n; i++) if (arr[i] === '6') out += '53';\nfor (var i = 0; i < n; i++) if (arr[i] === '3') out += '3';\nfor (var i = 0; i < n; i++) if (arr[i] === '4') out += '322';\nfor (var i = 0; i < n; i++) if (arr[i] === '2') out += '2';\n\nprint(out);\n\n\n"}, {"source_code": "var n = +readline(), a = readline().split(\"\").map(Number)\nans = [];\n\na.forEach(function(digit, i){\n\tswitch(digit){\n\t\tcase 2:\n\t\t\tans.push(2);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tans.push(3);\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tans.push(3,2,2)\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tans.push(5);\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tans.push(5,3)\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tans.push(7);\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tans.push(7,2,2,2,2)\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tans.push(7,3,3,2,2)\n\t}\n});\n\nans.sort(function(x,y){return y-x});\n\nwrite(a.join(\"\"));"}, {"source_code": "var n = +readline(), a = readline().split(\"\").map(Number)\nans = [];\n\na.forEach(function(digit, i){\n\tswitch(digit){\n\t\tcase 2:\n\t\t\tans.push(2);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tans.push(3);\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tans.push(3,2,2)\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tans.push(5);\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tans.push(5,3)\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tans.push(7);\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tans.push(7,2,2,2,2)\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tans.push(7,3,3,2,2)\n\t}\n});\n\nans.sort(function(x,y){return y-x});\n\nwrite(ans.join(\"\"));"}, {"source_code": "var n = +readline(), a = readline().split(\"\").map(Number);\n\na.forEach(function(digit, i){\n\tswitch(digit){\n\t\tcase 0:\n\t\t\ta.splice(i,1);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ta.splice(i,1);\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ta.splice(i,1,3,2,2);\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ta.splice(i,1,5,3);\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ta.splice(i,1,7,2,2,2,2);\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ta.splice(i,1,7,3,3,2,2);\n\t}\n});\n\na.sort(function(x,y){return y-x});\n\nwrite(a.join(\"\"));"}, {"source_code": "readline();\nvar s = readline().split('').map(Number);\nvar s1 = s.filter(x=>x>1).map(x=>{if (x==4) {return [2,2,3];} else if (x==6) {return [5,3];} else if (x==8) {return [7,2,2,2];} else return x;});\nvar s2 = [].concat.apply([],s1).sort((x,y)=>y-x);\nprint(s2.join(''));"}, {"source_code": "readline();\nvar s = readline().split('').map(Number);\nvar s1 = s.filter(x=>x>1).map(x=>{if (x==4) {return [2,2,3];} else if (x==6) {return [5,3];} else if (x==8) {return [7,2,2,2];} else if (x==9) {return [7,3,3,3]} else return x;});\nvar s2 = [].concat.apply([],s1).sort((x,y)=>y-x);\nprint(s2.join(''));"}, {"source_code": "\n// 441A Валера и антиквариат \n\n\nvar n = parseInt(readline());\n\n// var input_line = readline().split(' ').map(Number);\nvar arr = readline().split('');\n\nvar out = '';\n\nfor (var i = 0; i < n; i++) if (arr[i] === '9') out += '9';\nfor (var i = 0; i < n; i++) if (arr[i] === '7') out += '7';\nfor (var i = 0; i < n; i++) if (arr[i] === '8') out += '7222';\nfor (var i = 0; i < n; i++) if (arr[i] === '5') out += '5';\nfor (var i = 0; i < n; i++) if (arr[i] === '6') out += '53';\nfor (var i = 0; i < n; i++) if (arr[i] === '3') out += '3';\nfor (var i = 0; i < n; i++) if (arr[i] === '4') out += '322';\nfor (var i = 0; i < n; i++) if (arr[i] === '2') out += '2';\n\narr = out.split('');\narr.sort();\nout = arr.join('');\n\nprint(out);\n\n\n"}, {"source_code": "\n// 441A Валера и антиквариат \n\n\nvar n = parseInt(readline());\n\n// var input_line = readline().split(' ').map(Number);\nvar arr = readline().split('');\n\nvar out = '';\n\nfor (var i = 0; i < n; i++) if (arr[i] === '9') out += '9';\nfor (var i = 0; i < n; i++) if (arr[i] === '7') out += '7';\nfor (var i = 0; i < n; i++) if (arr[i] === '8') out += '7222';\nfor (var i = 0; i < n; i++) if (arr[i] === '5') out += '5';\nfor (var i = 0; i < n; i++) if (arr[i] === '6') out += '53';\nfor (var i = 0; i < n; i++) if (arr[i] === '3') out += '3';\nfor (var i = 0; i < n; i++) if (arr[i] === '4') out += '322';\nfor (var i = 0; i < n; i++) if (arr[i] === '2') out += '2';\n\narr = out.split('').sort().reverse();\n\nout = arr.join('');\n\nprint(out);\n\n\n"}, {"source_code": "\n// 441A Валера и антиквариат \n\n\nvar n = parseInt(readline());\n\n// var input_line = readline().split(' ').map(Number);\nvar arr = readline().split('').map(Number);\n\nvar out = '';\n\nfor (var i = 0; i < n; i++) if (arr[i] === '9') out += '9';\nfor (var i = 0; i < n; i++) if (arr[i] === '7') out += '7';\nfor (var i = 0; i < n; i++) if (arr[i] === '8') out += '7222';\nfor (var i = 0; i < n; i++) if (arr[i] === '5') out += '5';\nfor (var i = 0; i < n; i++) if (arr[i] === '6') out += '53';\nfor (var i = 0; i < n; i++) if (arr[i] === '3') out += '3';\nfor (var i = 0; i < n; i++) if (arr[i] === '4') out += '322';\nfor (var i = 0; i < n; i++) if (arr[i] === '2') out += '2';\n\nprint(out);\n\n\n"}, {"source_code": "var n = Number(readline());\nvar a = readline();\na = a.replace('0', '').replace('1', '');\nvar b = [];\nfor (var i = 0; i < a.length; i++) {\n\tif (a[i] === '4') {\n\t\tb.push('3');\n\t\tb.push('2');\n\t\tb.push('2');\n\t} else if (a[i] === '6') {\n\t\tb.push('5');\n\t\tb.push('3');\n\t} else {\n\t\tb.push(a[i]);\n\t}\n}\n\nb.sort(function(x, y) {return x - y;}).reverse();\nprint(b.join(''));"}, {"source_code": "var n = Number(readline());\nvar a = readline();\na = a.replace(/0/g, '').replace(/1/g, '');\nvar b = [];\nfor (var i = 0; i < a.length; i++) {\n\tif (a[i] === '4') {\n\t\tb.push('3');\n\t\tb.push('2');\n\t\tb.push('2');\n\t} else if (a[i] === '6') {\n\t\tb.push('5');\n\t\tb.push('3');\n\t} else if (a[i] === '8') {\n\t\tfor (var j = 0; j < 3; j++) {\n\t\t\tb.push('2');\n\t\t}\n\t} else {\n\t\tb.push(a[i]);\n\t}\n}\n\nb.sort(function(x, y) {return x - y;}).reverse();\nprint(b.join(''));"}, {"source_code": "var n = Number(readline());\nvar a = readline();\na = a.replace(/0/g, '').replace(/1/g, '');\nvar b = [];\nfor (var i = 0; i < a.length; i++) {\n\tif (a[i] === '4') {\n\t\tb.push('3');\n\t\tb.push('2');\n\t\tb.push('2');\n\t} else if (a[i] === '6') {\n\t\tb.push('5');\n\t\tb.push('3');\n\t} else if (a[i] === '8') {\n\t\tfor (var j = 0; j < 3; j++) {\n\t\t\tb.push('2');\n\t\t}\n\t\tb.push('7');\n\t} else {\n\t\tb.push(a[i]);\n\t}\n}\n\nb.sort(function(x, y) {return x - y;}).reverse();\nprint(b.join(''));"}], "src_uid": "60dbfc7a65702ae8bd4a587db1e06398"} {"nl": {"description": "An n × n table a is defined as follows: The first row and the first column contain ones, that is: ai, 1 = a1, i = 1 for all i = 1, 2, ..., n. Each of the remaining numbers in the table is equal to the sum of the number above it and the number to the left of it. In other words, the remaining elements are defined by the formula ai, j = ai - 1, j + ai, j - 1. These conditions define all the values in the table.You are given a number n. You need to determine the maximum value in the n × n table defined by the rules above.", "input_spec": "The only line of input contains a positive integer n (1 ≤ n ≤ 10) — the number of rows and columns of the table.", "output_spec": "Print a single line containing a positive integer m — the maximum value in the table.", "sample_inputs": ["1", "5"], "sample_outputs": ["1", "70"], "notes": "NoteIn the second test the rows of the table look as follows: {1, 1, 1, 1, 1},  {1, 2, 3, 4, 5},  {1, 3, 6, 10, 15},  {1, 4, 10, 20, 35},  {1, 5, 15, 35, 70}."}, "positive_code": [{"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nlet input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n const count = parseInt(input[0], 10)\n let hash = []\n for (let a = 1; a <= count; a ++) {\n let index = hash.length === 0 ? 1 : hash.length - 1\n if (hash[index] === undefined) {\n hash.push([a])\n } else {\n hash[index].push(a)\n }\n }\n for (let a = 1; a < count - 1; a++) {\n for (let b = 0; b < count; b++) {\n const _prevLeftNum = b > 0 ? hash[a][b - 1] : 0\n const _prevTopNum = hash[a - 1][b]\n const all = _prevLeftNum + _prevTopNum\n if (hash[a] === undefined) {\n hash.push([all])\n } else {\n hash[a].push(all)\n }\n }\n }\n const lastResult = hash[hash.length - 1]\n console.log(hash[hash.length - 1][lastResult.length - 1])\n})"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw \"ArrayIndexOutOfBoundsException ‚There is no more input\";}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var N = nextInt();\n var list = new Array(N);\n for(var i = 0; i < N; i++){\n list[i] = new Array(N).fill(0);\n if(i == 0){\n list[i] = new Array(N).fill(1);\n }\n list[i][0] = 1;\n }\n for(var i = 1; i < N; i++){\n for(var j = 1; j < N; j++){\n list[i][j] = list[i][j - 1] + list[i - 1][j];\n }\n }\n myout(list[N - 1][N - 1]);\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n const matrix = new Array(+d).fill(1).map(x => new Array(+d).fill(1));\n let ans = 0;\n\n for (let i = 0; i < matrix.length; i++) {\n for (let j = 0; j < matrix[i].length; j++) {\n let v = 0;\n if (Number.isInteger(matrix[i][j - 1])) {\n v += matrix[i][j - 1];\n }\n\n if (matrix[i - 1] && Number.isInteger(matrix[i - 1][j])) {\n v += matrix[i - 1][j]\n }\n\n matrix[i][j] = Math.max(1, v);\n ans += matrix[i][j];\n }\n }\n\n console.log(matrix[matrix.length - 1][matrix.length - 1]);\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nconst solve = (row, col) => {\n if (row === 1 || col === 1) {\n return 1;\n }\n\n return solve(row - 1, col) + solve(row, col - 1);\n}\n\nrl.on('line', (d) => {\n console.log(solve(+d, +d));\n\n // const matrix = new Array(+d).fill(1).map(x => new Array(+d).fill(1));\n // let ans = 0;\n\n // for (let i = 0; i < matrix.length; i++) {\n // for (let j = 0; j < matrix[i].length; j++) {\n // let v = 0;\n // if (Number.isInteger(matrix[i][j - 1])) {\n // v += matrix[i][j - 1];\n // }\n\n // if (matrix[i - 1] && Number.isInteger(matrix[i - 1][j])) {\n // v += matrix[i - 1][j]\n // }\n\n // matrix[i][j] = Math.max(1, v);\n // ans += matrix[i][j];\n // }\n // }\n\n // console.log(matrix);\n // console.log(matrix[matrix.length - 1][matrix.length - 1]);\n});\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [n] = input[0].split(' ').map(x => parseInt(x));\n const matrix = [];\n\n for (let i = 0; i < n; i += 1) matrix.push(Array(n).fill(1));\n\n for (let i = 1; i < n; i += 1) {\n for (let j = 1; j < n; j += 1) {\n matrix[i][j] = matrix[i][j-1]+matrix[i-1][j];\n }\n }\n\n console.log(matrix[n-1][n-1]);\n}); \n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n\n\nfunction main() {\n const l = parseInt(readLine().split(' '));\n\nlet arr = [];\n let matrix = [];\n for (let i = 0; i < l; ++i) {\n matrix[i] = [];\n for (let j = 0; j < l; ++j) {\n if (i == 0 && j == 0) {\n matrix[i][j] = 2;\n } else if (j == 0) {\n matrix[i][j] = matrix[i - 1][j] + 1;\n } else if (i == 0) {\n matrix[i][j] = matrix[i][j - 1] + 1;\n } else {\n matrix[i][j] = matrix[i - 1][j] + matrix[i][j - 1];\n }\n\n matrix[0][j] = 1;\n matrix[i][0] = 1;\n }\n }\n\n for (let g = 0; g < l; ++g) {\n for (k = 0; k < l; ++k) {\n if (k == g) {\n arr.push(matrix[g][k]);\n }\n }\n }\n console.log(arr.pop());\n }\n \n "}, {"source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\n/**\n * \n * @param {*} str \n * @param {*} seperator \n */\nfunction splitter(str, seperator = '') {\n return str.trim().split(seperator);\n}\n\n/**\n * \n * @param {*} arr \n */\nfunction strToNumArr(arr = []) {\n return arr.map(num => Number(num));\n}\n\n/**\n * \n * @param {*} num1 \n * @param {*} num2 \n */\nfunction matrixArray(num1, num2) {\n return Array(num1).fill(Array(num2));\n}\n\nfunction main(input) {\n let output = nameLookUp(input);\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n// Write your code here\nfunction nameLookUp(str) {\n\n let n = +str.trim();\n let arr = [];\n let max = [1];\n if (n > 1) {\n for (let index1 = 0; index1 < n; index1++) {\n arr[index1] = [];\n for (let index2 = 0; index2 < n; index2++) {\n\n if (index1 == 0 || index2 == 0) {\n arr[index1][index2] = 1;\n\n }\n else {\n let indexItem = arr[index1 - 1][index2] + arr[index1][index2 - 1];\n max.push(indexItem);\n arr[index1][index2] = indexItem;\n }\n\n\n }\n\n }\n }\n return Math.max(...max).toString();\n}\n\n\n\n\n\n\n\n\n"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let n = parseInt(readLine());\n let arr = [];\n for (var i = 0; i < n; i++) {\n arr.push([]);\n }\n for (var i = 0; i < n; i++) {\n arr[0].push(1);\n if (i + 1 < n) arr[i + 1].push(1);\n }\n for (var i = 1; i < n; i++) {\n for (var j = 1; j < n; j++) {\n arr[i].push(arr[i - 1][j] + arr[i][j - 1]);\n }\n }\n console.log(arr[n - 1][n - 1]);\n}\n\n// arr = [\n// [1, 1, 1, 1],\n// [1, 2, 3, 4],\n// [1, 3, 6, 10],\n// [1, 4, 10, 20],\n// ]"}, {"source_code": "var n = +readline(), numbers = [0,1,2,6,20,70,252,924,3432,12870,48620];\nwrite(numbers[n]);"}, {"source_code": "var n = readline();\n\nvar a = new Array(n);\n\nfor(var i=0;i Number(x));\n\n var n = input[0];\n\n var matrix = [];\n\n for (var i = 0; i < n; i++) {\n matrix[i] = [];\n for (var j = 0; j < n; j++) {\n if (i === 0 || j === 0) {\n matrix[i][j] = 1;\n } else {\n matrix[i][j] = matrix[i - 1][j] + matrix[i][j - 1];\n }\n }\n }\n\n return matrix[n - 1][n - 1];\n}"}, {"source_code": "var n = readline();\n //i-5 i-1\nvar str = [];\n\tfor (var i=0; in)\n\t\tstr[i]= Number(str[i-n])+Number(+str[i-1]);\n\t\tif (i%n==0)\n\t\tstr[i]= 1;\n\t}\n\t\t\n\tprint(Math.max.apply(this, str));"}, {"source_code": "var n = Number(readline());\n\nfunction f(i,j) {\n if (i===1) {\n return 1;\n }\n else {\n if (i===j) {\n return f(i-1,j)*2;\n }\n else {\n return f(i,j-1)+f(i-1,j);\n }\n }\n}\n\nprint(f(n,n));"}, {"source_code": "var n = Number(readline());\n\nvar matrix = [];\n\nfor (var i = 0; i < n; i++) {\n\tmatrix[i] = [];\n\n\tfor (var j = 0; j < n; j++) {\n\t\tif (i == 0 || j == 0) {\n\t\t\tmatrix[i][j] = 1;\n\t\t} else {\n\t\t\tmatrix[i][j] = matrix[i][j-1] + matrix[i-1][j];\n\t\t}\n\t}\n}\n\nprint(matrix[n-1][n-1]);"}, {"source_code": "\"use strict\";\n\nvar n = readline() - 1;\n\nvar f = function (x) {\n var result = 1;\n for (let i = 1; i <= x; ++i) {\n result *= i;\n }\n return result;\n};\n\nwrite(f(2 * n) / (f(n) * f(n)));\n"}, {"source_code": "n=Number(readline())\n\nvar f = (i,j) => i==1 ? 1 : (i==j ? (f(i-1,j)*2) : (f(i,j-1)+f(i-1,j)))\n\nprint(f(n,n))\n"}, {"source_code": "if (!readline) {\n var _i = 0;\n var readline = function() {\n _i ++;\n\n switch (_i) {\n case 1: return '10';\n }\n }\n\n var write = console.log;\n}\n\nvar n = +readline();\nvar a = [];\n\nfor (var i = 0; i < n; i ++) {\n a.push([]);\n for (var j = 0; j < n; j ++) {\n a[i].push(0);\n }\n a[i][0] = 1;\n a[0][i] = 1;\n}\n\nfor (var i = 1; i < n; i ++) {\n for (var j = 1; j < n; j ++) {\n a[i][j] = a[i-1][j] + a[i][j-1];\n }\n}\n\nwrite(a[n-1][n-1]);\n"}], "negative_code": [{"source_code": "var n = readline();\n //i-5 i-1\nvar str = [];\n\tfor (var i=0; i5)\n\t\tstr[i]= Number(str[i-n])+Number(+str[i-1]);\n\t\tif (i%n==0)\n\t\tstr[i]= 1;\n\t}\n\t\t\n\tprint(Math.max.apply(this, str));"}], "src_uid": "2f650aae9dfeb02533149ced402b60dc"} {"nl": {"description": "Valera the Horse is going to the party with friends. He has been following the fashion trends for a while, and he knows that it is very popular to wear all horseshoes of different color. Valera has got four horseshoes left from the last year, but maybe some of them have the same color. In this case he needs to go to the store and buy some few more horseshoes, not to lose face in front of his stylish comrades.Fortunately, the store sells horseshoes of all colors under the sun and Valera has enough money to buy any four of them. However, in order to save the money, he would like to spend as little money as possible, so you need to help Valera and determine what is the minimum number of horseshoes he needs to buy to wear four horseshoes of different colors to a party.", "input_spec": "The first line contains four space-separated integers s1, s2, s3, s4 (1 ≤ s1, s2, s3, s4 ≤ 109) — the colors of horseshoes Valera has. Consider all possible colors indexed with integers.", "output_spec": "Print a single integer — the minimum number of horseshoes Valera needs to buy.", "sample_inputs": ["1 7 3 3", "7 7 7 7"], "sample_outputs": ["1", "3"], "notes": null}, "positive_code": [{"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const arr = readLine()\n .split(\" \")\n .map((n) => parseInt(n));\n const map = {};\n let count = 0;\n arr.forEach((n) => {\n if (!map[n]) map[n] = 1;\n else count++;\n });\n\n console.log(count);\n}\n"}, {"source_code": "const readline = require(\"readline\")\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet arrOfShoes\nlet similarCounter = 0\n\nrl.on(\"line\", (input) => {\n if (!arrOfShoes) {\n arrOfShoes = input.split(\" \").map(Number)\n }\n if (arrOfShoes) {\n arrOfShoes.forEach((shoe,index) => {\n if(arrOfShoes.includes(shoe,index+1)){\n similarCounter++\n }\n });\n console.log(similarCounter)\n rl.close();\n\n }\n})"}, {"source_code": "\"use strict\";\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet inputString = \"\";\nlet currentLine = 0;\n\nprocess.stdin.on(\"data\", (inputStdin) => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((string) => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n const x = readline().split(\" \");\n \n \n horseshoeOnTheOtherHoof(x);\n}\n\nfunction horseshoeOnTheOtherHoof(colors) {\n console.log(4 - new Set(colors).size);\n\n}\n\n\n"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n input: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n obj = init(inLine);\n console.error(\"\\n\");\n var start = Date.now();\n Main();\n var end = Date.now() - start;\n myerr(\"time : \" + (end) + \"ms\");\n myerr(\"memory : \" + Math.round(process.memoryUsage().heapTotal / 1024) + \"KB\");\n});\nfunction makeClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n return {\n list : input, index : 0, max : input.length,\n hasNext : function(){return (this.index < this.max);},\n next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw \"ArrayIndexOutOfBoundsException ‚There is no more input\";}}\n };\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error(\"debug:\" + require(\"util\").inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(\" \");case 4:return i.split(\" \").map(Number);case 6:return i.split(\"\");case 7:return i.split(\"\").map(Number);case 8:return i.join(\" \");case 9:return i.join(\"\\n\");case 0:return i.join(\"\");default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var set = new Set(nextIntArray());\n myout(4 - set.size);\n}\n"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n\n main();\n});\n\nfunction readline() {\n return inputString[currentLine++];\n}\n\nfunction print(s) {\n process.stdout.write(`${s}`);\n}\n// Make a Snippet for the code above this and then write your logic in main();\n\nfunction main() {\n // input\n const a = readline().split(' ');\n let x = 0;\n const set = new Set();\n for (let i = 0; i < a.length; i++) {\n set.add(a[i]);\n }\n x = a.length - set.size;\n // output\n print(x);\n}\n\n"}, {"source_code": "//Is your horseshoe on the other hoof?\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n let lines = inp.split(EOL)[0].split(' ');\n \n process.stdout.write((lines.length - (new Set(lines)).size) + '');\n\n return;\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n const arr = d.split(' ');\n const uniqueArr = new Set(arr);\n const ans = arr.length - uniqueArr.size;\n\n console.log(ans);\n});\n"}, {"source_code": "const input = [];\n \nconst RL = require('readline').createInterface({\n input : process.stdin,\n output : process.stdout\n});\n \nRL.on('line', (line) => {\n input.push(line);\n});\n\nRL.on('close', () => {\n const set = new Set();\n input[0].split(' ').forEach(x => set.add(x));\n\n console.log(4 - set.size);\n});"}, {"source_code": "function main(stdin) {\n const horseshoes = stdin.split(\" \").map(v => parseInt(v));\n console.log(horseshoes.sort().reduce((ac, val, i, arr) => arr[i - 1] === val ? ac + 1 : ac, 0));\n}\n\nmain(\n require(\"fs\")\n .readFileSync(0, \"utf-8\")\n .trim()\n);\n"}, {"source_code": "'use strict';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n \n main(); \n});\n\nconst readLine=()=> inputString[currentLine++];\n/* ================================================ \n Main Solution Starts Here \n===================================================*/\n\nconst main=()=>{\n\tlet set=new Set()\n\tlet numbers = readLine().split(' ').map(n=>+n)\n\tnumbers.forEach(number=>set.add(number))\n\tconsole.log(4-set.size)\n}"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction isPrime(x) {\n\tlet s = Math.sqrt(x);\n\tlet i = 2;\n\twhile (i <= s) {\n\t\tif (x % i === 0) {\n\t\t\treturn false;\n\t\t}\n\t\ti++;\n\t}\n\treturn true;\n}\n\nfunction main() {\n\tlet hoes = readLine()\n\t\t.split(' ')\n\t\t.map(x => x >> 0);\n\n\tlet counter = {};\n\tlet spend = 0;\n\tfor (let i = 0; i < 4; ++i) counter[hoes[i]] = (counter[hoes[i]] || 0) + 1;\n\n\tObject.entries(counter).forEach(([k, v]) => {\n\t\tspend += v - 1;\n\t});\n\tconsole.log(spend);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let shoesArray = readLine().split(' ').map(Number);\n let selecTed = []; // [1, 7, 3, 3]\n for (let i = 0; i < shoesArray.length; i++) {\n if (selecTed.indexOf(shoesArray[i]) === -1) {\n selecTed.push(shoesArray[i]);\n }\n }\n let result = shoesArray.length - selecTed.length;\n console.log(result);\n}\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadline.on('line', line => { input.push(line); });\n\nreadline.on('close', () => {\n const n = input[0].split(' ');\n const ns = new Set(n);\n console.log(n.length - ns.size);\n});"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet currentLine = 0;\nlet inputString = \"\";\n\nprocess.stdin.on(\"data\", (raw_data) => {\n inputString += raw_data;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((line) => {\n return line.trim();\n });\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n/******** Main function*************/\n\nfunction main() {\n var arr = readLine().split(\" \").map(Number);\n\n var uniqArr = [...new Set(arr)];\n console.log(4 - uniqArr.length);\n}\n"}, {"source_code": "let fs = require('fs');\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(/[\\n\\r]/).filter(data => data.length > 0);\n\nfor (let i = 0; i < txt.length; i++) {\n console.log(4 - [...new Set(txt[i].split(/[ ]/))].length);\n\n}"}, {"source_code": "// Sample code to perform I/O:\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\nvar stdin_input = \"\";\n\nprocess.stdin.on(\"data\", function (input) {\n stdin_input += input; // Reading input from STDIN\n});\n\nprocess.stdin.on(\"end\", function () {\n main(stdin_input);\n});\n\nfunction main(input) {\n let output = nameLookUp(input);\n process.stdout.write(output); // Writing output to STDOUT\n}\n\n// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail\n\n// Write your code here\nfunction nameLookUp(str) {\n\n let inputs = str.trim().split(' ');\n let currentShoesIndex = [...new Set(inputs)].length;\n let shoesToBuy = 4 - currentShoesIndex;\n return shoesToBuy.toString();\n}\n\n\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nconst horseShoe = () => {\n let ar = input[0].split(' ');\n let ar2 = new Set(ar);\n\n console.log(4 - ar2.size);\n};\n\n\nreadLine.on('close', horseShoe);"}, {"source_code": "'use strict';\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\n\nlet inputString = '';\nlet currentLine = 0;\n\nprocess.stdin.on('data', inputStdin => {\n inputString += inputStdin;\n});\n\nprocess.stdin.on('end', _ => {\n inputString = inputString.replace(/\\s*$/, '')\n .split('\\n')\n .map(str => str.replace(/\\s*$/, ''));\n\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let arr = readLine().split(' ').map(value => parseInt(value));\n let newArr = [...new Set(arr)];\n console.log(arr.length - newArr.length);\n}"}, {"source_code": "\nvar m={};\nreadline().split(' ').forEach(function(v){ m[v]=true; });\nprint(4-Object.keys(m).length);"}, {"source_code": "var colors = readline().split(\" \"), counter = 0, c1, c2, c3, c4;\n\nc1 = [colors[0], colors.filter(function(a){return a == colors[0]}).length];\nc2 = [colors[1], colors.filter(function(a){return a == colors[1]}).length];\nc3 = [colors[2], colors.filter(function(a){return a == colors[2]}).length];\nc4 = [colors[3], colors.filter(function(a){return a == colors[3]}).length];\n\nif( c1[1] > 1 ){\n\tif( c1[0] == c2[0] ){\n\t\tcounter++;\n\t}\n\tif( c1[0] == c3[0] ){\n\t\tcounter++;\n\t}\n\tif( c1[0] == c4[0] ){\n\t\tcounter++;\n\t}\n}\nif( (c2[1] > 1) && (c2[0] != c1[0]) ){\n\tif( c2[0] == c3[0] ){\n\t\tcounter++;\n\t}\n\tif( c2[0] == c4[0] ){\n\t\tcounter++;\n\t}\n}\nif( (c3[1] > 1) && (c3[0] != c2[0]) && (c3[0] != c1[0]) ){\n\tif( c3[0] == c4[0] ){\n\t\tcounter++;\n\t}\n}\n\nwrite(counter);"}, {"source_code": "var input = readline().split(\" \");\n\nfunction solveProb(input) {\n var unique = [];\n var count = 4;\n\n for (var i = 0; i < input.length; i++) {\n if (!isThere(unique, input[i])) {\n unique.push(input[i]);\n count--;\n }\n if (count === 0) {\n return count;\n }\n }\n return count;\n}\n\nfunction isThere(arr, k) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === k) {\n return true;\n }\n }\n return false;\n}\n\nprint(solveProb(input));\n"}, {"source_code": "var needToBuy = 4\nvar horsesShoeOwned = {}\n \n var horsesShoe = readline().split(' ').map(Number)\n \n for (var i = 0; i < horsesShoe.length; i++) {\n if (!horsesShoeOwned.hasOwnProperty(horsesShoe[i])) {\n horsesShoeOwned[horsesShoe[i]] = 0\n needToBuy -= 1\n }\n }\n \n print(needToBuy)"}, {"source_code": "var input = readline().split(\" \").map(x=>parseInt(x));\nprint(4-[...new Set(input)].length)"}, {"source_code": ";(function () {\n\n\tvar s = readline().split(' ');\n\tvar m = {};\n\tvar t = 0;\n\n\tfor(var i = 0; i < 4; i++)\n\t\tif (m[s[i]]) t++;\n\t\telse m[s[i]] = true;\n\n\tprint(t);\n\n}).call(this);"}, {"source_code": "// var curReadLine=0;\n// var readlines=[\"1 7 3 3\"];\n\n// function readline(){\n// \treturn readlines[curReadLine++];\n// }\n// function print(x){\n// \tconsole.log(x);\n// }\nvar sameColour = 0;\nvar hoofsColours = readline().split(\" \");\n//console.log(hoofsColours);\n\n// var obj={};\n// for (i=0;i {\n obj[p] = 1;\n});\n\nwrite(4 - Object.keys(obj).length);\n "}, {"source_code": "function nextInt(){\n\treturn parseInt(next());\n}\nvar tokens = [];\nvar posToken = 0;\nfunction next(){\n\twhile(posToken>=tokens.length){\n\t\ttokens = readline().split(/[\\s]+/);\n\t\tposToken = 0;\n\t}\n\treturn tokens[posToken++];\n}\n\nfunction main(){\n\tvar i;\n\tvar set = Object.create(null);\n\tfor(i=0;i<4;i++){\n\t\tset[nextInt()]=1;\n\t}\n\tvar ans = 4; \n\tfor(var b in set)\n\t\tans--;\n\tprint(ans);\n}\nmain();\n"}, {"source_code": "var horse = readline().split(\" \").sort((x,y)=>x-y);\n\tvar newShoes = 0;\n\tfor (var i=0; i<4; i++){\n\t\t if (horse[i+1]==horse[i]){\n\t\t\tnewShoes++;\n\t\t }\n\t}\n print(newShoes);\n // console.log(newShoes);"}, {"source_code": "var x = readline().split(\" \"),\n\tn = x.length,\n\tc = 0;\nfor (var i = 0; i < n; i++) {\n\tvar k = true;\n\tfor (var j = i; j > 0; j--) {\n\t\tif (x[i] === x[j - 1]) {\n\t\t\tk = false;\n\t\t\tbreak;\n }\n }\n\tif (k) {\n for (var j = i + 1; j < n; j++) {\n if (x[i] === x[j]) {\n c++;\n }\n }\n }\n}\nprint(c);"}, {"source_code": "\tvar str = readline().split(\" \").sort((x,y)=>x-y);\n\tvar res = 0;\n\tfor (var i=0; i<4; i++){\n\t\t if (str[i+1]==str[i]){\n\t\t\tres++;\n\t\t }\n\t}\n\tprint(res);"}, {"source_code": "var p = readline().split(\" \")\nvar m = {};\nvar b = 0;\nfor (var i=0; i +value)).size);\n"}, {"source_code": "var boots = readline().split(\" \");\nvar set = new Set(boots);\nprint(boots.length - set.size)"}, {"source_code": "(function main() {\n function trim(s) { return s.replace(/^\\s+|\\s+$/gm, ''); } \n \n //var input = trim(readline());\n //var s2 = readline().toLowerCase();\n //var n = readline().split(' ').map(Number);\n var a = readline().split(' ').map(Number);\n var count = {};\n var lol = 0;\n for (var i = 0; i < 4; i++) {\n if (count[a[i]] === undefined) {\n count[a[i]] = 1;\n lol++;\n }\n }\n print( 4 - lol );\n})()"}, {"source_code": "var existing = readline().split(\" \").map(Number).sort((a, b) => a - b);\n\nvar buyCount = 0;\n\nfor (var i = 1; i < existing.length; i++) {\n if (existing[i - 1] === existing[i]) {\n buyCount++;\n }\n}\n\nprint(buyCount);"}], "negative_code": [{"source_code": "const readline = require(\"readline\")\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet arrOfShoes\nlet similarCounter = 0\n\nrl.on(\"line\", (input) => {\n if (!arrOfShoes) {\n arrOfShoes = input.split(\" \").map(Number)\n }\n if (arrOfShoes) {\n arrOfShoes.forEach((element1, index1) => {\n arrOfShoes.forEach((element2, index2) => {\n if (element1 === element2 && index1 != index2)\n similarCounter++\n })\n });\n switch (similarCounter) {\n case 12:\n console.log(12/4)\n rl.close();\n break;\n case 6 :\n console.log(6/3)\n rl.close();\n break;\n case 2 :\n console.log(2/2) \n rl.close(); \n default:\n break;\n }\n }\n})"}, {"source_code": "const readline = require(\"readline\")\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet arrOfShoes\nlet similarCounter = 0\n\nrl.on(\"line\", (input) => {\n if (!arrOfShoes) {\n arrOfShoes = input.split(\" \").map(Number)\n }\n if (arrOfShoes) {\n arrOfShoes.forEach((element1, index1) => {\n arrOfShoes.forEach((element2, index2) => {\n if (element1 === element2 && index1 != index2)\n similarCounter++\n })\n });\n switch (similarCounter) {\n case 12:\n console.log(12/4)\n rl.close();\n break;\n case 6 :\n console.log(6/3)\n rl.close();\n break;\n case 2 :\n console.log(2/2) \n rl.close(); \n case 0:\n console.log(0)\n rl.close()\n break;\n default:\n break;\n }\n }\n})"}, {"source_code": "const readline = require(\"readline\")\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet arrOfShoes\nlet similarCounter = 0\n\nrl.on(\"line\", (input) => {\n if (!arrOfShoes) {\n arrOfShoes = input.split(\" \").map(Number)\n }\n if (arrOfShoes) {\n arrOfShoes.forEach((element1, index1) => {\n arrOfShoes.forEach((element2, index2) => {\n if (element1 === element2 && index1 != index2)\n similarCounter++\n })\n });\n switch (similarCounter) {\n case 12:\n console.log(12/4)\n rl.close();\n break;\n case 6 :\n console.log(6/3)\n rl.close();\n break;\n case 2 :\n console.log(2/2) \n rl.close(); \n break;\n case 0:\n console.log(0)\n rl.close()\n break;\n default:\n break;\n }\n }\n})"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let shoesArray = readLine().split(' ').map(Number);\n let selecTed = [];\n for (let i = 0; i < shoesArray.length; i++) {\n if (selecTed.indexOf(shoesArray[i] === -1)) {\n selecTed.push(shoesArray[i]);\n }\n }\n console.log(shoesArray);\n console.log(selecTed);\n let result = shoesArray.length - selecTed.length;\n console.log(result);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let shoesArray = readLine().split(' ').map(Number);\n let selecTed = []; // [1, 7, 3, 3]\n for (let i = 0; i < shoesArray.length; i++) {\n let test = shoesArray[i];\n if (selecTed.indexOf(test === -1)) {\n selecTed.push(test);\n }\n }\n console.log(shoesArray);\n console.log(selecTed);\n let result = shoesArray.length - selecTed.length;\n console.log(result);\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let shoesArray = readLine().split(' ').map(Number);\n let selecTed = [];\n for (let i = 0; i < shoesArray.length; i++) {\n if (selecTed.indexOf(shoesArray[i] === -1)) {\n selecTed.push(shoesArray[i]);\n }\n }\n let result = shoesArray.length - selecTed.length;\n console.log(result);\n}\n"}, {"source_code": "var m={};\nreadline().split('').forEach(function(v){ m[v]=true; });\nprint(4-Object.keys(m).length);"}, {"source_code": "var horse = readline().split(\" \").sort((x,y)=>x-y);\n\tvar newShoes = 0;\n\tfor (var i=0; i {\n if (l === 0) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else if (l === 1) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let wg = w[0]\n let hg = h[0]\n w.push(inp[0])\n h.push(inp[1])\n if (h[1] < h[2]) {\n let aux = h[1]\n h[1] = h[2]\n h[2] = aux\n aux = w[1]\n w[1] = w[2]\n w[2] = aux\n }\n for (let i = h[0]; i >= h[1]; i--) {\n wg += i\n hg--\n }\n\n wg -= w[1]\n if (wg < 0)\n wg = 0\n if (hg <= 0) {\n console.log(wg)\n return\n }\n for (let i = h[1] - 1; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n if (wg < 0)\n wg = 0\n for (let i = hg; i >= 0; i--) {\n wg += i;\n }\n console.log(wg)\n }\n l++\n});\n"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n input = chunk.split(re).slice(0, -1);\n let [w, h, u1, d1, u2, d2] = input.map(value => parseInt(value));\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w -= u1;\n if (h == d2) w -= u2;\n w = Math.max(w, 0);\n }\n console.log(w);\n process.exit();\n }\n});"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet input = [];\nrl.on('line', (inputString) => {\n let [x, y] = inputString.split(' ').map(v => parseInt(v));\n input = input.concat([x, y]);\n if (input.length == 6) {\n let [w, h, u1, d1, u2, d2] = input;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w -= u1;\n if (h == d2) w -= u2;\n if (w < 0) w = 0;\n }\n console.log(w);\n process.exit();\n }\n});\n"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n input = chunk.split(re).slice(0, 6);\n console.log(snowball.apply(null, input.map(value => parseInt(value))));\n process.exit(0);\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w = Math.max(w - u1, 0);\n if (h == d2) w = Math.max(w - u2, 0);\n }\n return w;\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n input = chunk.split(re).slice(0, -1);\n let myinput = input.map(value => parseInt(value));\n console.log(snowball.apply(null, myinput));\n process.exit(0);\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w -= u1;\n if (h == d2) w -= u2;\n if (w < 0) w = 0;\n }\n return w;\n}"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet input = [];\nrl.on('line', (inputString) => {\n let [x, y] = inputString.split(' ').map(v => parseInt(v));\n input = input.concat([x, y]);\n if (input.length == 6) {\n let [w, h, u1, d1, u2, d2] = input;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w -= u1;\n if (h == d2) w -= u2;\n w = Math.max(w, 0);\n }\n console.log(w);\n process.exit();\n }\n});\n"}, {"source_code": "process.stdin.setEncoding('utf8');\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n let input = chunk.split(re).slice(0, -1);\n console.log(snowball.apply(null, input.map(value => parseInt(value))));\n process.exit(0);\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w = Math.max(w - u1, 0);\n if (h == d2) w = Math.max(w - u2, 0);\n }\n return w;\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n let input = chunk.split(re).slice(0, -1);\n console.log(snowball.apply(null, input.map(value => parseInt(value))));\n process.exit(0);\n }\n});\n\nfunction snowball(w, h, u1, d1, u2, d2) {\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w -= u1;\n if (h == d2) w -= u2;\n w = Math.max(w, 0);\n }\n return w;\n}"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nrl.on('line', (inputString) => {\n let [x, y] = inputString.split(' ').map(v => parseInt(v));\n if (!rl.on.input) rl.on.input = [];\n rl.on.input = rl.on.input.concat([x, y]);\n if (rl.on.input.length == 6) {\n sb.apply(null, rl.on.input);\n process.exit();\n }\n});\n\nfunction sb(w, h, u1, d1, u2, d2) {\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w -= u1;\n if (h == d2) w -= u2;\n w = Math.max(0, w);\n }\n console.log(w);\n}\n"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n input = chunk.split(re).slice(0, -1);\n let myinput = input.map(value => parseInt(value));\n console.log(snowball.apply(null, myinput));\n process.exit(0);\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w = (w - u1) > 0 ? (w - u1) : 0;\n if (h == d2) w = (w - u2) > 0 ? (w - u2) : 0;\n }\n return w;\n}"}, {"source_code": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\nlet input = [];\nrl.on('line', (inputString) => {\n input = input.concat(inputString.split(' '));\n if (input.length == 6) {\n let [w, h, u1, d1, u2, d2] = input.map(v => parseInt(v));\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w -= u1;\n if (h == d2) w -= u2;\n w = Math.max(w, 0);\n }\n console.log(w);\n process.exit();\n }\n});"}, {"source_code": "const readline = require('readline');\n\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nfunction readLines(number, cb) {\n const lines = [];\n rl.on('line', function(line) {\n lines.push(line);\n if (lines.length === number) {\n rl.close();\n cb(lines);\n }\n });\n};\n\nfunction readLines(number, cb) {\n const lines = [];\n rl.on('line', function(line) {\n lines.push(line);\n if (lines.length === number) {\n rl.close();\n cb(lines);\n }\n });\n};\n\nfunction doIt(lines) {\n const snowBall = lines[0].split(\" \").map(x => parseInt(x));\n const stoneOne = lines[1].split(\" \").map(x => parseInt(x));\n const stoneTwo = lines[2].split(\" \").map(x => parseInt(x));\n\n let snowW = snowBall[0];\n let snowH = snowBall[1];\n \n for (let i = snowH; i>=0; i--) {\n snowW = snowW+i;\n if (i === stoneOne[1]) {\n snowW -= stoneOne[0];\n }\n\n if (i === stoneTwo[1]) {\n snowW -= stoneTwo[0];\n }\n if (snowW < 0)\n snowW = 0;\n }\n console.log(snowW);\n}\n\nreadLines(3, doIt);"}, {"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n var one = nextIntArray();\n var w = one[0];\n var h = one[1];\n var two = nextIntArray();\n var three = nextIntArray();\n var u1 = two[0];\n var d1 = two[1];\n var u2 = three[0];\n var d2 = three[1];\n for(var i = h; i >= 0; i--){\n w += i;\n if(i == d1){\n w -= u1;\n }\n if(i == d2){\n w -= u2;\n }\n if(w < 0){\n w = 0;\n }\n }\n myout(w);\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet w, h;\nlet u1, u2, d1, d2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n [w, h] = d.split(' ').map(Number);\n return;\n }\n\n if (c === 1) {\n c++;\n [u1, d1] = d.split(' ').map(Number);\n return;\n }\n\n [u2, d2] = d.split(' ').map(Number);\n\n c++;\n});\n\nrl.on('close', () => {\n let ans = w;\n\n while (h > 0) {\n ans += h;\n\n if (h === d1) {\n ans -= u1;\n }\n\n if (h === d2) {\n ans -= u2;\n }\n\n if (ans < 0) {\n ans = 0;\n }\n\n h--;\n }\n\n console.log(Math.max(0, ans));\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nlet w = []\nlet h = []\n\nrl.on('line', (input) => {\n if (l === 0) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else if (l === 1) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let wg = w[0]\n let hg = h[0]\n w.push(inp[0])\n h.push(inp[1])\n if (h[1] < h[2]) {\n let aux = h[1]\n h[1] = h[2]\n h[2] = aux\n aux = w[1]\n w[1] = w[2]\n w[2] = aux\n }\n for (let i = h[0]; i >= h[1]; i--) {\n wg += i\n hg--\n }\n\n wg -= w[1]\n if (wg < 0)\n wg = 0\n if (hg <= 0) {\n console.log(wg)\n return\n }\n for (let i = h[1] - 1; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n if (wg < 0)\n wg = 0\n for (let i = hg; i >= 0; i--) {\n wg += i;\n }\n console.log(wg)\n }\n l++\n});\n"}, {"source_code": "var ar1=readline().split(\" \");\nvar ar2=readline().split(\" \");\nvar ar3=readline().split(\" \");\nvar w=parseInt(ar1[0]),h=parseInt(ar1[1]);\nvar w1=parseInt(ar2[0]),h1=parseInt(ar2[1]);\nvar w2=parseInt(ar3[0]),h2=parseInt(ar3[1]);\nwhile(h!==0){\n\tw+=h;\n\tif(h===h1){w-=w1;}\n\telse if(h===h2){w-=w2;}\n\th--;\n\tif(w<0){w=0;}\n\tif(h===0){\n\t\tif(h===h1){w-=w1;}\n\telse if(h===h2){w-=w2;}\n\t}\n}print(w);"}], "negative_code": [{"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n input = chunk.split(re).slice(0, -1);\n let myinput = input.map(value => parseInt(value));\n console.log(snowball.apply(null, myinput));\n process.exit(0);\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w -= u1;\n if (h == d2) w -= u2;\n if (!w) w = 0;\n }\n return w;\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n input = input.concat(chunk.slice(0, -1).split(' '));\n if (input.length == 6) {\n let myinput = input.map(value => parseInt(value));\n console.log(snowball.apply(null, myinput));\n //process.exit(0);\n }\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w = w - u1 ? w - u1 : 0;\n if (h == d2) w = w - u2 ? w - u2 : 0;\n }\n return w;\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n input = chunk.split(re).slice(0, -1);\n let myinput = input.map(value => parseInt(value));\n console.log(input);\n console.log(snowball.apply(null, myinput));\n process.exit(0);\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w = (w - u1) > 0 ? (w - u1) : 0;\n if (h == d2) w = (w - u2) > 0 ? (w - u2) : 0;\n }\n return w;\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n| /;\n input = chunk.split(re).slice(0, -1);\n let myinput = input.map(value => parseInt(value));\n console.log(snowball.apply(null, myinput));\n process.exit(0);\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w = w - u1 ? w - u1 : 0;\n if (h == d2) w = w - u2 ? w - u2 : 0;\n }\n return w;\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n input = input.concat(chunk.slice(0, -1).split(' '));\n if (input.length == 6) {\n let myinput = input.map(value => parseInt(value));\n console.log(snowball.apply(null, myinput));\n process.exit(0);\n }\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w = w - u1 ? w - u1 : 0;\n if (h == d2) w = w - u2 ? w - u2 : 0;\n }\n return w;\n}"}, {"source_code": "process.stdin.setEncoding('utf8');\nlet input = [];\nprocess.stdin.on('readable', () => {\n const chunk = process.stdin.read();\n if (chunk !== null) {\n let re = /\\n\\s*| /;\n input = chunk.split(re).slice(0, -1);\n let myinput = input.map(value => parseInt(value));\n process.exit(0);\n }\n});\n\nfunction snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w += h;\n if (h == d1) w = (w - u1) > 0 ? (w - u1) : 0;\n if (h == d2) w = (w - u2) > 0 ? (w - u2) : 0;\n }\n return w;\n}"}, {"source_code": "function snowball(weight, height, u1, d1, u2, d2) {\n let w = weight, h = height;\n for (; h >= 0; h--) {\n w = w + h;\n if (h == d2) {\n w = w - u2 ? w - u2 : 0;\n }\n if (h == d1) {\n w = w - u1 ? w - u1 : 0;\n }\n }\n return w;\n}\n\n[w, h, u1, d1, u2, d2] = process.argv.slice(2).map((value) => parseInt(value));\nweight = snowball(w, h, u1, d1, u2, d2);\nconsole.log(weight);"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet w, h;\nlet u1, u2, d1, d2;\n\nrl.on('line', (d) => {\n if (c === 0) {\n c++;\n [w, h] = d.split(' ').map(Number);\n return;\n }\n\n if (c === 1) {\n c++;\n [u1, d1] = d.split(' ').map(Number);\n return;\n }\n\n [u2, d2] = d.split(' ').map(Number);\n\n c++;\n});\n\nrl.on('close', () => {\n let ans = w;\n\n ans += h*(h+1) / 2;\n ans -= u1;\n ans -= u2;\n ans = Math.max(0, ans);\n\n console.log(ans);\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nlet w = []\nlet h = []\n\nrl.on('line', (input) => {\n if (l === 0) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else if (l === 1) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let wg = w[0]\n let hg = h[0]\n w.push(inp[0])\n h.push(inp[1])\n if (h[1] > h[2]) {\n for (let i = h[0]; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (hg <= 0) {\n if (wg < 0)\n wg = 0\n console.log(wg)\n return\n }\n for (let i = h[1] - 1; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n if (hg > 0)\n wg += hg\n if (wg < 0)\n wg = 0\n console.log(wg)\n } else {\n for (let i = h[0]; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n\n if (hg <= 0) {\n if (wg < 0)\n wg = 0\n console.log(wg)\n return\n }\n\n for (let i = h[2] - 1; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (hg > 0)\n wg += hg\n if (wg < 0)\n wg = 0\n console.log(wg)\n }\n }\n l++\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nlet w = []\nlet h = []\n\nrl.on('line', (input) => {\n if (l === 0) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else if (l === 1) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let wg = w[0]\n let hg = h[0]\n w.push(inp[0])\n h.push(inp[1])\n if (h[1] > h[2]) {\n hg++\n for (let i = h[0]; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (hg <= 0) {\n if (wg < 0)\n wg = 0\n console.log(wg)\n return\n }\n hg--\n for (let i = h[1] - 1; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n if (hg > 0)\n wg += hg\n if (wg < 0)\n wg = 0\n console.log(wg)\n } else {\n hg++\n for (let i = h[0]; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n\n if (hg <= 0) {\n if (wg < 0)\n wg = 0\n console.log(wg)\n return\n }\n\n for (let i = h[2] - 1; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (hg > 0)\n wg += hg\n if (wg < 0)\n wg = 0\n console.log(wg)\n }\n }\n l++\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nlet w = []\nlet h = []\n\nrl.on('line', (input) => {\n if (l === 0) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else if (l === 1) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let wg = w[0]\n let hg = h[0]\n w.push(inp[0])\n h.push(inp[1])\n if (h[1] > h[2]) {\n for (let i = h[0]; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (wg < 0)\n wg = 0\n if (hg <= 0) {\n console.log(wg)\n return\n }\n for (let i = h[1] - 1; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n if (wg < 0)\n wg = 0\n\n if (hg > 0)\n wg += hg\n console.log(wg)\n } else {\n for (let i = h[0]; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n if (wg < 0)\n wg = 0\n if (hg <= 0) {\n console.log(wg)\n return\n }\n for (let i = h[2] - 1; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (wg < 0)\n wg = 0\n if (hg > 0)\n wg += hg\n console.log(wg)\n }\n }\n l++\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nlet w = []\nlet h = []\n\nrl.on('line', (input) => {\n if (l === 0) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else if (l === 1) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let wg = w[0]\n let hg = h[0]\n w.push(inp[0])\n h.push(inp[1])\n if (h[1] > h[2]) {\n hg++\n for (let i = h[0]; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (hg <= 0) {\n if (wg < 0)\n wg = 0\n console.log(wg)\n return\n }\n\n for (let i = h[1] - 1; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n if (wg < 0)\n wg = 0\n console.log(wg)\n } else {\n hg++\n for (let i = h[0]; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n\n if (hg <= 0) {\n if (wg < 0)\n wg = 0\n console.log(wg)\n return\n }\n\n for (let i = h[2] - 1; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (wg < 0)\n wg = 0\n console.log(wg)\n }\n }\n l++\n});\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nlet l = 0;\nlet w = []\nlet h = []\n\nrl.on('line', (input) => {\n if (l === 0) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else if (l === 1) {\n let inp = input.split(\" \").map(x => parseInt(x))\n w.push(inp[0])\n h.push(inp[1])\n } else {\n rl.close();\n let inp = input.split(\" \").map(x => parseInt(x))\n let wg = w[0]\n let hg = h[0]\n w.push(inp[0])\n h.push(inp[1])\n if (h[1] > h[2]) {\n hg++\n for (let i = h[0]; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n if (hg <= 0) {\n console.log(wg)\n return\n }\n\n for (let i = h[1] - 1; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n console.log(wg)\n } else {\n hg++\n for (let i = h[0]; i >= h[2]; i--) {\n wg += i\n hg--\n }\n wg -= w[2]\n\n if (hg <= 0) {\n console.log(wg)\n return\n }\n\n for (let i = h[2] - 1; i >= h[1]; i--) {\n wg += i\n hg--\n }\n wg -= w[1]\n console.log(wg)\n }\n }\n l++\n});\n"}], "src_uid": "084a12eb3a708b43b880734f3ee51374"} {"nl": {"description": "Petya and Vasya decided to play a game. They have n cards (n is an even number). A single integer is written on each card.Before the game Petya will choose an integer and after that Vasya will choose another integer (different from the number that Petya chose). During the game each player takes all the cards with number he chose. For example, if Petya chose number 5 before the game he will take all cards on which 5 is written and if Vasya chose number 10 before the game he will take all cards on which 10 is written.The game is considered fair if Petya and Vasya can take all n cards, and the number of cards each player gets is the same.Determine whether Petya and Vasya can choose integer numbers before the game so that the game is fair. ", "input_spec": "The first line contains a single integer n (2 ≤ n ≤ 100) — number of cards. It is guaranteed that n is an even number. The following n lines contain a sequence of integers a1, a2, ..., an (one integer per line, 1 ≤ ai ≤ 100) — numbers written on the n cards.", "output_spec": "If it is impossible for Petya and Vasya to choose numbers in such a way that the game will be fair, print \"NO\" (without quotes) in the first line. In this case you should not print anything more. In the other case print \"YES\" (without quotes) in the first line. In the second line print two distinct integers — number that Petya should choose and the number that Vasya should choose to make the game fair. If there are several solutions, print any of them.", "sample_inputs": ["4\n11\n27\n27\n11", "2\n6\n6", "6\n10\n20\n30\n20\n10\n20", "6\n1\n1\n2\n2\n3\n3"], "sample_outputs": ["YES\n11 27", "NO", "NO", "NO"], "notes": "NoteIn the first example the game will be fair if, for example, Petya chooses number 11, and Vasya chooses number 27. Then the will take all cards — Petya will take cards 1 and 4, and Vasya will take cards 2 and 3. Thus, each of them will take exactly two cards.In the second example fair game is impossible because the numbers written on the cards are equal, but the numbers that Petya and Vasya should choose should be distinct.In the third example it is impossible to take all cards. Petya and Vasya can take at most five cards — for example, Petya can choose number 10 and Vasya can choose number 20. But for the game to be fair it is necessary to take 6 cards."}, "positive_code": [{"source_code": "(function() {\n \nvar line = Number(readline());\nvar numbers = {};\nfor (var i = 0; i < line; i++) {\n var next = Number(readline());\n numbers[next] = (numbers[next] || 0) + 1;\n if (Object.keys(numbers).length > 2) {\n print('NO');\n return;\n }\n}\nvar keys = Object.keys(numbers);\nif (keys.length === 2 && numbers[keys[0]] === numbers[keys[1]]) {\n print('YES\\n' + keys.join(' '));\n} else {\n print('NO');\n}\n\n})()"}, {"source_code": "var n = parseInt(readline());\nvar a = [];\nfor(var i = 0; i < n;i++){\n\ta[i] = parseInt(readline());\n}\n// var a = [14,14,14,14,32,32,32,32];\n\nfunction main(a){\n\tvar len = a.length;\n\tvar map = new Map();\n\tfor(var i = 0; i < len;i++){\n\t\tif(map.has(a[i])){\n\t\t\tmap.set(a[i],map.get(a[i])+1)\n\t\t}else{\n\t\t\tmap.set(a[i],1);\n\t\t}\n\t}\n\tvar len1 = map.size;\n\tif(len1 != 2){\n\t\tprint('NO');\n\t\t// console.log(\"NO\");\n\t}\n\telse {\n\t\tfor(var j = 0; j < len1-1;j++){\n\t\t\tif(map.get(a[j]) === n/2){\n\t\t\t\t// console.log(map.get(a[j]), map.get(a[j+1]));\n\t\t\t\t// console.log(\"YES\");\n\t\t\t\tprint('YES');\n\t\t\t\tvar item = map.keys();\n\t\t\t\t// console.log(item.next().value+' '+item.next().value);\n\t\t\t\tprint(item.next().value+' '+item.next().value)\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprint('NO');\n\t\t\t\t// console.log(\"NO\");\n\t\t\t}\t\n\t\t}\n\t}\n}\nmain(a);"}], "negative_code": [{"source_code": "var n = parseInt(readline());\nvar a = [];\nfor(var i = 0; i < n;i++){\n\ta[i] = parseInt(readline());\n}\n// var a = [14,14,14,14,32,32,32,32];\nfunction main(a){\n\tvar len = a.length;\n\tvar map = new Map();\n\tfor(var i = 0; i < len;i++){\n\t\tif(map.has(a[i])){\n\t\t\tmap.set(a[i],map.get(a[i])+1)\n\t\t}else{\n\t\t\tmap.set(a[i],1);\n\t\t}\n\t}\n\tvar len1 = map.size;\n\tif(len1 != 2){\n\t\tprint('NO');\n\t\t// console.log(\"NO\");\n\t}\n\telse {\n\t\tfor(var j = 0; j < len1-1;j++){\n\t\t\tif(map.get(a[j]) === map.get(a[j+1])){\n\t\t\t\t// console.log(map.get(a[j]), map.get(a[j+1]));\n\t\t\t\t// console.log(\"YES\");\n\t\t\t\tprint('YES');\n\t\t\t\tvar item = map.keys();\n\t\t\t\t// console.log(item.next().value+' '+item.next().value);\n\t\t\t\tprint(item.next().value+' '+item.next().value)\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprint('NO');\n\t\t\t\t// console.log(\"NO\");\n\t\t\t}\t\n\t\t}\n\t}\n}\nmain(a);"}, {"source_code": "var n = parseInt(readline());\nvar a = [];\nfor(var i = 0; i < n;i++){\n\ta[i] = parseInt(readline());\n}\n// var a = [1,1,2,2,3,3];\nfunction main(a){\n\tvar len = a.length;\n\tvar map = new Map();\n\tfor(var i = 0; i < len;i++){\n\t\tif(map.has(a[i])){\n\t\t\tmap.set(a[i],map.get(a[i])+1)\n\t\t}else{\n\t\t\tmap.set(a[i],1);\n\t\t}\n\t}\n\tvar len1 = map.size;\n\tif(len1 != 2){\n\t\tprint('NO');\n\t}\n\telse {\n\t\tfor(var i = 0; i < len1-1;i++){\n\t\t\tif(map.get(a[i]) === map.get(a[i+1])){\n\t\t\t\t// console.log(map.get(a[i]), map.get(a[i+1]));\n\t\t\t\t// console.log(\"Yes\");\n\t\t\t\t// console.log(a[i], a[i+1]);\n\t\t\t\tprint('YES');\n\t\t\t\tprint(a[i],a[i+1]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprint('NO');\n\t\t\t}\t\n\t\t}\n\t}\n}\nmain(a);"}], "src_uid": "2860b4fb22402ea9574c2f9e403d63d8"} {"nl": {"description": "The only difference between easy and hard versions is the length of the string.You are given a string $$$s$$$ and a string $$$t$$$, both consisting only of lowercase Latin letters. It is guaranteed that $$$t$$$ can be obtained from $$$s$$$ by removing some (possibly, zero) number of characters (not necessary contiguous) from $$$s$$$ without changing order of remaining characters (in other words, it is guaranteed that $$$t$$$ is a subsequence of $$$s$$$).For example, the strings \"test\", \"tst\", \"tt\", \"et\" and \"\" are subsequences of the string \"test\". But the strings \"tset\", \"se\", \"contest\" are not subsequences of the string \"test\".You want to remove some substring (contiguous subsequence) from $$$s$$$ of maximum possible length such that after removing this substring $$$t$$$ will remain a subsequence of $$$s$$$.If you want to remove the substring $$$s[l;r]$$$ then the string $$$s$$$ will be transformed to $$$s_1 s_2 \\dots s_{l-1} s_{r+1} s_{r+2} \\dots s_{|s|-1} s_{|s|}$$$ (where $$$|s|$$$ is the length of $$$s$$$).Your task is to find the maximum possible length of the substring you can remove so that $$$t$$$ is still a subsequence of $$$s$$$.", "input_spec": "The first line of the input contains one string $$$s$$$ consisting of at least $$$1$$$ and at most $$$200$$$ lowercase Latin letters. The second line of the input contains one string $$$t$$$ consisting of at least $$$1$$$ and at most $$$200$$$ lowercase Latin letters. It is guaranteed that $$$t$$$ is a subsequence of $$$s$$$.", "output_spec": "Print one integer — the maximum possible length of the substring you can remove so that $$$t$$$ is still a subsequence of $$$s$$$.", "sample_inputs": ["bbaba\nbb", "baaba\nab", "abcde\nabcde", "asdfasdf\nfasd"], "sample_outputs": ["3", "2", "0", "3"], "notes": null}, "positive_code": [{"source_code": "if (process.env.ANT)\n{\n global.print = this.print ||\n function(){console.log([...arguments].join(' '))} ||\n require('lol-io').print;\n global.debug = function(){console.log('debug:', [...arguments].join(' '))}\n global.write = this.write || require('lol-io').write\n global.readline = this.readline || require('lol-io').readline\n main();\n}\nelse\n{\n const rl = require('readline').createInterface({ input: process.stdin,\n output: process.stdout });\n global.print = console.log\n global.debug = ()=>{};\n global.write = (...args) => {\n process.stdout.write(args.join(' '));\n }\n const lines = []\n rl.on('line', line =>{\n lines.push(line);\n });\n rl.on('close', main)\n let rli = 0;\n global.readline = ()=>lines[rli++];\n}\n\n///////////// CODE\n\nfunction main(){\n let D = [];\n\n let s = readline();\n let t = readline();\n\n function test(i, m)\n {\n debug('test ', i, m)\n let is = 0, it = 0;\n if (is==i)\n is += m;\n while (it max) max = b[i+1] - a[i] - 1;\n}\n\nwrite(max);\n"}, {"source_code": "'use strict'\n \nconst s = readline();\nconst t = readline();\n\nconst a = [], b = [];\nlet i = -1, j = 0;\n\nwhile (j < t.length && i < s.length - 1) {\n if (s[++i] === t[j]) a[j++] = i\n}\n\ni = s.length; j = t.length - 1;\n\nwhile (j !== -1 && i !== 0 ) {\n if (s[--i] === t[j]) b[j--] = i\n}\n\nlet max = Math.max(b[0], s.length - 1 - a[a.length - 1]);\n\nfor (let i = 0; i < t.length - 1; i++) {\n if (b[i+1] - a[i] - 1 > max) max = b[i+1] - a[i] - 1;\n}\n\nwrite(max);"}], "negative_code": [{"source_code": "if (process.env.ANT)\n{\n global.print = this.print ||\n function(){console.log([...arguments].join(' '))} ||\n require('lol-io').print;\n global.debug = function(){console.log('debug:', [...arguments].join(' '))}\n global.write = this.write || require('lol-io').write\n global.readline = this.readline || require('lol-io').readline\n main();\n}\nelse\n{\n const rl = require('readline').createInterface({ input: process.stdin,\n output: process.stdout });\n global.print = console.log\n global.debug = ()=>{};\n global.write = (...args) => {\n process.stdout.write(args.join(' '));\n }\n const lines = []\n rl.on('line', line =>{\n lines.push(line);\n });\n rl.on('close', main)\n let rli = 0;\n global.readline = ()=>lines[rli++];\n}\n\n///////////// CODE\n\nfunction main(){\n let D = [];\n\n let s = readline();\n let t = readline();\n\n function test(i, m)\n {\n debug('test ', i, m)\n let is = 0, it = 0;\n if (is==i)\n is += m;\n while (it {\n const a = [], b = [];\n let i = -1, j = 0;\n while (j < t.length && i < s.length - 1) {\n if (s[++i] === t[j]) a[j++] = i\n }\n i = s.length; j = t.length - 1;\n while (j !== -1 && i !== 0 ) {\n if (s[--i] === t[j]) b[j--] = i\n }\n\n let max = Math.max(b[0], s.length - 1 - a[a.length - 1]);\n for (let i = 0; i < t.length - 1; i++) {\n if (b[i+1] - a[i] - 1 > max) max = b[i+1] - a[i] - 1;\n }\n return max;\n}"}], "src_uid": "0fd33e1bdfd6c91feb3bf00a2461603f"} {"nl": {"description": "The protection of a popular program developed by one of IT City companies is organized the following way. After installation it outputs a random five digit number which should be sent in SMS to a particular phone number. In response an SMS activation code arrives.A young hacker Vasya disassembled the program and found the algorithm that transforms the shown number into the activation code. Note: it is clear that Vasya is a law-abiding hacker, and made it for a noble purpose — to show the developer the imperfection of their protection.The found algorithm looks the following way. At first the digits of the number are shuffled in the following order <first digit><third digit><fifth digit><fourth digit><second digit>. For example the shuffle of 12345 should lead to 13542. On the second stage the number is raised to the fifth power. The result of the shuffle and exponentiation of the number 12345 is 455 422 043 125 550 171 232. The answer is the 5 last digits of this result. For the number 12345 the answer should be 71232.Vasya is going to write a keygen program implementing this algorithm. Can you do the same?", "input_spec": "The only line of the input contains a positive integer five digit number for which the activation code should be found.", "output_spec": "Output exactly 5 digits without spaces between them — the found activation code of the program.", "sample_inputs": ["12345"], "sample_outputs": ["71232"], "notes": null}, "positive_code": [{"source_code": "// since javascript only has 53bit number, \n// we need to operate it as big number by using string\nfunction multiply(x, strNum)\n{\n\tvar carry = 0;\n\tvar num = strNum.split('').map(Number).reverse();\n\tvar result = [];\n\n\tfor(var i = 0; i < num.length; i++)\n\t{\n\t\tvar prod = x * num[i] + carry;\n\t\tresult.push(prod % 10);\n\t\tcarry = Math.floor(prod / 10);\n\t}\n\n\t// the possible biggest carry is \n\t// 99999 * 9 = 899991\n\twhile(carry)\n\t{\n\t\tresult.push(carry % 10);\n\t\tcarry = Math.floor(carry / 10);\n\t}\n\n\treturn result.reverse().join('');\n}\n\nfunction pow(x, pow)\n{\n\tvar result = '1';\n\tfor(var i = 0; i < pow; i++)\n\t\tresult = multiply(x, result);\n\n\treturn result;\n}\n\n\nvar input = readline();\nvar digits = input[0] + input[2] + input[4] + input[3] + input[1];\n\nvar result = pow(digits, 5);\nprint(result.substr(result.length - 5));"}, {"source_code": "\nfunction multiply(x, strNum)\n{\n\tvar carry = 0;\n\tvar num = strNum.split('').map(Number).reverse();\n\tvar result = [];\n\n\tfor(var i = 0; i < num.length; i++)\n\t{\n\t\tvar prod = x * num[i] + carry;\n\t\tresult.push(prod % 10);\n\t\tcarry = Math.floor(prod / 10);\n\t}\n\n\twhile(carry)\n\t{\n\t\tresult.push(carry % 10);\n\t\tcarry = Math.floor(carry / 10);\n\t}\n\n\treturn result.reverse().join('');\n}\n\nfunction pow(x, pow)\n{\n\tvar result = '1';\n\tfor(var i = 0; i < pow; i++)\n\t\tresult = multiply(x, result);\n\n\treturn result;\n}\n\n\nvar input = readline();\nvar digits = input[0] + input[2] + input[4] + input[3] + input[1];\n\nvar result = pow(digits, 5);\nprint(result.substr(result.length - 5));"}], "negative_code": [], "src_uid": "51b1c216948663fff721c28d131bf18f"} {"nl": {"description": "Natasha is going to fly to Mars. She needs to build a rocket, which consists of several stages in some order. Each of the stages is defined by a lowercase Latin letter. This way, the rocket can be described by the string — concatenation of letters, which correspond to the stages.There are $$$n$$$ stages available. The rocket must contain exactly $$$k$$$ of them. Stages in the rocket should be ordered by their weight. So, after the stage with some letter can go only stage with a letter, which is at least two positions after in the alphabet (skipping one letter in between, or even more). For example, after letter 'c' can't go letters 'a', 'b', 'c' and 'd', but can go letters 'e', 'f', ..., 'z'.For the rocket to fly as far as possible, its weight should be minimal. The weight of the rocket is equal to the sum of the weights of its stages. The weight of the stage is the number of its letter in the alphabet. For example, the stage 'a 'weighs one ton,' b 'weighs two tons, and' z' — $$$26$$$ tons.Build the rocket with the minimal weight or determine, that it is impossible to build a rocket at all. Each stage can be used at most once.", "input_spec": "The first line of input contains two integers — $$$n$$$ and $$$k$$$ ($$$1 \\le k \\le n \\le 50$$$) – the number of available stages and the number of stages to use in the rocket. The second line contains string $$$s$$$, which consists of exactly $$$n$$$ lowercase Latin letters. Each letter defines a new stage, which can be used to build the rocket. Each stage can be used at most once.", "output_spec": "Print a single integer — the minimal total weight of the rocket or -1, if it is impossible to build the rocket at all.", "sample_inputs": ["5 3\nxyabd", "7 4\nproblem", "2 2\nab", "12 1\nabaabbaaabbb"], "sample_outputs": ["29", "34", "-1", "1"], "notes": "NoteIn the first example, the following rockets satisfy the condition: \"adx\" (weight is $$$1+4+24=29$$$); \"ady\" (weight is $$$1+4+25=30$$$); \"bdx\" (weight is $$$2+4+24=30$$$); \"bdy\" (weight is $$$2+4+25=31$$$).Rocket \"adx\" has the minimal weight, so the answer is $$$29$$$.In the second example, target rocket is \"belo\". Its weight is $$$2+5+12+15=34$$$.In the third example, $$$n=k=2$$$, so the rocket must have both stages: 'a' and 'b'. This rocket doesn't satisfy the condition, because these letters are adjacent in the alphabet. Answer is -1."}, "positive_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet n, k;\n\nrl.on('line', (d) => {\n if (c === 0) {\n [n, k] = d.split(' ').map(Number);\n c++;\n return;\n }\n\n const chars = [...d];\n chars.sort();\n const alpha = 'abcdefghijklmnopqrstuvwxyz';\n\n let ans = -1;\n const str = [chars[0]];\n\n for (let i = 0; i < n; i++) {\n let prev = str[str.length - 1];\n let distance = Math.abs(alpha.indexOf(prev) - alpha.indexOf(chars[i]));\n\n if (distance < 2) {\n continue;\n }\n\n str.push(chars[i]);\n\n if (str.length === k) {\n break;\n }\n }\n\n if (str.length >= k) {\n ans = 0;\n for (let i = 0; i < k; i++) {\n ans += alpha.indexOf(str[i]) + 1;\n }\n }\n\n console.log(ans);\n c++;\n});\n"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n const [n, m] = is.nextArray().map(Number);\n const word = is.nextLine().split('');\n word.forEach((item, index, array) => {\n array[index] = item.charCodeAt() - 'a'.charCodeAt() + 1;\n });\n word.sort((a, b) => a - b);\n\n function theFor(i, j, accum, number) {\n if (m === number) {\n return accum;\n }\n if (j === n) {\n return -1;\n }\n\n if (word[j] - word[i] > 1) {\n return theFor(j, j + 1, accum + word[j], number + 1);\n }\n return theFor(i, j + 1, accum, number);\n }\n\n console.log(theFor(0, 1, word[0], 1));\n}\n\n/*\n * Api Scanner\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n\n nextLine() {\n return this.lines[this.index++]; // eslint-disable-line\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', (input) => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n const [n, m] = is.nextArray().map(Number);\n const word = is.nextLine().split('');\n word.forEach((item, index, array) => {\n array[index] = item.charCodeAt() - 'a'.charCodeAt() + 1;\n });\n word.sort((a, b) => a - b);\n\n let answer = word[0];\n let pre = 0;\n let number = 1;\n for (let i = 1; i < n; i += 1) {\n if (number === m)\n break;\n if (word[i] - word[pre] >= 2) {\n answer += word[i];\n pre = i;\n number += 1;\n }\n }\n\n console.log(number !== m ? -1 : answer);\n}\n\n/*\n * Api Scanner\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n\n nextLine() {\n return this.lines[this.index++]; // eslint-disable-line\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', (input) => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}], "negative_code": [{"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet n, k;\n\nrl.on('line', (d) => {\n if (c === 0) {\n [n, k] = d.split(' ').map(Number);\n c++;\n return;\n }\n\n const chars = [...d];\n chars.sort();\n const alpha = 'abcdefghijklmnopqrstuvwxyz';\n\n let ans = -1;\n const str = [chars[0]];\n\n for (let i = 0; i < n; i++) {\n let prev = str[str.length - 1];\n let distance = Math.abs(alpha.indexOf(prev) - alpha.indexOf(chars[i]));\n\n if (distance < 2) {\n continue;\n }\n\n str.push(chars[i]);\n\n if (str.length === k) {\n break;\n }\n }\n\n if (str.length === k) {\n ans = 0;\n for (let i = 0; i < str.length; i++) {\n ans += alpha.indexOf(str[i]) + 1;\n }\n }\n\n console.log(ans);\n c++;\n});\n"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n const [n, m] = is.nextArray().map(Number);\n const word = is.nextLine().split('');\n word.forEach((item, index, array) => {\n array[index] = item.charCodeAt(0) - 'a'.charCodeAt(0) + 1;\n });\n word.sort((a, b) => a - b);\n\n let answer = Infinity;\n\n function calc(i, accum, number) {\n if (number === m) {\n answer = Math.min(answer, accum);\n }\n if (i === n || number > m) {\n return;\n }\n\n if (Math.abs(word[i] - word[i + 1]) >= 2) {\n calc(i + 1, accum + word[i + 1], number + 1);\n }\n calc(i + 1, accum, number);\n }\n\n calc(0, word[0], 1);\n console.log(answer === Infinity ? -1 : answer);\n}\n\n/*\n * Api Scanner\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n\n nextLine() {\n return this.lines[this.index++]; // eslint-disable-line\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', (input) => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n const [n, m] = is.nextArray().map(Number);\n const word = is.nextLine().split('');\n word.forEach((item, index, array) => {\n array[index] = item.charCodeAt(0) - 'a'.charCodeAt(0) + 1;\n });\n word.sort((a, b) => a - b);\n\n let answer = Infinity;\n\n function calc(i, accum, number) {\n if (number === m) {\n answer = Math.min(answer, accum);\n }\n if (i === n || number > m) {\n return;\n }\n\n if (Math.abs(word[i] - word[i + 1]) >= 2) {\n calc(i + 1, accum + word[i + 1], number + 1);\n }\n calc(i + 1, accum, number);\n }\n\n for (let i = 0; i < n - m + 1; i += 1) {\n calc(i, word[i], 1);\n }\n console.log(answer === Infinity ? -1 : answer);\n}\n\n/*\n * Api Scanner\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n\n nextLine() {\n return this.lines[this.index++]; // eslint-disable-line\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', (input) => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n const [n, m] = is.nextArray().map(Number);\n const word = is.nextLine().split('');\n word.forEach((item, index, array) => {\n array[index] = item.charCodeAt(0) - 'a'.charCodeAt(0) + 1;\n });\n word.sort((a, b) => a - b);\n \n let answer = Infinity;\n\n function calc(i, accum, number) {\n if (number === m) {\n answer = Math.min(answer, accum);\n return;\n }\n if (i === n) {\n return;\n }\n\n if (word[i + 1] - word[i] >= 2) {\n calc(i + 1, accum + word[i + 1], number + 1);\n }\n calc(i + 1, accum, number);\n }\n\n for (let i = 0; i < n - m + 1; i += 1) {\n calc(i, word[i], 1);\n }\n console.log(answer === Infinity ? -1 : answer);\n}\n\n/*\n * Api Scanner\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n\n nextLine() {\n return this.lines[this.index++]; // eslint-disable-line\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', (input) => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n const [n, m] = is.nextArray().map(Number);\n const word = is.nextLine().split('');\n word.forEach((item, index, array) => {\n array[index] = item.charCodeAt() - 'a'.charCodeAt() + 1;\n });\n word.sort((a, b) => a - b);\n\n function theFor(i, j, accum, number) {\n if (m === number) {\n return accum;\n }\n if (j + 1 === n) {\n return -1;\n }\n\n if (word[j] - word[i] > 1) {\n return theFor(j, j + 1, accum + word[j], number + 1);\n }\n return theFor(i, j + 1, accum, number);\n }\n\n console.log(theFor(0, 1, word[0], 1));\n}\n\n/*\n * Api Scanner\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n\n nextLine() {\n return this.lines[this.index++]; // eslint-disable-line\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', (input) => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}, {"source_code": "\nfunction main() {\n const is = new Scanner();\n const [n, m] = is.nextArray().map(Number);\n const word = is.nextLine().split('');\n word.forEach((item, index, array) => {\n array[index] = item.charCodeAt(0) - 'a'.charCodeAt(0) + 1;\n });\n word.sort((a, b) => a - b);\n console.log(word);\n let answer = Infinity;\n\n function calc(i, accum, number) {\n if (number === m) {\n answer = Math.min(answer, accum);\n return;\n }\n if (i === n) {\n return;\n }\n\n if (word[i + 1] - word[i] >= 2) {\n calc(i + 1, accum + word[i + 1], number + 1);\n }\n calc(i + 1, accum, number);\n }\n\n for (let i = 0; i < n - m + 1; i += 1) {\n calc(i, word[i], 1);\n }\n console.log(answer === Infinity ? -1 : answer);\n}\n\n/*\n * Api Scanner\n */\n\nclass Scanner {\n constructor() {\n this.index = 0;\n this.lines = stdinInput.trim().split('\\n'); // eslint-disable-line\n }\n\n nextLine() {\n return this.lines[this.index++]; // eslint-disable-line\n }\n\n nextInt() {\n return parseInt(this.nextLine(), 10);\n }\n\n nextDouble() {\n return parseFloat(this.nextLine());\n }\n\n nextArray() {\n return this.nextLine().split(' ');\n }\n\n hasNext() {\n return this.index < this.lines.length;\n }\n}\n\nlet stdinInput = '';\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nprocess.stdin.on('data', (input) => { stdinInput += input; });\nprocess.stdin.on('end', () => { main(); });\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet c = 0;\nlet n, k;\n\nrl.on('line', (d) => {\n if (c === 0) {\n [n, k] = d.split(' ').map(Number);\n c++;\n return;\n }\n\n const chars = [...d];\n chars.sort();\n const alpha = 'abcdefghijklmnopqrstuvwxyz';\n\n let ans = -1;\n const str = [chars[0]];\n\n for (let i = 0; i < n; i++) {\n let prev = str[str.length - 1];\n let distance = Math.abs(alpha.indexOf(prev) - alpha.indexOf(chars[i]));\n\n if (distance <= 2) {\n continue;\n }\n\n str.push(chars[i]);\n\n if (str.length === k) {\n break;\n }\n }\n\n if (str.length === k) {\n ans = 0;\n for (let i = 0; i < str.length; i++) {\n ans += alpha.indexOf(str[i]) + 1;\n }\n }\n\n console.log(ans);\n c++;\n});\n"}], "src_uid": "56b13d313afef9dc6c6ba2758b5ea313"} {"nl": {"description": "Let's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and c. Your task is to calculate the following sum:Find the sum modulo 1073741824 (230).", "input_spec": "The first line contains three space-separated integers a, b and c (1 ≤ a, b, c ≤ 2000).", "output_spec": "Print a single integer — the required sum modulo 1073741824 (230).", "sample_inputs": ["2 2 2", "4 4 4", "10 10 10"], "sample_outputs": ["20", "328", "11536"], "notes": "NoteFor the first example. d(1·1·1) = d(1) = 1; d(1·1·2) = d(2) = 2; d(1·2·1) = d(2) = 2; d(1·2·2) = d(4) = 3; d(2·1·1) = d(2) = 2; d(2·1·2) = d(4) = 3; d(2·2·1) = d(4) = 3; d(2·2·2) = d(8) = 4. So the result is 1 + 2 + 2 + 3 + 2 + 3 + 3 + 4 = 20."}, "positive_code": [{"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction numDivisors(x) {\n\tvar count = 0;\n\tfor (var i = 1; i*i <= x; ++i) {\n\t\tif (x%i == 0) {\n\t\t\t++count;\n\t\t\tif (i*i != x) {\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}\n\nfunction main() {\n\tvar data = tokenizeIntegers(readline()),\n\t\ta = data[0], b = data[1], c = data[2],\n\t\tdivisors = {}, count = 0;\n\tfor (var i = 1; i <= a; ++i) {\n\t\tfor (var j = 1; j <= b; ++j) {\n\t\t\tfor (var k = 1; k <= c; ++k) {\n\t\t\t\tvar x = i*j*k;\n\t\t\t\tif (divisors[x] === undefined) {\n\t\t\t\t\tdivisors[x] = numDivisors(x);\n\t\t\t\t}\n\t\t\t\tcount = (count+divisors[x]) % 1073741824;\n\t\t\t}\n\t\t}\n\t}\n\tprint(count);\n}\n\nmain();\n"}, {"source_code": "// http://codeforces.com/contest/236/problem/B\n\nvar memObj = {};\nfunction d(n) {\n var num = 0;\n if (memObj[n]) {\n num = memObj[n];\n } else {\n var k = Math.floor(Math.sqrt(n));\n for (var i = 1; i <= k; i++) {\n if (n%i === 0) {\n num += 2;\n }\n\n if (i*i ==n ) num --;\n }\n memObj[n] = num;\n }\n\n return num;\n}\n\nfunction getSum(a,b,c) {\n var sum = 0;\n for (var i = 1; i <= a; i++) {\n for (var j = 1; j <= b; j++) {\n for (var k =1; k <= c; k++) {\n sum += d(i*j*k);\n }\n }\n }\n\n return sum;\n}\n\nvar args = readline().split(' ');\nprint(getSum(args[0], args[1], args[2])%1073741824);\n"}, {"source_code": "// http://codeforces.com/contest/236/problem/B\n\nvar memObj = {};\nfunction d(n) {\n var num = 0;\n if (memObj[n]) {\n num = memObj[n];\n } else {\n if (n == 1) return 1;\n num = 2;\n var k = Math.floor(Math.sqrt(n));\n for (var i = 2; i <= k; i++) {\n if (n%i === 0) {\n num += 2;\n }\n\n if (i*i ==n ) num --;\n }\n memObj[n] = num;\n }\n\n return num;\n}\n\nfunction getSum(a,b,c) {\n var sum = 0;\n for (var i = 1; i <= a; i++) {\n for (var j = 1; j <= b; j++) {\n for (var k =1; k <= c; k++) {\n sum += d(i*j*k);\n }\n }\n }\n\n return sum;\n}\n\nvar args = readline().split(' ');\nprint(getSum(args[0], args[1], args[2])%1073741824);\n"}, {"source_code": "// http://codeforces.com/contest/236/problem/B\n\nvar memObj = {};\nfunction d(n) {\n var num = 0;\n if (memObj[n]) {\n num = memObj[n];\n } else {\n var k = Math.floor(Math.sqrt(n));\n for (var i = 1; i <= k; i++) {\n if (n%i === 0) {\n num += 2;\n }\n\n if (i*i ==n ) num --;\n }\n memObj[n] = num;\n }\n\n return num;\n}\n\nfunction getSum(a,b,c) {\n var sum = 0;\n for (var i = 1; i <= a; i++) {\n for (var j = 1; j <= b; j++) {\n for (var k =1; k <= c; k++) {\n sum += d(i*j*k);\n }\n }\n }\n\n return sum;\n}\n\nvar args = readline().split(' ');\nprint(getSum(args[0], args[1], args[2]));\n"}], "negative_code": [{"source_code": "// http://codeforces.com/contest/236/problem/B\n\nvar memObj = {};\nfunction d(n) {\n var num = 0;\n if (memObj[n]) {\n num = memObj[n];\n } else {\n var k = Math.floor(Math.sqrt(n));\n for (var i = 1; i <= k; i++) {\n if (k%i === 0) {\n num += 2;\n }\n\n }\n if (k*k == n) {\n num -= 1;\n }\n\n memObj[n] = num;\n }\n\n return num;\n}\n\nfunction getSum(a,b,c) {\n var sum = 0;\n for (var i = 1; i <= a; i++) {\n for (var j = 1; j <= b; j++) {\n for (var k =1; k <= c; k++) {\n sum += d(i*j*k);\n }\n }\n }\n\n return sum;\n}\n\nvar args = readline().split(' ');\nprint(getSum(args[0], args[1], args[2]));\n"}], "src_uid": "4fdd4027dd9cd688fcc70e1076c9b401"} {"nl": {"description": "wHAT DO WE NEED cAPS LOCK FOR?Caps lock is a computer keyboard key. Pressing it sets an input mode in which typed letters are capital by default. If it is pressed by accident, it leads to accidents like the one we had in the first passage. Let's consider that a word has been typed with the Caps lock key accidentally switched on, if: either it only contains uppercase letters; or all letters except for the first one are uppercase. In this case we should automatically change the case of all letters. For example, the case of the letters that form words \"hELLO\", \"HTTP\", \"z\" should be changed.Write a program that applies the rule mentioned above. If the rule cannot be applied, the program should leave the word unchanged.", "input_spec": "The first line of the input data contains a word consisting of uppercase and lowercase Latin letters. The word's length is from 1 to 100 characters, inclusive.", "output_spec": "Print the result of the given word's processing.", "sample_inputs": ["cAPS", "Lock"], "sample_outputs": ["Caps", "Lock"], "notes": null}, "positive_code": [{"source_code": "\n\nvar word = readline();\nvar result = '';\n\nif(word.length === 1) {\n if(isLowerCase(word)) {\n result = word.toUpperCase();\n }\n else {\n result = word.toLowerCase();\n }\n }\n\nif(word.length > 1) {\n \n var wrngWrd = true;\n \n for(var i = 1; i < word.length; i++) {\n if(isLowerCase(word[i])) { \n wrngWrd = false;\n break;\n }\n }\n \n if(! wrngWrd) {\n result = word;\n }\n \n else {\n result = convrtWrd(word); \n }\n}\n\nprint(result);\n\n\nfunction isLowerCase(chrctr){\n return chrctr.toLowerCase() === chrctr;\n}\n\nfunction convrtWrd (word) {\n result = '';\n if(isLowerCase(word[0])) {\n result += word[0].toUpperCase();\n result += word.slice(1).toLowerCase();\n }\n else {\n result = word.toLowerCase();\n }\n return result;\n}\n\n\n"}, {"source_code": "var word=readline().split('');\n\n\nvar flg= false;\nfor(var i=1;i='A'&&word[i]<='Z') ){\n\t\tflg=true;\n\t}\n}\n\nif(!flg){\n\tif(word[0]>='A'&&word[0]<='Z'){\n\t\tword[0]=word[0].toLowerCase();\n\t}else{\n\t\tword[0]=word[0].toUpperCase();\n\t}\n\t\n\tfor(var i=1; i1){\n \n if(a[0] >= \"A\" && a[a.length-1] <= \"Z\") {\n txt = txt.toLowerCase();\n}\nelse if(txt[0]>= \"a\" && a[a.length-2] <= \"Z\") {\n txt = txt.toLowerCase();\n l = txt[0].toUpperCase();\n txt = txt.replace(txt[0], l);\n }\n}\nelse {\n if(txt[0]>= \"A\" && a[0] <= \"Z\"){\n txt = txt.toLowerCase();\n }\n else\n txt = txt.toUpperCase();\n}\n\nprint(txt);"}, {"source_code": " \n var word = readline();\n if(word.length==1){\n print(word === word.toUpperCase()? word.toLowerCase() : word.toUpperCase());\n } else if(word === word.toUpperCase()){\n print(word.toLowerCase());\n } else{\n var first = word.substring(0,1);\n var rest = word.substring(1);\n if(rest === rest.toUpperCase()){\n print(first.toUpperCase()+rest.toLowerCase());\n } else {\n print(word);\n }\n }"}, {"source_code": "'use strict';\n\n/*let input = `\ncAPS\n`.trim().split('\\n');\nfunction print(output) {\n\tconsole.log(output);\n}\nfunction readline() {\n\treturn input.shift();\n}*/\n\n//code\n\nvar upperCase = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split('');\nvar lowerCase = \"abcdefghijklmnopqrstuvwxyz\".split('');\n\nvar str = readline();\nvar strArr = str.split(''),\n i = void 0;\nfor (i = 1; i < strArr.length; i++) {\n\tif (upperCase.indexOf(strArr[i]) === -1) {\n\t\tbreak;\n\t}\n}\nif (i === strArr.length) {\n\tvar newArr = [];\n\tfor (var j = 0; j < strArr.length; j++) {\n\t\tif (lowerCase.indexOf(strArr[j]) !== -1) {\n\t\t\tnewArr.push(upperCase[lowerCase.indexOf(strArr[j])]);\n\t\t} else {\n\t\t\tnewArr.push(lowerCase[upperCase.indexOf(strArr[j])]);\n\t\t}\n\t}\n\tprint(newArr.join(''));\n} else {\n\tprint(str);\n}\n"}, {"source_code": "(function main() {\n var line = readline();\n\n if (line === line.toUpperCase()){\n \n print(line.toLowerCase());\n } else {\n\n var first = line[0];\n var rest = line.slice(1, line.length);\n if ((first === first.toLowerCase()) && (rest == rest.toUpperCase())){\n print(first.toUpperCase() + rest.toLowerCase());\n } else {\n print(line);\n }\n }\n \n return 0;\n})();"}, {"source_code": "var n = readline();\n\nvar on = true;\n\nfor (var i = 1; i < n.length; ++i) {\n if (n[i] != n[i].toUpperCase()) {\n on = false;\n break;\n }\n}\n\nvar n0 = n[0].toLowerCase();\n\nif (on) {\n if (n0 == n[0])\n print(n[0].toUpperCase() + n.substring(1).toLowerCase());\n else\n print(n0 + n.substring(1).toLowerCase());\n} else {\n print(n);\n}\n"}, {"source_code": "function main(){\n\nvar line = readline();\n\nvar a = line.slice(1);\nvar b = a.toUpperCase();\nvar c = a.toLowerCase();\nvar d = \"\";\nvar e = line[0];\n\nif(line.slice(1)===b){\n if(line[0]===e.toUpperCase()){\n\td+=e.toLowerCase()+c;\n\tprint(d);\n\treturn;\n }else{\n\td+=e.toUpperCase()+c;\n\tprint(d);\n\treturn;\n }\n}\n\nprint(line);\n}\n\nmain();"}, {"source_code": "var input = readline();\n\nvar arr = input.split('');\nvar lowerCaseFlag = false;\nvar upperCaseFlag = false;\nvar firstLowerCase = false;\n\nif (arr[0] == arr[0].toLowerCase())\n firstLowerCase = true;\n \nfor (var i = 1; i < arr.length; i++) {\n if (arr[i] == arr[i].toLowerCase())\n lowerCaseFlag = true;\n if (arr[i] == arr[i].toUpperCase())\n upperCaseFlag = true;\n}\n\nvar change = false;\nif (firstLowerCase && upperCaseFlag && !lowerCaseFlag) change = true;\nelse if (!firstLowerCase && upperCaseFlag && !lowerCaseFlag) change = true;\nelse if (firstLowerCase && !upperCaseFlag && !lowerCaseFlag) change = true;\nelse if (!firstLowerCase && !upperCaseFlag && !lowerCaseFlag) change = true;\n\nif (change) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] == arr[i].toLowerCase())\n arr[i] = arr[i].toUpperCase();\n else if (arr[i] == arr[i].toUpperCase())\n arr[i] = arr[i].toLowerCase();\n }\n}\nwrite(arr.join(''));\n\n"}, {"source_code": "var s = readline();\nvar u = true;\nfor(var i=1; i word.charCodeAt(0))\n{\n\tcaps++;\n\tfor (var i = 1; i < word.length; i++)\n\t{\n\t\tif (97 > word.charCodeAt(i))\n\t\t\tcaps++;\n\t}\n\n\tif (caps == word.length)\n\t\tword = word.toLowerCase();\n}\n// case where the first is not caps but the rest is\nelse\n{\n\tfor (var i = 1; i < word.length; i++)\n\t{\n\t\tif (97 > word.charCodeAt(i))\n\t\t\tcaps++;\n\t}\n\n\tif (caps == word.length-1)\n\t\tword = word.substr(0,1).toUpperCase() + word.substr(1,word.length-1).toLowerCase();\n}\n\n//Output: Print the result of the given word's processing.\nprint(word);\n"}, {"source_code": "var word = readline();\n\nif(word == word.toUpperCase())\n\tword = word.toLowerCase();\nelse if((word.slice(0,1) == word.slice(0,1).toLowerCase()) && (word.slice(1) == word.slice(1).toUpperCase()))\n\tword = word.slice(0,1).toUpperCase() + word.slice(1).toLowerCase();\n\nprint(word);"}, {"source_code": "'use strict';\nconst str = readline();\nconst isCaps = function(char) {\n return char == char.toUpperCase();\n}\n\nlet caps = true;\n\nstr.split('').slice(1).map(function(char){\n if(!isCaps(char)) {\n caps = false; \n }\n})\n\nif(caps) {\n let firstChar = str[0].toUpperCase();\n \n if(isCaps(str[0])) {\n firstChar = str[0].toLowerCase();\n } \n \n write(firstChar + str.substr(1).toLowerCase());\n} else {\n write(str);\n}"}, {"source_code": "var str = readline();\nvar l = str.length;\nvar mode;\nfor(var i = 1; i < l; ++i)\n{\n if(str[i] >= \"a\" && str[i] <= \"z\")\n {\n mode = \"none\";\n break;\n }\n}\n\nif(mode == \"none\")\n{\n print(str);\n}\nelse\n{\n mode = false;\n if(str[0] >= \"a\" && str[0] <= \"z\")\n {\n mode = true;\n }\n str = str.toLowerCase();\n if(mode)\n {\n var new_str = str[0];\n new_str = new_str.toUpperCase();\n new_str += str.substr(1);\n str = new_str;\n }\n print(str);\n}\n"}, {"source_code": "//var array = readline().split(\" \").map(item => +item);\nvar line = readline(),\n regex = /^[a-z]?[A-Z]+$/g;\n\nif (line.length === 1 && line.charCodeAt(0) >= 97) {\n print(String.fromCharCode(line.charCodeAt(i) - 32));\n} else if (regex.test(line)) {\n var first = true,\n ans = \"\";\n\n for(var i = 0; i < line.length; i++) {\n if(line.charCodeAt(i) >= 97) {\n ans += String.fromCharCode(line.charCodeAt(i) - 32); \n } else {\n ans += String.fromCharCode(line.charCodeAt(i) + 32); \n }\n }\n\n print(ans);\n} else {\n print(line); \n}\n\n//print((i - 1).toString());"}, {"source_code": "s=readline()\nif(s.toUpperCase()==s){\n\ts=s.toLowerCase();\n}\nelse if(s==s[0].toLowerCase()+s.substr(1).toUpperCase()){\n\ts=s[0].toUpperCase()+s.substr(1).toLowerCase();\n}\nprint(s);"}, {"source_code": "var word = readline();\n\nif(word.match(/^[A-Z]+$/)){\n word = word.toLowerCase();\n}else if(word.match(/^[a-z][A-Z]*$/)){\n word = word.charAt(0).toUpperCase().concat(word.substr(1).toLowerCase());\n}\n\nprint(word);\n"}, {"source_code": " var input = readline()\n if (input === input.toUpperCase()) print(input.toLowerCase())\n else {\n var a = input[0]\n input = input.slice(1,input.length)\n if(input == input.toUpperCase()) print(a.toUpperCase() + input.toLowerCase())\n else {\n print(a + input)\n }\n }"}, {"source_code": "var str = readline();\nvar reg = /[a-z]+?/;\nif (reg.test(str[0])&®.test(str.slice(1))==false)\nprint(str[0].toUpperCase()+str.slice(1).toLowerCase());\nelse if (reg.test(str)==false) print(str.toLowerCase());\nelse print(str);"}, {"source_code": "var inputStr = readline();\n\nfunction isAllSymInCap(str) {\n var result = true;\n for (var i = 0; i < str.length; i++) {\n if (str.charAt(i) == str.charAt(i).toLowerCase()) {\n result = false;\n break;\n } \n }\n\n return result;\n}\n\nfunction isFirstInLowerAndOtherInUpper(str) {\n var result = true;\n\n if (str.charAt(0) == str.charAt(0).toLowerCase()) {\n for (var i = 1; i < str.length; i++) {\n if (str.charAt(i) == str.charAt(i).toLowerCase()) {\n result = false;\n break;\n }\n }\n } else {\n result = false;\n }\n\n return result;\n}\n\nfunction revertCase(str) {\n var newStr = '';\n\n for (var i = 0; i < str.length; i++) {\n if (str.charAt(i) == str.charAt(i).toLowerCase()) {\n newStr += (str.charAt(i).toUpperCase().toString());\n } else if (str.charAt(i) < str.charAt(i).toLowerCase()) {\n newStr += (str.charAt(i).toLowerCase().toString());\n }\n }\n \n return newStr;\n}\n\nif (isAllSymInCap(inputStr) || isFirstInLowerAndOtherInUpper(inputStr)) {\n print(revertCase(inputStr));\n} else {\n print(inputStr);\n}"}, {"source_code": "function isupper(c) {\n return !(c.charCodeAt(0) & 0x20);\n}\n\nfunction othercase(c) {\n return String.fromCharCode(c.charCodeAt(0) ^ 0x20);\n}\nline = readline();\nallcaps = line.split('').slice(1).every(isupper);\nif (allcaps) {\n line = line.split('').map(othercase).join('');\n}\nprint(line);\n"}, {"source_code": "//TAG: regex\n\nfunction main() {\n\tvar textLine = readline();\n\tif (/^[a-z].*/.test(textLine) && !/^[a-z].*[a-z]+.*/.test(textLine)) {\n\t\ttextLine = textLine.substring(0, 1).toUpperCase() + textLine.substring(1).toLowerCase();\n\t} else if (/^[A-Z].*/.test(textLine) && !/^[A-Z].*[a-z]+.*/.test(textLine)) {\n\t\ttextLine = textLine.toLowerCase();\n\t}\n\tprint(textLine);\n}\n\nmain();"}, {"source_code": "function main() {\n\tvar textLine = readline();\t\t//.split(' ');\n\tif (textLine.match(/^[a-z].*/) && !textLine.match(/^[a-z].*[a-z]+.*/)) {\n\t\ttextLine = textLine.substring(0, 1).toUpperCase() + textLine.substring(1).toLowerCase();\n\t} else if (textLine.match(/^[A-Z].*/) && !textLine.match(/^[A-Z].*[a-z]+.*/)) {\n\t\ttextLine = textLine.toLowerCase();\n\t}\n\tprint(textLine);\n}\n\nmain();"}, {"source_code": "var input = readline();\n\nvar strUp = input.toUpperCase();\n\n\nif(input === strUp)\n print(input.toLowerCase());\nelse if(input === input[0] + input.substr(1).toUpperCase() )\n print(input[0].toUpperCase() + input.substr(1).toLowerCase())\nelse print(input)"}, {"source_code": "var text=readline();\nvar change=false;\nfunction isLowerCase(c) {\n if(c>='a' && c<='z')\n return true;\n else\n return false;\n}\nvar i;\nvar change=true;\nif(isLowerCase(text[0])){\n i=1;\n}\nelse{\n i=0;\n}\nfor(;i (e === e.toUpperCase()) \n ? e.toLowerCase() \n : e.toUpperCase())\n .join('');\n}\nprint(word);\n"}, {"source_code": "var s = readline();\nvar subString = s.substring(1);\nvar subStringUpper = subString.toUpperCase();\nif (subString == subStringUpper) {\n var swappedFirstChar = s[0].toUpperCase();\n if (swappedFirstChar == s[0]) {\n swappedFirstChar = swappedFirstChar.toLowerCase();\n }\n print(swappedFirstChar+subStringUpper.toLowerCase());\n}\nelse {\n print(s);\n}"}, {"source_code": "var str = readline(),\n flag = true,\n res = '';\n\nfunction isUpper(s) {\n return s === s.toUpperCase() ? true : false;\n}\n\nfor (var i = 1; i < str.length; i++) {\n if (!isUpper(str[i])) flag = false;\n}\n\nif (flag) {\n for (var i = 0; i < str.length; i++) {\n var s = str[i];\n if (isUpper(s)) {\n s = s.toLowerCase();\n } else {\n s = s.toUpperCase();\n }\n res += s;\n }\n \n print(res);\n} else {\n print(str);\n}"}, {"source_code": "var str = readline(),\n flag = true,\n res = '';\n\nfunction isUpper(s) {\n return s === s.toUpperCase() ? true : false;\n}\n\nfor (var i = 1; i < str.length; i++) {\n if (!isUpper(str[i])) flag = false;\n}\n\nif (flag) {\n for (var i = 0; i < str.length; i++) {\n var s = str[i];\n res += isUpper(s) ? s.toLowerCase() : s.toUpperCase();\n }\n \n print(res);\n} else {\n print(str);\n}"}, {"source_code": "function checkToNonDetermineToCondition(str)\n{\n\tstr = str.split('');\n var res = true;\n for (var i = 1; i <= str.length - 1; i++)\n {\n if ('A'.charCodeAt(0) <= str[i].charCodeAt(0) && str[i].charCodeAt(0) <= 'Z'.charCodeAt(0)) res = true;\n else {\n res = false;\n break;\n }\n \n }\n if (res)\n {\n for (i = 0; i <= str.length - 1; i++)\n\t\t{\n\t\t\tif ('A'.charCodeAt(0) <= str[i].charCodeAt(0) && str[i].charCodeAt(0) <= 'Z'.charCodeAt(0)) str[i] = str[i].toLowerCase();\n\t\t\telse str[i] = str[i].toUpperCase();\n\t\t}\n }\n return str.join('');\n}\n{\n var input = readline();\n print(checkToNonDetermineToCondition(input));\n}"}, {"source_code": "data = readline();\nif (doesMatch(data))\n{\n print(changedCaseString(data));\n}\nelse\n{\n print(data);\n}\n\nfunction doesMatch(data)\n{\n upperCaseAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n lowerCaseAlphabet = \"abcdefghijklmnopqrstuvwxyz\"\n \n stringLength = data.length;\n flag = true;\n for(index = 1; index < stringLength; index++)\n {\n if (lowerCaseAlphabet.indexOf(data[index]) !== -1)\n {\n flag = false;\n break;\n }\n }\n \n if (lowerCaseAlphabet.indexOf(data[0]) !== -1 || upperCaseAlphabet.indexOf(data[0]) !== -1)\n {\n if (flag)\n {\n return true;\n }\n }\n return false; \n}\n\n\nfunction changedCaseString(data)\n{\n result = '';\n for(index = 0; index < data.length; index++)\n {\n if (data[index] === data[index].toLowerCase())\n {\n result += data[index].toUpperCase();\n }\n else\n {\n result += data[index].toLowerCase();\n }\n }\n return result\n}"}, {"source_code": "var s = readline();\nvar s1,s2;\nvar f = 1;\nfor(var i = 1; i < s.length; i++){\n\tif(s.charCodeAt(i) >=97 && s.charCodeAt(i) <= 122){\n\t\tf = 0;\n\t\tbreak;\n\t}\n}\nif(s.length==1){\n\tif(s.charCodeAt(0) >=97 && s.charCodeAt(0) <= 122)\n\t\tprint(s.toUpperCase());\n\telse\n\t\tprint(s.toLowerCase());\n}\nelse if(f){\n\tif(s.charCodeAt(0) >=65 && s.charCodeAt(0) <= 90)\n\t\tprint(s.toLowerCase());\n\telse{\n\t\ts1 = s.slice(0,1).toUpperCase();\n\t\ts2 = s.slice(1,s.length).toLowerCase();\n\t\tprint(s1+s2);\n\t}\n\t\n}\nelse\n\tprint(s);\n"}, {"source_code": "var s = readline().split( '' );\nprint(\n s.every( function(s) { return s === s.toUpperCase(); } ) || s.every( function(s, i) { return !i && s === s.toLowerCase() || i && s === s.toUpperCase(); } )\n ? s.map( function(s) { return s === s.toLowerCase() ? s.toUpperCase() : s.toLowerCase(); } ).join( '' )\n : s.join( '' )\n);"}, {"source_code": "var str = readline();\nvar mayus = str.toUpperCase();\nif(str==mayus){\n print(str.toLowerCase());\n}else{\n if(str[0]!=mayus[0] && str.slice(1)==mayus.slice(1)){\n print(str[0].toUpperCase()+str.toLowerCase().slice(1));\n }else{\n print(str)\n }\n}"}, {"source_code": "var inp = readline(),\n valid = true,\n el = '';\n \nfor(var i=1; i<=inp.length-1; i++) {\n el = inp[i];\n if(el.charCodeAt(0) < 65 || el.charCodeAt(0) > 90) valid = false;\n}\n \nif(valid) {\n \n if(inp[0].charCodeAt(0) >= 65 && inp[0].charCodeAt(0) <= 90) {\n inp = inp.toLowerCase().split('');\n inp[0] = inp[0].toLowerCase();\n } else {\n inp = inp.toLowerCase().split('');\n inp[0] = inp[0].toUpperCase();\n }\n \n inp = inp.join('');\n}\n \nprint(inp);"}, {"source_code": "(function main() {\n var inWord = readline(),\n result = inWord;\n\n function isCaps(word) {\n return !!word.match(/^.[A-Z]*$/g);\n }\n\n function fix(word) {\n var firstChar = word.charAt(0);\n if (firstChar.match(/[A-Z]/)) {\n firstChar = firstChar.toLowerCase();\n } else {\n firstChar = firstChar.toUpperCase();\n }\n\n return firstChar + word.slice(1).toLowerCase();\n }\n\n if (isCaps(inWord)) {\n result = fix(inWord);\n }\n\n print(result);\n})();\n"}, {"source_code": "// 131A - cAPS lOCK\n// http://codeforces.com/problemset/problem/131/A\n\nfunction main() {\n let s = read();\n let ans = s;\n if (s.length === 1 || s.substring(1, s.length) === s.substring(1, s.length).toUpperCase()) {\n ans = \"\";\n for (let i = 0; i < s.length; i++) {\n if (s[i] === s[i].toUpperCase()) {\n ans += s[i].toLowerCase();\n } else {\n ans += s[i].toUpperCase();\n }\n }\n }\n writeline(ans);\n return 0;\n}\n\nvar input = \"\";\nvar read;\nvar writeline = (x) => process.stdout.write(x + \"\\n\");\nvar write = (x) => process.stdout.write(x);\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf8\");\nprocess.stdin.on(\"data\", (chunk) => input += chunk);\nprocess.stdin.on(\"end\", () => {\n input = input.trim().split(/\\s+/);\n read = () => input.shift();\n process.exit(main() || 0);\n});\n"}, {"source_code": "let readline = require('readline');\nlet rl = readline.createInterface({\n\tinput: process.stdin,\n\toutput: process.stdout\n});\n\nrl.on('line', function(line) {\n\tcapsLock(line);\n\trl.close();\n});\n\nlet capsLock = (input) => {\n\tif (checkStr(input.substring(1))) {\n\t\tlet firstChar = input.charAt(0);\n\t\tcheckStr(firstChar) ? (firstChar = firstChar.toLowerCase()) : (firstChar = firstChar.toUpperCase());\n\t\tconsole.log(firstChar + '' + input.substring(1).toLowerCase());\n\t} else {\n\t\tconsole.log(input);\n\t}\n};\n\nlet checkStr = (str) => {\n\treturn str === str.toUpperCase();\n};\n"}, {"source_code": "\"use strict\";\n\nconst readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nreadline.on('line', line => {\n readline.close(), console.log(capsLocks(line));\n});\nconst capsLocks = (word) => {\n const upperCase = /^[A-ZÑ]+$/g;\n\n if (word.length > 1) {\n const first = word.charAt(0);\n const last = word.slice(1);\n\n if (upperCase.test(word))\n return word.toLowerCase();\n else if (upperCase.test(last) && !upperCase.test(first))\n return first.toUpperCase() + last.toLowerCase();\n else\n return word;\n }\n else\n if (!upperCase.test(word))\n return word.toUpperCase();\n else\n return word.toLowerCase();\n}"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nreadline.on('line', line => {\n readline.close(), console.log(capsLocks(line));\n});\nconst capsLocks = (word) => {\n const upperCase = /^[A-ZÑ]+$/g;\n\n if (word.length > 1)\n if (upperCase.test(word))\n return word.toLowerCase();\n else if (upperCase.test(word.slice(1)) && !upperCase.test(word.charAt(0)))\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n else\n return word;\n else\n if (!upperCase.test(word))\n return word.toUpperCase();\n else\n return word.toLowerCase();\n}"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nconst isCapitalize = ch => ch === ch.toUpperCase();\n\nreadLine.on('close', () => {\n const str = input[0];\n let flag = true;\n\n if (str.length === 1) { \n if (!isCapitalize(str[0]))\n console.log(str.toUpperCase()); \n else \n console.log(str.toLowerCase());\n return \n }\n\n for (let i = 1; i < str.length; i += 1) if(!isCapitalize(str[i])) flag = false;\n \n if (flag) {\n if (isCapitalize(str[0]))\n console.log(str[0].toLowerCase() + str.slice(1).toLowerCase());\n else\n console.log(str[0].toUpperCase() + str.slice(1).toLowerCase());\n return;\n }\n \n console.log(str);\n});"}, {"source_code": "const input = [];\n\nfunction splbsi(line) {\n return line.split(\" \").map((x) => parseInt(x));\n}\n\nconst readLine = require(\"readline\").createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nreadLine.on(\"line\", (line) => {\n input.push(line);\n});\n\nreadLine.on(\"close\", () => {\n const str = input[0];\n\n if (str === str.toUpperCase()) {\n console.log(str.toLowerCase());\n return;\n }\n\n if (\n str[0].toLowerCase() === str[0] &&\n str.slice(1).toUpperCase() === str.slice(1)\n ) {\n console.log(`${str[0].toUpperCase()}${str.slice(1).toLowerCase()}`);\n return;\n }\n\n console.log(str);\n});\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet currentLine = 0;\nlet inputString = \"\";\n\nprocess.stdin.on(\"data\", (raw_data) => {\n inputString += raw_data;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((line) => {\n return line.trim();\n });\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n/******** Main function*************/\n\nfunction isLowerCase(str) {\n return str == str.toLowerCase() && str != str.toUpperCase();\n}\n\nfunction main() {\n var str = readLine().split(\"\");\n var string = str.join(\"\");\n var Fstr = str[0];\n var EFstr = str.slice(1);\n\n var count = 0;\n var eFstrCount = 0;\n\n for (var i = 0; i < EFstr.length; i++) {\n if (isLowerCase(EFstr[i]) === false) {\n eFstrCount++;\n }\n }\n\n for (var j = 0; j < str.length; j++) {\n if (isLowerCase(str[j]) === false) {\n count++;\n }\n }\n\n if (eFstrCount == EFstr.length && isLowerCase(Fstr)) {\n console.log(Fstr.toUpperCase() + EFstr.join(\"\").toLowerCase());\n } else if (count === str.length) {\n console.log(string.toLowerCase());\n } else {\n console.log(string);\n }\n}\n\n// either it only contains uppercase letters;\n// or all letters except for the first one are uppercase.\n"}, {"source_code": "let fs = require(\"fs\");\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0;\n});\nfor (let i = 0; i < txt.length; i ++) {\n doit(txt[i]);\n\n}\n\nfunction doit(str) {\n let tab =str.split(\"\").filter(data=>{return data.length>0});\n let stab=[]\n tab.forEach(data => {\n if(data.charCodeAt()<97){\n stab.push(\"U\");\n }else{\n stab.push(\"L\")\n }\n });\n let r=stab.filter(data=>{return data==\"L\"}).length\n if(r==0 ||(r==1 && stab[0]==\"L\")){\n tab.forEach((data,index)=>{\n if(data.charCodeAt()<97){\n stab[index]=data.toLowerCase()\n }else{\n stab[index]=data.toUpperCase()\n }\n })\n console.log(stab.join(\"\"));\n \n }else{\n console.log(str);\n \n }\n \n}"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let a = readLine();\n if (a.toUpperCase() === a) {\n console.log(a.toLowerCase());\n } else if (a[0].toLowerCase() + a.substring(1).toUpperCase() === a) {\n console.log(a[0].toUpperCase() + a.substring(1).toLowerCase());\n } else {\n console.log(a);\n }\n}\n"}, {"source_code": "var w = readline();\nfunction isUp(ch) {\n if (ch == ch.toUpperCase()) {\n return true;\n }\n return false;\n}\n\nif (w.length>1&&!isUp(w[0]) && isUp(w[1])){\n if (w.toUpperCase().substring(1) == w.substring(1)){\n w = w[0].toUpperCase() + w.toLowerCase().substring(1);\n\n }\n}\nif (w.toUpperCase() === w) {\n w = w.toLowerCase()\n}else if (w.length === 1){\n if (w.toUpperCase() === w){\n w = w.toLowerCase();\n }else{\n w = w.toUpperCase();\n }\n}\nwrite(w)"}, {"source_code": "var word = readline(), counter = 0;\n\nif( word.charAt(0) < \"a\" ){\n\tfor(i = 1; i < word.length; i++){\n\t\tif( word.charAt(i) < \"a\" ){\n\t\t\tcounter++;\n\t\t}\n\t}\n\tif( counter+1 == word.length ){\n\t\twrite(word.toLowerCase());\n\t}\n\telse{\n\t\twrite(word);\n\t}\n}\nelse{\n\tfor(i = 1; i < word.length; i++){\n\t\tif( word.charAt(i) < \"a\" ){\n\t\t\tcounter++;\n\t\t}\n\t}\n\tif( counter+1 == word.length ){\n\t\twrite(word.charAt(0).toUpperCase());\n\t\twrite(word.substring(1).toLowerCase());\n\t}\n\telse{\n\t\twrite(word);\n\t}\n}"}, {"source_code": "var lee = readline();\n\nif (lee.slice(1) == lee.slice(1).toUpperCase() && lee[0] == lee[0].toLowerCase()) {\n\tprint(lee[0].toUpperCase() + lee.slice(1).toLowerCase()); \n} else if(lee == lee.toUpperCase()) {\n\tprint(lee.toLowerCase());\n} else {\n print(lee);\n}"}, {"source_code": "var n = readline();\nvar c = n.substring(1);\nvar p = c.toUpperCase();\nif (n[0] === n[0].toUpperCase()) r = n[0].toLowerCase();\nelse r = n[0].toUpperCase();\nif ( p === c ) {\n n = r + c.toLowerCase();\n}\nwrite(n);"}, {"source_code": "var word = readline();\n\nvar A = 'A'.codePointAt(0);\nvar Z = 'Z'.codePointAt(0);\nvar delta = 'a'.codePointAt(0) - A;\n\nvar upper = true;\nfor (var i = 1; i < word.length; i++) {\n var c = word.codePointAt(i);\n if (c < A || c > Z) {\n upper = false;\n break;\n }\n}\nif (upper) {\n var r = word.codePointAt(0);\n if (r < A || r > Z) {\n r -= delta;\n } else {\n r += delta;\n }\n r = String.fromCodePoint(r);\n for (var i = 1; i < word.length; i++) {\n r += String.fromCodePoint(word.codePointAt(i) + delta);\n }\n print(r);\n} else {\n print(word);\n}\n\nfunction readNums() {\n return readline().split(' ').map(v => v - 0);\n}"}, {"source_code": "print(wrongCaps(readline()));\n\nfunction wrongCaps(word){\n\tif(/^[A-Z]*$/.test(word)){\n\t\treturn word.toLowerCase();\n\t} else if (/^[a-z]{1}[A-Z]*$/.test(word)){\n\t\tvar firstChar = word.slice(0,1).toUpperCase();\n\t\tvar otherChars = word.slice(1).toLowerCase();\n\t\treturn firstChar+otherChars;\n\t} else{\n\t\treturn word;\n\t}\n}"}, {"source_code": "eil = readline();\nneil = eil.substr(1);\nueil = neil.toUpperCase();\nif (eil[0] == eil[0].toUpperCase()) r = eil[0].toLowerCase();\nelse r = eil[0].toUpperCase();\nif (ueil == neil){\n\teil = r + neil.toLowerCase();\t\n}\nwrite(eil);\n\n"}, {"source_code": "const input = readline()\n \nif(input == input.toUpperCase() ) {\n print(`${input.toLowerCase()}`)\n} else if(/^[a-z][A-Z]+$/.test(input)) {\n print(`${input[0].toUpperCase()}${input.substring(1).toLowerCase()}`)\n} else if(input.length == 1) {\n print(input.toUpperCase())\n} else {\n print(input)\n}\n"}, {"source_code": "'use strict';\n\n// let inpFileStrArr = `\n// Lock\n// `.trim().split('\\n'), inpFileCounter = 0;\n// function readline() {\n// return inpFileStrArr[inpFileCounter++];\n// }\n// function print(x) {\n// console.log(x);\n// }\n\nvar isLower = function isLower(x) {\n return x === x.toLowerCase();\n};\nvar isUpper = function isUpper(x) {\n return x === x.toUpperCase();\n};\nvar convert = function convert(str) {\n return str.split('').map(function (x) {\n return isUpper(x) ? x.toLowerCase() : x.toUpperCase();\n }).join('');\n};\n\nvar str = readline().trim();\n\nvar allCaps = isUpper(str);\n\nvar onlyFirstLower = isLower(str[0]) && isUpper(str.slice(1));\n\nprint(allCaps || onlyFirstLower ? convert(str) : str);\n"}, {"source_code": "var str = readline();\na = str.split('');\nvar f = false;\nvar res = '';\n\nfor (var i = 1; i < a.length; i++) {\n if (a[i] != a[i].toUpperCase()) {\n print(str);\n f = true;\n break;\n } else res += a[i].toLowerCase();\n}\n\nif (!f) {\n if (a[0].toUpperCase() == a[0])\n print(a[0].toLowerCase() + res);\n else print(a[0].toUpperCase() + res);\n}"}, {"source_code": "var w = readline(),\n\tc = w.charAt(0),\n\trest = w.substr(1)\n\nif (rest == rest.toUpperCase()) {\n\tprint((c.toUpperCase() == c ? c.toLowerCase() : c.toUpperCase()) + rest.toLowerCase())\n} else {\n\tprint(w)\n}"}, {"source_code": "function isCaps(letter) {\n return letter === letter.toUpperCase();\n}\n\nfunction solve(word) {\n var firstLetter = word[0];\n var restWord = word.slice(1, word.length);\n \n if (!isCaps(firstLetter) && isCaps(restWord)) {\n return firstLetter.toUpperCase() + restWord.toLowerCase();\n } else if (isCaps(word)) {\n return word.toLowerCase();\n } else {\n return word;\n }\n}\n\nprint(solve(readline()));"}, {"source_code": "s = readline()\n\n if (s === s.toUpperCase())\n print(s.toLowerCase())\n else if(s === s[0].toLowerCase()+s.slice(1).toUpperCase())\n print(s[0].toUpperCase()+s.slice(1).toLowerCase())\n else\n print(s) \n \n \n "}, {"source_code": "var word = readline();\nif (word[0] == word[0].toLowerCase() && word.slice(1) == word.slice(1).toUpperCase()) {\n\tprint(word[0].toUpperCase() + word.slice(1).toLowerCase()); \n} else if(word == word.toUpperCase()){\n\tprint(word.toLowerCase())\n} else print(word); "}, {"source_code": ";(function () {\n\tvar str = readline();\n\n\tfunction isUpper (l) { return l === l.toUpperCase(); }\n\tfunction toggle (str) { return str.split('').map(function (l) { return isUpper(l) ? l.toLowerCase() : l.toUpperCase() }).join(''); }\n\tfunction isUpperString (str) { if (str.length < 2) return true; return !str.split('').slice(1).filter(function(l) { return !isUpper(l); }).length;}\n\n\tprint(isUpperString(str) ? toggle(str) : str);\n\n}).call(this);"}, {"source_code": "function unintentionallCaps(s) {\n return (s.substring(1, s.length) == s.substring(1, s.length).toUpperCase());\n}\n\nfunction isLowerCase(s) { \n return (s == s.toLowerCase());\n}\n\nfunction capitalizeFirstLetter(s) {\n return (s[0].toUpperCase().concat(s.substring(1, s.length).toLowerCase()));\n}\n\nvar s = readline();\n\nif (unintentionallCaps(s)) {\n print(isLowerCase(s[0]) ? capitalizeFirstLetter(s) : s.toLowerCase());\n} else {\n print(s);\n}"}, {"source_code": "var _text = readline();\nvar text = _text.split('');\nvar textWithout1 = [...text];\n\ttextWithout1.shift();\nvar isAccidentally = true;\nvar isUpper = false;\n\nvar isUpperCase = function(letter){\n\tvar character = letter.charAt(0);\n\treturn character == character.toUpperCase();\n};\n\nfor(var i = 0; i < textWithout1.length; i ++){\n\tif(!isUpperCase(textWithout1[i])){\n\t\tisAccidentally = false;\n\t\tprint(_text);\n\t\tbreak;\n\t} \n}\n\nif(isUpperCase(text[0])){\n\tisUpper = true;\n}\n\nif(isAccidentally){\n\tvar ans = text.map(function(letter, i){\n\t\tif(i == 0 && !isUpper){\n\t\t\treturn letter.toUpperCase();\n\t\t}else{\n\t\t\treturn letter.toLowerCase();\n\t\t}\n\t});\n\n\tprint(ans.join(''));\n}"}, {"source_code": "var s = readline();\nvar subString = s.substring(1);\nvar subStringUpper = subString.toUpperCase();\nif (subString == subStringUpper) {\n var swappedFirstChar = s[0].toUpperCase();\n if (swappedFirstChar == s[0]) {\n swappedFirstChar = swappedFirstChar.toLowerCase();\n }\n print(swappedFirstChar+subStringUpper.toLowerCase());\n}\nelse {\n print(s);\n}"}, {"source_code": "function Capital(letter){\n\treturn letter === letter.toUpperCase();\n}\n\nfunction program(input){\n\tvar FirstLetter = input[0]\n\tvar resword = input.slice(1,input.length);\n \t\n \tif(!Capital(FirstLetter) && Capital(resword)){\n \t\treturn FirstLetter.toUpperCase() + resword.toLowerCase()\n \t}\n \telse if(Capital(input)){\n \t\treturn input.toLowerCase();\n \t}\n \telse{\n \t\treturn input\n \t}\n\n}\nvar input = readline();\nprint(program(input))\n"}, {"source_code": "function main() {\n var s = readline();\n if(s.length <= 1) {\n if(s === s.toLowerCase()) {\n s = s.toUpperCase();\n } else {\n s = s.toLowerCase();\n }\n print(s);\n } else {\n var i;\n for(i = 1 ; i < s.length ; i++) {\n if(s.charAt(i) !== s.charAt(i).toUpperCase()) {\n break;\n }\n }\n if(i === s.length) {\n var out = \"\";\n for(i = 0 ; i < s.length ; i++) {\n if(s.charAt(i) === s.charAt(i).toUpperCase()) {\n out += s.charAt(i).toLowerCase();\n } else {\n out += s.charAt(i).toUpperCase();\n }\n }\n print(out);\n } else {\n print(s);\n }\n }\n}\n\nmain();"}, {"source_code": "function capsLock(text){\n textAr = text[0].split(\"\");\n var newAr = [], contain=false;\n notFirstChar = text[0].substr(1,(textAr.length - 1));\n if (text[0] == text[0].toUpperCase()){\n return text[0].toLowerCase();\n } else if (text[0] == text[0].toLowerCase() && textAr.length!=1){\n return text[0]\n }\n else if (notFirstChar == notFirstChar.toUpperCase() || notFirstChar == notFirstChar.toLowerCase()) {\n contain = true;\n }\n if(contain) {\n for (var i = 0; i1&&!isUp(w[0]) && isUp(w[1])){\n if (w.toUpperCase().substring(1) == w.substring(1)){\n w = w[0].toUpperCase() + w.toLowerCase().substring(1);\n\n }\n}\nif (w.toUpperCase() == w) {\n w = w.toLowerCase()\n}\nif (w.length === 1){\n if (w.toUpperCase() == w){\n w = w.toLowerCase();\n }else{\n w = w.toUpperCase();\n }\n}\nwrite(w)"}, {"source_code": "var str = readline();\n\n if (str.search(/[A-Z]/)>0){\n\tprint(str[0].toUpperCase()+str.slice(1).toLowerCase());\n\t}\n\t\n\telse if(str.search(/[A-Z]/)==0 && str.slice(1).search(/[A-Z]/>0)){\t\n\tprint(str[0].toUpperCase()+str.slice(1).toLowerCase());\n\t}"}, {"source_code": "function Caps(word)\n{\n var i = 0;\n word = word.split('');\n word[0] = word[0].toUpperCase();\n while (i < word.length)\n {\n word[i] = word[i].toLowerCase();\n i++;\n }\n return word.join('');\n}\n\n{\n var input = readline();\n print(Caps(input));\n}"}, {"source_code": "data = readline();\nif (doesMatch(data))\n{\n print(data[0].toUpperCase() + data.slice(1).toLowerCase());\n}\nelse\n{\n print(data);\n}\n\nfunction doesMatch(data)\n{\n upperCaseAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n lowerCaseAlphabet = \"abcdefghijklmnopqrstuvwxyz\"\n \n stringLength = data.length;\n flag = true;\n for(index = 1; index < stringLength; index++)\n {\n if (lowerCaseAlphabet.indexOf(data[index]) !== -1)\n {\n flag = false;\n break;\n }\n }\n \n if (lowerCaseAlphabet.indexOf(data[0]) !== -1 || upperCaseAlphabet.indexOf(data[0]) !== -1)\n {\n if (flag)\n {\n return true;\n }\n }\n return false; \n}\n"}, {"source_code": "const input = readline()\n \nif(input == input.toUpperCase() || /^[a-z][A-Z]*$/.test(input)) {\n print(`{input[0].toUpperCase()}${input.slice(1).toLowerCase()}`)\n} else {\n print(input)\n}\n"}, {"source_code": " var word = readline();\n if(word.length==1){\n print(word);\n } else if(word === word.toUpperCase()){\n print(word.toLowerCase());\n } else{\n var first = word.substring(0,1);\n var rest = word.substring(1);\n if(rest === rest.toUpperCase()){\n print(first.toUpperCase()+rest.toLowerCase());\n } else {\n print(word);\n }\n }"}, {"source_code": "var word = readline();\nif (word[0].toLowerCase() && !word.slice(1).toUpperCase()) {\n\tprint(word[0].toUpperCase() + word.slice(1).toLowerCase()); \n} else print(word); "}, {"source_code": "var word = readline().split(''),\n willChange = false;\nfor (var i = 0; i < word.length; i++) {\n if (word[i] == word[i].toUpperCase()) {\n willChange = true;\n } else {\n willChange = false;\n break;\n }\n}\n\nfor (var j = 0; j < word.length - 1; j++) {\n if (word[0] == word[0].toLowerCase() && word[j + 1] == word[j + 1].toUpperCase()) {\n willChange = true;\n } else {\n willChange = false;\n break;\n }\n}\n\nif(willChange){\n word[0] = word[0].toUpperCase();\n for (var a = 0; a < word.length - 1; a++) {\n word[a+1] = word[a+1].toLowerCase();\n }\n}\nprint(word.join(''));"}, {"source_code": "function main() {\n var s = readline();\n if(s.length <= 1) {\n print(s.toUpperCase());\n } else {\n var i;\n for(i = 1 ; i < s.length ; i++) {\n if(s.charAt(i) !== s.charAt(i).toUpperCase()) {\n break;\n }\n }\n if(i === s.length) {\n var out = \"\";\n for(i = 0 ; i < s.length ; i++) {\n if(s.charAt(i) === s.charAt(i).toUpperCase()) {\n out += s.charAt(i).toLowerCase();\n } else {\n out += s.charAt(i).toUpperCase();\n }\n }\n print(out);\n } else {\n print(s);\n }\n }\n}\n\nmain();"}, {"source_code": "\n\nvar word = readline();\nvar result = '';\n\nif(word.length === 1) {\n if(!isLowerCase(word)) {\n result = word.toLowerCase();\n }\n else {\n result = word;\n }\n }\n\nif(word.length > 1) {\n \n var wrngWrd = true;\n \n for(var i = 1; i < word.length; i++) {\n if(isLowerCase(word[i])) { \n wrngWrd = false;\n break;\n }\n }\n \n if(! wrngWrd) {\n result = word;\n }\n \n else {\n result = convrtWrd(word); \n }\n}\n\nprint(result);\n\n\nfunction isLowerCase(chrctr){\n return chrctr.toLowerCase() === chrctr;\n}\n\nfunction convrtWrd (word) {\n result = '';\n if(isLowerCase(word[0])) {\n result += word[0].toUpperCase();\n result += word.slice(1).toLowerCase();\n }\n else {\n result = word.toLowerCase();\n }\n return result;\n}\n\n\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// single line input\nreadline.on('line', line => {\n readline.close(), console.log(capsLocks(line));\n});\nconst capsLocks = (word) => {\n const upperCase = /^[A-ZÑ]+$/g;\n\n if (upperCase.test(word))\n return word.charAt(0) + word.slice(1).toLowerCase();\n else if (upperCase.test(word.slice(1)) && !upperCase.test(word.charAt(0)))\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n else\n return word;\n}"}, {"source_code": "data = readline();\nif (doesMatch(data))\n{\n print(data.toLowerCase());\n}\nelse\n{\n print(data);\n}\n\nfunction doesMatch(data)\n{\n upperCaseAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n lowerCaseAlphabet = \"abcdefghijklmnopqrstuvwxyz\"\n \n stringLength = data.length;\n flag = true;\n for(index = 1; index < stringLength; index++)\n {\n if (lowerCaseAlphabet.indexOf(data[index]) !== -1)\n {\n flag = false;\n break;\n }\n }\n \n if (lowerCaseAlphabet.indexOf(data[0]) !== -1 || upperCaseAlphabet.indexOf(data[0]) !== -1)\n {\n if (flag)\n {\n return true;\n }\n }\n return false; \n}\n"}, {"source_code": "var str = readline(),\n flag = true,\n res = str[0].toUpperCase();\n\nfunction isUpper(s) {\n return s === s.toUpperCase() ? true : false;\n}\n\nfor (var i = 1; i < str.length; i++) {\n if (!isUpper(str[i])) flag = false;\n}\n\nif (flag) {\n \n for (var i = 1; i < str.length; i++) {\n if (isUpper(str[i])) s = str[i].toLowerCase();\n res += s;\n }\n \n print(res);\n}"}, {"source_code": "function Caps(word)\n{\n var i = 0;\n word = word.split('');\n word[0] = word[0].toUpperCase();\n while (i < word.length)\n {\n word[i] = word[i].toLowerCase();\n i++;\n }\n return word.join('');\n}\n\n{\n var input = readline();\n print(Caps(input));\n}"}, {"source_code": "function Caps(word)\n{\n var i = 0;\n word = word.split('');\n word[0] = word[0].toUpperCase();\n while (i < word.length)\n {\n word[i] = word[i].toLowerCase();\n i++;\n }\n return word.join('');\n}\n\n{\n var input = readline();\n print(Caps(input));\n}"}, {"source_code": "//var input = \"CaPS\";\n//var index = 0;\n//\n//function readline(){\n// var data = input.split('\\n');\n// if(index < data.length)\n// return data[index++];\n//}\n//\n//function print(output){\n// console.log(output);\n//}\n\nfunction main(){\n var str = readline();\n var reg = /\\b([a-z]{1})([A-Z]{1,})\\b/;\n var ans = str.replace(reg, function(match, p1, p2){\n return p1.toUpperCase() + p2.toLowerCase();\n });\n reg = /\\b([A-Z]{1,})\\b/;\n ans = ans.replace(reg, function(match, p1){\n return match.toLowerCase();\n });\n print(ans);\n}\nmain();"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nconst isCapitalize = ch => ch === ch.toUpperCase();\n\nreadLine.on('close', () => {\n const str = input[0];\n let flag = true;\n\n if (str.length === 1) {console.log(str); return}\n\n for (let i = 1; i < str.length; i += 1) if(!isCapitalize(str[i])) flag = false;\n \n if (flag) {\n console.log(str[0].toUpperCase() + str.slice(1).toLowerCase());\n return;\n }\n \n console.log(str);\n});"}, {"source_code": "var str = readline();\nprint(str[0].toUpperCase()+str.slice(1).toLowerCase());"}, {"source_code": "'use strict';\nconst str = readline();\nconst isCaps = function(char) {\n return char === char.toUpperCase();\n}\n\nlet caps = true;\n\nstr.split('').slice(1).map(function(char){\n if(!isCaps(char)) {\n caps = false; \n }\n})\n\nif(caps) {\n write(str[0].toUpperCase() + str.substr(1).toLowerCase());\n} else {\n write(str);\n}\n"}, {"source_code": "var word = readline().split(''),\n willChange = false;\n\n\nfor (var j = 0; j < word.length - 1; j++) {\n if (word[0] == word[0].toLowerCase() && word[j + 1] == word[j + 1].toUpperCase()) {\n willChange = true;\n } else {\n willChange = false;\n break;\n }\n}\n\nfor (var i = 0; i < word.length; i++) {\n if (word[i] == word[i].toUpperCase()) {\n willChange = true;\n } else {\n willChange = false;\n break;\n }\n}\n\nif(willChange){\n word[0] = word[0].toUpperCase();\n for (var a = 0; a < word.length - 1; a++) {\n word[a+1] = word[a+1].toLowerCase();\n }\n}\nprint(word.join(''));"}, {"source_code": "(function main() {\n\n var inWord = readline(),\n result = inWord;\n\n function isCaps(word) {\n return !!word.match(/^.[A-Z]+$/g);\n }\n\n function fix(word) {\n var firstChar = word.charAt(0);\n if (firstChar.match(/[A-Z]/)) {\n firstChar = firstChar.toLowerCase();\n } else {\n firstChar = firstChar.toUpperCase();\n }\n\n return firstChar + word.slice(1).toLowerCase();\n }\n\n if (isCaps(inWord)) {\n result = fix(inWord);\n }\n\n print(result);\n})();\n"}, {"source_code": "const input = readline()\n \nif(input == input.toUpperCase() || /^[a-z][A-Z]*$/.test(input)) {\n print(`{input[0].toUpperCase()}${input.slice(1).toLowerCase()}`)\n} else {\n print(input)\n}\n"}, {"source_code": "//var input = \"CaPS\";\n//var index = 0;\n//\n//function readline(){\n// var data = input.split('\\n');\n// if(index < data.length)\n// return data[index++];\n//}\n//\n//function print(output){\n// console.log(output);\n//}\n\nfunction main(){\n var str = readline();\n var reg = /\\b([a-z]{1})([A-Z]{1,})\\b/;\n var ans = str.replace(reg, function(match, p1, p2){\n return p1.toUpperCase() + p2.toLowerCase();\n });\n reg = /\\b([A-Z]{1,})\\b/;\n ans = ans.replace(reg, function(match, p1){\n return match.toLowerCase();\n });\n print(ans);\n}\nmain();"}, {"source_code": "const input = readline()\n\nif(input == input.toUpperCase() || /^[a-z][A-Z]*$/.test(input)) {\n print(`{input[0].toUpperCase()}${input.slice(1).toLowerCase()}`)\n}\nprint(input)"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n// single line input\nreadline.on('line', line => {\n readline.close(), console.log(capsLocks(line));\n});\nconst capsLocks = (word) => {\n const upperCase = /^[A-ZÑ]+$/g;\n\n if (upperCase.test(word))\n return word.charAt(0) + word.slice(1).toLowerCase();\n else if (upperCase.test(word.slice(1)) && !upperCase.test(word.charAt(0)))\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n else\n return word;\n}"}, {"source_code": "'use strict';\nconst str = readline();\nconst isCaps = function(char) {\n return char === char.toUpperCase();\n}\n\nlet caps = true;\n\nstr.split('').slice(1).map(function(char){\n if(!isCaps(char)) {\n caps = false; \n }\n})\n\nif(caps) {\n write(str[0].toUpperCase() + str.substr(1).toLowerCase());\n} else {\n write(str);\n}\n"}, {"source_code": "var s = readline();\nvar u = true;\nfor(var i=1; i 1) {\n \n var wrngWrd = true;\n \n for(var i = 1; i < word.length; i++) {\n if(isLowerCase(word[i])) { \n wrngWrd = false;\n break;\n }\n }\n \n if(! wrngWrd) {\n result = word;\n }\n \n else {\n result = convrtWrd(word); \n }\n}\n\nprint(result);\n\n\nfunction isLowerCase(chrctr){\n return chrctr.toLowerCase() === chrctr;\n}\n\nfunction convrtWrd (word) {\n result = '';\n if(isLowerCase(word[0])) {\n result += word[0].toUpperCase();\n result += word.slice(1).toLowerCase();\n }\n else {\n result = word.toLowerCase();\n }\n return result;\n}\n\n\n"}, {"source_code": "var n = readline().toLowerCase();\nvar p = n[0].toUpperCase();\nvar c = n.substring(1);\np += c;\nprint(p.concat());"}, {"source_code": "str = readline()\nprint(str.charAt(0).toUpperCase() + str.slice(1).toLowerCase)"}, {"source_code": "var n = readline();\n\nvar on = true;\n\nfor (var i = 1; i < n.length; ++i) {\n if (n[i] != n[i].toUpperCase()) {\n on = false;\n break;\n }\n}\n\nif (on)\n print(n[0].toUpperCase() + n.substring(1).toLowerCase());\nelse\n print(n);\n"}, {"source_code": "const input = readline()\n\nif(input == input.toUpperCase() || /^[a-z][A-Z]*$/.test(input)) {\n print(`{input[0].toUpperCase()}${input.slice(1).toLowerCase()}`)\n}\nprint(input)"}, {"source_code": "var line = readline().toLowerCase();\n\nvar newline = line[0].toUpperCase() + line.slice(1);\n\nprint (newline);"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nreadline.on('line', line => {\n readline.close(), console.log(capsLocks(line));\n});\nconst capsLocks = (word) => {\n const upperCase = /^[A-ZÑ]+$/g;\n\n if (upperCase.test(word))\n return word.toLowerCase();\n else if (upperCase.test(word.slice(1)) && !upperCase.test(word.charAt(0)))\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n else\n return word;\n}"}, {"source_code": "var s = readline();\nif(s === s.toUpperCase() || s === s[0].toLowerCase() + s.slice(1).toUpperCase()){\n print(s[0].toUpperCase() + s.slice(1).toLowerCase());\n}\nelse print(s);"}, {"source_code": "var word = readline();\n\nif(word.match(/^[A-Z]+$/)){\n word = word.toLowerCase();\n}else if(word.match(/^[a-z][A-Z]+$/)){\n word = word.charAt(0).toUpperCase().concat(word.substr(1).toLowerCase());\n}\n\nprint(word);\n"}, {"source_code": "str = readline();\nif(str.length - 2 < str.replace(/[^A-Z]/g, \"\").length)\n{str = str.toLowerCase();\nprint(str.charAt(0).toUpperCase() + str.slice(1))}\nelse print(str);\n"}, {"source_code": " var word = readline(); f = word[0].toUpperCase();\nword = word.slice(1); \nprint(f + word.toLowerCase());"}, {"source_code": "// wHAT DO WE NEED cAPS LOCK FOR?\n\n// Caps lock is a computer keyboard key. Pressing it sets an input mode in which typed letters are capital by default. If it is pressed by accident, it leads to accidents like the one we had in the first passage.\n\n// Let's consider that a word has been typed with the Caps lock key accidentally switched on, if:\n\n// either it only contains uppercase letters;\n// or all letters except for the first one are uppercase. \n\n// In this case we should automatically change the case of all letters. For example, the case of the letters that form words \"hELLO\", \"HTTP\", \"z\" should be changed.\n\n// Write a program that applies the rule mentioned above. If the rule cannot be applied, the program should leave the word unchanged.\n\n// Input\n// The first line of the input data contains a word consisting of uppercase and lowercase Latin letters. The word's length is from 1 to 100 characters, inclusive.\n\n// Output\n// Print the result of the given word's processing.\n\nvar s = readline()\nvar len = s.length\nvar sb = s.substring(1,len)\n\nfunction isL (x){\n return x === x.toLowerCase()\n}\n\nfunction isU (x){\n return x === x.toUpperCase()\n}\n\nif (len === 1 && isU(s)){\n print(s.toLowerCase())\n}\nelse if ((isL(s[0]) && isU(sb)) || isU(s)){\n print(s[0].toUpperCase()+sb.toLowerCase())\n}else {\n print(s)\n}\n\n"}, {"source_code": "var s = readline();\nvar s1,s2;\nvar f = 1;\nfor(var i = 1; i < s.length; i++){\n\tif(s.charCodeAt(i) >=97 && s.charCodeAt(i) <= 122){\n\t\tf = 0;\n\t\tbreak;\n\t}\n}\nif(f){\n\ts1 = s.slice(0,1).toUpperCase();\n\ts2 = s.slice(1,s.length).toLowerCase();\n\tprint(s1+s2);\n}\nelse\n\tprint(s);\n"}, {"source_code": "const input = readline()\n \nif(input == input.toUpperCase() || /^[a-z][A-Z]*$/.test(input)) {\n print(`{input[0].toUpperCase()}${input.slice(1).toLowerCase()}`)\n} else {\n print(input)\n}\n"}, {"source_code": "// 131A - cAPS lOCK\n// http://codeforces.com/problemset/problem/131/A\n\nfunction main() {\n let s = read();\n let ans = s;\n if (s.length === 1 || s.substring(1, s.length - 1) === s.substring(1, s.length - 1).toUpperCase()) {\n ans = \"\";\n for (let i = 0; i < s.length; i++) {\n if (s[i] === s[i].toUpperCase()) {\n ans += s[i].toLowerCase();\n } else {\n ans += s[i].toUpperCase();\n }\n }\n }\n writeline(ans);\n return 0;\n}\n\nvar input = \"\";\nvar read;\nvar writeline = (x) => process.stdout.write(x + \"\\n\");\nvar write = (x) => process.stdout.write(x);\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf8\");\nprocess.stdin.on(\"data\", (chunk) => input += chunk);\nprocess.stdin.on(\"end\", () => {\n input = input.trim().split(/\\s+/);\n read = () => input.shift();\n process.exit(main() || 0);\n});\n"}, {"source_code": "function main() {\n var s = \"readline()\";\n if(s.length <= 1) {\n if(s === s.toLowerCase()) {\n s = s.toUpperCase();\n }\n print(s);\n } else {\n var i;\n for(i = 1 ; i < s.length ; i++) {\n if(s.charAt(i) !== s.charAt(i).toUpperCase()) {\n break;\n }\n }\n if(i === s.length) {\n var out = \"\";\n for(i = 0 ; i < s.length ; i++) {\n if(s.charAt(i) === s.charAt(i).toUpperCase()) {\n out += s.charAt(i).toLowerCase();\n } else {\n out += s.charAt(i).toUpperCase();\n }\n }\n print(out);\n } else {\n print(s);\n }\n }\n}\n\nmain();"}, {"source_code": "var s = readline();\nif(s === s.toUpperCase() || s === s[0].toLowerCase() + s.slice(1).toUpperCase()){\n print(s[0].toUpperCase() + s.slice(1).toLowerCase());\n}\nelse print(s);"}, {"source_code": "const input = readline()\n \nif(input == input.toUpperCase() ) {\n print(`${input.toLowerCase()}`)\n} else if(/^[a-z][A-Z]+$/.test(input)) {\n print(`${input[0].toUpperCase()}${input.substring(1).toLowerCase()}`)\n} else if(input == input.toLowerCase()) {\n print(input.toUpperCase())\n} else {\n print(input)\n}\n"}, {"source_code": " var word = readline().split(''),\n willChange = false;\n for (var i = 0; i < word.length; i++) {\n if (word[i] == word[i].toUpperCase()) {\n willChange = true;\n } else {\n willChange = false;\n break;\n }\n }\n\n if (willChange == false) {\n for (var j = 0; j < word.length - 1; j++) {\n if (word[0] == word[0].toLowerCase() && word[j + 1] == word[j + 1].toUpperCase()) {\n willChange = true;\n } else {\n willChange = false;\n break;\n }\n }\n }\n\n if (willChange) {\n for (var a = 0; a < word.length; a++) {\n if (word[a] == word[a].toLowerCase()) {\n word[a] = word[a].toUpperCase();\n } else {\n word[a] = word[a].toLowerCase();\n }\n }\n }\n print(word.join(''));"}, {"source_code": "var word = readline();\nvar result = word[0].toUpperCase() + word.slice(1).toLowerCase();\n\nif (word === word.toUpperCase() || word === (word[0].toLowerCase() + word.slice(1).toUpperCase())) {\n print(result); \n} else print(word);"}, {"source_code": "s=readline()\nif(s.toUpperCase()==s || s==s[0].toLowerCase()+s.substr(1).toUpperCase()){\n\ts=s[0].toUpperCase()+s.substr(1).toLowerCase();\n}\nprint(s);"}, {"source_code": "var n = readline();\nvar str= '';\n//print(n[0].toUpperCase()+n.slice(1).toLowerCase());\nfor (var i=0; i= \"a\" && str[i] <= \"z\")\n {\n mode = \"none\";\n break;\n }\n}\n\nif(mode == \"none\")\n{\n print(str);\n}\nelse\n{\n mode = false;\n if(str[0] >= \"a\" && str[0] <= \"z\")\n {\n mode = true;\n }\n str = str.toLowerCase();\n if(mode)\n {\n str[0] = str[0].toUpperCase();\n }\n}\nprint(str);"}, {"source_code": "var str = readline();\nvar mayus = str.toUpperCase();\nif(str==mayus){\n print(str[0]+str.slice(1).toLowerCase());\n}else{\n if(str[0]!=mayus[0] && str.slice(1)==mayus.slice(1)){\n print(str[0].toUpperCase()+str.toLowerCase().slice(1));\n }else if(str==str.toLowerCase()){\n print(str[0].toUpperCase()+str.slice(1));\n }\n}"}, {"source_code": "function Caps(word)\n{\n var i = 0;\n word = word.split('');\n word[0] = word[0].toUpperCase();\n while (i < word.length)\n {\n word[i] = word[i].toLowerCase();\n i++;\n }\n return word.join('');\n}\n\n{\n var input = readline();\n print(Caps(input));\n}"}, {"source_code": "var w = readline();\nfunction isUp(ch) {\n if (ch == ch.toUpperCase()) {\n return true;\n }\n return false;\n}\n\nif (w.length>1&&!isUp(w[0]) && isUp(w[1])){\n if (w.toUpperCase().substring(1) == w.substring(1)){\n w = w[0].toUpperCase() + w.toLowerCase().substring(1);\n\n }\n}\nif (w.toUpperCase() === w) {\n w = w.toLowerCase()\n}\nif (w.length === 1){\n if (w.toUpperCase() === w){\n w = w.toLowerCase();\n }else{\n w = w.toUpperCase();\n }\n}\nwrite(w)"}, {"source_code": "// http://codeforces.com/problemset/problem/131/A\n\n//Input: The first line of the input data contains a word consisting of uppercase and lowercase Latin letters. The word's length is from 1 to 100 characters, inclusive.\nvar word = readline();\n\nvar caps = 0;\n\nif (1 == word.length)\n{\n\tif ( 97 > word.charCodeAt(0))\n\t\tword = word.toLowerCase();\n}\nelse\n{\n\tfor (var i = 1; i < word.length; i++)\n\t{\n\t\tif (97 > word.charCodeAt(i))\n\t\t\tcaps++;\n\t}\n\n\tif (caps == word.length-1)\n\t\tword = word.substr(0,1).toUpperCase() + word.substr(1,word.length-1).toLowerCase();\n}\n\n//Output: Print the result of the given word's processing.\nprint(word);"}, {"source_code": "function isStringUppercase (string) {\n debugger\n return string.toUpperCase() === string;\n}\n\nfunction isFirstLetterLowerCase (string) {\n return string.charAt(0).toLowerCase() === string.charAt(0);\n}\n\nfunction isWrongCase(string) {\n var wrongCase = false;\n\n if (isFirstLetterLowerCase(string) && isStringUppercase(string.slice(1))) {\n wrongCase = true;\n } else if (isStringUppercase(string)) {\n wrongCase = true;\n }\n\n return wrongCase;\n}\n\nfunction invertWrongCaseString (string) {\n if (isWrongCase(string)) {\n return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n } else {\n return string;\n }\n}\n\nvar input = readline();\n\nvar output = invertWrongCaseString.call(null, input);\n\nwrite(output);\n"}, {"source_code": "function typedWithCapsLockKeyAccidentallySwitchedOn(s) {\n\treturn s.match(/^[a-z].*/) && !s.match(/^[a-z].*[a-z]+.*/)\n\t || s.match(/^[A-Z].+/) && !s.match(/^[A-Z].*[a-z]+.*/);\n}\nfunction main() {\n\tvar textLine = readline();\t\t//.split(' ');\n\tif (typedWithCapsLockKeyAccidentallySwitchedOn(textLine)) {\n\t\ttextLine = textLine.substring(0, 1).toUpperCase() + textLine.substring(1).toLowerCase();\n\t}\n\tprint(textLine);\n}\n\nmain();"}, {"source_code": "var txt = readline();\nvar k = txt.split('');\nvar a = k.sort();\nvar l;\nif(txt.length>1){\n \n if(a[0] >= \"A\" && a[a.length-1] <= \"Z\") {\n txt = txt.toLowerCase();\n}\nelse if(txt[0]>= \"a\" && a[a.length-2] <= \"Z\") {\n txt = txt.toLowerCase();\n l = txt[0].toUpperCase();\n txt = txt.replace(txt[0], l);\n }\n}\nelse {\n if(txt[0]>= \"a\" && a[0] <= \"Z\"){\n txt = txt.toLowerCase();\n }\n else\n txt = txt.toUpperCase();\n}\n\nprint(txt);"}, {"source_code": "var string = readline();\nvar changed;\nvar count;\nvar firstLetter = false;\n\nfor (var i=0; i process.stdout.write(x + \"\\n\");\nvar write = (x) => process.stdout.write(x);\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf8\");\nprocess.stdin.on(\"data\", (chunk) => input += chunk);\nprocess.stdin.on(\"end\", () => {\n input = input.trim().split(/\\s+/);\n read = () => input.shift();\n process.exit(main() || 0);\n});\n"}, {"source_code": "var word = readline();\nif (word[0].toLowerCase() || word.slice(1).toUpperCase()) {\n\tprint(word[0].toUpperCase() + word.slice(1).toLowerCase()); \n} else print(word); "}, {"source_code": "function main() {\n var s = readline();\n if(s.length <= 1) {\n if(s === s.toLowerCase()) {\n s = s.toUpperCase();\n }\n print(s);\n } else {\n var i;\n for(i = 1 ; i < s.length ; i++) {\n if(s.charAt(i) !== s.charAt(i).toUpperCase()) {\n break;\n }\n }\n if(i === s.length) {\n var out = \"\";\n for(i = 0 ; i < s.length ; i++) {\n if(s.charAt(i) === s.charAt(i).toUpperCase()) {\n out += s.charAt(i).toLowerCase();\n } else {\n out += s.charAt(i).toUpperCase();\n }\n }\n print(out);\n } else {\n print(s);\n }\n }\n}\n\nmain();"}, {"source_code": "var string = readline();\n\nfor (var i=0; i 1 ){\n\t\tfor(i = 1; i < word.length; i++){\n\t\t\twrite(word.charAt(i).toLowerCase());\n\t\t}\n\t}\n}"}, {"source_code": "const input = readline()\n \nif(input == input.toUpperCase() ) {\n print(`${input.toLowerCase()}`)\n} else if(/^[a-z][A-Z]+$/.test(input)) {\n print(`${input[0].toLowerCase()}${input.substring(1).toUpperCase()}`)\n} else {\n print(input)\n}\n"}, {"source_code": "const input = readline()\n \nif(input == input.toUpperCase() ) {\n print(`${input.toLowerCase()}`)\n} else if(/^[a-z][A-Z]+$/.test(input)) {\n print(`${input[0].toLowerCase()}${input.substring(1).toUpperCase()}`)\n} else {\n print(input)\n}\n"}, {"source_code": "var str = readline();\na = str.split('');\nvar f = false;\nvar res = '';\n\nfor (var i = 1; i < a.length; i++) {\n if (a[i] != a[i].toUpperCase()) {\n print(str);\n f = true;\n break;\n } else res += a[i].toLowerCase();\n}\n\nif (!f) {\n print(a[0].toUpperCase() + res);\n}"}, {"source_code": "function isStringUppercase (string) {\n debugger\n return string.toUpperCase() === string;\n}\n\nfunction isFirstLetterLowerCase (string) {\n return string.charAt(0).toLowerCase() === string.charAt(0);\n}\n\nfunction isWrongCase(string) {\n var wrongCase = false;\n\n if (isFirstLetterLowerCase(string) && isStringUppercase(string.slice(1))) {\n wrongCase = true;\n } else if (isStringUppercase(string)) {\n wrongCase = true;\n }\n\n return wrongCase;\n}\n\nfunction invertWrongCaseString (string) {\n if (isWrongCase(string)) {\n return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n } else {\n return string;\n }\n}\n\nvar input = readline();\n\nvar output = invertWrongCaseString.call(null, input);\n\nwrite(output);\n"}, {"source_code": "var str = readline();\n\n if (str.search(/[A-Z]/)>0){\n\tprint(str[0].toUpperCase()+str.slice(1).toLowerCase());\n\t}\n\t\n\telse if(str.search(/[A-Z]/)==0 && str.slice(1).search(/[A-Z]/>0)){\t\n\tprint(str[0].toUpperCase()+str.slice(1).toLowerCase());\n\t}"}, {"source_code": "var word = readline().toLowerCase().split('');\nword[0] = word[0].toUpperCase();\nprint(word.join(''));"}, {"source_code": "var word = readline().toLowerCase().split('');\nword[0] = word[0].toUpperCase();\nprint(word.join(''));"}, {"source_code": "var s = readline();\nif(s === s.toUpperCase() || s === s[0].toLowerCase() + s.slice(1).toUpperCase()){\n print(s[0].toUpperCase() + s.slice(1).toLowerCase());\n}\nelse print(s);"}, {"source_code": "var str = readline();\nvar reg = /[a-z]+?/;\nif (reg.test(str[0])&®.test(str.slice(1))==false||reg.test(str)==false)\nprint(str[0].toUpperCase()+str.slice(1).toLowerCase());\nelse \nprint(str);"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n let str = readLine();\n str = str[0].toUpperCase() + str.substring(1).toLowerCase();\n console.log(str);\n}\n"}, {"source_code": "data = readline();\nif (doesMatch(data))\n{\n print(data[0].toUpperCase() + data.slice(1).toLowerCase());\n}\nelse\n{\n print(data);\n}\n\nfunction doesMatch(data)\n{\n upperCaseAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n lowerCaseAlphabet = \"abcdefghijklmnopqrstuvwxyz\"\n \n stringLength = data.length;\n flag = true;\n for(index = 1; index < stringLength; index++)\n {\n if (lowerCaseAlphabet.indexOf(data[index]) !== -1)\n {\n flag = false;\n break;\n }\n }\n \n if (lowerCaseAlphabet.indexOf(data[0]) !== -1 || upperCaseAlphabet.indexOf(data[0]) !== -1)\n {\n if (flag)\n {\n return true;\n }\n }\n return false; \n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding(\"utf-8\");\n\nlet currentLine = 0;\nlet inputString = \"\";\n\nprocess.stdin.on(\"data\", (raw_data) => {\n inputString += raw_data;\n});\n\nprocess.stdin.on(\"end\", (_) => {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((line) => {\n return line.trim();\n });\n main();\n});\n\nfunction readLine() {\n return inputString[currentLine++];\n}\n\n/******** Main function*************/\n\nfunction isLowerCase(str) {\n return str == str.toLowerCase() && str != str.toUpperCase();\n}\n\nfunction main() {\n var str = readLine().split(\"\");\n var string = str.join(\"\");\n var Fstr = str[0];\n var EFstr = str.join(\"\").slice(1);\n\n var count = 0;\n\n for (var i = 0; i < str.length; i++) {\n if (isLowerCase(str[i]) == false) {\n count++;\n }\n }\n if (isLowerCase(EFstr) == false && isLowerCase(Fstr)) {\n console.log(Fstr.toUpperCase() + EFstr.toLowerCase());\n } else if (count === str.length) {\n console.log(string.toLowerCase());\n } else {\n console.log(string);\n }\n}\n\n// either it only contains uppercase letters;\n// or all letters except for the first one are uppercase.\n"}, {"source_code": "//var n = readline().split(' ').map(Number);\n\nvar str = readline();\nvar flag = false;\n\nfor (var i = 1; i < str.length; i++) {\n if (str[i] == str[i].toLowerCase()) {\n flag = true;\n }\n}\n\nvar ans = str[0].toUpperCase();\n\nfor (var i = 1; i < str.length; i++) {\n ans += str[i].toLowerCase();\n}\n\nif (flag) {\n ans = str;\n}\n\nprint(ans);"}, {"source_code": "var word = readline().split(''),\n willChange = false;\nfor (var i = 0; i < word.length; i++) {\n if (word[i] == word[i].toUpperCase()) {\n willChange = true;\n } else {\n willChange = false;\n break;\n }\n}\n\nfor (var j = 0; j < word.length - 1; j++) {\n if (word[0] == word[0].toLowerCase() && word[j + 1] == word[j + 1].toUpperCase()) {\n willChange = true;\n } else {\n willChange = false;\n break;\n }\n}\n\nif(willChange){\n word[0] = word[0].toUpperCase();\n for (var a = 0; a < word.length - 1; a++) {\n word[a+1] = word[a+1].toLowerCase();\n }\n}\nprint(word.join(''));"}], "src_uid": "db0eb44d8cd8f293da407ba3adee10cf"} {"nl": {"description": "Vasya has got many devices that work on electricity. He's got n supply-line filters to plug the devices, the i-th supply-line filter has ai sockets.Overall Vasya has got m devices and k electrical sockets in his flat, he can plug the devices or supply-line filters directly. Of course, he can plug the supply-line filter to any other supply-line filter. The device (or the supply-line filter) is considered plugged to electricity if it is either plugged to one of k electrical sockets, or if it is plugged to some supply-line filter that is in turn plugged to electricity. What minimum number of supply-line filters from the given set will Vasya need to plug all the devices he has to electricity? Note that all devices and supply-line filters take one socket for plugging and that he can use one socket to plug either one device or one supply-line filter.", "input_spec": "The first line contains three integers n, m, k (1 ≤ n, m, k ≤ 50) — the number of supply-line filters, the number of devices and the number of sockets that he can plug to directly, correspondingly. The second line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 50) — number ai stands for the number of sockets on the i-th supply-line filter.", "output_spec": "Print a single number — the minimum number of supply-line filters that is needed to plug all the devices to electricity. If it is impossible to plug all the devices even using all the supply-line filters, print -1.", "sample_inputs": ["3 5 3\n3 1 2", "4 7 2\n3 3 2 4", "5 5 1\n1 3 1 2 1"], "sample_outputs": ["1", "2", "-1"], "notes": "NoteIn the first test case he can plug the first supply-line filter directly to electricity. After he plug it, he get 5 (3 on the supply-line filter and 2 remaining sockets for direct plugging) available sockets to plug. Thus, one filter is enough to plug 5 devices.One of the optimal ways in the second test sample is to plug the second supply-line filter directly and plug the fourth supply-line filter to one of the sockets in the second supply-line filter. Thus, he gets exactly 7 sockets, available to plug: one to plug to the electricity directly, 2 on the second supply-line filter, 4 on the fourth supply-line filter. There's no way he can plug 7 devices if he use one supply-line filter."}, "positive_code": [{"source_code": "var homeStructure = readline();\nhomeStructure = homeStructure.split(' ');\nvar supplyLineFilters = Number(homeStructure[0]);\nvar devices = Number(homeStructure[1]);\nvar homeSockets = Number(homeStructure[2]);\nvar supplyLineFiltersSockets = readline();\nsupplyLineFiltersSockets = supplyLineFiltersSockets.split(' ');\nsupplyLineFiltersSocketsNum = [];\nfor (var i = 0; i < supplyLineFiltersSockets.length; i++) {\n supplyLineFiltersSocketsNum.push(Number(supplyLineFiltersSockets[i]));\n}\nsupplyLineFiltersSocketsNum.sort(function(a, b) {\n return b - a;\n});\nvar search = function(devices) {\n var found = 0;\n for (var i = 0; i < supplyLineFiltersSocketsNum.length; i++) {\n if (devices === supplyLineFiltersSocketsNum[i]) {\n found = i;\n break;\n }\n }\n found = supplyLineFiltersSocketsNum.splice(found, 1);\n return found;\n};\nvar usedSupplyLines = 0;\nif (devices <= homeSockets) {\n print(usedSupplyLines);\n} else {\n while ((homeSockets > 0 || supplyLineFiltersSocketsNum.length > 0) && devices > 0) {\n \n \n if (devices <= homeSockets) {\n devices = 0;\n homeSockets = 0;\n break;\n }\n var supplyLineSockets = search(devices);\n \n if (supplyLineSockets) {\n devices -= supplyLineSockets;\n if(homeSockets !== 0){\n \thomeSockets -= 1;\n }\n usedSupplyLines++;\n }\n if(devices !== 0 && homeSockets === 0 && supplyLineFiltersSocketsNum.length !==0){\n \tdevices += 1;\n }\n }\n if (devices > 0) {\n print(-1);\n } else {\n print(usedSupplyLines);\n }\n}\n"}, {"source_code": "(function main() {\n var nmk = readline().split(' ').map(function(x) {return parseInt(x);});\n var n = nmk[0];\n var m = nmk[1];\n var k = nmk[2];\n var a = readline().split(' ').map(function(x) {return parseInt(x);});\n a.sort(function(a, b) {return b - a;});\n var i = 0;\n while (m > k && i < n) {\n k += a[i] - 1;\n ++i;\n }\n if (m > k)\n print(-1);\n else \n print(i);\n})();"}], "negative_code": [{"source_code": "var homeStructure = readline();\nhomeStructure = homeStructure.split(' ');\nvar supplyLineFilters = Number(homeStructure[0]);\nvar devices = homeStructure[1];\nvar homeSockets = homeStructure[2];\nvar supplyLineFiltersSockets = readline();\nsupplyLineFiltersSockets = supplyLineFiltersSockets.split(' ');\nsupplyLineFiltersSocketsNum = [];\nfor (var i = 0; i < supplyLineFiltersSockets.length; i++) {\n supplyLineFiltersSocketsNum.push(Number(supplyLineFiltersSockets[i]));\n}\nsupplyLineFiltersSocketsNum.sort(function(a, b) {\n return b - a;\n});\nvar search = function(devices) {\n var found = 0;\n for (var i = 0; i < supplyLineFiltersSocketsNum.length; i++) {\n if (devices === supplyLineFiltersSocketsNum[i]) {\n found = i;\n break;\n }\n }\n found = supplyLineFiltersSocketsNum.splice(found, 1);\n return found;\n};\nvar usedSupplyLines = 0;\nif (homeSockets === devices || devices < homeSockets) {\n print(usedSupplyLines);\n} else {\n while (homeSockets > 0 && devices > 0) {\n if (devices === homeSockets) {\n devices = 0;\n homeSockets = 0;\n break;\n }\n var supplyLineSockets = search(devices);\n if (supplyLineSockets) {\n devices -= supplyLineSockets;\n homeSockets -= 1;\n usedSupplyLines++;\n }\n if(homeSockets === 0 && supplyLineFiltersSocketsNum.length !==0){\n \thomeSockets += 1;\n \tdevices += 1;\n }\n }\n if (devices > 0) {\n print(-1);\n } else {\n print(usedSupplyLines);\n }\n}\n"}, {"source_code": "var homeStructure = readline();\nhomeStructure = homeStructure.split(' ');\nvar supplyLineFilters = Number(homeStructure[0]);\nvar devices = Number(homeStructure[1]);\nvar homeSockets = Number(homeStructure[2]);\nvar supplyLineFiltersSockets = readline();\nsupplyLineFiltersSockets = supplyLineFiltersSockets.split(' ');\nsupplyLineFiltersSocketsNum = [];\nfor (var i = 0; i < supplyLineFiltersSockets.length; i++) {\n supplyLineFiltersSocketsNum.push(Number(supplyLineFiltersSockets[i]));\n}\nsupplyLineFiltersSocketsNum.sort(function(a, b) {\n return b - a;\n});\nvar search = function(devices) {\n var found = 0;\n for (var i = 0; i < supplyLineFiltersSocketsNum.length; i++) {\n if (devices === supplyLineFiltersSocketsNum[i]) {\n found = i;\n break;\n }\n }\n found = supplyLineFiltersSocketsNum.splice(found, 1);\n return found;\n};\nvar usedSupplyLines = 0;\nif (homeSockets === devices || devices < homeSockets) {\n print(usedSupplyLines);\n} else {\n while ((homeSockets > 0 || supplyLineFiltersSocketsNum.length > 0) && devices > 0) {\n if (devices === homeSockets) {\n devices = 0;\n homeSockets = 0;\n break;\n }\n var supplyLineSockets = search(devices);\n if (supplyLineSockets) {\n devices -= supplyLineSockets;\n if(homeSockets !== 0){\n \thomeSockets -= 1;\n }\n usedSupplyLines++;\n }\n if(devices !== 0 && homeSockets === 0 && supplyLineFiltersSocketsNum.length !==0){\n \tdevices += 1;\n }\n }\n if (devices > 0) {\n print(-1);\n } else {\n print(usedSupplyLines);\n }\n}\n"}, {"source_code": "var homeStructure = readline();\nhomeStructure = homeStructure.split(' ');\nvar supplyLineFilters = Number(homeStructure[0]);\nvar devices = homeStructure[1];\nvar homeSockets = homeStructure[2];\nvar supplyLineFiltersSockets = readline();\nsupplyLineFiltersSockets = supplyLineFiltersSockets.split(' ');\nsupplyLineFiltersSocketsNum = [];\nfor (var i = 0; i < supplyLineFiltersSockets.length; i++) {\n supplyLineFiltersSocketsNum.push(Number(supplyLineFiltersSockets[i]));\n}\nsupplyLineFiltersSocketsNum.sort(function(a, b) {\n return b - a;\n});\nvar search = function(devices) {\n var found = 0;\n for (var i = 0; i < supplyLineFiltersSocketsNum.length; i++) {\n if (devices === supplyLineFiltersSocketsNum[i]) {\n found = i;\n break;\n }\n }\n found = supplyLineFiltersSocketsNum.splice(found, 1);\n return found;\n};\nvar usedSupplyLines = 0;\nif (homeSockets === devices || devices < homeSockets) {\n print(usedSupplyLines);\n} else {\n while (homeSockets > 0 && devices > 0) {\n if (devices === homeSockets) {\n devices = 0;\n homeSockets = 0;\n break;\n }\n var supplyLineSockets = search(devices);\n if (supplyLineSockets) {\n devices -= supplyLineSockets;\n homeSockets -= 1;\n usedSupplyLines++;\n }\n }\n if (devices > 0) {\n print(-1);\n } else {\n print(usedSupplyLines);\n }\n}\n"}, {"source_code": "(function main() {\n var nmk = readline().split(' ').map(function(x) {return parseInt(x);});\n var n = nmk[0];\n var m = nmk[1];\n var k = nmk[2];\n var a = readline().split(' ').map(function(x) {return parseInt(x);});\n a.sort();\n a.reverse();\n var i = 0;\n while (m > k && i < n) {\n k += a[i] - 1;\n ++i;\n }\n if (m > k)\n print(-1);\n else \n print(i);\n})();"}], "src_uid": "b32ab27503ee3c4196d6f0d0f133d13c"} {"nl": {"description": "Professor GukiZ makes a new robot. The robot are in the point with coordinates (x1, y1) and should go to the point (x2, y2). In a single step the robot can change any of its coordinates (maybe both of them) by one (decrease or increase). So the robot can move in one of the 8 directions. Find the minimal number of steps the robot should make to get the finish position.", "input_spec": "The first line contains two integers x1, y1 ( - 109 ≤ x1, y1 ≤ 109) — the start position of the robot. The second line contains two integers x2, y2 ( - 109 ≤ x2, y2 ≤ 109) — the finish position of the robot.", "output_spec": "Print the only integer d — the minimal number of steps to get the finish position.", "sample_inputs": ["0 0\n4 5", "3 4\n6 1"], "sample_outputs": ["5", "3"], "notes": "NoteIn the first example robot should increase both of its coordinates by one four times, so it will be in position (4, 4). After that robot should simply increase its y coordinate and get the finish position.In the second example robot should simultaneously increase x coordinate and decrease y coordinate by one three times."}, "positive_code": [{"source_code": "const readline = require(\"readline\");\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false,\n});\n\nlet c = 0;\nlet x1, y1, x2, y2;\n\nrl.on(\"line\", (d) => {\n if (c === 0) {\n [x1, y1] = d.split(\" \").map(Number);\n c++;\n return;\n }\n\n [x2, y2] = d.split(\" \").map(Number);\n const ans = Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\n console.log(ans);\n c++;\n});\n"}, {"source_code": "function rda(){ return readline().split(\" \").map(Number); };\nfunction rdn(){ return +readline(); };\n\nvar inp = rda();\nvar x1 = inp[0], y1 = inp[1];\ninp = rda();\nvar x2 = inp[0], y2 = inp[1];\n\nvar ans = 0;\nans += Math.min(Math.abs(y2-y1), Math.abs(x2-x1));\nans += Math.max(Math.abs(y2-y1), Math.abs(x2-x1)) - ans;\n\nwrite(ans);"}, {"source_code": "var p1= readline().split(' ');\nvar p2= readline().split(' ');\n\np1[0] = parseInt(p1[0]);\np1[1] = parseInt(p1[1]);\n\np2[0] = parseInt(p2[0]);\np2[1] = parseInt(p2[1]);\n\n\nvar dx = Math.abs( p2[0] - p1[0]);\nvar dy = Math.abs( p2[1] - p1[1]);\n\nvar m = Math.min(dx,dy);\n\ndx-=m;\ndy-=m;\n\nprint(m+dx+dy);"}, {"source_code": "\n\nfunction getPoint (a, b) {\n var xStep, yStep;\n \n if ((a[0]>=0 && b[0]<=0) || (a[0]<=0 && b[0]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(b[0]);\n } else {\n \txStep = a[0]-b[0];\n }\n \n if ((a[1]>=0 && b[1]<=0) || (a[1]<=0 && b[1]>=0)) {\n \tyStep = Math.abs(a[1]) + Math.abs(b[1]);\n } else {\n \tyStep = a[1]-b[1];\n }\n \n return Math.max(Math.abs(xStep), Math.abs(yStep))\n}\n\nvar a = readline().split(\" \").map(function(firstLine) { return parseInt(firstLine); });\nvar b = readline().split(\" \").map(function(secondLine) { return parseInt(secondLine); });\n\nprint(getPoint (a, b));"}, {"source_code": "var a = readline().split(\" \").map(function(firstLine) { return parseInt(firstLine); });\nvar b = readline().split(\" \").map(function(secondLine) { return parseInt(secondLine); });\n\n\nfunction getPoint (a, b) {\n var xStep, yStep;\n \n if ((a[0]>=0 && b[0]<=0) || (a[0]<=0 && b[0]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(b[0]);\n } else {\n \txStep = a[0]-b[0];\n }\n \n if ((a[1]>=0 && b[1]<=0) || (a[1]<=0 && b[1]>=0)) {\n \tyStep = Math.abs(a[1]) + Math.abs(b[1]);\n } else {\n \tyStep = a[1]-b[1];\n }\n \n return Math.max(Math.abs(xStep), Math.abs(yStep))\n}\n\n\nprint(getPoint (a, b));"}, {"source_code": "(function(){var a,b,c,d;a=readline().split(\" \").map(function(a){return+a});c=a[0];d=a[1];b=readline().split(\" \").map(function(a){return+a});a=b[0];b=b[1];a-=c;b-=d;c=d=0;print(Math.max(Math.abs(a),Math.abs(b)))}).call(this);\n"}, {"source_code": "// 620A - Brooks Mershon\nfunction steps(a, b) {\n var count = 0,\n xDelta,\n yDelta;\n\n xDelta = Math.abs(a[0] - b[0]),\n yDelta = Math.abs(a[1] - b[1]);\n count += Math.min(xDelta, yDelta);\n\n a[0] -= sign(a[0] - b[0]) * count;\n a[1] -= sign(a[1] - b[1]) * count;\n \n function sign(x) {\n return typeof x === 'number' ? x ? x < 0 ? -1 : 1 : x === x ? 0 : NaN : NaN;\n }\n \n return count + Math.abs(a[0] - b[0]) + Math.abs(a[1] - b[1]);\n}\n\n// Codeforces I/O\nvar first = readline().split(\" \").map(function(x) { return parseInt(x); }),\n second = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nprint(steps(first, second));\n\n"}], "negative_code": [{"source_code": "function getSteps(a,b) {\n var max = Math.max( Math.abs(b[0])+Math.abs(a[0]), Math.abs(b[1])+Math.abs(a[1]) );\n \n if (max === Math.abs(b[0])+Math.abs(a[0])) { \n return max-a[0]\n } else if (max === Math.abs(b[1])+Math.abs(a[1]) ) {\n return max-a[1]\n }\n}"}, {"source_code": "var parsed_start = readline().split(\" \").map(function(x) { return parseInt(x); });\n\nfunction getPoint (a) {\n var xStep, yStep;\n\t\n if ((a[0]>=0 && a[1]<=0) || (a[0]<=0 && a[1]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(a[1]);\n } else {\n \txStep = a[0]-a[1];\n }\n \n if ((a[2]>=0 && a[3]<=0) || (a[2]<=0 && a[3]>=0)) {\n \tyStep = Math.abs(a[2]) + Math.abs(a[3]);\n } else {\n \tyStep = a[2]-a[3];\n }\n \n return Math.max(xStep, yStep)\n}\n\ngetPoint(parsed_start);"}, {"source_code": "var a = readline().split(\" \").map(function(firstLine) { return parseInt(firstLine); });\nvar b = readline().split(\" \").map(function(secondLine) { return parseInt(secondLine); });\n\nfunction getPoint (a, b) {\n var xStep, yStep;\n \n if ((a[0]>=0 && b[0]<=0) || (a[0]<=0 && b[0]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(b[0]);\n } else {\n \txStep = a[0]-b[0];\n }\n \n if ((a[1]>=0 && b[1]<=0) || (a[1]<=0 && b[1]>=0)) {\n \tyStep = Math.abs(a[1]) + Math.abs(b[1]);\n } else {\n \tyStep = a[1]-b[1];\n }\n \n return Math.max(Math.abs(xStep), Math.abs(yStep))\n}"}, {"source_code": "function getSteps(a,b) {\n var myX = Math.abs(a[0])+Math.abs(b[0]);\n var myY = Math.abs(a[1])+Math.abs(b[1]);\n if (myX > myY) {return myX} else {return myY}\n}"}, {"source_code": "function getPoint (a, b) {\n\tvar xStep, yStep;\n\tif ((a[0]>=0 && b[0]<=0) || (a[0]<=0 && b[0]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(b[0]);\n console.log('xStep', xStep);\n } else {\n \txStep = a[0]-b[0];\n }\n \n if ((a[1]>=0 && b[1]<=0) || (a[1]<=0 && b[1]>=0)) {\n \tyStep = Math.abs(a[1]) + Math.abs(b[1]);\n console.log('yStep', yStep);\n } else {\n \tyStep = a[1]-b[1];\n }\n \n console.log('max', Math.max(xStep, yStep));\n return Math.max(xStep, yStep)\n}"}, {"source_code": "var parsed_start = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar parsed_finish = readline().split(\" \").map(function(y) { return parseInt(y); });\n\nfunction getPoint (a, b) {\n\tvar xStep, yStep;\n\tif ((a[0]>=0 && b[0]<=0) || (a[0]<=0 && b[0]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(b[0]);\n } else {\n \txStep = a[0]-b[0];\n }\n \n if ((a[1]>=0 && b[1]<=0) || (a[1]<=0 && b[1]>=0)) {\n \tyStep = Math.abs(a[1]) + Math.abs(b[1]);\n } else {\n \tyStep = a[1]-b[1];\n }\n \n return Math.max(xStep, yStep)\n}\n\ngetPoint(parsed_start, parsed_finish);"}, {"source_code": "function getSteps(x,y,newX, newY) {\n var myX = Math.abs(x)+Math.abs(newX);\n var myY = Math.abs(y)+Math.abs(newY);\n if (myX > myY) {return myX} else {return myY}\n}"}, {"source_code": "var a = readline().split(\" \").map(function(firstLine) { return parseInt(firstLine); });\nvar b = readline().split(\" \").map(function(secondLine) { return parseInt(secondLine); });\n\nfunction getPoint (a, b) {\n var xStep, yStep;\n \n if ((a[0]>=0 && b[0]<=0) || (a[0]<=0 && b[0]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(b[0]);\n } else {\n \txStep = a[0]-b[0];\n }\n \n if ((a[1]>=0 && b[1]<=0) || (a[1]<=0 && b[1]>=0)) {\n \tyStep = Math.abs(a[1]) + Math.abs(b[1]);\n } else {\n \tyStep = a[1]-b[1];\n }\n \n return Math.max(Math.abs(xStep), Math.abs(yStep))\n}\n\ngetPoint (a, b)"}, {"source_code": "function getSteps(a,b) {\n var max = Math.max( Math.abs(b[0])+Math.abs(a[0]), Math.abs(b[1])+Math.abs(a[1]) );\n \n if (max === Math.abs(b[0])+Math.abs(a[0])) { \n \t\t\t\tif (Math.abs(b[0]) > Math.abs(a[0])) {\n \treturn Math.abs(b[0] - a[0])\n } else {\n \treturn Math.abs(a[0] - b[0])\n } \n } else if (max === Math.abs(b[1])+Math.abs(a[1]) ) {\n if (Math.abs(b[1]) > Math.abs(a[1])) {\n \treturn Math.abs(b[1] - a[1])\n } else {\n \treturn Math.abs(a[1] - b[1])\n } \n }\n}"}, {"source_code": "function getPoint (a, b) {\n var xStep, yStep;\n \n if ((a[0]>=0 && b[0]<=0) || (a[0]<=0 && b[0]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(b[0]);\n } else {\n \txStep = a[0]-b[0];\n }\n \n if ((a[1]>=0 && b[1]<=0) || (a[1]<=0 && b[1]>=0)) {\n \tyStep = Math.abs(a[1]) + Math.abs(b[1]);\n } else {\n \tyStep = a[1]-b[1];\n }\n \n return Math.max(xStep, yStep)\n}\n\nvar a = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar b = readline().split(\" \").map(function(y) { return parseInt(y); });\n\ngetPoint(a,b)"}, {"source_code": "function getPoint (a, b) {\n var xStep, yStep;\n \n if ((a[0]>=0 && b[0]<=0) || (a[0]<=0 && b[0]>=0)) {\n \txStep = Math.abs(a[0]) + Math.abs(b[0]);\n } else {\n \txStep = a[0]-b[0];\n }\n \n if ((a[1]>=0 && b[1]<=0) || (a[1]<=0 && b[1]>=0)) {\n \tyStep = Math.abs(a[1]) + Math.abs(b[1]);\n } else {\n \tyStep = a[1]-b[1];\n }\n \n return Math.max(xStep, yStep)\n}"}, {"source_code": "function getSteps(a,b) {\n var max = Math.max( Math.abs(b[0]), Math.abs(b[1]) );\n \n if (max === Math.abs(b[0])) { \n return max-a[0]\n } else if (max === Math.abs(b[1])) {\n return max-a[1]\n }\n}"}, {"source_code": "(function(){var a,b,c,d;a=readline().split(\" \").map(function(a){return+a});c=a[0];d=a[1];b=readline().split(\" \").map(function(a){return+a});a=b[0];b=b[1];a-=c;b-=d;c=d=0;print(Math.max(a,b))}).call(this);\n"}], "src_uid": "a6e9405bc3d4847fe962446bc1c457b4"} {"nl": {"description": "Andrey received a postcard from Irina. It contained only the words \"Hello, Andrey!\", and a strange string consisting of lowercase Latin letters, snowflakes and candy canes. Andrey thought that this string is an encrypted message, and decided to decrypt it.Andrey noticed that snowflakes and candy canes always stand after the letters, so he supposed that the message was encrypted as follows. Candy cane means that the letter before it can be removed, or can be left. A snowflake means that the letter before it can be removed, left, or repeated several times.For example, consider the following string: This string can encode the message «happynewyear». For this, candy canes and snowflakes should be used as follows: candy cane 1: remove the letter w, snowflake 1: repeat the letter p twice, candy cane 2: leave the letter n, snowflake 2: remove the letter w, snowflake 3: leave the letter e. Please note that the same string can encode different messages. For example, the string above can encode «hayewyar», «happpppynewwwwwyear», and other messages.Andrey knows that messages from Irina usually have a length of $$$k$$$ letters. Help him to find out if a given string can encode a message of $$$k$$$ letters, and if so, give an example of such a message.", "input_spec": "The first line contains the string received in the postcard. The string consists only of lowercase Latin letters, as well as the characters «*» and «?», meaning snowflake and candy cone, respectively. These characters can only appear immediately after the letter. The length of the string does not exceed $$$200$$$. The second line contains an integer number $$$k$$$ ($$$1 \\leq k \\leq 200$$$), the required message length.", "output_spec": "Print any message of length $$$k$$$ that the given string can encode, or «Impossible» if such a message does not exist.", "sample_inputs": ["hw?ap*yn?eww*ye*ar\n12", "ab?a\n2", "ab?a\n3", "ababb\n5", "ab?a\n1"], "sample_outputs": ["happynewyear", "aa", "aba", "ababb", "Impossible"], "notes": null}, "positive_code": [{"source_code": "const readline = require('readline');\n\nvar rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\nfunction readLines(number, cb) {\n const lines = [];\n rl.on('line', function(line) {\n lines.push(line);\n if (lines.length === number) {\n rl.close();\n cb(lines);\n }\n });\n};\n\nfunction readLines(number, cb) {\n const lines = [];\n rl.on('line', function(line) {\n lines.push(line);\n if (lines.length === number) {\n rl.close();\n cb(lines);\n }\n });\n};\n\nfunction doIt(lines) {\n const str = lines[0];\n const k = parseInt(lines[1]);\n const snow = (str.match(/\\*/g)||[]).length;\n const cane = (str.match(/\\?/g)||[]).length;\n const vlen = k - (str.length - 2*(snow+cane));\n\n if (vlen<0) {\n console.log(\"Impossible\");\n } else if (snow===0 && cane 0) {\n\t\tsmallest = smallest.replaceAt(n - 1, String(t - R));\n\t\tprint(smallest);\n\t} else {\n\t\tprint(smallest);\n\t}\n}\n"}, {"source_code": "var a = readline().split(\" \");//readline();\nvar res = \"\";\n\t\tif (a[0]==\"1\"&&a[1]==\"10\"){\n\t\tprint(\"-1\");\n\t\t} else {\n\t\tfor (var i=0; i= 0; i--) {\n\t result = f(xs[i], result);\n\t }\n\t return result;\n\t}\n\texports.foldr = foldr;\n\tfunction concat(xss) {\n\t var total = sum(map(function (xs) { return xs.length; }, xss));\n\t var result = new Array(total);\n\t var m = 0;\n\t for (var i = 0; i < xss.length; i++) {\n\t var xs = xss[i];\n\t for (var j = 0; j < xs.length; j++) {\n\t result[m++] = xs[j];\n\t }\n\t }\n\t return result;\n\t}\n\texports.concat = concat;\n\tfunction sum(xs) {\n\t var result = 0;\n\t for (var i = 0; i < xs.length; i++) {\n\t result += xs[i];\n\t }\n\t return result;\n\t}\n\texports.sum = sum;\n\tfunction product(xs) {\n\t var result = 1;\n\t for (var i = 0; i < xs.length; i++) {\n\t result *= xs[i];\n\t }\n\t return result;\n\t}\n\texports.product = product;\n\tfunction sort(xs, compare) {\n\t return copy(xs).sort(compare);\n\t}\n\texports.sort = sort;\n\tfunction sortInPlace(xs, compare) {\n\t xs.sort(compare);\n\t return xs;\n\t}\n\texports.sortInPlace = sortInPlace;\n\tfunction maximumInRange(xs, s, e) {\n\t var result = xs[s];\n\t for (var i = s + 1; i <= e; i++) {\n\t if (result < xs[i])\n\t result = xs[i];\n\t }\n\t return result;\n\t}\n\texports.maximumInRange = maximumInRange;\n\tfunction maximum(xs) {\n\t return maximumInRange(xs, 0, xs.length - 1);\n\t}\n\texports.maximum = maximum;\n\tfunction maximumInRangeWith(xs, s, e, f) {\n\t var result = f(xs[s]);\n\t for (var i = s + 1; i <= e; i++) {\n\t var candidate = f(xs[i]);\n\t if (result < candidate)\n\t result = candidate;\n\t }\n\t return result;\n\t}\n\texports.maximumInRangeWith = maximumInRangeWith;\n\tfunction maximumWith(xs, f) {\n\t return maximumInRangeWith(xs, 0, xs.length - 1, f);\n\t}\n\texports.maximumWith = maximumWith;\n\tfunction minimumInRange(xs, s, e) {\n\t var result = xs[s];\n\t for (var i = s + 1; i <= e; i++) {\n\t if (result > xs[i])\n\t result = xs[i];\n\t }\n\t return result;\n\t}\n\texports.minimumInRange = minimumInRange;\n\tfunction minimum(xs) {\n\t return minimumInRange(xs, 0, xs.length - 1);\n\t}\n\texports.minimum = minimum;\n\tfunction minimumInRangeWith(xs, s, e, f) {\n\t var result = f(xs[s]);\n\t for (var i = s + 1; i <= e; i++) {\n\t var candidate = f(xs[i]);\n\t if (result > candidate)\n\t result = candidate;\n\t }\n\t return result;\n\t}\n\texports.minimumInRangeWith = minimumInRangeWith;\n\tfunction minimumWith(xs, f) {\n\t return minimumInRangeWith(xs, 0, xs.length - 1, f);\n\t}\n\texports.minimumWith = minimumWith;\n\tfunction replicate(n, x) {\n\t var result = new Array(n);\n\t for (var i = 0; i < result.length; i++) {\n\t result[i] = x;\n\t }\n\t return result;\n\t}\n\texports.replicate = replicate;\n\tfunction take(n, xs) {\n\t return xs.slice(0, n);\n\t}\n\texports.take = take;\n\tfunction drop(n, xs) {\n\t return xs.slice(n);\n\t}\n\texports.drop = drop;\n\tfunction splitAt(n, xs) {\n\t return [take(n, xs), drop(n, xs)];\n\t}\n\texports.splitAt = splitAt;\n\tfunction takeWhile(f, xs) {\n\t for (var i = 0; i < xs.length; i++) {\n\t if (!f(xs[i])) {\n\t return xs.slice(0, i);\n\t }\n\t }\n\t return xs.slice();\n\t}\n\texports.takeWhile = takeWhile;\n\tfunction dropWhile(f, xs) {\n\t for (var i = 0; i < xs.length; i++) {\n\t if (!f(xs[i])) {\n\t return xs.slice(i);\n\t }\n\t }\n\t return [];\n\t}\n\texports.dropWhile = dropWhile;\n\tfunction group(xs) {\n\t if (xs.length == 0)\n\t return [];\n\t var result = [];\n\t var last = [xs[0]];\n\t for (var i = 1; i < xs.length; i++) {\n\t if (last[0] === xs[i]) {\n\t last.push(xs[i]);\n\t }\n\t else {\n\t result.push(last);\n\t last = [xs[i]];\n\t }\n\t }\n\t result.push(last);\n\t return result;\n\t}\n\texports.group = group;\n\tfunction nub(xs) {\n\t if (xs.length == 0)\n\t return [];\n\t var result = [];\n\t result.push(xs[0]);\n\t for (var i = 1; i < xs.length; i++) {\n\t if (xs[i] !== xs[i - 1]) {\n\t result.push(xs[i]);\n\t }\n\t }\n\t return result;\n\t}\n\texports.nub = nub;\n\tfunction filter(f, xs) {\n\t var result = [];\n\t for (var i = 0; i < xs.length; i++) {\n\t if (f(xs[i]))\n\t result.push(xs[i]);\n\t }\n\t return result;\n\t}\n\texports.filter = filter;\n\tfunction zip(xs, ys) {\n\t var n = Prelude_1.min(xs.length, ys.length);\n\t var result = new Array(n);\n\t for (var i = 0; i < n; i++) {\n\t result[i] = [xs[i], ys[i]];\n\t }\n\t return result;\n\t}\n\texports.zip = zip;\n\tfunction unzip(xs) {\n\t var r1 = new Array(xs.length);\n\t var r2 = new Array(xs.length);\n\t for (var i = 0; i < xs.length; i++) {\n\t r1[i] = xs[i][0];\n\t r2[i] = xs[i][1];\n\t }\n\t return [r1, r2];\n\t}\n\texports.unzip = unzip;\n\tfunction range(from, to) {\n\t var result = Array(to - from + 1);\n\t for (var i = from; i <= to; i++) {\n\t result[i - from] = i;\n\t }\n\t return result;\n\t}\n\texports.range = range;\n\tfunction copy(xs) {\n\t return xs.slice(0);\n\t}\n\texports.copy = copy;\n\tfunction apply_permutation(p, xs) {\n\t var n = xs.length;\n\t var result = new Array(n);\n\t for (var i = 0; i < n; i++) {\n\t result[i] = xs[p[i]];\n\t }\n\t return result;\n\t}\n\texports.apply_permutation = apply_permutation;\n\tfunction next_permutation(p) {\n\t var n = p.length;\n\t if (n < 2)\n\t return null;\n\t var r = copy(p);\n\t var k = n - 2;\n\t for (; k >= 0 && r[k] >= r[k + 1]; k--)\n\t ;\n\t if (k < 0)\n\t return null;\n\t for (var i = k + 1, j = n - 1; i < j; i++, j--) {\n\t var t_1 = r[i];\n\t r[i] = r[j];\n\t r[j] = t_1;\n\t }\n\t var next = k + 1;\n\t for (; r[next] <= r[k]; next++)\n\t ;\n\t var t = r[k];\n\t r[k] = r[next];\n\t r[next] = t;\n\t return r;\n\t}\n\texports.next_permutation = next_permutation;\n\tfunction create(n, value) {\n\t return replicate(n, value);\n\t}\n\texports.create = create;\n\tfunction createWith(n, f) {\n\t var result = new Array(n);\n\t for (var i = 0; i < n; i++) {\n\t result[i] = f(i);\n\t }\n\t return result;\n\t}\n\texports.createWith = createWith;\n\tfunction create2D(n1, n2, value) {\n\t return map(function (_) { return replicate(n2, value); }, replicate(n1, 0));\n\t}\n\texports.create2D = create2D;\n\tfunction create2DWith(n1, n2, f) {\n\t var result = new Array(n1);\n\t for (var i = 0; i < n1; i++) {\n\t result[i] = new Array(n2);\n\t for (var j = 0; j < n2; j++) {\n\t result[i][j] = f(i, j);\n\t }\n\t }\n\t return result;\n\t}\n\texports.create2DWith = create2DWith;\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tfunction min(a, b) {\n\t return a < b ? a : b;\n\t}\n\texports.min = min;\n\tfunction max(a, b) {\n\t return a < b ? b : a;\n\t}\n\texports.max = max;\n\tfunction curry(f) {\n\t return function (x) { return function (y) { return f(x, y); }; };\n\t}\n\texports.curry = curry;\n\tfunction uncurry(f) {\n\t return function (x, y) { return f(x)(y); };\n\t}\n\texports.uncurry = uncurry;\n\tfunction id(x) {\n\t return x;\n\t}\n\texports.id = id;\n\tfunction constant(x) {\n\t return function (_) { return x; };\n\t}\n\texports.constant = constant;\n\tfunction flip(f) {\n\t return function (y) { return function (x) { return f(x)(y); }; };\n\t}\n\texports.flip = flip;\n\tfunction flip2(f) {\n\t return function (y, x) { return f(x, y); };\n\t}\n\texports.flip2 = flip2;\n\tfunction compose(g, f) {\n\t return function (x) { return g(f(x)); };\n\t}\n\texports.compose = compose;\n\tfunction gcd(a, b) {\n\t var r = a % b;\n\t while (r !== 0) {\n\t a = b;\n\t b = r;\n\t r = a % b;\n\t }\n\t return b;\n\t}\n\texports.gcd = gcd;\n\n\n/***/ }\n/******/ ]);"}, {"source_code": "var I = readline().split(' ');\n a = parseInt(I[0]), \n b = parseInt(I[1]);\nif(a == 1 && b == 10) print('-1');\nelse {\n var S = \"\" + b;\n var i = 1 + (b == 10);\n for(; i < a; i++) S += '0';\n print(S);\n}"}, {"source_code": "var a = readline().split(\" \").map(function(x) { return parseInt(x); });\nvar n = a[0], t = a[1];\nvar aa = Array(n).join('0')\nif (t < 10) {\n print (t + aa);\n} else if (n > 1){\n print (1 + aa);\n} else {\n print (-1);\n}"}, {"source_code": "try {require('codef');} catch (e){global = this};\nfunction readLineAsArray(separator){return readline().split(typeof separator == \"undefined\" ? ' ' : separator)}\nfunction readLineAsIntegerArray(separator){return readLineAsArray(separator).map(function(v){return +v})}\nArray.prototype.list = function() {var length = arguments.length; for(var i=0; i < length; i++){global[arguments[i]] = this[i]}};\nString.prototype.repeat = function(n){return new Array(n + 1).join(this);}\n\nreadLineAsIntegerArray().list('n', 't');\n\nwrite(n == 1 && t == 10 ? -1 : (n == 1 ? t : t * 2 + (t * 2 < 10 ? '0' : '') + ('0').repeat(n - 2)))"}, {"source_code": "input = readline().split(\" \").map(Number);\nn = input[0];\nt = input[1];\nanswer = \"\";\nif (t == 10) {\n\tif (n == 1) {\n\t\tanswer = \"-1\";\n\t} else {\n\t\tvar answer = \"1\";\n\t\tfor (var i = 1; i < n; i++) \n\t\t\tanswer += \"0\";\n\t}\n} else {\n\tfor (var i = 0; i < n; i++)\n\t\tanswer += t;\n}\nwrite(answer);"}, {"source_code": "function main(){\n\nvar line = readline().split(' ').map(Number);\n\nvar n = line[0];\nvar t = line[1];\n\nif(n===1){\n if(t===10){\n\tprint(-1);\n\treturn;\n }\n print(t);\n return;\n}\n\nvar num = 1;\n\nfor(i=1;i +value);\nvar n = input[0];\nvar t = input[1];\n\nvar result = t < 10 ? new Array(n).fill(t).join('') : n > 1 ? '1' + new Array(n - 1).fill(0).join('') : -1;\n\nwrite(result);\n"}, {"source_code": "X=readline().split(' ').map(Number)\nif (X[0]==1&&X[1]==10)\n print(-1)\nelse\n print(X[1]+'0'.repeat(X[0]-(X[1]==10?2:1)))"}, {"source_code": "// var _i = 0;\n//\n// function readline() {\n// _i ++;\n//\n// switch (_i) {\n// case 1: return '1 10';\n// }\n// }\n//\n// function write(value) {\n// console.log(value);\n// }\n\nfunction getDigitsCount(n) {\n var res = 0;\n\n while (n > 0) {\n n = Math.floor(n / 10);\n res ++;\n }\n\n return res;\n}\n\nvar a = readline().split(' ');\n\nvar n = parseInt(a[0]);\nvar t = parseInt(a[1]);\n\nvar m = getDigitsCount(t);\nvar ans;\n\nif (n < m) {\n ans = -1;\n} else {\n ans = t;\n\n for (var i = 0; i < n-m; i ++) {\n ans = ans + '0';\n }\n}\n\nwrite(ans);\n"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar n = input[0];\nvar t = input[1];\nvar i = 0;\nvar s = \"\";\nif(n == 1 && t == 10) s += \"-1\";\nelse if(t == 10)\n{\n\ts = \"1\";\n\tfor(; i < n - 1; i++) s += \"0\";\n}\nelse\n{\n\tfor(; i < n; i++) s += t;\n}\n\nprint(s);"}, {"source_code": "\nvar isCodeForces = true;\nvar line, lines, echo;\nif(!isCodeForces){\n\tlines = '';\n\tprocess.stdin.resume();\n\tprocess.stdin.on('data', function(buffer){lines += buffer.toString();});\n\tprocess.stdin.on('end', function(){\n\t\tlines = lines.trim().split('\\n');\n\t\techo = console.log;\n\t\twrapper();\n\t});\n}else{\n\tlines = [];\n\twhile(line = readline()){\n\t\tlines.push(line);\n\t}\n\techo = print;\n\twrapper();\n}\n\nfunction wrapper(){\n\tinit();\n\tvar res = main();\n\tif(res != undefined){\n\t\techo(res);\n\t}\n}\n\nfunction main(){\n\tvar line = lines[0].split(' ');\n\tvar a = parseInt(line[0]), b = parseInt(line[1]);\n\tif(b == 10){\n\t\tif(a <= 1)\n\t\t\treturn -1;\n\t\treturn '1' + new Array(a).join('0');\n\t}else{\n\t\treturn new Array(a + 1).join(b + '');\n\t}\n}\n\nfunction init(){\n}\n"}, {"source_code": "var line=readline().split(' ');\nvar answer=\"\";\nif(line[1]>=2&&line[1]<10)\n{\nanswer=line[1];\nfor(var i=0;i<(line[0]-1);i++) answer+=\"0\"; \nprint(answer);\n}\nelse if(line[0]>1&&line[1]==10)\n{\nanswer=\"1\";\nfor(var i=0;i<(line[0]-1);i++) answer+=\"0\";\nprint(answer);\n}\nelse print(\"-1\");"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [n, t] = input[0].split(' ').map(x => parseInt(x));\n let answer = [];\n if (n > 1) {\n for (let i = 0; i < n; i += 1) {\n if (i === 0) answer.push(t);\n else answer.push(0);\n }\n if (t === 10) answer.pop();\n console.log(answer.join(''));\n } else {\n if (t === 10 && n === 1) console.log(-1);\n else console.log(t);\n }\n}); "}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction main() {\n\tconst [n, t] = readLine()\n\t\t.split(' ')\n\t\t.map(x => x >> 0);\n\n\tif (n === 1 && t === 10) {\n\t\tconsole.log(-1);\n\t} else {\n\t\tif (t < 10) {\n\t\t\tconsole.log(`${t}${'0'.repeat(n - 1)}`);\n\t\t} else {\n\t\t\tconsole.log(`1${'0'.repeat(n - 1)}`);\n\t\t}\n\t}\n}\n"}, {"source_code": "var input = readline().split(\" \").map(Number), n = input[0], t = input[1];\nvar a = t, ans, arr = [1];\n\nif((t + \"\").length > n){\n\tans = -1;\n}\nelse{\n\tfor(var i = 1; i < 110; i++){\n\t\tarr[i] = 0;\n\t}\n\n\tif(t == 1 || t == 10){\n\t\tans = arr.concat().splice(0,n).join(\"\");\n\t}\n\telse{\n\t\tarr[0] = t;\n\t\tans = arr.concat().splice(0,n).join(\"\");\n\t}\n}\n\nwrite(ans);"}], "negative_code": [{"source_code": "var input = readline().split(' ').map(Number);\n\nvar n = input[0];\nvar t = input[1];\n\nvar smallest = \"1\";\n\nfor (i = 1; i < n; i++) {\n\tsmallest += \"0\";\n}\n\nvar R = 1;\n\nfor (j = 2; j <= n; j++) {\n\tR = (R * 10) % t;\n}\n\nString.prototype.replaceAt=function(index, character) {\n return this.substr(0, index) + character + this.substr(index+character.length);\n}\n\nif (n == 1 && t == 10) {\n\tprint(\"-1\");\n} else {\n\tif (R > 0) {\n\t\tsmallest = smallest.replaceAt(n - 1, String(t - R));\n\t\tprint(smallest);\n\t} else {\n\t\tprint(smallest);\n\t}\n}\n"}, {"source_code": "var a = readline().split(\" \");//readline();\nvar res = \"\";\n\t\t\n\t\tfor (var i=0; i 5 ? '-1' : t * 2 + (t * 2 < 10 ? '0' : '') + ('0').repeat(n - 2));\n\n\n\n\n\n\n"}, {"source_code": "var line = readline().split(' ').map(Number);\n\nvar n = line[0];\nvar t = line[1];\n\nvar num = Math.pow(10,n-1);\n\nwhile(num%t !== 0){\n num+=1;\n} \n\nprint(num);"}, {"source_code": "function main(){\n\nvar line = readline().split(' ').map(Number);\n\nvar n = line[0];\nvar t = line[1];\n\nif(n===1 && t===10){\n print(-1);\n return;\n}\n\nvar num = 1;\n\nfor(i=1;i +value);\nvar n = input[0];\nvar t = input[1];\n\nvar result = -1;\nfor (var i = +('1' + new Array(n - 1).fill(0).join('')); ('' + i).length === n; ++i) {\n if (i % t === 0) {\n result = i;\n break;\n }\n}\n\nwrite(result);\n"}, {"source_code": "X=readline().split(' ').map(Number)\nif (X[0]==1&&X[1]==10)\n print(-1)\nelse\n print(X[1]+'0'.repeat(X[0]-1))\n "}, {"source_code": "X=readline().split(' ').map(Number)\nprint(X[1]+'0'.repeat(X[0]-1))\n"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar n = input[0];\nvar t = input[1];\nvar i = 0;\nvar s = \"\";\nif(n == 1 && t == 10) s += \"-1\";\nelse if(t == 10)\n{\n\tprint(1);\n\tfor(; i < n - 1; i++) s += \"0\";\n}\nelse\n{\n\tfor(; i < n; i++) s += t;\n}"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar n = input[0];\nvar t = input[1];\nvar i = 0;\n\nif(n == 1 && t == 10) print(-1);\nelse if(t == 10)\n{\n\tprint(1);\n\tfor(; i < n - 1; i++) print(0);\n}\nelse\n{\n\tfor(; i < n; i++) print(t);\n}"}, {"source_code": "var input = readline().split(' ').map(Number);\nvar n = input[0];\nvar t = input[1];\nvar i = 0;\nvar s = \"\";\nif(n == 1 && t == 10) s += \"-1\";\nelse if(t == 10)\n{\n\tprint(1);\n\tfor(; i < n - 1; i++) s += \"0\";\n}\nelse\n{\n\tfor(; i < n; i++) s += t;\n}\n\nprint(s);"}, {"source_code": "\nvar isCodeForces = true;\nvar line, lines, echo;\nif(!isCodeForces){\n\tlines = '';\n\tprocess.stdin.resume();\n\tprocess.stdin.on('data', function(buffer){lines += buffer.toString();});\n\tprocess.stdin.on('end', function(){\n\t\tlines = lines.trim().split('\\n');\n\t\techo = console.log;\n\t\tmain();\n\t});\n}else{\n\tlines = [];\n\twhile(line = readline()){\n\t\tlines.push(line);\n\t}\n\techo = print;\n\tmain();\n}\n\nfunction main(){\n\tinit();\n\tvar x = parseInt(lines[0]);\n\techo(Math.ceil(x / 5));\n}\n\nfunction init(){\n}\n"}, {"source_code": "\nvar isCodeForces = true;\nvar line, lines, echo;\nif(!isCodeForces){\n\tlines = '';\n\tprocess.stdin.resume();\n\tprocess.stdin.on('data', function(buffer){lines += buffer.toString();});\n\tprocess.stdin.on('end', function(){\n\t\tlines = lines.trim().split('\\n');\n\t\techo = console.log;\n\t\twrapper();\n\t});\n}else{\n\tlines = [];\n\twhile(line = readline()){\n\t\tlines.push(line);\n\t}\n\techo = print;\n\twrapper();\n}\n\nfunction wrapper(){\n\tinit();\n\tvar res = main();\n\tif(res != undefined){\n\t\techo(res);\n\t}\n}\n\nfunction main(){\n\tline = lines[0].split(' ');\n\tvar a = parseInt(line[0]), b = parseInt(line[1]);\n\tvar c = Math.ceil(Math.pow(10, a - 1) / b);\n\tvar res = c * b;\n\tif(Math.pow(10, a - 1) <= res && res < Math.pow(10, a))\n\t\treturn res;\n\tres = (c + 1) * b;\n\tif(Math.pow(10, a - 1) <= res && res < Math.pow(10, a))\n\t\treturn res;\n\treturn -1;\n}\n\nfunction init(){\n}\n"}, {"source_code": "var line=readline().split(' ')\nif(line[1]>=2&&line[1]<10)\n{\nprint(line[1]);\nfor(var i=0;i<(line[0]-1);i++) print(\"0\"); \n}\nelse if(line[0]>1&&line[1]==10)\n{\nprint(\"1\");\nfor(var i=0;i<(line[0]-1);i++) print(\"0\");\n}\nelse print(\"-1\");"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let [n, t] = input[0].split(' ').map(x => parseInt(x));\n let answer = [];\n if (n > 1) {\n for (let i = 0; i < n; i += 1) {\n if (i === 0) answer.push(t);\n else answer.push(0);\n }\n\n console.log(answer.join(''));\n } else {\n if (t === 10 && n === 1) console.log(-1);\n else console.log(t);\n }\n}); \n "}, {"source_code": "var input = readline().split(\" \").map(Number), n = input[0], t = input[1];\nvar proof = true, a = t, ans;\n\nif((t + \"\").length > n){\n\tans = -1;\n}\nelse{\n\twhile(proof){\n\t\tif((a + \"\").length == n){\n\t\t\tproof = false;\n\t\t\tans = a;\n\t\t}\n\t\telse{\n\t\t\ta *= t;\n\t\t}\n\t}\n}\n\nwrite(ans);"}, {"source_code": "var input = readline().split(\" \").map(Number), n = input[0], t = input[1];\nvar a = t, ans, arr = [1];\n\nfor(var i = 1; i < 110; i++){\n\tarr[i] = 0;\n}\n\nif(t == 1 || t == 10){\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse{\n\tarr[0] = t;\n\tans = arr.concat().splice(0,n).join(\"\");\n}\n\nwrite(ans);"}, {"source_code": "var input = readline().split(\" \").map(Number), n = input[0], t = input[1];\nvar a = t, ans, arr = [1];\n\nfor(var i = 1; i < 110; i++){\n\tarr[i] = 0;\n}\n\nif(t == 1){\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 2){\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 3){\n\tarr[n-1] = 2;\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 4){\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 5){\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 6){\n\tarr[n-1] = 2;\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 7){\n\tarr[0] = 7;\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 8){\n\tarr[n-1] = 8;\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 9){\n\tarr[n-1] = 8;\n\tans = arr.concat().splice(0,n).join(\"\");\n}\nelse if(t == 10){\n\tans = arr.concat().splice(0,n).join(\"\");\n}\n\nwrite(ans);"}, {"source_code": "var line = readline().split(' ')\n\tif (line[0] == 1 && line[1] == 10) print(\"-1\")\n\telse {\n\t\tif (line[1] == 10)\n\t\t\tprint(\"1\");\n\t\telse\n\t\t\tprint(line[1]);\n\t\tfor (var q = 1; q < line[0]; q++) {\n\t\t\tprint(\"0\")\n\t\t}\n\t}"}, {"source_code": "var line = readline().split(' ')\nvar answer;\n\tif (line[0] == 1 && line[1] == 10) print(\"-1\")\n\telse {\n\t\tif (line[1] == 10)\n\t\t\tanswer = \"1\"\n\t\telse\n\t\t\tanswer = line[1]\n\t\tfor (var q = 1; q < line[0]; q++) {\n\t\t\tanswer += \"0\"\n\t\t}\n\t}\nprint(answer);"}], "src_uid": "77ffc1e38c32087f98ab5b3cb11cd2ed"} {"nl": {"description": "You are given a sequence a consisting of n integers. You may partition this sequence into two sequences b and c in such a way that every element belongs exactly to one of these sequences. Let B be the sum of elements belonging to b, and C be the sum of elements belonging to c (if some of these sequences is empty, then its sum is 0). What is the maximum possible value of B - C?", "input_spec": "The first line contains one integer n (1 ≤ n ≤ 100) — the number of elements in a. The second line contains n integers a1, a2, ..., an ( - 100 ≤ ai ≤ 100) — the elements of sequence a.", "output_spec": "Print the maximum possible value of B - C, where B is the sum of elements of sequence b, and C is the sum of elements of sequence c.", "sample_inputs": ["3\n1 -2 0", "6\n16 23 16 15 42 8"], "sample_outputs": ["3", "120"], "notes": "NoteIn the first example we may choose b = {1, 0}, c = { - 2}. Then B = 1, C =  - 2, B - C = 3.In the second example we choose b = {16, 23, 16, 15, 42, 8}, c = {} (an empty sequence). Then B = 120, C = 0, B - C = 120."}, "positive_code": [{"source_code": "//Don't have to see. start------------------------------------------\nvar read = require('readline').createInterface({\n\tinput: process.stdin, output: process.stdout\n});\nvar obj; var inLine = [];\nread.on('line', function(input){inLine.push(input);});\nread.on('close', function(){\n\tobj = init(inLine);\n\tconsole.error('\\n↑入力 ↓出力');\n\tMain();\n});\nfunction makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}\nfunction nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}\nfunction nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}\nfunction next(){return obj.next();} function hasNext(){return obj.hasNext();}\nfunction init(input){ \n\treturn {\n\t\tlist : input, index : 0, max : input.length,\n\t\thasNext : function(){return (this.index < this.max);},\n\t\tnext : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}\n\t};\n}\nfunction myout(s){console.log(s);}\nfunction myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}\n//param \"no\" is\n//unknown or outlier : return i. 1: parseInt.\n//2: split space. 4: split space and parseInt.\n//6: split 1 character. 7: split 1 character and parseInt.\n//8: join space. 9: join nextline. 0: join no character.\nfunction myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}\n\n//Don't have to see. end------------------------------------------\nfunction Main(){\n\tvar N = nextInt();\n\tvar list = nextIntArray();\n\tvar sum = 0;\n\tfor(var i = 0; i < N; i++){\n\t\tsum += Math.abs(list[i]);\n\t}\n\tmyout(sum);\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\nlet count = 0;\n\nrl.on('line', (d) => {\n if (count === 0) {\n count++;\n return;\n }\n\n const arr = d.split(' ').map(Number);\n let b = 0;\n let c = 0;\n\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] < 0) {\n c += arr[i];\n }\n else {\n b += arr[i];\n }\n }\n\n console.log(b - c);\n\n count++;\n});\n"}, {"source_code": "n=+readline()\nres=0\na=readline().split(' ')\nfor (i=0;ii>=0).reduce((s,c)=>s+ (+c), 0)-nums.filter(i=>i<0).reduce((s,c)=>s+ (+c), 0));"}, {"source_code": "(function() {\n readline();\n var elem = readline().split(' ').map(x => +x);\n \n print(solution(elem));\n})();\n\nfunction solution(elem) {\n var B = elem.filter(x => x > 0).reduce((s, v) => s + v, 0);\n var C = elem.filter(x => x < 0).reduce((s, v) => s + v, 0);\n \n return B - C;\n}"}, {"source_code": "const n = readline();\nconst input = readline();\nconst numbers = input.split(' ');\n\nvar result = 0;\n\nfor (var i = 0; i < n; i++){\n result += Math.abs(numbers[i]);\n}\n\nprint(result);"}, {"source_code": "//var input = readline()\nvar k = readline()\n\nvar n = readline().split(' ')\n\nvar s = 0\nfor(var i=0; i acc + (d < 0 ? -d : d), 0);\nprint(sum);\n"}], "negative_code": [{"source_code": "n=readline()\nres=0\na=readline().split(' ')\nfor (i=0;i acc + (d < 0 ? -d : d), 0);\n print(sum);\n}\n"}], "src_uid": "4b5d14833f9b51bfd336cc0e661243a5"} {"nl": {"description": "Pasha has many hamsters and he makes them work out. Today, n hamsters (n is even) came to work out. The hamsters lined up and each hamster either sat down or stood up.For another exercise, Pasha needs exactly hamsters to stand up and the other hamsters to sit down. In one minute, Pasha can make some hamster ether sit down or stand up. How many minutes will he need to get what he wants if he acts optimally well?", "input_spec": "The first line contains integer n (2 ≤ n ≤ 200; n is even). The next line contains n characters without spaces. These characters describe the hamsters' position: the i-th character equals 'X', if the i-th hamster in the row is standing, and 'x', if he is sitting.", "output_spec": "In the first line, print a single integer — the minimum required number of minutes. In the second line, print a string that describes the hamsters' position after Pasha makes the required changes. If there are multiple optimal positions, print any of them.", "sample_inputs": ["4\nxxXx", "2\nXX", "6\nxXXxXx"], "sample_outputs": ["1\nXxXx", "1\nxX", "0\nxXXxXx"], "notes": null}, "positive_code": [{"source_code": "function trim(s) {\n return s.replace(/^\\s+|\\s+$/gm,'');\n}\nfunction tokenize(s) {\n return trim(s).split(/\\s+/);\n}\nfunction tokenizeIntegers(s) {\n var tokens=tokenize(s);\n for(var i=0; ihamsterNum/2) {\n minutes+=1;\n parts.push('X');\n continue;\n }\n } else {\n standingCount+=1;\n if(standingCount > hamsterNum/2) {\n minutes+=1;\n parts.push('x');\n continue;\n }\n }\n parts.push(hamsters.charAt(i));\n }\n print(minutes);\n print(parts.join(''));\n}\nmain();"}, {"source_code": ";(function () {\n\n\tprint(function (n) {\n\t\tvar s = readline().split(''),\n\t\t\tm = {x: 0, X: 0, mx: n/2, mX: n/2},\n\t\t\tl = 0;\n\n\t\ts.forEach(function (e) { m[e]++; });\n\n\t\tvar pos = -1;\n\t\twhile (m.x !== m.mx && m.X !== m.mX) {\n\t\t\tl++;\n\n\t\t\tif (m.x < m.mx) {\n\t\t\t\tpos = s.indexOf('X', pos + 1);\n\t\t\t\ts[pos] = 'x'; m.x++; m.X--;\n\t\t\t} else {\n\t\t\t\tpos = s.indexOf('x', pos + 1);\n\t\t\t\ts[pos] = 'X'; m.X++; m.x--;\n\t\t\t}\n\t\t}\n\n\t\treturn l + '\\n' + s.join('');\n\t}(+readline()));\n\n}.call(this));\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar hamsterNum = parseInt(readline());\n\tvar hamsters = trim(readline());\n\tvar sittingCount = 0, standingCount = 0;\n\tvar parts = [], minutes = 0;\n\tfor (var i = 0; i < hamsterNum; ++i) {\n\t\tvar hamster = hamsters.charAt(i);\n\t\tif (hamster == 'x') {\n\t\t\tsittingCount += 1;\n\t\t\tif (sittingCount > hamsterNum/2) {\n\t\t\t\tminutes += 1;\n\t\t\t\tparts.push('X');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstandingCount += 1;\n\t\t\tif (standingCount > hamsterNum/2 ) {\n\t\t\t\tminutes += 1;\n\t\t\t\tparts.push('x');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tparts.push(hamsters.charAt(i));\n\t}\n\tprint(minutes);\n\tprint(parts.join(''));\n}\n\nmain();\n"}, {"source_code": "String.prototype.replaceAt=function(index, character) {\n return this.substr(0, index) + character + this.substr(index+character.length);\n}\n\nreadline();\nvar line = readline();\nvar c = 0;\nfor(var i = 0; i < line.length; i++) {\n c += (line.charAt(i) == 'x') ? 1 : 0;\n}\n\nvar r = c - (line.length >> 1);\nvar R = Math.abs(r);\n\ni = 0;\nwhile (r > 0) {\n if (line.charAt(i) == 'x') {\n line = line.replaceAt(i, 'X');\n r--;\n } else {\n i++;\n }\n}\n\ni = 0;\nwhile (r < 0) {\n if (line.charAt(i) == 'X') {\n line = line.replaceAt(i, 'x');\n r++;\n } else {\n i++;\n }\n}\n\nprint(R);\nprint(line);"}, {"source_code": "function main() {\n\n var n = Number(readline());\n\n var line = readline().split('');\n\n\n var res=0;\n for(var i=0;i 0){\n var j=0;\n while (diff>0 && j0 && j b) {\n for (; a > b+1; --a) {\n b++;\n answ++;\n str = str.replaceAt(str.indexOf('x'),'X');\n }\n } else {\n for (; a+1 < b; --b) {\n a++;\n answ++;\n str = str.replaceAt(str.indexOf('X'),'x');\n }\n }\n\n print(answ);\n print(str);\n}\n\n"}, {"source_code": "n = parseInt(readline())\nvar positions = readline()\n\nvar a = 0\nvar b = 0\n\nfor(var i = 0; i < positions.length; i++){\n\tif(positions[i] === \"x\"){\n\t\ta++\n\t}\n\telse{\n\t\tb++\n\t}\n}\n\nnum = Math.abs(a-b)/2\n\nprint(num)\n\nif(a > b){\n\tfor(var i = 0; i < num; i++){\n\t\tpositions = positions.replace(\"x\", \"X\")\n\t}\n}\nelse{\n\tfor(var i = 0; i < num; i++){\n\t\tpositions = positions.replace(\"X\", \"x\")\n\t}\t\n}\n\nprint(positions)"}], "negative_code": [{"source_code": "function trim(s) {\n return s.replace(/^\\s+|\\s+$/gm,'');\n}\nfunction tokenize(s) {\n return trim(s).split(/\\s+/);\n}\nfunction tokenizeIntegers(s) {\n var tokens=tokenize(s);\n for(var i=0; ihamsterNum/2) {\n minutes+=1;\n parts.push('X');\n continue;\n }\n } else {\n standingCount+=1;\n if(standingCount > hamsterNum/2) {\n minutes+=1;\n parts.push('x');\n continue;\n }\n }\n parts.push(hamsters.charAt(i));\n }\n print(minutes);\n print(parts.join(' '));\n}\nmain();"}, {"source_code": ";(function () {\n\n\tprint(function (n) {\n\t\tvar s = readline().split(''),\n\t\t\tm = {x: 0, X: 0},\n\t\t\tl = 0;\n\n\t\ts.forEach(function (e) { m[e]++; });\n\n\t\tm.x = Math.abs(m.x - n/2);\n\t\tm.X = Math.abs(m.X - n/2);\n\n\t\tif (m.x === 0 && m.X === 0) return '0\\n' + s.join('');\n\n\t\tfor (var i = 0; i < n; i++) {\n\t\t\tif (s[i] === 'x' && m.x) {\n\t\t\t\ts[i] = 'X'; m.x--; m.X--; l++\n\t\t\t} else if (m.X) {\n\t\t\t\ts[i] = 'x'; m.X--; m.x--; l++\n\t\t\t}\n\t\t}\n\n\t\treturn l + '\\n' + s.join('');\n\t}(+readline()));\n\n}.call(this));\n"}, {"source_code": "function trim(s) {\n\treturn s.replace(/^\\s+|\\s+$/gm, '');\n}\n\nfunction tokenize(s) {\n\treturn trim(s).split(/\\s+/);\n}\n\nfunction tokenizeIntegers(s) {\n\tvar tokens = tokenize(s);\n\tfor (var i = 0; i < tokens.length; i += 1) {\n\t\ttokens[i] = parseInt(tokens[i], 10);\n\t};\n\treturn tokens;\n}\n\nfunction main() {\n\tvar hamsterNum = parseInt(readline());\n\tvar hamsters = trim(readline());\n\tvar sittingCount = 0, standingCount = 0;\n\tvar parts = [], minutes = 0;\n\tfor (var i = 0; i < hamsterNum; ++i) {\n\t\tif (hamsters.charAt(i) == 'x') {\n\t\t\tsittingCount += 1;\n\t\t}\n\t\telse {\n\t\t\tstandingCount += 1;\n\t\t}\n\t\tif (standingCount > hamsterNum/2) {\n\t\t\tminutes += 1;\n\t\t\tparts.push('x');\n\t\t}\n\t\telse if (sittingCount > hamsterNum/2) {\n\t\t\tminutes += 1;\n\t\t\tparts.push('X');\n\t\t}\n\t\telse {\n\t\t\tparts.push(hamsters.charAt(i));\n\t\t}\n\t}\n\tprint(minutes);\n\tprint(parts.join(''));\n}\n\nmain();\n"}, {"source_code": "var line = readline();\nvar c = 0;\nfor(var i = 0 ; i < line.length; i++) {\n c += (line.charAt(i) == 'x') ? 1 : 0;\n}\nprint(c);\nvar r = c - (line.length >> 1);\nprint(Math.abs(r));"}, {"source_code": "var line = readline();\n\nvar c = 0;\nfor(var i = 0 ; i < line.length; i++) {\n c += (line[i] == 'x') ? 1 : 0;\n}\n\nprint(Math.abs(c - (line.length >> 1)));"}, {"source_code": "var line = readline();\n\nvar c = 0;\nfor(var i = 0 ; i < line.length; i++) {\n c += (line[i] == 'x') ? 1 : 0;\n}\nprint(c);\nvar r = c - (line.length >> 1);\nprint(Math.abs(r));"}, {"source_code": "String.prototype.replaceAt=function(index, character) {\n return this.substr(0, index) + character + this.substr(index+character.length);\n}\n\nvar line = readline();\nvar c = 0;\nfor(var i = 0; i < line.length; i++) {\n c += (line.charAt(i) == 'x') ? 1 : 0;\n}\n\nvar r = c - (line.length >> 1);\nvar R = Math.abs(r);\n\ni = 0;\nwhile (r > 0) {\n if (line.charAt(i) == 'x') {\n line = line.replaceAt(i, 'X');\n r--;\n } else {\n i++;\n }\n}\n\ni = 0;\nwhile (r < 0) {\n if (line.charAt(i) == 'X') {\n line = line.replaceAt(i, 'x');\n r++;\n } else {\n i++;\n }\n}\n\nprint(\"\" + R);\nprint(\"\" + line);"}, {"source_code": "String.prototype.replaceAt=function(index, character) {\n return this.substr(0, index) + character + this.substr(index+character.length);\n}\n\nvar line = readline();\nvar c = 0;\nfor(var i = 0; i < line.length; i++) {\n c += (line.charAt(i) == 'x') ? 1 : 0;\n}\n\nvar r = c - (line.length >> 1);\nvar R = Math.abs(r);\n\ni = 0;\nwhile (r > 0) {\n if (line.charAt(i) == 'x') {\n line = line.replaceAt(i, 'X');\n r--;\n } else {\n i++;\n }\n}\n\ni = 0;\nwhile (r < 0) {\n if (line.charAt(i) == 'X') {\n line = line.replaceAt(i, 'x');\n r++;\n } else {\n i++;\n }\n}\n\nprint(R);\nprint(line);"}, {"source_code": "var n = parseInt(readline());\nvar str = readline();\n\nvar a = 0, b = 0;\n\nfor (var i = 0; i < str.length; ++i) {\n if (str[i] === 'x') {\n a++;\n } else {\n b++;\n }\n}\n\nString.prototype.replaceAt=function(index, character) {\n return this.substr(0, index) + character + this.substr(index+character.length);\n}\n\nvar answ = 0;\nif(a == b) {\n print(0);\n print(str);\n} else {\n\n if (a > b) {\n\n for (; a > b+1; --a) {\n answ++;\n str = str.replaceAt(str.indexOf('x'),'X');\n }\n } else {\n for (; a+1 < b; --b) {\n answ++;\n str = str.replaceAt(str.indexOf('X'),'x');\n }\n }\n\n print(answ);\n print(str);\n}\n\n"}, {"source_code": "n = Number(readline())\npositions = readline()\n\nvar a = 0\nvar b = 0\n\nfor(var i = 0; i < positions.length; i++){\n\tif(positions[i] === \"x\"){\n\t\ta++\n\t}\n\telse{\n\t\tb++\n\t}\n}\n\nprint(Math.abs(a-b)/2)"}], "src_uid": "fa6311c72d90d8363d97854b903f849d"} {"nl": {"description": "HQ9+ is a joke programming language which has only four one-character instructions: \"H\" prints \"Hello, World!\", \"Q\" prints the source code of the program itself, \"9\" prints the lyrics of \"99 Bottles of Beer\" song, \"+\" increments the value stored in the internal accumulator.Instructions \"H\" and \"Q\" are case-sensitive and must be uppercase. The characters of the program which are not instructions are ignored.You are given a program written in HQ9+. You have to figure out whether executing this program will produce any output.", "input_spec": "The input will consist of a single line p which will give a program in HQ9+. String p will contain between 1 and 100 characters, inclusive. ASCII-code of each character of p will be between 33 (exclamation mark) and 126 (tilde), inclusive.", "output_spec": "Output \"YES\", if executing the program will produce any output, and \"NO\" otherwise.", "sample_inputs": ["Hi!", "Codeforces"], "sample_outputs": ["YES", "NO"], "notes": "NoteIn the first case the program contains only one instruction — \"H\", which prints \"Hello, World!\".In the second case none of the program characters are language instructions."}, "positive_code": [{"source_code": "var a = readline();\nif(a){\n\tprint( /[HQ9]/.test(a) ? 'YES' : 'NO');\t\n}else{\n\tprint('YES');\n}\n"}, {"source_code": "var p = readline();\n\nif( (p == undefined) || p.indexOf(\"H\")+1 || p.indexOf(\"Q\")+1 || p.indexOf(\"9\")+1 ){\n\twrite(\"YES\");\n}\nelse{\n\twrite(\"NO\");\n}"}, {"source_code": "var a = readline();\nif(a){\n print( /[HQ9]/.test(a) ? 'YES' : 'NO'); \n}else{\n print('YES');\n}"}, {"source_code": "var s=readline();\n\nif(s)\n print((/[HQ9]/.test(s)) ? 'YES' : 'NO');\nelse\n print('YES');"}, {"source_code": "a = readline();\nprint(a?(/[HQ9]/.test(a)?\"YES\":\"NO\"):\"YES\")"}, {"source_code": "var s = readline();\nvar ans = \"NO\";\nif (s) {\n\n for (var i = 0; i < s.length; i++) {\n if (s[i] == 'H' || s[i] == 'Q' || s[i] == '9') {\n var ans = \"YES\";\n break;\n }\n }\n print(ans);\n}\nelse {\n print(\"YES\");\n}"}, {"source_code": "var s = readline();\nvar ans = \"NO\";\nif (s) {\n\n for (var i = 0; i < s.length; i++) {\n if (s[i] == 'H' || s[i] == 'Q' || s[i] == '9') {\n var ans = \"YES\";\n break;\n }\n }\n print(ans);\n}\nelse {\n print(\"YES\");\n}"}, {"source_code": "var string = readline();\nvar ans = \"NO\";\nif(string){\n for (var i = 0; i < string.length; i++) {\n if (string[i]=='H'||string[i]=='Q'||string[i]=='9') {\n ans = \"YES\";\n break;\n }\n }\n if(string){\n print(ans);\n\n\n }\n}\nelse{\n print(\"YES\");\n}"}, {"source_code": "var line = readline();\nprint(line?(line.match(/[HQ9]/)? 'YES': 'NO'): 'YES');\n"}, {"source_code": "var rp = /[HQ9]/g;\nvar str = readline();\n\nif (str)\nrp.test(str)? print(\"YES\"):print(\"NO\")\nelse \nprint(\"YES\");"}, {"source_code": "\nvar input=readline();\n\ntry{\n var n=input.length;\n}catch (e){\n input='Q';\n n=1;\n}\nvar check=false;\nfor(var i=0;i= 0) \n || (program.indexOf(\"Q\") >= 0)\n || (program.indexOf(\"9\") >= 0)\n ) ? \"YES\" : \"NO\");\n} catch (e) {\n print(\"YES\");\n}"}, {"source_code": "string = readline();\nif (string == undefined) print(\"YES\")\nelse if (/[HQ9]/.test(string)) print(\"YES\");\nelse print(\"NO\");"}, {"source_code": "var tes = /[HQ9]/g;\nvar str = readline();\n\nif (str)\ntes.test(str)? print(\"YES\"):print(\"NO\")\nelse \nprint(\"YES\");"}, {"source_code": "function check(str)\n{\nif (str === undefined) return \"YES\";\nfor (var i = 0; i < str.length; ++i) {\nif (str[i] == \"Q\" || str[i] == \"H\" || str[i] == \"9\") return \"YES\";\n}\nreturn \"NO\";\n}\n\nvar input = readline();\nprint(check(input));"}, {"source_code": "const input = readline()\n\nif(input) {\n const output = /[HQ9]/.test(input)\n print(output ? 'YES': 'NO')\n} else {\n print('YES')\n}"}, {"source_code": "var s = readline();\nif (s === undefined) print('YES');\nelse {\nvar x = s.replace(/[HQ9]/, '');\nprint(s.length > x.length? 'YES': 'NO');\n}"}, {"source_code": "var input = readline();\nif (input){\nif (input.toString().match(/[HQ9]/)){\n print(\"YES\");\n} else print(\"NO\")} else print(\"YES\");"}, {"source_code": ";(function () {\n\nvar a = readline();\nif(a) print(/[HQ9]/.test(a) ? 'YES' : 'NO');\nelse print('YES');\n\n}).call(this);"}, {"source_code": "var input = readline();\nprint(input?(input.match(/[HQ9]/)? \"YES\":\"NO\") : \"YES\");"}, {"source_code": "\n var word = readline(),\n isTrue = false;\n if (word == undefined) {\n print(\"YES\");\n } else {\n word = word.split(\"\");\n for (var i = 0; i < word.length; i++) {\n if (word[i] == \"H\" || word[i] == \"Q\" || word[i] == \"9\") {\n isTrue = true;\n break;\n } else {\n isTrue = false;\n }\n }\n\n if (isTrue) {\n print(\"YES\");\n } else {\n print(\"NO\");\n }\n }\n "}, {"source_code": "var word = readline();\nprint(word?(/[HQ9]/.test(word)?\"YES\":\"NO\"):\"YES\");"}, {"source_code": "var s=readline();\n\nif(s)\n print((/[HQ9]/.test(s)) ? 'YES' : 'NO');\nelse\n print('YES');"}, {"source_code": "var p = readline();\nif(p){\n\tprint((/[HQ9]/.test(p))? 'YES' : 'NO');\n}else\n\tprint('YES');"}, {"source_code": "var p = readline();\nif(p)\n\tprint((/[HQ9]/.test(p))? 'YES' : 'NO');\nelse\n\tprint('YES');"}, {"source_code": "var str = readline();\nif(str)\n{\n var l = str.length;\n var second = true;\n for(var i = 0; i < l; ++i)\n {\n if(str[i] == \"H\" || str[i] == \"Q\" || str[i] == \"9\"){second = false;}\n }\n print(second ? \"NO\" : \"YES\");\n}\nelse\n{\n print(\"YES\");\n} "}, {"source_code": "var palabra = readline();\n var bola = false;\n if(palabra==undefined){\n print(\"YES\");\n }\n else{\n for(var i=0;i {\n\trl.close();\n\tconsole.log(/[HQ9]/g.test(answer) ? \"YES\" : \"NO\");\n});\n"}, {"source_code": "const readline = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout\n})\nreadline.question(\"\",ans=>{\n if(ans.match(/[HQ9]/g))\n console.log(\"YES\")\n else\n console.log(\"NO\")\n readline.close()\n})\n\n\n\n\n/* ahsgdiojidqh iuwhu\nHqweuyquir\nljhfasQkajshd\nosaufHlaksjd\nQaslkdhjasd */"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const str = readLine();\n\n if (str.includes(\"H\") || str.includes(\"Q\") || str.includes(\"9\")) {\n console.log(\"YES\");\n } else {\n console.log(\"NO\");\n }\n}\n"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const str = readLine();\n let countPlus = 0;\n const nums = str.split(\"\").reduce((obj, char) => {\n if (char - char === 0) obj[char] = char;\n return obj;\n }, {});\n\n for (let i = 0; i < str.length; i++) {\n if (str[i] === \"+\") countPlus++;\n }\n\n Object.keys(nums).forEach((key) => {\n nums[key] = +nums[key] + countPlus;\n });\n\n if (str.includes(\"H\") || str.includes(\"Q\") || str.includes(\"9\")) {\n console.log(\"YES\");\n } else {\n console.log(\"NO\");\n }\n}\n"}, {"source_code": "// Alternative\n// https://www.npmjs.com/package/competitive-programming-js\n\"use strict\"\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', inputStdin => { inputString += inputStdin; });\nprocess.stdin.on('end', _ => {\n inputString = inputString.trim().split('\\n').map(string => {\n return string.trim();\n });\n main();\n});\nfunction readline() { return inputString[currentLine++]; }\nconst println = (x = \"\") => process.stdout.write(String(x) + \"\\n\");\nconst print = x => { process.stdout.write(String(x)); }\n// >>>>>>>>>>>>> Main starts here <<<<<<<<<<<<<<\n\nfunction main() {\n let s = readline();\n let f = 0;\n if (s.includes(\"H\")) f = 1;\n if (s.includes(\"Q\")) f = 1;\n if (s.includes(\"9\")) f = 1;\n println(f ? \"YES\" : \"NO\");\n}\n"}, {"source_code": "//HQ9+\n\nconst {EOL} = require('os');\n\nlet inp = '';\n\nprocess.stdin.on('data', c => inp += c);\n\nprocess.stdin.on('end', () => {\n let lines = inp.split(EOL)[0];\n \n for(let i in lines) {\n \tif('HQ9'.indexOf(lines[i]) != -1) {\n \t\tprocess.stdout.write(\"YES\");\n \t\treturn;\n \t}\n }\n\n process.stdout.write(\"NO\");\n return;\n});"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (str) => {\n if (/[HQ9]/.test(str)) {\n console.log('YES');\n }\n else {\n console.log('NO');\n }\n});\n"}, {"source_code": "const readLine = require('readline').createInterface({\n input: process.stdin,\n output: process.stdout,\n});\n\nconst input = [];\nreadLine.on('line', line => input.push(line));\n\nreadLine.on('close', () => {\n let str = input[0];\n\n for (let i = 0; i < str.length; i += 1) {\n if (str[i] === 'H' || str[i] === 'Q' || str[i] === '9') {\n console.log('YES'); process.exit();\n }\n }\n\n console.log('NO');\n});"}, {"source_code": "let inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', data => {\n\tinputString += data;\n});\nprocess.stdin.on('end', function () {\n\tinputString = inputString\n\t\t.trim()\n\t\t.split('\\n')\n\t\t.map(str => str.trim());\n\tmain();\n});\n\nfunction readLine() {\n\treturn inputString[currentLine++];\n}\n\nfunction isPrime(x) {\n\tlet s = Math.sqrt(x);\n\tlet i = 2;\n\twhile (i <= s) {\n\t\tif (x % i === 0) {\n\t\t\treturn false;\n\t\t}\n\t\ti++;\n\t}\n\treturn true;\n}\n\nfunction main() {\n\tlet prog = readLine().split('');\n\tlet grammar = {\n\t\tH: true,\n\t\tQ: true,\n\t\t9: true,\n\t};\n\n\tlet flag = false;\n\n\tfor (let i = 0, l = prog.length; i < l; ++i) {\n\t\tif (grammar[prog[i]]) {\n\t\t\tflag = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\tflag ? console.log('YES') : console.log('NO');\n}\n"}, {"source_code": "process.stdin.resume();\nprocess.stdin.setEncoding('utf-8');\nlet inputString = '';\nlet currentLine = 0;\nprocess.stdin.on('data', (inputStd) => {\n inputString += inputStd;\n});\nprocess.stdin.on('end', function () {\n inputString = inputString\n .trim()\n .split('\\n')\n .map((str) => {\n return str.trim();\n });\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\n\nfunction main() {\n let word = readLine();\n if (word.includes('H') || word.includes('Q') || word.includes('9')) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n}\n"}, {"source_code": "let fs = require('fs')\n\nlet txt = fs.readFileSync(0, \"utf-8\").split(\"\\r\\n\").filter(data => {\n return data.length > 0\n});\nfor (let i = 0; i < txt.length; i ++) {\n doit(txt[i])\n}\n\nfunction doit(str) {\n\n if(str.match(\"H\")!=null || str.match(\"Q\")!=null || str.match(\"/\\+/\")!=null || str.match(\"9\")!=null){\n console.log(\"YES\");\n }else{\n console.log('NO');\n \n }\n}"}, {"source_code": "var word = readline();\nprint( word ? ((word.indexOf('H') > -1 || word.indexOf('Q') > -1 || word.indexOf('9') > -1) ? 'YES' : 'NO') : 'YES');"}, {"source_code": "var str = readline();\nvar bool = false;\nif (str === undefined)\n write(\"YES\\n\");\nelse{\n var lng = str.length;\n for (var i = 0; i < lng; i++) {\n if( str[i] == \"+\" )\n continue;\n if( str[i] == \"H\" || str[i] == \"Q\" || str[i] == 9){\n bool = true;\n break;\n }\n }\n if(bool)\n write(\"YES\\n\");\n else\n write(\"NO\\n\"); \n}"}, {"source_code": "var str = readline();\nif (str === undefined)\n write(\"YES\\n\");\nelse{\n var x = str.replace(/[HQ9]/, '');\n write(str.length > x.length ? \"YES\" : \"NO\");\n}\n"}, {"source_code": "// HQ9+ is a joke programming language which has only four one-character instructions:\n\n// \"H\" prints \"Hello, World!\",\n// \"Q\" prints the source code of the program itself,\n// \"9\" prints the lyrics of \"99 Bottles of Beer\" song,\n// \"+\" increments the value stored in the internal accumulator.\n\n// Instructions \"H\" and \"Q\" are case-sensitive and must be uppercase. The characters of the program which are not instructions are ignored.\n\n// You are given a program written in HQ9+. You have to figure out whether executing this program will produce any output.\n\n// Input\n// The input will consist of a single line p which will give a program in HQ9+. String p will contain between 1 and 100 characters, inclusive. ASCII-code of each character of p will be between 33 (exclamation mark) and 126 (tilde), inclusive.\n\n// Output\n// Output \"YES\", if executing the program will produce any output, and \"NO\" otherwise.\n\n//if (readline().match(/H|Q|9/g)) {print(\"YES\")}else {print(\"NO\")}\n\nvar s = readline()\nprint(s?(s.match(/[HQ9]/)? \"YES\": \"NO\"): \"YES\")\n"}, {"source_code": "//var n = readline().split(' ').map(Number);\nvar s = readline();\nvar ans = \"NO\";\nif (s) {\n\n for (var i = 0; i < s.length; i++) {\n if (s[i] == 'H' || s[i] == 'Q' || s[i] == '9') {\n var ans = \"YES\";\n break;\n }\n }\n print(ans);\n}\nelse {\n print(\"YES\");\n}\n"}, {"source_code": "// wtf\nvar str = readline();\nif (str) {\n var answer = \"NO\";\n for(var i = 0; i < str.length; i++){\n if(str[i]=== \"H\" || str[i] === 'Q' || str[i] === '9'){\n answer = \"YES\";\n break;\n } \n }\n print(answer);\n} else {\n print(\"YES\");\n}\n"}, {"source_code": "str = readline();\nif(str)\n\t print((/[HQ9]/.test(str))? \"YES\" : \"NO\" ) ;\n else\n\t print(\"YES\");"}, {"source_code": "var input = readline();\nprint(input?(input.match(/[HQ9]/)? 'YES': 'NO'): 'YES');\n\n"}], "negative_code": [{"source_code": "var linea = new String(readline());\nif (linea.length>1) {\n linea = linea.substring(0, linea.length - 1);\n}\n\nvar res;\nvar centinela = false;\n\nif (linea.charAt(0)=='k' || linea.charAt(0)=='K') {\n centinela = true;\n}else if (linea.lastIndexOf('H') != -1 || linea.lastIndexOf('Q') != -1 || linea.lastIndexOf('9') != -1 || linea.indexOf(\"\\\\\")!=-1) {\n centinela = true;\n \n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\nprint(res);"}, {"source_code": "var rp = /[HQ9+]/g;\nvar r = /[=+]\\w/g;\nvar str = readline();\n\nif (rp.test(str)&&r.test(str)===false)\n\tprint (\"YES\");\nelse \n\tprint (\"NO\");\n\n"}, {"source_code": "var word = readline();\nprint((word.replace(/HQ9+/,\"\")==word)?\n \"YES\":\"NO\");"}, {"source_code": "var line = readline();\nprint(line?(line.match(/[HQ9]/)? 'YES': 'NO'): 'NO');\n"}, {"source_code": "var instruction = readline()\n var result = 'NO'\n\n var validInstructions = /[HQ9]/\n\n result = validInstructions.test(instruction) ? 'YES' : 'NO'\n\n print(result)"}, {"source_code": "var rp = /[HQ9+]/g;\nvar str = readline();\n\nif (rp.test(str))\n\tprint(\"YES\");\nelse \n\tprint(\"NO\");\n"}, {"source_code": "str = readline();\nif(str.charAt(0) == \"H\" || str.charAt(0) == \"Q\" || str.charAt(0) == \"9\" || str.charAt(0) == \"+\")\n{print(\"YES\");}\nelse{print(\"NO\");}"}, {"source_code": "b = readline();\n\nif( b.indexOf('H') == 0 || b.indexOf('Q') == 0 || b.indexOf('9') == 0 || b.indexOf('+') == 0 ) {\n \n print('YES')\n}\nelse {\n print('NO')\n \n}"}, {"source_code": "var rp = /[HQ9]/g;\nvar str = readline();\n\nif (rp.test(str))//&&r.test(str)===false)\n\tprint(\"YES\");\nelse \n\tprint(\"NO\");\n\n"}, {"source_code": "var linea = new String(readline());\n//var linea = \"lkjsdhgfskfghilskfh9g\";\nvar res;\nvar centinela = false;\n\nif (linea.indexOf('H') != -1 || linea.indexOf('Q') != -1 || linea.indexOf('9') != -1) {\n centinela = true;\n} else if (linea.charAt(0) == 'k') {\n centinela == true;\n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\n//alert(res)\nprint(res);"}, {"source_code": "function check(str)\n{\n for (var i = 0; i <= str.length - 1; i++)\n {\n if ((str[i] === 'H') || (str[i] === 'Q') || (str[i] === '9') || (str[i] === '+') ) return \"YES\";\n }\n return \"NO\";\n}\n\n{\n var input = readline();\n print(check(input));\n}"}, {"source_code": "var string = readline();\nvar ans = \"NO\";\nif(string){\n for (var i = 0; i < string.length; i++) {\n if (string[i]=='H'||string[i]=='Q'||string[i]=='9') {\n ans = \"YES\";\n break;\n }\n }\n print(ans);\n}"}, {"source_code": "var rp = /[HQ9+]\\w/g;\nvar r = /=/g;\nvar str = readline();\n\nif (str.length>1&&rp.test(str)&&r.test(str)===false)\n\tprint(\"YES\");\nelse \n\tprint(\"NO\");\n\n"}, {"source_code": "\nvar input = \"CODE!\";\nprint(input ? (input.match(/[HQ9]/)? \"YES\":\"NO\"):\"YES\");\n"}, {"source_code": "var linea = new String(readline());\n//var linea = \"lkjsdhgfskfghilskfh9g\";\nvar res;\nvar centinela = false;\n\nif (linea.indexOf('H') != -1 || linea.indexOf('Q') != -1 || linea.indexOf('9') != -1) {\n centinela = true;\n} else if (linea.charAt(0) == 'k') {\n centinela == true;\n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\n//alert(res)\nprint(res);"}, {"source_code": "const input = readline()\nconst output = input.match(/[HQ9]/g)\nprint(output)"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (str) => {\n if (/[HQ0-9+]/.test(str)) {\n console.log('YES');\n }\n else {\n console.log('NO');\n }\n});\n"}, {"source_code": "const input = readline() || ''\nconst output = input.match(/[HQ9]/g) ? 'YES': 'NO'\nprint(output)"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (str) => {\n if (/[HQ0-9]/.test(str)) {\n console.log('YES');\n }\n else {\n console.log('NO');\n }\n});\n"}, {"source_code": " function main()\n {\n var str = readline();\n var l = str.length;\n for(var i = 0; i < l; ++i)\n {\n if(str[i] == \"H\" || str[i] == \"Q\" || str[i] == \"9\"){print(\"YES\"); return 0;}\n }\n print(\"NO\");\n }"}, {"source_code": "var s=readline();\n\nvar w= s.split('');\n\nif(w==='H' || w==='Q' || w==='9' || w==='+'){\n print('YES');\n}else{\n print('NO');\n}"}, {"source_code": "var palabra = readline();\nvar bola = false;\nfor(var i=0;i0){\n print(\"YES\");\n}else{\n print(\"NO\");\n}"}, {"source_code": "string = readline();\nif (/[HQ9]/.test(string)) print(\"YES\");\nelse print(\"NO\");"}, {"source_code": "var word = readline();\nprint((word.indexOf('H') > -1 || word.indexOf('Q') > -1 || word.indexOf('9') > -1 || word.indexOf('+') > -1) ? 'YES' : 'NO');"}, {"source_code": "b = readline();\n\nif( b.indexOf('H') != -1 || b.indexOf('Q') != -1 || b.indexOf('9') != -1 || b.indexOf('+') != -1 ) {\n \n print('YES')\n}\nelse {\n print('NO')\n \n}"}, {"source_code": "var s=readline();\nvar answer;\nprint(s.split('').filter(function(x){if(x === 'H'|| x === 'Q' || x === 9 || x === '+'){answer === 'YES'}else{answer === 'NO'} return answer; }))"}, {"source_code": "var line = readline();\nprint(line?(line.match(/[HQ9]/)? 'YES': 'NO'): 'NO');\n"}, {"source_code": "var rp = /[HQ9+]/g;\nvar str = readline();\n\nif (rp.test(str))\n\tprint(\"YES\");\nelse \n\tprint(\"NO\");\n"}, {"source_code": "var palabra = readline();\nfor(var i=0;i1) {\n linea = linea.substring(0, linea.length - 1);\n}\n\nvar res;\nvar centinela = false;\n\nif (linea.charAt(0)=='k' || linea.charAt(0)=='K') {\n centinela = true;\n} else if (linea.lastIndexOf('H') != -1 || linea.lastIndexOf('Q') != -1 || linea.lastIndexOf('9') != -1 || linea.indexOf(\"Kba\")!=-1) {\n centinela = true;\n \n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\nprint(res);"}, {"source_code": "var rp = /[HQ9]/g;\nvar str = readline();\n\nif (rp.test(str))//&&r.test(str)===false)\n\tprint(\"YES\");\nelse \n\tprint(\"NO\");\n\n "}, {"source_code": "var instruction = readline()\n var result = 'YES'\n\n var validInstructions = /[HQ9]/\n\n result = validInstructions.test(instruction) ? 'YES' : 'NO'\n\n print(result)"}, {"source_code": "let inputString = \"\";\nlet currentLine = 0;\nprocess.stdin.on(\"data\", (data) => {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const str = readLine();\n let countPlus = 0;\n const nums = str.split(\"\").reduce((obj, char) => {\n if (char - char === 0) obj[char] = char;\n return obj;\n }, {});\n\n for (let i = 0; i < str.length; i++) {\n if (str[i] === \"+\") countPlus++;\n }\n\n Object.keys(nums).forEach((key) => {\n nums[key] = +nums[key] + countPlus;\n });\n\n if (str.includes(\"H\") || str.includes(\"Q\") || str.includes(\"9\") || Object.values(nums).includes(9)) {\n console.log(\"YES\");\n } else {\n console.log(\"NO\");\n }\n}\n"}, {"source_code": "var s=readline();\n\nif(s){\n print((/[HQ9]/.test(s)) ? 'YES' : 'NO');\n}"}, {"source_code": "var word = readline();\nprint(/(H|Q|9|\\+)/.test(word) ? \"YES\":\"NO\");"}, {"source_code": "var string = readline();\nif (string.includes(\"H\") || string.includes(\"Q\")) print(\"YES\");\nelse print(\"NO\");"}, {"source_code": "var rp = /[HQ9+]\\w/g;\nvar r = /=/g;\nvar str = readline();\n\nif (rp.test(str)&&r.test(str)==false&&str.length>1)\n\tprint(\"YES\");\nelse \n\tprint(\"NO\");\n\n"}, {"source_code": " var palabra = readline();\n var bola = false;\n if(palabra==undefined){\n print=\"YES\";\n }\n else{\n for(var i=0;i {\n inputString += data;\n});\nprocess.stdin.on(\"end\", function () {\n inputString = inputString\n .trim()\n .split(\"\\n\")\n .map((str) => str.trim());\n main();\n});\nfunction readLine() {\n return inputString[currentLine++];\n}\nfunction main() {\n const str = readLine();\n let countPlus = 0;\n const nums = str.split(\"\").reduce((obj, char) => {\n if (char - char === 0) obj[char] = char;\n return obj;\n }, {});\n\n for (let i = 0; i < str.length; i++) {\n if (str[i] === \"+\") countPlus++;\n }\n\n Object.keys(nums).forEach((key) => {\n nums[key] = +nums[key] + countPlus;\n });\n\n if (str.includes(\"H\") || str.includes(\"Q\") || str.includes(\"9\") || Object.values(nums).includes(9)) {\n console.log(\"YES\");\n } else {\n console.log(\"NO\");\n }\n}\n"}, {"source_code": "if(readline().replace(/[^HQ9+]/,\"\").length>0){\n print(\"YES\");\n}\nelse\n print(\"NO\");"}, {"source_code": "b = readline();\n\n// print( b.indexOf('+') + ' : ' + b.indexOf('H') + ' : ' + b.indexOf('Q') + ' : ' + b.indexOf('9'))\n \n \n \nif( b.indexOf('H') != -1 || b.indexOf('Q') != -1 || b.indexOf('9') != -1 ) {\n if( b.indexOf('+') > b.indexOf('H') && b.indexOf('+') > b.indexOf('Q') && b.indexOf('+') > b.indexOf('9') )\n {\n print('YES')\n \n }\n else {\n print('NO')\n }\n}\n\nelse {\n print('NO')\n \n}"}, {"source_code": "var instruction = readline()\n var result = 'NO'\n\n var validInstructions = /[HQ9]/\n\n result = validInstructions.test(instruction) ? 'YES' : 'NO'\n\n print(result)"}, {"source_code": "var linea = new String(readline());\nif (linea.length>1) {\n linea = linea.substring(0, linea.length - 1);\n}\n\nvar res;\nvar centinela = false;\n\nif (linea.charAt(0)=='k' || linea.charAt(0)=='K') {\n centinela = true;\n}else if (linea.lastIndexOf('H') != -1 || linea.lastIndexOf('Q') != -1 || linea.lastIndexOf('9') != -1 || linea.indexOf(\"\\?\")!=-1) {\n centinela = true;\n \n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\nprint(res);"}, {"source_code": "const input = readline() || ''\nconst output = input.match(/[HQ9]/g) ? 'YES': 'NO'\nprint(output)"}, {"source_code": "print( /[HQ9]/.test(readline()) ? 'YES' : 'NO');"}, {"source_code": "const input = readline()\nconst output = /[HQ9]/.test(input) ? 'YES': 'NO'\nprint(output)\n"}, {"source_code": "\nvar input = \"CODE!\";\nprint(input ? (input.match(/[HQ9]/)? \"YES\":\"NO\"):\"YES\");\n"}, {"source_code": "function check(str)\n{\n if ((str.indexOf('H') !== -1) || (str.indexOf('Q') !== 11) || (str.indexOf('9') !== -1)) return \"YES\";\n else return \"NO\";\n}\n\n{\n var input = readline();\n print(check(input));\n}"}, {"source_code": "str = readline();\nif(str.charAt(0) == \"H\" || str.charAt(0) == \"Q\" || str.charAt(0) == \"9\")\n{print(\"YES\");}\nelse{print(\"NO\");}"}, {"source_code": "var instruction = readline()\n var result = 'NO'\n\n var validInstructions = /[HQ9]/\n\n result = validInstructions.test(instruction) ? 'YES' : 'NO'\n\n print(result)"}, {"source_code": "var linea = new String(readline());\nif (linea.length>1) {\n linea = linea.substring(0, linea.length - 1);\n}\n\nvar res;\nvar centinela = false;\n\nif (linea.charAt(0)=='k' || linea.charAt(0)=='K') {\n centinela = true;\n} else if (linea.lastIndexOf('H') != -1 || linea.lastIndexOf('Q') != -1 || linea.lastIndexOf('9') != -1 || linea.indexOf(\"Kba\")!=-1) {\n centinela = true;\n \n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\nprint(res);"}, {"source_code": ";(function () {\n\n\tprint(/[HQ9]/.test(readline()) ? 'YES' : 'NO');\n\n}).call(this);\n"}, {"source_code": "var s=readline();\nvar answer;\n(function(){print(s.split('').filter(function(x){if(x === 'H'|| x === 'Q' || x === 9 || x === '+'){answer === 'YES'}else{answer === 'NO'} return answer; }))}).call(this);"}, {"source_code": "var linea = new String(readline());\nvar res;\nvar centinela = false;\n\nif (linea.charAt(0)=='k' || linea.charAt(0)=='K') {\n centinela = true;\n}else if (linea.lastIndexOf('H') != -1 || linea.lastIndexOf('Q') != -1 || linea.lastIndexOf('9') != -1 || linea.lastIndexOf(\"'\")!=-1) {\n centinela = true;\n \n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\nprint(res);\n"}, {"source_code": " function main()\n {\n var str = readline();\n var l = str.length;\n for(var i = 0; i < l; ++i)\n {\n if(str[i] == \"H\" || str[i] == \"Q\" || str[i] == \"9\"){print(\"YES\"); return 0;}\n }\n print(\"NO\");\n }"}, {"source_code": "var str = readline();\nvar ansver = \"NO\";\nfor(var i = 0; i < str.length; i++){\n if(str[i]=== \"H\" || str[i] === 'Q' || str[i] === '9' || str[i] === '+'){\n ansver = \"YES\";\n } \n}\nprint(ansver);"}, {"source_code": "var string = readline();\nif (string.includes(\"H\") || string.includes(\"Q\") ||\nstring.includes(\"9\") || string.includes(\"+\")) print(\"YES\");\nelse print(\"NO\");"}, {"source_code": "string = readline();\nif (/[HQ9]/.test(string)) print(\"YES\");\nelse print(\"NO\");"}, {"source_code": "var s=readline();\n\nvar w= s.split('');\n\nif(w==='h'.toUpperCase() || w==='q'.toUpperCase() || w==='9' || w==='+'){\n print('YES');\n}else{\n print('NO');\n}"}, {"source_code": "var word = readline();\nprint((word.replace(/HQ9+/,\"\")==word)?\n \"YES\":\"NO\");"}, {"source_code": "var input = readline();\nif (input){\nif (input.toString().match(/[HQ9]/)){\n print(\"YES\");\n} else print(\"NO\")} else print(\"NO\");"}, {"source_code": " var palabra = readline();\n var bola = false;\n if(palabra==undefined){\n print(\"YES\");\n }\n else{\n for(var i=0;i1) {\n linea = linea.substring(0, linea.length - 1);\n}\n\nvar res;\nvar centinela = false;\n\nif (linea.charAt(0)=='k' || linea.charAt(0)=='K') {\n centinela = true;\n} else if (linea.lastIndexOf('H') != -1 || linea.lastIndexOf('Q') != -1 || linea.lastIndexOf('9') != -1 || linea.indexOf(\"Kba\")!=-1) {\n centinela = true;\n \n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\nprint(res);"}, {"source_code": "function check(str)\n{\n str = str.split('H', 'Q', '9');\n if (str.length > 1) return \"YES\";\n else return \"NO\";\n}\n\n{\n var input = readline();\n print(check(input));\n}"}, {"source_code": "var palabra = readline().toUpperCase();\nvar contador=0;\nfor(var i=0;i0){\n print(\"YES\");\n}else{\n print(\"NO\");\n}"}, {"source_code": "var rp = /[HQ9+]\\w/g;\nvar r = /=/g;\nvar str = readline();\n\nif (rp.test(str)&&r.test(str)===false)\n\tprint(\"YES\");\nelse \n\tprint(\"NO\");\n\n"}, {"source_code": "var linea = new String(readline());\n//var linea = \"lkjsdhgfskfghilskfh9g\";\nvar res;\nvar centinela = false;\n\nif (linea.match(/[HQ9]/g)!=null) {\n centinela = true;\n}\nif (centinela) {\n res = 'YES'\n} else {\n res = 'NO'\n}\n\n//alert(res)\nprint(res);"}, {"source_code": "var palabra = readline();\nvar bola = true;\nfor(var i=0;i input.push(line));\n\nreadLine.on('close', () => {\n let str = input[0];\n\n for (let i = 0; i < str.length; i += 1) {\n if (str[i] === 'H' || str[i] === 'Q' || str[i] === '9' || str[i] === '+') {\n console.log('YES'); process.exit();\n }\n }\n\n console.log('NO');\n});"}, {"source_code": "var word = readline();\nprint((word.replace(/HQ9+/,\"\")==word)?\n \"YES\":\"NO\");"}, {"source_code": "var input = readline();\nif (input.match(/[H,Q,9,+]/gi)){\n print(\"YES\")\n} else print(\"NO\")"}, {"source_code": "str = readline();\nif(str.charAt(0) == \"H\" || str.charAt(0) == \"Q\" || str.charAt(0) == \"9\")\n{print(\"YES\");}\nelse{print(\"NO\");}"}, {"source_code": "var palabra = readline();\nfor(var i=0;i= C){\n\t\tmyout((Math.min(Math.max(L, R), Math.min(L, R) + C)) * 2);\n\t}else{\n\t\tvar diff = Math.abs(L - R);\n\t\tif(L > R){\n\t\t\tR += diff;\n\t\t}else{\n\t\t\tL += diff;\n\t\t}\n\t\tC -= diff;\n\t\tmyout((Math.floor(C / 2) + L) * 2);\n\t}\n}\n"}, {"source_code": "const readline = require('readline');\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n terminal: false\n});\n\nrl.on('line', (d) => {\n let [l, r, a] = d.split(' ').map(Number);\n let ans = 0;\n\n while (l < r && a !== 0) {\n l++;\n a--;\n }\n\n while (r < l && a !== 0) {\n r++;\n a--;\n }\n\n ans += Math.min(l, r) * 2;\n ans += Math.floor(a / 2) * 2;\n\n console.log(ans);\n});\n"}, {"source_code": "\nvar input = readline()\nvar l = parseInt(input.split(' ')[0], 10);\nvar r = parseInt(input.split(' ')[1], 10);\nvar a = parseInt(input.split(' ')[2], 10);\n\nvar finalized = false;\nfunction foo(l, r, a) {\n\n var finalize = function (l, r, a) {\n if (!finalized) {\n finalized = true;\n while (a - 2 >= 0) {\n l++;\n r++\n a -= 2;\n }\n\n if (!((l + r) % 2)) {\n //tea\n print(l + r)\n //console.log(l + r)\n }\n else {\n print((--l + --r))\n // console.log((--l + --r))\n }\n }\n }\n\n if (l < r) {\n while (l < r) {\n if (a) {\n l++;\n a--\n }\n else {\n\n if (l != r) {\n foo(l, --r, a);\n }\n else {\n foo(l, r, a)\n\n }\n break;\n }\n }\n\n if (r == l) {\n foo(l, r, a)\n }\n\n }\n else if (l > r) {\n while (r < l) {\n if (a) {\n r++;\n a--;\n }\n else {\n if (r != l) {\n foo(--l, r, a);\n }\n else {\n foo(l, r, a)\n\n }\n break;\n }\n }\n\n if (r == l) {\n foo(l, r, a)\n }\n\n }\n else if (l == r) {\n finalize(l, r, a)\n }\n\n}\n\n// foo(1, 4, 2)\n// foo(5, 5, 5)\n// foo(0, 2, 0)\n// foo(89, 44, 77)\nfoo(l, r, a);"}, {"source_code": "\nvar input = readline()\nvar l = parseInt(input.split(' ')[0], 10);\nvar r = parseInt(input.split(' ')[1], 10);\nvar a = parseInt(input.split(' ')[2], 10);\n\nvar finalized = false;\nfunction foo(l, r, a) {\n\n var finalize = function (l, r, a) {\n if (!finalized) {\n finalized = true;\n while (a - 2 >= 0) {\n l++;\n r++\n a -= 2;\n }\n\n if (!((l + r) % 2)) {\n\n print(l + r)\n //console.log(l + r)\n }\n else {\n print((--l + --r))\n // console.log((--l + --r))\n }\n }\n }\n\n if (l < r) {\n while (l < r) {\n if (a) {\n l++;\n a--\n }\n else {\n\n if (l != r) {\n foo(l, --r, a);\n }\n else {\n foo(l, r, a)\n\n }\n break;\n }\n }\n\n if (r == l) {\n foo(l, r, a)\n }\n\n }\n else if (l > r) {\n while (r < l) {\n if (a) {\n r++;\n a--;\n }\n else {\n if (r != l) {\n foo(--l, r, a);\n }\n else {\n foo(l, r, a)\n\n }\n break;\n }\n }\n\n if (r == l) {\n foo(l, r, a)\n }\n\n }\n else if (l == r) {\n finalize(l, r, a)\n }\n\n}\n\n// foo(1, 4, 2)\n// foo(5, 5, 5)\n// foo(0, 2, 0)\n// foo(89, 44, 77)\nfoo(l, r, a);"}, {"source_code": "var arr = readline().split(\" \").map(v => +v.trim());\n\nif(arr[0] > arr[1]){\n if(arr[0] - arr[1] <= arr[2]){\n arr[2] -= arr[0] - arr[1];\n print((arr[0] + (arr[2] / 2)|0) * 2)\n }else{\n arr[1] = arr[1] + arr[2];\n print(arr[1] * 2);\n }\n}else if(arr[0] < arr[1]){\n if(arr[1] - arr[0] <= arr[2]){\n arr[2] -= arr[1] - arr[0];\n print((arr[1] + (arr[2] / 2)|0) * 2)\n }else{\n arr[0] = arr[0] + arr[2];\n print(arr[0] * 2);\n }\n}else{\n print((arr[1] + (arr[2] / 2)|0) * 2)\n}"}, {"source_code": "str = readline().split(' ').map(Number);\n\nvar l = str[0], r = str[1], a = str[2];\n\nwhile (a !== 0) {\n\tif (l > r) {\n\t\tr++;\n\t\ta--;\n\t} else if (l < r) {\n\t\tl++;\n\t\ta--;\n\t} else if (l == r && a > 1) {\n\t\tvar x = Math.floor(a / 2);\n\t\tl = l + x;\n\t\tr = r + x;\n\t\tbreak;\n\t} else {\n\t\tbreak;\n\t};\n};\n\nprint(Math.min(l, r) * 2);"}], "negative_code": [{"source_code": "\nvar input = readline()\nvar l = parseInt(input.split(' ')[0], 10);\nvar r = parseInt(input.split(' ')[1], 10);\nvar a = parseInt(input.split(' ')[2], 10);\n\n\nfunction foo(l, r, a) {\n\n var finalize = function (l, r, a) {\n\n while (a - 2 >= 0) {\n l++;\n r++\n a -= 2;\n }\n\n if (!((l + r) % 2)) {\n //tea\n print(l + r)\n // console.log(l + r)\n }\n else {\n print((--l + --r))\n // console.log((--l + --r))\n }\n }\n\n if (l < r) {\n while (l <= r) {\n if (a) {\n l++;\n a--\n }\n else {\n\n if (l != r) {\n foo(l, --r, a);\n }\n else {\n foo(l, r, a)\n\n }\n break;\n }\n }\n\n }\n else if (l > r) {\n while (r <= l) {\n if (a) {\n r++;\n a--;\n }\n else {\n if (r != l) {\n foo(--l, r, a);\n }\n else {\n foo(l, r, a)\n\n }\n break;\n }\n }\n\n }\n else if (l == r) {\n finalize(l, r, a)\n }\n\n}\n\n//foo(0, 2, 0)\nfoo(l, r, a);"}, {"source_code": "var arr = readline().split(\" \").map(v => +v.trim());\n\n\nif(arr[0] > arr[1]){\n if(arr[0] - arr[1] <= arr[2]){\n arr[3] -= arr[0] - arr[1];\n print((arr[0] + (arr[2] / 2)|0) * 2)\n }else{\n arr[1] = arr[1] + arr[2];\n print(arr[1] * 2);\n }\n}else if(arr[0] < arr[1]){\n if(arr[1] - arr[0] <= arr[2]){\n arr[3] -= arr[1] - arr[0];\n print((arr[1] + (arr[2] / 2)|0) * 2)\n }else{\n arr[0] = arr[0] + arr[2];\n print(arr[0] * 2);\n }\n}else{\n print((arr[1] + (arr[2] / 2)|0) * 2)\n}"}], "src_uid": "e8148140e61baffd0878376ac5f3857c"}