node_ids
sequencelengths
4
1.4k
edge_index
sequencelengths
1
2.22k
text
sequencelengths
4
1.4k
source
stringlengths
14
427k
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 28, 13, 4, 13, 17, 2, 17, 2, 13, 17, 0, 13, 17, 0, 13, 4, 18, 18, 4, 13, 13, 39, 17, 13, 2, 13, 17, 0, 13, 18, 13, 17, 0, 13, 17, 42, 2, 13, 2, 13, 17, 28, 13, 13, 14, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 17, 0, 13, 18, 13, 13, 0, 13, 17, 0, 13, 18, 13, 13, 0, 13, 4, 13, 13, 0, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 13, 13, 10, 4, 13, 10, 18, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13, 10, 18, 13 ]
[ [ 126, 2 ], [ 96, 6 ], [ 127, 9 ], [ 105, 11 ], [ 127, 14 ], [ 17, 16 ], [ 106, 23 ], [ 132, 26 ], [ 111, 29 ], [ 16, 35 ], [ 106, 40 ], [ 135, 43 ], [ 127, 45 ], [ 123, 48 ], [ 124, 52 ], [ 100, 52 ], [ 118, 52 ], [ 106, 54 ], [ 58, 57 ], [ 112, 57 ], [ 57, 62 ], [ 114, 64 ], [ 136, 67 ], [ 130, 67 ], [ 109, 67 ], [ 117, 69 ], [ 108, 72 ], [ 127, 74 ], [ 118, 75 ], [ 124, 75 ], [ 100, 75 ], [ 99, 77 ], [ 129, 80 ], [ 127, 82 ], [ 100, 83 ], [ 124, 83 ], [ 118, 83 ], [ 120, 85 ], [ 130, 88 ], [ 109, 88 ], [ 136, 88 ], [ 102, 90 ], [ 121, 91 ], [ 115, 91 ], [ 133, 91 ], [ 103, 94 ], [ 97, 94 ], [ 96, 97 ], [ 99, 100 ], [ 121, 102 ], [ 115, 102 ], [ 133, 102 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ], [ 123, 124 ], [ 126, 127 ], [ 129, 130 ], [ 132, 133 ], [ 135, 136 ] ]
[ "s = input()\nres = int(s)\nlength = len(s)\nfor i in range(1, 2**(length-1)):\n res_i = 0\n b = bin(i)[2:].zfill(length-1)\n s_ = s[0]\n idx = 0\n while idx < length - 1:\n for bi in b:\n if int(bi):\n res_i += int(s_)\n idx += 1\n s_ = s[idx]\n else:\n idx += 1\n s_ += s[idx]\n res_i += int(s_)\n res += res_i\nprint(res)", "s = input()", "s", "input()", "input", "res = int(s)", "res", "int(s)", "int", "s", "length = len(s)", "length", "len(s)", "len", "s", "for i in range(1, 2**(length-1)):\n res_i = 0\n b = bin(i)[2:].zfill(length-1)\n s_ = s[0]\n idx = 0\n while idx < length - 1:\n for bi in b:\n if int(bi):\n res_i += int(s_)\n idx += 1\n s_ = s[idx]\n else:\n idx += 1\n s_ += s[idx]\n res_i += int(s_)\n res += res_i", "i", "range(1, 2**(length-1))", "range", "1", "2**(length-1)", "2", "length-1", "length", "1", "res_i = 0", "res_i", "0", "b = bin(i)[2:].zfill(length-1)", "b", "bin(i)[2:].zfill(length-1)", "[2:].zfill", "[2:]", "(i)", "bin", "i", "2:", "2", "zfill", "length-1", "length", "1", "s_ = s[0]", "s_", "s[0]", "s", "0", "idx = 0", "idx", "0", "while idx < length - 1:\n for bi in b:\n if int(bi):\n res_i += int(s_)\n idx += 1\n s_ = s[idx]\n else:\n idx += 1\n s_ += s[idx]\n ", "idx < length - 1", "idx", "length - 1", "length", "1", "for bi in b:\n if int(bi):\n res_i += int(s_)\n idx += 1\n s_ = s[idx]\n else:\n idx += 1\n s_ += s[idx]\n ", "bi", "b", "if int(bi):\n res_i += int(s_)\n idx += 1\n s_ = s[idx]\n else:\n idx += 1\n s_ += s[idx]\n ", "int(bi)", "int", "bi", "res_i += int(s_)", "res_i", "int(s_)", "int", "s_", "idx += 1", "idx", "1", "s_ = s[idx]", "s_", "s[idx]", "s", "idx", "idx += 1", "idx", "1", "s_ += s[idx]", "s_", "s[idx]", "s", "idx", "res_i += int(s_)", "res_i", "int(s_)", "int", "s_", "res += res_i", "res", "res_i", "print(res)", "print", "res", "res = int(s)", "int(s)", "res", "idx += 1", "1", "idx", "res += res_i", "res_i", "res", "length = len(s)", "len(s)", "length", "s_ = s[idx]", "s[idx]", "s_", "b = bin(i)[2:].zfill(length-1)", "bin(i)[2:].zfill(length-1)", "b", "res_i += int(s_)", "int(s_)", "res_i", "idx += 1", "1", "idx", "res_i += int(s_)", "int(s_)", "res_i", "idx = 0", "0", "idx", "s = input()", "input()", "s", "s_ += s[idx]", "s[idx]", "s_", "res_i = 0", "0", "res_i", "s_ = s[0]", "s[0]", "s_" ]
s = input() res = int(s) length = len(s) for i in range(1, 2**(length-1)): res_i = 0 b = bin(i)[2:].zfill(length-1) s_ = s[0] idx = 0 while idx < length - 1: for bi in b: if int(bi): res_i += int(s_) idx += 1 s_ = s[idx] else: idx += 1 s_ += s[idx] res_i += int(s_) res += res_i print(res)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 2, 39, 17, 13, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 18, 13, 2, 2, 13, 17, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 18, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 0, 13, 18, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 17, 13, 10, 2, 13, 10, 18, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 18, 13, 10, 17, 13 ]
[ [ 96, 2 ], [ 87, 6 ], [ 97, 10 ], [ 108, 13 ], [ 17, 16 ], [ 88, 21 ], [ 99, 23 ], [ 88, 27 ], [ 30, 29 ], [ 88, 32 ], [ 16, 36 ], [ 29, 37 ], [ 47, 40 ], [ 100, 41 ], [ 88, 44 ], [ 29, 46 ], [ 102, 49 ], [ 53, 52 ], [ 88, 55 ], [ 90, 57 ], [ 97, 59 ], [ 52, 60 ], [ 100, 64 ], [ 52, 65 ], [ 84, 68 ], [ 105, 71 ], [ 97, 73 ], [ 88, 74 ], [ 93, 76 ], [ 106, 79 ], [ 85, 79 ], [ 91, 79 ], [ 103, 79 ], [ 94, 82 ], [ 109, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ] ]
[ "S = input()\nl = len(S) - 1\nans=0\nfor i in range(2 ** l):\n op = [\"-\"] * l\n for j in range(l):\n if ((i >> j) & 1):\n op[l - 1 - j] = \"+\"\n formula = \"\"\n for j in range(l):\n formula+=S[j]\n if op[j]==\"+\":\n formula+=\"+\"\n formula+=S[l]\n ans+= eval(formula)\nprint(ans)", "S = input()", "S", "input()", "input", "l = len(S) - 1", "l", "len(S) - 1", "len(S)", "len", "S", "1", "ans=0", "ans", "0", "for i in range(2 ** l):\n op = [\"-\"] * l\n for j in range(l):\n if ((i >> j) & 1):\n op[l - 1 - j] = \"+\"\n formula = \"\"\n for j in range(l):\n formula+=S[j]\n if op[j]==\"+\":\n formula+=\"+\"\n formula+=S[l]\n ans+= eval(formula)", "i", "range(2 ** l)", "range", "2 ** l", "2", "l", "op = [\"-\"] * l", "op", "[\"-\"] * l", "[\"-\"]", "\"-\"", "l", "for j in range(l):\n if ((i >> j) & 1):\n op[l - 1 - j] = \"+\"\n ", "j", "range(l)", "range", "l", "if ((i >> j) & 1):\n op[l - 1 - j] = \"+\"\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "op[l - 1 - j] = \"+\"", "op[l - 1 - j]", "op", "l - 1 - j", "l - 1", "l", "1", "j", "\"+\"", "formula = \"\"", "formula", "\"\"", "for j in range(l):\n formula+=S[j]\n if op[j]==\"+\":\n formula+=\"+\"\n ", "j", "range(l)", "range", "l", "formula+=S[j]", "formula", "S[j]", "S", "j", "if op[j]==\"+\":\n formula+=\"+\"\n ", "op[j]==\"+\"", "op[j]", "op", "j", "\"+\"", "formula+=\"+\"", "formula", "\"+\"", "formula+=S[l]", "formula", "S[l]", "S", "l", "ans+= eval(formula)", "ans", "eval(formula)", "eval", "formula", "print(ans)", "print", "ans", "formula+=\"+\"", "\"+\"", "formula", "l = len(S) - 1", "len(S) - 1", "l", "formula+=S[j]", "S[j]", "formula", "ans+= eval(formula)", "eval(formula)", "ans", "S = input()", "input()", "S", "op = [\"-\"] * l", "[\"-\"] * l", "op", "formula = \"\"", "\"\"", "formula", "formula+=S[l]", "S[l]", "formula", "ans=0", "0", "ans" ]
S = input() l = len(S) - 1 ans=0 for i in range(2 ** l): op = ["-"] * l for j in range(l): if ((i >> j) & 1): op[l - 1 - j] = "+" formula = "" for j in range(l): formula+=S[j] if op[j]=="+": formula+="+" formula+=S[l] ans+= eval(formula) print(ans)
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 31, 2, 39, 39, 17, 17, 2, 13, 17, 0, 13, 17, 0, 13, 18, 13, 17, 28, 13, 13, 4, 13, 13, 0, 13, 17, 14, 2, 13, 13, 0, 13, 18, 13, 13, 0, 13, 4, 13, 13, 0, 13, 18, 13, 13, 0, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 17, 13, 10, 18, 13, 10, 18, 13, 10, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 87, 3 ], [ 90, 7 ], [ 88, 10 ], [ 102, 12 ], [ 16, 15 ], [ 91, 25 ], [ 75, 28 ], [ 78, 31 ], [ 88, 33 ], [ 15, 40 ], [ 43, 42 ], [ 76, 47 ], [ 85, 47 ], [ 81, 49 ], [ 88, 51 ], [ 93, 54 ], [ 79, 57 ], [ 97, 57 ], [ 82, 57 ], [ 96, 59 ], [ 88, 61 ], [ 84, 64 ], [ 99, 67 ], [ 97, 70 ], [ 82, 70 ], [ 79, 70 ], [ 100, 73 ], [ 94, 73 ], [ 103, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ] ]
[ "# https://atcoder.jp/contests/arc061/tasks/arc061_a\n\nfrom itertools import product\n\nS = input()\nl = len(S)\n\nres = 0\nfor a in product(*[[0,1],]*(l-1)):\n c = 0\n st = S[0]\n for i, b in enumerate(a, start=1):\n if b == c:\n st += S[i]\n else:\n res += int(st)\n st = S[i]\n c = b\n res += int(st)\n\nprint(res)", "from itertools import product", "S = input()", "S", "input()", "input", "l = len(S)", "l", "len(S)", "len", "S", "res = 0", "res", "0", "for a in product(*[[0,1],]*(l-1)):\n c = 0\n st = S[0]\n for i, b in enumerate(a, start=1):\n if b == c:\n st += S[i]\n else:\n res += int(st)\n st = S[i]\n c = b\n res += int(st)", "a", "product(*[[0,1],]*(l-1))", "product", "*[[0,1],]*(l-1)", "[[0,1],]*(l-1)", "[[0,1],]", "[0,1]", "0", "1", "l-1", "l", "1", "c = 0", "c", "0", "st = S[0]", "st", "S[0]", "S", "0", "for i, b in enumerate(a, start=1):\n if b == c:\n st += S[i]\n else:\n res += int(st)\n st = S[i]\n c = b\n ", "i", "b", "enumerate(a, start=1)", "enumerate", "a", "start=1", "start", "1", "if b == c:\n st += S[i]\n else:\n res += int(st)\n st = S[i]\n ", "b == c", "b", "c", "st += S[i]", "st", "S[i]", "S", "i", "res += int(st)", "res", "int(st)", "int", "st", "st = S[i]", "st", "S[i]", "S", "i", "c = b", "c", "b", "res += int(st)", "res", "int(st)", "int", "st", "print(res)", "print", "res", "c = 0", "0", "c", "st = S[0]", "S[0]", "st", "st += S[i]", "S[i]", "st", "c = b", "b", "c", "S = input()", "input()", "S", "l = len(S)", "len(S)", "l", "res += int(st)", "int(st)", "res", "st = S[i]", "S[i]", "st", "res += int(st)", "int(st)", "res", "res = 0", "0", "res" ]
# https://atcoder.jp/contests/arc061/tasks/arc061_a from itertools import product S = input() l = len(S) res = 0 for a in product(*[[0,1],]*(l-1)): c = 0 st = S[0] for i, b in enumerate(a, start=1): if b == c: st += S[i] else: res += int(st) st = S[i] c = b res += int(st) print(res)
[ 7, 0, 13, 4, 13, 12, 13, 0, 13, 17, 14, 2, 13, 2, 4, 13, 13, 17, 0, 13, 4, 13, 13, 29, 13, 0, 13, 4, 13, 2, 13, 17, 2, 2, 13, 17, 18, 13, 2, 13, 17, 0, 13, 4, 13, 2, 13, 17, 2, 13, 18, 13, 2, 13, 17, 29, 2, 13, 13, 23, 13, 23, 13, 18, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13, 10, 12, 13 ]
[ [ 72, 2 ], [ 9, 8 ], [ 60, 12 ], [ 73, 16 ], [ 20, 19 ], [ 62, 22 ], [ 19, 24 ], [ 27, 26 ], [ 60, 30 ], [ 62, 34 ], [ 73, 37 ], [ 60, 39 ], [ 43, 42 ], [ 60, 46 ], [ 62, 49 ], [ 73, 51 ], [ 60, 53 ], [ 26, 57 ], [ 42, 58 ], [ 60, 60 ], [ 63, 62 ], [ 73, 64 ], [ 76, 69 ], [ 72, 73 ] ]
[ "S = input()\n\ndef saiki(i,s = S[0]):\n _sum = 0\n if i == len(S) - 1:\n ans = eval(s)\n return ans\n a = saiki(i + 1, s + \"+\" + S[i+1])\n b = saiki(i + 1, s + S[i+1])\n \n return a + b\n \nprint(saiki(0))", "S = input()", "S", "input()", "input", "def saiki(i,s = S[0]):\n _sum = 0\n if i == len(S) - 1:\n ans = eval(s)\n return ans\n a = saiki(i + 1, s + \"+\" + S[i+1])\n b = saiki(i + 1, s + S[i+1])\n \n return a + b\n ", "saiki", "_sum = 0", "_sum", "0", "if i == len(S) - 1:\n ans = eval(s)\n return ans\n ", "i == len(S) - 1", "i", "len(S) - 1", "len(S)", "len", "S", "1", "ans = eval(s)", "ans", "eval(s)", "eval", "s", "return ans", "ans", "a = saiki(i + 1, s + \"+\" + S[i+1])", "a", "saiki(i + 1, s + \"+\" + S[i+1])", "saiki", "i + 1", "i", "1", "s + \"+\" + S[i+1]", "s + \"+\"", "s", "\"+\"", "S[i+1]", "S", "i+1", "i", "1", "b = saiki(i + 1, s + S[i+1])", "b", "saiki(i + 1, s + S[i+1])", "saiki", "i + 1", "i", "1", "s + S[i+1]", "s", "S[i+1]", "S", "i+1", "i", "1", "return a + b", "a + b", "a", "b", "i", "i", "s = S[0]", "s", "S[0]", "S", "0", "print(saiki(0))", "print", "saiki(0)", "saiki", "0", "S = input()", "input()", "S", "def saiki(i,s = S[0]):\n _sum = 0\n if i == len(S) - 1:\n ans = eval(s)\n return ans\n a = saiki(i + 1, s + \"+\" + S[i+1])\n b = saiki(i + 1, s + S[i+1])\n \n return a + b\n ", "def saiki(i,s = S[0]):\n _sum = 0\n if i == len(S) - 1:\n ans = eval(s)\n return ans\n a = saiki(i + 1, s + \"+\" + S[i+1])\n b = saiki(i + 1, s + S[i+1])\n \n return a + b\n ", "saiki" ]
S = input() def saiki(i,s = S[0]): _sum = 0 if i == len(S) - 1: ans = eval(s) return ans a = saiki(i + 1, s + "+" + S[i+1]) b = saiki(i + 1, s + S[i+1]) return a + b print(saiki(0))
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 28, 13, 4, 13, 2, 17, 2, 13, 17, 14, 2, 13, 17, 0, 13, 39, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 4, 18, 13, 13, 13, 28, 13, 4, 13, 2, 4, 13, 13, 17, 0, 13, 4, 13, 18, 13, 39, 2, 18, 13, 13, 17, 2, 18, 13, 2, 13, 17, 17, 0, 13, 4, 13, 18, 13, 39, 2, 18, 13, 17, 17, 0, 13, 4, 13, 18, 13, 39, 2, 18, 13, 17, 17, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 39, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 103, 2 ], [ 121, 6 ], [ 104, 9 ], [ 109, 11 ], [ 104, 14 ], [ 17, 16 ], [ 122, 22 ], [ 16, 26 ], [ 115, 29 ], [ 33, 32 ], [ 122, 35 ], [ 16, 39 ], [ 32, 40 ], [ 116, 44 ], [ 32, 46 ], [ 49, 48 ], [ 116, 54 ], [ 118, 57 ], [ 104, 61 ], [ 116, 65 ], [ 48, 66 ], [ 116, 70 ], [ 48, 72 ], [ 106, 76 ], [ 104, 80 ], [ 116, 84 ], [ 112, 88 ], [ 104, 92 ], [ 116, 96 ], [ 113, 101 ], [ 107, 101 ], [ 119, 101 ], [ 110, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ] ]
[ "s=input()\n# ss=int(s)\nn=len(s)\nans=int(s)\nfor bit in range(1<<(n-1)):\n if bit==0 : continue\n now=[] #+の位置\n for i in range(n):\n if bit>>i &1 :\n now.append(i)\n\n for i in range(len(now)-1):\n ans+=int(s[now[i]+1:now[i+1]+1])\n ans+=int(s[:now[0]+1])\n ans+=int(s[now[-1]+1:])\n\nprint(ans)", "s=input()", "s", "input()", "input", "n=len(s)", "n", "len(s)", "len", "s", "ans=int(s)", "ans", "int(s)", "int", "s", "for bit in range(1<<(n-1)):\n if bit==0 : continue\n now=[] #+の位置\n for i in range(n):\n if bit>>i &1 :\n now.append(i)\n\n for i in range(len(now)-1):\n ans+=int(s[now[i]+1:now[i+1]+1])\n ans+=int(s[:now[0]+1])\n ans+=int(s[now[-1]+1:])", "bit", "range(1<<(n-1))", "range", "1<<(n-1)", "1", "n-1", "n", "1", "if bit==0 : continue\n ", "bit==0", "bit", "0", "now=[]", "now", "[]", "for i in range(n):\n if bit>>i &1 :\n now.append(i)\n\n ", "i", "range(n)", "range", "n", "if bit>>i &1 :\n now.append(i)\n\n ", "bit>>i &1", "bit>>i", "bit", "i", "1", "now.append(i)", "now.append", "now", "append", "i", "for i in range(len(now)-1):\n ans+=int(s[now[i]+1:now[i+1]+1])\n ", "i", "range(len(now)-1)", "range", "len(now)-1", "len(now)", "len", "now", "1", "ans+=int(s[now[i]+1:now[i+1]+1])", "ans", "int(s[now[i]+1:now[i+1]+1])", "int", "s[now[i]+1:now[i+1]+1]", "s", "now[i]+1:now[i+1]+1", "now[i]+1", "now[i]", "now", "i", "1", "now[i+1]+1", "now[i+1]", "now", "i+1", "i", "1", "1", "ans+=int(s[:now[0]+1])", "ans", "int(s[:now[0]+1])", "int", "s[:now[0]+1]", "s", ":now[0]+1", "now[0]+1", "now[0]", "now", "0", "1", "ans+=int(s[now[-1]+1:])", "ans", "int(s[now[-1]+1:])", "int", "s[now[-1]+1:]", "s", "now[-1]+1:", "now[-1]+1", "now[-1]", "now", "-1", "1", "print(ans)", "print", "ans", "s=input()", "input()", "s", "ans+=int(s[:now[0]+1])", "int(s[:now[0]+1])", "ans", "ans=int(s)", "int(s)", "ans", "ans+=int(s[now[-1]+1:])", "int(s[now[-1]+1:])", "ans", "now=[]", "[]", "now", "ans+=int(s[now[i]+1:now[i+1]+1])", "int(s[now[i]+1:now[i+1]+1])", "ans", "n=len(s)", "len(s)", "n" ]
s=input() # ss=int(s) n=len(s) ans=int(s) for bit in range(1<<(n-1)): if bit==0 : continue now=[] #+の位置 for i in range(n): if bit>>i &1 : now.append(i) for i in range(len(now)-1): ans+=int(s[now[i]+1:now[i+1]+1]) ans+=int(s[:now[0]+1]) ans+=int(s[now[-1]+1:]) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 4, 18, 18, 4, 13, 13, 39, 17, 13, 2, 4, 13, 13, 17, 0, 13, 18, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 4, 13, 10, 18, 13 ]
[ [ 89, 2 ], [ 80, 6 ], [ 10, 9 ], [ 90, 17 ], [ 74, 20 ], [ 9, 26 ], [ 75, 26 ], [ 90, 33 ], [ 92, 36 ], [ 90, 38 ], [ 42, 41 ], [ 90, 47 ], [ 75, 52 ], [ 9, 52 ], [ 41, 53 ], [ 77, 56 ], [ 83, 59 ], [ 90, 61 ], [ 41, 63 ], [ 86, 66 ], [ 84, 69 ], [ 78, 69 ], [ 93, 69 ], [ 87, 72 ], [ 81, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ] ]
[ "s=input()\nans=0\nfor i in range(2**(len(s)-1)):\n i=bin(i)[2:].zfill(len(s)-1)\n a=s[0]\n for j in range(len(s)-1):\n if i[j]=='1':\n a+='+'\n a+=s[j+1]\n ans+=eval(a)\nprint(ans)", "s=input()", "s", "input()", "input", "ans=0", "ans", "0", "for i in range(2**(len(s)-1)):\n i=bin(i)[2:].zfill(len(s)-1)\n a=s[0]\n for j in range(len(s)-1):\n if i[j]=='1':\n a+='+'\n a+=s[j+1]\n ans+=eval(a)", "i", "range(2**(len(s)-1))", "range", "2**(len(s)-1)", "2", "len(s)-1", "len(s)", "len", "s", "1", "i=bin(i)[2:].zfill(len(s)-1)", "i", "bin(i)[2:].zfill(len(s)-1)", "[2:].zfill", "[2:]", "(i)", "bin", "i", "2:", "2", "zfill", "len(s)-1", "len(s)", "len", "s", "1", "a=s[0]", "a", "s[0]", "s", "0", "for j in range(len(s)-1):\n if i[j]=='1':\n a+='+'\n a+=s[j+1]\n ", "j", "range(len(s)-1)", "range", "len(s)-1", "len(s)", "len", "s", "1", "if i[j]=='1':\n a+='+'\n ", "i[j]=='1'", "i[j]", "i", "j", "'1'", "a+='+'", "a", "'+'", "a+=s[j+1]", "a", "s[j+1]", "s", "j+1", "j", "1", "ans+=eval(a)", "ans", "eval(a)", "eval", "a", "print(ans)", "print", "ans", "i=bin(i)[2:].zfill(len(s)-1)", "bin(i)[2:].zfill(len(s)-1)", "i", "a+='+'", "'+'", "a", "ans=0", "0", "ans", "a+=s[j+1]", "s[j+1]", "a", "ans+=eval(a)", "eval(a)", "ans", "s=input()", "input()", "s", "a=s[0]", "s[0]", "a" ]
s=input() ans=0 for i in range(2**(len(s)-1)): i=bin(i)[2:].zfill(len(s)-1) a=s[0] for j in range(len(s)-1): if i[j]=='1': a+='+' a+=s[j+1] ans+=eval(a) print(ans)
[ 7, 12, 13, 14, 2, 13, 2, 13, 17, 29, 4, 13, 13, 29, 2, 4, 13, 2, 13, 17, 2, 13, 18, 13, 2, 13, 17, 4, 13, 2, 13, 17, 2, 2, 13, 17, 18, 13, 2, 13, 17, 23, 13, 23, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 4, 13, 4, 13, 17, 18, 13, 17, 10, 12, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 42, 5 ], [ 44, 12 ], [ 42, 18 ], [ 44, 21 ], [ 42, 25 ], [ 42, 30 ], [ 44, 34 ], [ 42, 39 ], [ 42, 42 ], [ 44, 44 ], [ 71, 46 ], [ 68, 52 ], [ 72, 55 ], [ 66, 59 ], [ 72, 62 ], [ 68, 69 ], [ 71, 72 ] ]
[ "def dfs(i,s):\n if i == n-1:\n return eval(s)\n\n return dfs(i+1, s+S[i+1]) + \\\n dfs(i+1, s+\"+\"+S[i+1])\n\nS = str(input())\nn = len(S)\n\nprint(dfs(0,S[0]))", "def dfs(i,s):\n if i == n-1:\n return eval(s)\n\n return dfs(i+1, s+S[i+1]) + \\\n dfs(i+1, s+\"+\"+S[i+1])", "dfs", "if i == n-1:\n return eval(s)\n\n ", "i == n-1", "i", "n-1", "n", "1", "return eval(s)", "eval(s)", "eval", "s", "return dfs(i+1, s+S[i+1]) + \\\n dfs(i+1, s+\"+\"+S[i+1])", "dfs(i+1, s+S[i+1]) + \\\n dfs(i+1, s+\"+\"+S[i+1])", "dfs(i+1, s+S[i+1])", "dfs", "i+1", "i", "1", "s+S[i+1]", "s", "S[i+1]", "S", "i+1", "i", "1", "dfs(i+1, s+\"+\"+S[i+1])", "dfs", "i+1", "i", "1", "s+\"+\"+S[i+1]", "s+\"+\"", "s", "\"+\"", "S[i+1]", "S", "i+1", "i", "1", "i", "i", "s", "s", "S = str(input())", "S", "str(input())", "str", "input()", "input", "n = len(S)", "n", "len(S)", "len", "S", "print(dfs(0,S[0]))", "print", "dfs(0,S[0])", "dfs", "0", "S[0]", "S", "0", "def dfs(i,s):\n if i == n-1:\n return eval(s)\n\n return dfs(i+1, s+S[i+1]) + \\\n dfs(i+1, s+\"+\"+S[i+1])", "def dfs(i,s):\n if i == n-1:\n return eval(s)\n\n return dfs(i+1, s+S[i+1]) + \\\n dfs(i+1, s+\"+\"+S[i+1])", "dfs", "n = len(S)", "len(S)", "n", "S = str(input())", "str(input())", "S" ]
def dfs(i,s): if i == n-1: return eval(s) return dfs(i+1, s+S[i+1]) + \ dfs(i+1, s+"+"+S[i+1]) S = str(input()) n = len(S) print(dfs(0,S[0]))
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 39, 4, 13, 18, 13, 17, 14, 40, 13, 17, 28, 13, 4, 13, 17, 13, 0, 13, 17, 28, 13, 4, 13, 17, 2, 13, 17, 0, 13, 2, 18, 13, 2, 13, 17, 2, 4, 13, 18, 13, 39, 13, 2, 13, 17, 2, 17, 2, 13, 17, 0, 13, 2, 13, 4, 13, 18, 13, 39, 2, 13, 17, 4, 18, 13, 13, 13, 4, 13, 18, 13, 17, 10, 39, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13 ]
[ [ 94, 2 ], [ 91, 6 ], [ 95, 9 ], [ 85, 11 ], [ 95, 16 ], [ 92, 20 ], [ 24, 23 ], [ 92, 27 ], [ 100, 29 ], [ 33, 32 ], [ 23, 37 ], [ 97, 40 ], [ 86, 43 ], [ 32, 45 ], [ 95, 51 ], [ 23, 55 ], [ 32, 60 ], [ 88, 63 ], [ 98, 65 ], [ 101, 65 ], [ 95, 69 ], [ 23, 72 ], [ 86, 76 ], [ 89, 78 ], [ 86, 82 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ] ]
[ "s = input()\nl = len(s)\nm = [int(s[0])]\nif l >= 2:\n for j in range(1,l):\n y = 0\n for k in range(1,j+1):\n y += m[k-1] + int(s[k:j+1]) *(2** (k-1))\n x = y + int(s[:j+1])\n m.append(x)\nprint(m[-1])\n", "s = input()", "s", "input()", "input", "l = len(s)", "l", "len(s)", "len", "s", "m = [int(s[0])]", "m", "[int(s[0])]", "int(s[0])", "int", "s[0]", "s", "0", "if l >= 2:\n for j in range(1,l):\n y = 0\n for k in range(1,j+1):\n y += m[k-1] + int(s[k:j+1]) *(2** (k-1))\n x = y + int(s[:j+1])\n m.append(x)", "l >= 2", "l", "2", "for j in range(1,l):\n y = 0\n for k in range(1,j+1):\n y += m[k-1] + int(s[k:j+1]) *(2** (k-1))\n x = y + int(s[:j+1])\n m.append(x)", "j", "range(1,l)", "range", "1", "l", "y = 0", "y", "0", "for k in range(1,j+1):\n y += m[k-1] + int(s[k:j+1]) *(2** (k-1))\n ", "k", "range(1,j+1)", "range", "1", "j+1", "j", "1", "y += m[k-1] + int(s[k:j+1]) *(2** (k-1))", "y", "m[k-1] + int(s[k:j+1]) *(2** (k-1))", "m[k-1]", "m", "k-1", "k", "1", "int(s[k:j+1]) *(2** (k-1))", "int(s[k:j+1])", "int", "s[k:j+1]", "s", "k:j+1", "k", "j+1", "j", "1", "2** (k-1)", "2", "k-1", "k", "1", "x = y + int(s[:j+1])", "x", "y + int(s[:j+1])", "y", "int(s[:j+1])", "int", "s[:j+1]", "s", ":j+1", "j+1", "j", "1", "m.append(x)", "m.append", "m", "append", "x", "print(m[-1])", "print", "m[-1]", "m", "-1", "m = [int(s[0])]", "[int(s[0])]", "m", "x = y + int(s[:j+1])", "y + int(s[:j+1])", "x", "l = len(s)", "len(s)", "l", "s = input()", "input()", "s", "y += m[k-1] + int(s[k:j+1]) *(2** (k-1))", "m[k-1] + int(s[k:j+1]) *(2** (k-1))", "y", "y = 0", "0", "y" ]
s = input() l = len(s) m = [int(s[0])] if l >= 2: for j in range(1,l): y = 0 for k in range(1,j+1): y += m[k-1] + int(s[k:j+1]) *(2** (k-1)) x = y + int(s[:j+1]) m.append(x) print(m[-1])
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 0, 13, 2, 2, 18, 13, 39, 2, 2, 13, 13, 17, 17, 18, 13, 39, 2, 2, 13, 13, 17, 0, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13 ]
[ [ 91, 2 ], [ 76, 6 ], [ 92, 9 ], [ 82, 11 ], [ 15, 14 ], [ 77, 20 ], [ 88, 23 ], [ 92, 24 ], [ 85, 26 ], [ 30, 29 ], [ 77, 33 ], [ 14, 39 ], [ 29, 40 ], [ 94, 44 ], [ 89, 48 ], [ 95, 48 ], [ 29, 52 ], [ 86, 53 ], [ 98, 53 ], [ 89, 57 ], [ 95, 57 ], [ 29, 61 ], [ 86, 62 ], [ 98, 62 ], [ 97, 65 ], [ 79, 68 ], [ 95, 71 ], [ 89, 71 ], [ 80, 74 ], [ 83, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ], [ 92, 88 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ] ]
[ "S = input()\nN = len(S)\nans = 0\n\nfor n in range(1 << N-1):\n s = S\n cnt = 0\n for i in range(N-1):\n if (n >> i) & 1 == 1:\n s = s[:i+cnt+1] + \"+\" + s[i+cnt+1:]\n cnt += 1\n ans += eval(s)\n\nprint(ans)", "S = input()", "S", "input()", "input", "N = len(S)", "N", "len(S)", "len", "S", "ans = 0", "ans", "0", "for n in range(1 << N-1):\n s = S\n cnt = 0\n for i in range(N-1):\n if (n >> i) & 1 == 1:\n s = s[:i+cnt+1] + \"+\" + s[i+cnt+1:]\n cnt += 1\n ans += eval(s)", "n", "range(1 << N-1)", "range", "1 << N-1", "1", "N-1", "N", "1", "s = S", "s", "S", "cnt = 0", "cnt", "0", "for i in range(N-1):\n if (n >> i) & 1 == 1:\n s = s[:i+cnt+1] + \"+\" + s[i+cnt+1:]\n cnt += 1\n ", "i", "range(N-1)", "range", "N-1", "N", "1", "if (n >> i) & 1 == 1:\n s = s[:i+cnt+1] + \"+\" + s[i+cnt+1:]\n cnt += 1\n ", "(n >> i) & 1 == 1", "(n >> i) & 1", "n >> i", "n", "i", "1", "1", "s = s[:i+cnt+1] + \"+\" + s[i+cnt+1:]", "s", "s[:i+cnt+1] + \"+\" + s[i+cnt+1:]", "s[:i+cnt+1] + \"+\"", "s[:i+cnt+1]", "s", ":i+cnt+1", "i+cnt+1", "i+cnt", "i", "cnt", "1", "\"+\"", "s[i+cnt+1:]", "s", "i+cnt+1:", "i+cnt+1", "i+cnt", "i", "cnt", "1", "cnt += 1", "cnt", "1", "ans += eval(s)", "ans", "eval(s)", "eval", "s", "print(ans)", "print", "ans", "N = len(S)", "len(S)", "N", "ans += eval(s)", "eval(s)", "ans", "ans = 0", "0", "ans", "cnt = 0", "0", "cnt", "s = S", "S", "s", "S = input()", "input()", "S", "s = s[:i+cnt+1] + \"+\" + s[i+cnt+1:]", "s[:i+cnt+1] + \"+\" + s[i+cnt+1:]", "s", "cnt += 1", "1", "cnt" ]
S = input() N = len(S) ans = 0 for n in range(1 << N-1): s = S cnt = 0 for i in range(N-1): if (n >> i) & 1 == 1: s = s[:i+cnt+1] + "+" + s[i+cnt+1:] cnt += 1 ans += eval(s) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 18, 13, 2, 4, 13, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 0, 13, 4, 13, 13, 0, 13, 18, 13, 2, 2, 4, 13, 13, 17, 13, 0, 13, 2, 18, 13, 2, 2, 4, 13, 13, 17, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 18, 13, 10, 18, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 98, 2 ], [ 89, 6 ], [ 10, 9 ], [ 99, 17 ], [ 83, 20 ], [ 99, 22 ], [ 99, 26 ], [ 30, 29 ], [ 99, 35 ], [ 9, 41 ], [ 29, 42 ], [ 101, 46 ], [ 84, 49 ], [ 93, 49 ], [ 87, 49 ], [ 86, 51 ], [ 99, 53 ], [ 99, 58 ], [ 29, 60 ], [ 92, 62 ], [ 99, 65 ], [ 99, 70 ], [ 29, 72 ], [ 84, 73 ], [ 93, 73 ], [ 87, 73 ], [ 95, 75 ], [ 93, 78 ], [ 87, 78 ], [ 84, 78 ], [ 96, 81 ], [ 102, 81 ], [ 90, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ] ]
[ "N=input()\nans=0\nfor i in range(2**((len(N)-1))):\n b = N[len(N)-1]\n for j in range(len(N)-1):\n if (i>>j)&1==1:\n ans += int(b)\n b = N[len(N)-2-j]\n else:\n b = N[len(N)-2-j] + b\n else:\n ans += int(b)\nprint(ans) ", "N=input()", "N", "input()", "input", "ans=0", "ans", "0", "for i in range(2**((len(N)-1))):\n b = N[len(N)-1]\n for j in range(len(N)-1):\n if (i>>j)&1==1:\n ans += int(b)\n b = N[len(N)-2-j]\n else:\n b = N[len(N)-2-j] + b\n else:\n ans += int(b)", "i", "range(2**((len(N)-1)))", "range", "2**((len(N)-1))", "2", "len(N)-1", "len(N)", "len", "N", "1", "b = N[len(N)-1]", "b", "N[len(N)-1]", "N", "len(N)-1", "len(N)", "len", "N", "1", "for j in range(len(N)-1):\n if (i>>j)&1==1:\n ans += int(b)\n b = N[len(N)-2-j]\n else:\n b = N[len(N)-2-j] + b\n else:\n ans += int(b)", "j", "range(len(N)-1)", "range", "len(N)-1", "len(N)", "len", "N", "1", "if (i>>j)&1==1:\n ans += int(b)\n b = N[len(N)-2-j]\n else:\n b = N[len(N)-2-j] + b\n ", "(i>>j)&1==1", "(i>>j)&1", "i>>j", "i", "j", "1", "1", "ans += int(b)", "ans", "int(b)", "int", "b", "b = N[len(N)-2-j]", "b", "N[len(N)-2-j]", "N", "len(N)-2-j", "len(N)-2", "len(N)", "len", "N", "2", "j", "b = N[len(N)-2-j] + b", "b", "N[len(N)-2-j] + b", "N[len(N)-2-j]", "N", "len(N)-2-j", "len(N)-2", "len(N)", "len", "N", "2", "j", "b", "ans += int(b)", "ans", "int(b)", "int", "b", "print(ans)", "print", "ans", "b = N[len(N)-1]", "N[len(N)-1]", "b", "b = N[len(N)-2-j]", "N[len(N)-2-j]", "b", "ans=0", "0", "ans", "b = N[len(N)-2-j] + b", "N[len(N)-2-j] + b", "b", "ans += int(b)", "int(b)", "ans", "N=input()", "input()", "N", "ans += int(b)", "int(b)", "ans" ]
N=input() ans=0 for i in range(2**((len(N)-1))): b = N[len(N)-1] for j in range(len(N)-1): if (i>>j)&1==1: ans += int(b) b = N[len(N)-2-j] else: b = N[len(N)-2-j] + b else: ans += int(b) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 2, 39, 17, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 2, 13, 13, 17, 0, 18, 13, 13, 17, 0, 13, 39, 28, 13, 4, 13, 2, 2, 4, 13, 13, 17, 17, 14, 2, 2, 13, 17, 17, 4, 18, 13, 13, 18, 13, 2, 13, 17, 14, 2, 18, 13, 2, 2, 13, 17, 17, 17, 4, 18, 13, 13, 17, 0, 13, 4, 13, 4, 13, 4, 13, 13, 4, 18, 4, 18, 17, 13, 13, 13, 17, 0, 13, 2, 39, 17, 2, 4, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 139, 2 ], [ 130, 8 ], [ 140, 15 ], [ 136, 18 ], [ 22, 21 ], [ 140, 29 ], [ 33, 32 ], [ 140, 38 ], [ 21, 43 ], [ 32, 44 ], [ 50, 47 ], [ 131, 48 ], [ 134, 48 ], [ 32, 49 ], [ 142, 52 ], [ 56, 55 ], [ 140, 62 ], [ 55, 68 ], [ 143, 73 ], [ 140, 76 ], [ 55, 78 ], [ 131, 83 ], [ 134, 83 ], [ 55, 86 ], [ 143, 92 ], [ 127, 96 ], [ 143, 110 ], [ 133, 114 ], [ 140, 121 ], [ 128, 125 ], [ 137, 125 ], [ 127, 128 ], [ 130, 131 ], [ 133, 134 ], [ 136, 137 ], [ 139, 140 ], [ 142, 143 ] ]
[ "s = list(input())\nl = [\"#\"] * (len(s)-1)\nans = 0\nfor i in range(2**(len(s)-1)):\n for j in range(len(s)-1):\n if (i>>j)&1:\n l[j] = \"+\"\n x = []\n for j in range(len(s)*2-1):\n if j % 2 == 0:\n x.append(s[j//2])\n else:\n if l[(j-1)//2] == \"+\":\n x.append(\"+\")\n ans += sum(list(map(int, \"\".join(x).split(\"+\"))))\n l = [\"#\"] * (len(s)-1)\nprint(ans)", "s = list(input())", "s", "list(input())", "list", "input()", "input", "l = [\"#\"] * (len(s)-1)", "l", "[\"#\"] * (len(s)-1)", "[\"#\"]", "\"#\"", "len(s)-1", "len(s)", "len", "s", "1", "ans = 0", "ans", "0", "for i in range(2**(len(s)-1)):\n for j in range(len(s)-1):\n if (i>>j)&1:\n l[j] = \"+\"\n x = []\n for j in range(len(s)*2-1):\n if j % 2 == 0:\n x.append(s[j//2])\n else:\n if l[(j-1)//2] == \"+\":\n x.append(\"+\")\n ans += sum(list(map(int, \"\".join(x).split(\"+\"))))\n l = [\"#\"] * (len(s)-1)", "i", "range(2**(len(s)-1))", "range", "2**(len(s)-1)", "2", "len(s)-1", "len(s)", "len", "s", "1", "for j in range(len(s)-1):\n if (i>>j)&1:\n l[j] = \"+\"\n ", "j", "range(len(s)-1)", "range", "len(s)-1", "len(s)", "len", "s", "1", "if (i>>j)&1:\n l[j] = \"+\"\n ", "(i>>j)&1", "i>>j", "i", "j", "1", "l[j] = \"+\"", "l[j]", "l", "j", "\"+\"", "x = []", "x", "[]", "for j in range(len(s)*2-1):\n if j % 2 == 0:\n x.append(s[j//2])\n else:\n if l[(j-1)//2] == \"+\":\n x.append(\"+\")\n ", "j", "range(len(s)*2-1)", "range", "len(s)*2-1", "len(s)*2", "len(s)", "len", "s", "2", "1", "if j % 2 == 0:\n x.append(s[j//2])\n else:\n if l[(j-1)//2] == \"+\":\n x.append(\"+\")\n ", "j % 2 == 0", "j % 2", "j", "2", "0", "x.append(s[j//2])", "x.append", "x", "append", "s[j//2]", "s", "j//2", "j", "2", "if l[(j-1)//2] == \"+\":\n x.append(\"+\")\n ", "l[(j-1)//2] == \"+\"", "l[(j-1)//2]", "l", "(j-1)//2", "j-1", "j", "1", "2", "\"+\"", "x.append(\"+\")", "x.append", "x", "append", "\"+\"", "ans += sum(list(map(int, \"\".join(x).split(\"+\"))))", "ans", "sum(list(map(int, \"\".join(x).split(\"+\"))))", "sum", "list(map(int, \"\".join(x).split(\"+\")))", "list", "map(int, \"\".join(x).split(\"+\"))", "map", "int", "\"\".join(x).split(\"+\")", "\"\".join(x).split", "\"\".join(x)", "\"\".join", "\"\"", "join", "x", "split", "\"+\"", "l = [\"#\"] * (len(s)-1)", "l", "[\"#\"] * (len(s)-1)", "[\"#\"]", "\"#\"", "len(s)-1", "len(s)", "len", "s", "1", "print(ans)", "print", "ans", "ans += sum(list(map(int, \"\".join(x).split(\"+\"))))", "sum(list(map(int, \"\".join(x).split(\"+\"))))", "ans", "l = [\"#\"] * (len(s)-1)", "[\"#\"] * (len(s)-1)", "l", "l = [\"#\"] * (len(s)-1)", "[\"#\"] * (len(s)-1)", "l", "ans = 0", "0", "ans", "s = list(input())", "list(input())", "s", "x = []", "[]", "x" ]
s = list(input()) l = ["#"] * (len(s)-1) ans = 0 for i in range(2**(len(s)-1)): for j in range(len(s)-1): if (i>>j)&1: l[j] = "+" x = [] for j in range(len(s)*2-1): if j % 2 == 0: x.append(s[j//2]) else: if l[(j-1)//2] == "+": x.append("+") ans += sum(list(map(int, "".join(x).split("+")))) l = ["#"] * (len(s)-1) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 12, 13, 0, 13, 13, 0, 13, 2, 13, 17, 0, 13, 17, 0, 13, 17, 42, 2, 13, 17, 14, 40, 2, 13, 2, 17, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 13, 0, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 13, 29, 13, 23, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 12, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 99, 2 ], [ 93, 6 ], [ 100, 9 ], [ 14, 13 ], [ 94, 14 ], [ 17, 16 ], [ 94, 18 ], [ 22, 21 ], [ 25, 24 ], [ 16, 28 ], [ 54, 28 ], [ 51, 28 ], [ 71, 33 ], [ 21, 36 ], [ 57, 36 ], [ 40, 39 ], [ 100, 43 ], [ 49, 48 ], [ 16, 49 ], [ 54, 49 ], [ 51, 49 ], [ 52, 51 ], [ 55, 54 ], [ 58, 57 ], [ 61, 60 ], [ 100, 64 ], [ 60, 69 ], [ 39, 69 ], [ 24, 69 ], [ 71, 71 ], [ 105, 73 ], [ 77, 76 ], [ 94, 82 ], [ 102, 85 ], [ 97, 87 ], [ 76, 88 ], [ 103, 91 ], [ 106, 91 ], [ 93, 94 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ] ]
[ "s = input()\nlen_s = len(s)\ndef calc_one_sum(n):\n r = len_s\n l = len_s - 1\n i = 0\n one_sum = 0\n while l > 0:\n if n & 1<<i != 0:\n one_sum += int(s[l:r])\n r = l\n l -= 1\n else:\n l -= 1\n i += 1\n one_sum += int(s[l:r])\n return one_sum\nans = 0\nfor i in range(2**(len_s - 1)):\n ans += calc_one_sum(i)\nprint(ans)", "s = input()", "s", "input()", "input", "len_s = len(s)", "len_s", "len(s)", "len", "s", "def calc_one_sum(n):\n r = len_s\n l = len_s - 1\n i = 0\n one_sum = 0\n while l > 0:\n if n & 1<<i != 0:\n one_sum += int(s[l:r])\n r = l\n l -= 1\n else:\n l -= 1\n i += 1\n one_sum += int(s[l:r])\n return one_sum", "calc_one_sum", "r = len_s", "r", "len_s", "l = len_s - 1", "l", "len_s - 1", "len_s", "1", "i = 0", "i", "0", "one_sum = 0", "one_sum", "0", "while l > 0:\n if n & 1<<i != 0:\n one_sum += int(s[l:r])\n r = l\n l -= 1\n else:\n l -= 1\n i += 1\n ", "l > 0", "l", "0", "if n & 1<<i != 0:\n one_sum += int(s[l:r])\n r = l\n l -= 1\n else:\n l -= 1\n ", "n & 1<<i != 0", "n & 1<<i", "n", "1<<i", "1", "i", "0", "one_sum += int(s[l:r])", "one_sum", "int(s[l:r])", "int", "s[l:r]", "s", "l:r", "l", "r", "r = l", "r", "l", "l -= 1", "l", "1", "l -= 1", "l", "1", "i += 1", "i", "1", "one_sum += int(s[l:r])", "one_sum", "int(s[l:r])", "int", "s[l:r]", "s", "l:r", "l", "r", "return one_sum", "one_sum", "n", "n", "ans = 0", "ans", "0", "for i in range(2**(len_s - 1)):\n ans += calc_one_sum(i)", "i", "range(2**(len_s - 1))", "range", "2**(len_s - 1)", "2", "len_s - 1", "len_s", "1", "ans += calc_one_sum(i)", "ans", "calc_one_sum(i)", "calc_one_sum", "i", "print(ans)", "print", "ans", "len_s = len(s)", "len(s)", "len_s", "def calc_one_sum(n):\n r = len_s\n l = len_s - 1\n i = 0\n one_sum = 0\n while l > 0:\n if n & 1<<i != 0:\n one_sum += int(s[l:r])\n r = l\n l -= 1\n else:\n l -= 1\n i += 1\n one_sum += int(s[l:r])\n return one_sum", "def calc_one_sum(n):\n r = len_s\n l = len_s - 1\n i = 0\n one_sum = 0\n while l > 0:\n if n & 1<<i != 0:\n one_sum += int(s[l:r])\n r = l\n l -= 1\n else:\n l -= 1\n i += 1\n one_sum += int(s[l:r])\n return one_sum", "calc_one_sum", "s = input()", "input()", "s", "ans += calc_one_sum(i)", "calc_one_sum(i)", "ans", "ans = 0", "0", "ans" ]
s = input() len_s = len(s) def calc_one_sum(n): r = len_s l = len_s - 1 i = 0 one_sum = 0 while l > 0: if n & 1<<i != 0: one_sum += int(s[l:r]) r = l l -= 1 else: l -= 1 i += 1 one_sum += int(s[l:r]) return one_sum ans = 0 for i in range(2**(len_s - 1)): ans += calc_one_sum(i) print(ans)
[ 7, 15, 13, 12, 13, 12, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 13, 12, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 12, 13, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 13, 2, 17, 13, 0, 13, 4, 13, 18, 13, 39, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 13, 4, 13, 13, 10, 12, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 12, 13, 10, 4, 13, 10, 2, 13, 10, 12, 13, 10, 4, 13, 10, 12, 13, 10, 17, 13 ]
[ [ 10, 9 ], [ 112, 13 ], [ 9, 16 ], [ 22, 21 ], [ 112, 25 ], [ 21, 30 ], [ 108, 34 ], [ 112, 36 ], [ 114, 38 ], [ 109, 41 ], [ 102, 43 ], [ 47, 46 ], [ 115, 52 ], [ 129, 55 ], [ 59, 58 ], [ 115, 62 ], [ 46, 66 ], [ 58, 69 ], [ 123, 71 ], [ 109, 75 ], [ 58, 79 ], [ 117, 82 ], [ 58, 84 ], [ 105, 87 ], [ 109, 91 ], [ 106, 97 ], [ 124, 97 ], [ 103, 97 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 114, 115 ], [ 117, 118 ], [ 123, 124 ], [ 129, 130 ] ]
[ "import sys\ndef rs(): return sys.stdin.readline().rstrip()\ndef ri(): return int(rs())\ndef rs_(): return [_ for _ in rs().split()]\ndef ri_(): return [int(_) for _ in rs().split()]\ns = rs()\nn = len(s)\nans = 0\nfor bit in range(1 << n - 1):\n tmp = 0\n for i in range(n - 1):\n if bit & (1 << i):\n ans += int(s[tmp:i+1])\n tmp = i + 1\n ans += int(s[tmp:n])\nprint(ans)", "import sys", "sys", "def rs(): return sys.stdin.readline().rstrip()", "rs", "def ri(): return int(rs())", "ri", "_ for _ in rs().split()", "for _ in rs().split()", "_", "rs().split()", "().split", "()", "rs", "split", "for _ in rs().split()", "_", "def rs_(): return [_ for _ in rs().split()]", "rs_", "int(_) for _ in rs().split()", "for _ in rs().split()", "_", "rs().split()", "().split", "()", "rs", "split", "for _ in rs().split()", "int(_)", "int", "_", "def ri_(): return [int(_) for _ in rs().split()]", "ri_", "s = rs()", "s", "rs()", "rs", "n = len(s)", "n", "len(s)", "len", "s", "ans = 0", "ans", "0", "for bit in range(1 << n - 1):\n tmp = 0\n for i in range(n - 1):\n if bit & (1 << i):\n ans += int(s[tmp:i+1])\n tmp = i + 1\n ans += int(s[tmp:n])", "bit", "range(1 << n - 1)", "range", "1 << n - 1", "1", "n - 1", "n", "1", "tmp = 0", "tmp", "0", "for i in range(n - 1):\n if bit & (1 << i):\n ans += int(s[tmp:i+1])\n tmp = i + 1\n ", "i", "range(n - 1)", "range", "n - 1", "n", "1", "if bit & (1 << i):\n ans += int(s[tmp:i+1])\n tmp = i + 1\n ", "bit & (1 << i)", "bit", "1 << i", "1", "i", "ans += int(s[tmp:i+1])", "ans", "int(s[tmp:i+1])", "int", "s[tmp:i+1]", "s", "tmp:i+1", "tmp", "i+1", "i", "1", "tmp = i + 1", "tmp", "i + 1", "i", "1", "ans += int(s[tmp:n])", "ans", "int(s[tmp:n])", "int", "s[tmp:n]", "s", "tmp:n", "tmp", "n", "print(ans)", "print", "ans", "def ri(): return int(rs())", "def ri(): return int(rs())", "ri", "ans = 0", "0", "ans", "ans += int(s[tmp:n])", "int(s[tmp:n])", "ans", "s = rs()", "rs()", "s", "def rs(): return sys.stdin.readline().rstrip()", "def rs(): return sys.stdin.readline().rstrip()", "rs", "n = len(s)", "len(s)", "n", "tmp = i + 1", "i + 1", "tmp", "def ri_(): return [int(_) for _ in rs().split()]", "def ri_(): return [int(_) for _ in rs().split()]", "ri_", "ans += int(s[tmp:i+1])", "int(s[tmp:i+1])", "ans", "def rs_(): return [_ for _ in rs().split()]", "def rs_(): return [_ for _ in rs().split()]", "rs_", "tmp = 0", "0", "tmp" ]
import sys def rs(): return sys.stdin.readline().rstrip() def ri(): return int(rs()) def rs_(): return [_ for _ in rs().split()] def ri_(): return [int(_) for _ in rs().split()] s = rs() n = len(s) ans = 0 for bit in range(1 << n - 1): tmp = 0 for i in range(n - 1): if bit & (1 << i): ans += int(s[tmp:i+1]) tmp = i + 1 ans += int(s[tmp:n]) print(ans)
[ 7, 0, 13, 4, 13, 12, 13, 14, 2, 13, 2, 13, 17, 29, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 29, 2, 4, 13, 2, 13, 17, 2, 13, 18, 13, 2, 13, 17, 4, 13, 2, 13, 17, 2, 2, 13, 17, 18, 13, 2, 13, 17, 23, 13, 23, 13, 0, 13, 4, 13, 13, 4, 13, 4, 13, 17, 18, 13, 17, 10, 12, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 73, 2 ], [ 53, 9 ], [ 55, 21 ], [ 53, 29 ], [ 55, 32 ], [ 74, 34 ], [ 53, 36 ], [ 53, 41 ], [ 55, 45 ], [ 74, 48 ], [ 53, 50 ], [ 53, 53 ], [ 55, 55 ], [ 76, 57 ], [ 74, 60 ], [ 71, 64 ], [ 74, 67 ], [ 73, 74 ], [ 76, 77 ] ]
[ "S = input()\n\ndef dfs(i, f):\n if i == N-1:\n return sum(map(int, f.split('+')))\n return dfs(i+1, f + S[i+1]) + dfs(i+1, f+'+'+S[i+1])\n\nN = len(S)\nprint(dfs(0, S[0]))", "S = input()", "S", "input()", "input", "def dfs(i, f):\n if i == N-1:\n return sum(map(int, f.split('+')))\n return dfs(i+1, f + S[i+1]) + dfs(i+1, f+'+'+S[i+1])", "dfs", "if i == N-1:\n return sum(map(int, f.split('+')))\n ", "i == N-1", "i", "N-1", "N", "1", "return sum(map(int, f.split('+')))", "sum(map(int, f.split('+')))", "sum", "map(int, f.split('+'))", "map", "int", "f.split('+')", "f.split", "f", "split", "'+'", "return dfs(i+1, f + S[i+1]) + dfs(i+1, f+'+'+S[i+1])", "dfs(i+1, f + S[i+1]) + dfs(i+1, f+'+'+S[i+1])", "dfs(i+1, f + S[i+1])", "dfs", "i+1", "i", "1", "f + S[i+1]", "f", "S[i+1]", "S", "i+1", "i", "1", "dfs(i+1, f+'+'+S[i+1])", "dfs", "i+1", "i", "1", "f+'+'+S[i+1]", "f+'+'", "f", "'+'", "S[i+1]", "S", "i+1", "i", "1", "i", "i", "f", "f", "N = len(S)", "N", "len(S)", "len", "S", "print(dfs(0, S[0]))", "print", "dfs(0, S[0])", "dfs", "0", "S[0]", "S", "0", "def dfs(i, f):\n if i == N-1:\n return sum(map(int, f.split('+')))\n return dfs(i+1, f + S[i+1]) + dfs(i+1, f+'+'+S[i+1])", "def dfs(i, f):\n if i == N-1:\n return sum(map(int, f.split('+')))\n return dfs(i+1, f + S[i+1]) + dfs(i+1, f+'+'+S[i+1])", "dfs", "S = input()", "input()", "S", "N = len(S)", "len(S)", "N" ]
S = input() def dfs(i, f): if i == N-1: return sum(map(int, f.split('+'))) return dfs(i+1, f + S[i+1]) + dfs(i+1, f+'+'+S[i+1]) N = len(S) print(dfs(0, S[0]))
[ 7, 12, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 0, 13, 4, 13, 28, 13, 4, 13, 4, 13, 17, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 13, 2, 2, 13, 17, 18, 13, 39, 2, 13, 17, 2, 13, 17, 0, 13, 13, 14, 2, 13, 13, 0, 13, 2, 2, 13, 17, 18, 13, 39, 2, 13, 17, 0, 13, 8, 40, 13, 13, 4, 13, 13, 17, 4, 18, 13, 13, 13, 4, 13, 13, 23, 13, 14, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 10, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 95, 8 ], [ 12, 11 ], [ 15, 14 ], [ 19, 18 ], [ 4, 24 ], [ 27, 26 ], [ 30, 29 ], [ 33, 32 ], [ 4, 35 ], [ 18, 39 ], [ 32, 40 ], [ 44, 43 ], [ 26, 46 ], [ 43, 46 ], [ 65, 46 ], [ 95, 49 ], [ 29, 52 ], [ 58, 52 ], [ 32, 55 ], [ 59, 58 ], [ 32, 59 ], [ 58, 62 ], [ 29, 62 ], [ 4, 63 ], [ 66, 65 ], [ 43, 68 ], [ 26, 68 ], [ 65, 68 ], [ 95, 71 ], [ 58, 74 ], [ 29, 74 ], [ 78, 77 ], [ 65, 80 ], [ 43, 80 ], [ 26, 80 ], [ 14, 81 ], [ 65, 84 ], [ 43, 84 ], [ 26, 84 ], [ 14, 88 ], [ 65, 90 ], [ 43, 90 ], [ 26, 90 ], [ 77, 93 ], [ 11, 93 ], [ 95, 95 ], [ 108, 101 ], [ 112, 105 ], [ 109, 106 ], [ 108, 109 ] ]
[ "def solve(S):\n N = len(S) - 1\n ret = 0\n used_equation = set()\n for i in range(pow(2, N)):\n tmp_equation = ''\n last_j = -1\n for j in range(N):\n if i >> j & 1:\n tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1]\n last_j = j\n if last_j < N:\n tmp_equation = tmp_equation + '+' + S[last_j + 1:]\n ret += eval(tmp_equation) if tmp_equation not in used_equation else 0\n used_equation.add(tmp_equation)\n print(ret)\n\nif __name__ == \"__main__\":\n S = input()\n solve(S)", "def solve(S):\n N = len(S) - 1\n ret = 0\n used_equation = set()\n for i in range(pow(2, N)):\n tmp_equation = ''\n last_j = -1\n for j in range(N):\n if i >> j & 1:\n tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1]\n last_j = j\n if last_j < N:\n tmp_equation = tmp_equation + '+' + S[last_j + 1:]\n ret += eval(tmp_equation) if tmp_equation not in used_equation else 0\n used_equation.add(tmp_equation)\n print(ret)", "solve", "N = len(S) - 1", "N", "len(S) - 1", "len(S)", "len", "S", "1", "ret = 0", "ret", "0", "used_equation = set()", "used_equation", "set()", "set", "for i in range(pow(2, N)):\n tmp_equation = ''\n last_j = -1\n for j in range(N):\n if i >> j & 1:\n tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1]\n last_j = j\n if last_j < N:\n tmp_equation = tmp_equation + '+' + S[last_j + 1:]\n ret += eval(tmp_equation) if tmp_equation not in used_equation else 0\n used_equation.add(tmp_equation)\n ", "i", "range(pow(2, N))", "range", "pow(2, N)", "pow", "2", "N", "tmp_equation = ''", "tmp_equation", "''", "last_j = -1", "last_j", "-1", "for j in range(N):\n if i >> j & 1:\n tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1]\n last_j = j\n ", "j", "range(N)", "range", "N", "if i >> j & 1:\n tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1]\n last_j = j\n ", "i >> j & 1", "i >> j", "i", "j", "1", "tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1]", "tmp_equation", "tmp_equation + '+' + S[last_j + 1: j + 1]", "tmp_equation + '+'", "tmp_equation", "'+'", "S[last_j + 1: j + 1]", "S", "last_j + 1: j + 1", "last_j + 1", "last_j", "1", "j + 1", "j", "1", "last_j = j", "last_j", "j", "if last_j < N:\n tmp_equation = tmp_equation + '+' + S[last_j + 1:]\n ", "last_j < N", "last_j", "N", "tmp_equation = tmp_equation + '+' + S[last_j + 1:]", "tmp_equation", "tmp_equation + '+' + S[last_j + 1:]", "tmp_equation + '+'", "tmp_equation", "'+'", "S[last_j + 1:]", "S", "last_j + 1:", "last_j + 1", "last_j", "1", "ret += eval(tmp_equation) if tmp_equation not in used_equation else 0", "ret", "eval(tmp_equation) if tmp_equation not in used_equation else 0", "tmp_equation not in used_equation", "tmp_equation", "used_equation", "eval(tmp_equation)", "eval", "tmp_equation", "0", "used_equation.add(tmp_equation)", "used_equation.add", "used_equation", "add", "tmp_equation", "print(ret)", "print", "ret", "S", "S", "if __name__ == \"__main__\":\n S = input()\n solve(S)", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "S = input()", "S", "input()", "input", "solve(S)", "solve", "S", "S = input()", "input()", "S", "def solve(S):\n N = len(S) - 1\n ret = 0\n used_equation = set()\n for i in range(pow(2, N)):\n tmp_equation = ''\n last_j = -1\n for j in range(N):\n if i >> j & 1:\n tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1]\n last_j = j\n if last_j < N:\n tmp_equation = tmp_equation + '+' + S[last_j + 1:]\n ret += eval(tmp_equation) if tmp_equation not in used_equation else 0\n used_equation.add(tmp_equation)\n print(ret)", "def solve(S):\n N = len(S) - 1\n ret = 0\n used_equation = set()\n for i in range(pow(2, N)):\n tmp_equation = ''\n last_j = -1\n for j in range(N):\n if i >> j & 1:\n tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1]\n last_j = j\n if last_j < N:\n tmp_equation = tmp_equation + '+' + S[last_j + 1:]\n ret += eval(tmp_equation) if tmp_equation not in used_equation else 0\n used_equation.add(tmp_equation)\n print(ret)", "solve" ]
def solve(S): N = len(S) - 1 ret = 0 used_equation = set() for i in range(pow(2, N)): tmp_equation = '' last_j = -1 for j in range(N): if i >> j & 1: tmp_equation = tmp_equation + '+' + S[last_j + 1: j + 1] last_j = j if last_j < N: tmp_equation = tmp_equation + '+' + S[last_j + 1:] ret += eval(tmp_equation) if tmp_equation not in used_equation else 0 used_equation.add(tmp_equation) print(ret) if __name__ == "__main__": S = input() solve(S)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 39, 28, 13, 4, 13, 4, 13, 13, 0, 13, 39, 18, 13, 13, 14, 2, 13, 2, 17, 13, 0, 13, 39, 17, 0, 13, 4, 13, 4, 18, 17, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 39, 13, 10, 39, 13, 10, 4, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 75, 2 ], [ 63, 6 ], [ 76, 9 ], [ 66, 11 ], [ 15, 14 ], [ 64, 22 ], [ 72, 25 ], [ 29, 28 ], [ 64, 33 ], [ 69, 35 ], [ 64, 38 ], [ 28, 39 ], [ 14, 42 ], [ 28, 45 ], [ 81, 47 ], [ 78, 51 ], [ 82, 58 ], [ 70, 58 ], [ 73, 58 ], [ 79, 61 ], [ 67, 61 ], [ 63, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ] ]
[ "s = input()\nl = list(s)\nsum_ = 0\nfor i in range(1 << len(l) -1):\n ll = []\n for j in range(len(l)):\n# print(i,j)\n ll +=[l[j]]\n if i & (1 << j):\n ll +=['+']\n# print(''.join(ll)) \n sum_ += eval(''.join(ll))\nprint(sum_)", "s = input()", "s", "input()", "input", "l = list(s)", "l", "list(s)", "list", "s", "sum_ = 0", "sum_", "0", "for i in range(1 << len(l) -1):\n ll = []\n for j in range(len(l)):\n# print(i,j)\n ll +=[l[j]]\n if i & (1 << j):\n ll +=['+']\n# print(''.join(ll)) \n sum_ += eval(''.join(ll))", "i", "range(1 << len(l) -1)", "range", "1 << len(l) -1", "1", "len(l) -1", "len(l)", "len", "l", "1", "ll = []", "ll", "[]", "for j in range(len(l)):\n# print(i,j)\n ll +=[l[j]]\n if i & (1 << j):\n ll +=['+']\n# print(''.join(ll)) \n ", "j", "range(len(l))", "range", "len(l)", "len", "l", "ll +=[l[j]]", "ll", "[l[j]]", "l[j]", "l", "j", "if i & (1 << j):\n ll +=['+']\n# print(''.join(ll)) \n ", "i & (1 << j)", "i", "1 << j", "1", "j", "ll +=['+']", "ll", "['+']", "'+'", "sum_ += eval(''.join(ll))", "sum_", "eval(''.join(ll))", "eval", "''.join(ll)", "''.join", "''", "join", "ll", "print(sum_)", "print", "sum_", "l = list(s)", "list(s)", "l", "sum_ = 0", "0", "sum_", "ll +=[l[j]]", "[l[j]]", "ll", "ll = []", "[]", "ll", "s = input()", "input()", "s", "sum_ += eval(''.join(ll))", "eval(''.join(ll))", "sum_", "ll +=['+']", "['+']", "ll" ]
s = input() l = list(s) sum_ = 0 for i in range(1 << len(l) -1): ll = [] for j in range(len(l)): # print(i,j) ll +=[l[j]] if i & (1 << j): ll +=['+'] # print(''.join(ll)) sum_ += eval(''.join(ll)) print(sum_)
[ 7, 12, 13, 14, 2, 13, 4, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 4, 13, 18, 13, 39, 13, 13, 0, 13, 13, 0, 13, 4, 13, 18, 13, 39, 13, 29, 13, 29, 2, 4, 13, 2, 13, 17, 13, 2, 13, 39, 13, 4, 13, 2, 13, 17, 13, 13, 23, 13, 23, 13, 23, 13, 0, 13, 4, 13, 0, 13, 4, 13, 13, 4, 13, 4, 13, 17, 13, 39, 10, 4, 13, 10, 12, 13, 10, 4, 13 ]
[ [ 60, 5 ], [ 62, 8 ], [ 11, 10 ], [ 14, 13 ], [ 17, 16 ], [ 64, 16 ], [ 20, 19 ], [ 62, 23 ], [ 29, 28 ], [ 16, 29 ], [ 32, 31 ], [ 62, 35 ], [ 31, 39 ], [ 19, 39 ], [ 10, 39 ], [ 60, 45 ], [ 62, 47 ], [ 64, 49 ], [ 60, 55 ], [ 62, 57 ], [ 64, 58 ], [ 60, 60 ], [ 62, 62 ], [ 64, 64 ], [ 88, 66 ], [ 82, 70 ], [ 89, 73 ], [ 86, 77 ], [ 89, 79 ], [ 82, 83 ], [ 88, 89 ] ]
[ "\n\ndef susiki(n, s, dest):\n if n == len(s):\n tmp = 0\n pre = 0\n for d in dest:\n tmp += int(s[pre:d])\n pre = d\n tmp += int(s[pre:])\n return tmp\n return susiki(n+1, s, dest+[n]) + susiki(n+1, s, dest)\n\ns = input()\nl = len(s)\n\nprint(susiki(1, s, []))", "def susiki(n, s, dest):\n if n == len(s):\n tmp = 0\n pre = 0\n for d in dest:\n tmp += int(s[pre:d])\n pre = d\n tmp += int(s[pre:])\n return tmp\n return susiki(n+1, s, dest+[n]) + susiki(n+1, s, dest)", "susiki", "if n == len(s):\n tmp = 0\n pre = 0\n for d in dest:\n tmp += int(s[pre:d])\n pre = d\n tmp += int(s[pre:])\n return tmp\n ", "n == len(s)", "n", "len(s)", "len", "s", "tmp = 0", "tmp", "0", "pre = 0", "pre", "0", "for d in dest:\n tmp += int(s[pre:d])\n pre = d\n ", "d", "dest", "tmp += int(s[pre:d])", "tmp", "int(s[pre:d])", "int", "s[pre:d]", "s", "pre:d", "pre", "d", "pre = d", "pre", "d", "tmp += int(s[pre:])", "tmp", "int(s[pre:])", "int", "s[pre:]", "s", "pre:", "pre", "return tmp", "tmp", "return susiki(n+1, s, dest+[n]) + susiki(n+1, s, dest)", "susiki(n+1, s, dest+[n]) + susiki(n+1, s, dest)", "susiki(n+1, s, dest+[n])", "susiki", "n+1", "n", "1", "s", "dest+[n]", "dest", "[n]", "n", "susiki(n+1, s, dest)", "susiki", "n+1", "n", "1", "s", "dest", "n", "n", "s", "s", "dest", "dest", "s = input()", "s", "input()", "input", "l = len(s)", "l", "len(s)", "len", "s", "print(susiki(1, s, []))", "print", "susiki(1, s, [])", "susiki", "1", "s", "[]", "l = len(s)", "len(s)", "l", "def susiki(n, s, dest):\n if n == len(s):\n tmp = 0\n pre = 0\n for d in dest:\n tmp += int(s[pre:d])\n pre = d\n tmp += int(s[pre:])\n return tmp\n return susiki(n+1, s, dest+[n]) + susiki(n+1, s, dest)", "def susiki(n, s, dest):\n if n == len(s):\n tmp = 0\n pre = 0\n for d in dest:\n tmp += int(s[pre:d])\n pre = d\n tmp += int(s[pre:])\n return tmp\n return susiki(n+1, s, dest+[n]) + susiki(n+1, s, dest)", "susiki", "s = input()", "input()", "s" ]
def susiki(n, s, dest): if n == len(s): tmp = 0 pre = 0 for d in dest: tmp += int(s[pre:d]) pre = d tmp += int(s[pre:]) return tmp return susiki(n+1, s, dest+[n]) + susiki(n+1, s, dest) s = input() l = len(s) print(susiki(1, s, []))
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 15, 13, 12, 13, 12, 13, 12, 13, 0, 13, 4, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 4, 13, 18, 13, 13, 0, 13, 39, 17, 17, 0, 13, 39, 28, 13, 4, 18, 13, 13, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 18, 13, 17, 0, 13, 17, 28, 13, 13, 4, 13, 18, 13, 39, 17, 13, 14, 40, 13, 17, 0, 13, 2, 2, 13, 17, 13, 0, 13, 13, 0, 13, 13, 0, 13, 13, 4, 18, 13, 13, 13, 4, 13, 4, 13, 13, 10, 13, 13, 10, 17, 13, 10, 13, 13, 10, 13, 13, 10, 2, 13, 10, 18, 13, 10, 12, 13, 10, 12, 13, 10, 4, 13, 10, 4, 13, 10, 39, 13, 10, 39, 13, 10, 12, 13, 10, 18, 13 ]
[ [ 122, 4 ], [ 131, 19 ], [ 123, 25 ], [ 134, 28 ], [ 132, 34 ], [ 140, 37 ], [ 137, 42 ], [ 46, 45 ], [ 141, 50 ], [ 53, 52 ], [ 135, 56 ], [ 132, 56 ], [ 146, 59 ], [ 135, 61 ], [ 132, 61 ], [ 110, 64 ], [ 135, 72 ], [ 132, 72 ], [ 45, 75 ], [ 119, 81 ], [ 147, 84 ], [ 117, 84 ], [ 120, 84 ], [ 107, 88 ], [ 147, 89 ], [ 117, 89 ], [ 120, 89 ], [ 116, 91 ], [ 113, 94 ], [ 117, 95 ], [ 120, 95 ], [ 147, 95 ], [ 138, 98 ], [ 114, 100 ], [ 108, 100 ], [ 111, 100 ], [ 138, 105 ], [ 147, 107 ], [ 117, 107 ], [ 120, 107 ], [ 107, 108 ], [ 110, 111 ], [ 117, 113 ], [ 120, 113 ], [ 147, 113 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 131, 132 ], [ 134, 135 ], [ 137, 138 ], [ 140, 141 ], [ 146, 147 ] ]
[ "# coding: utf-8\n# Your code here!\nimport sys\ninput = sys.stdin.readline\nimport itertools\n \ndef I(): return int(input())\ndef MI(): return map(int, input().split())\ndef LI(): return list(map(int, input().split()))\n\ns = str(input().rstrip())\ns = tuple(int(s[i]) for i in range(len(s)))\n\n\nmylist = [1, 0]\nd = []\n\nfor i in itertools.product(mylist, repeat = len(s)-1):\n temp = s[0]\n result = 0\n for j, k in zip(s[1:], i):\n if k != 1:\n temp = temp * 10 + j\n else:\n result += temp\n temp = j\n result += temp\n d.append(result)\n \nprint(sum(d))", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "import itertools", "itertools", "def I(): return int(input())", "I", "def MI(): return map(int, input().split())", "MI", "def LI(): return list(map(int, input().split()))", "LI", "s = str(input().rstrip())", "s", "str(input().rstrip())", "str", "input().rstrip()", "().rstrip", "()", "input", "rstrip", "s = tuple(int(s[i]) for i in range(len(s)))", "s", "tuple(int(s[i]) for i in range(len(s)))", "tuple", "int(s[i])", "int", "s[i]", "s", "i", "mylist = [1, 0]", "mylist", "[1, 0]", "1", "0", "d = []", "d", "[]", "for i in itertools.product(mylist, repeat = len(s)-1):\n temp = s[0]\n result = 0\n for j, k in zip(s[1:], i):\n if k != 1:\n temp = temp * 10 + j\n else:\n result += temp\n temp = j\n result += temp\n d.append(result)\n ", "i", "itertools.product(mylist, repeat = len(s)-1)", "itertools.product", "itertools", "product", "mylist", "repeat = len(s)-1", "repeat", "len(s)-1", "len(s)", "len", "s", "1", "temp = s[0]", "temp", "s[0]", "s", "0", "result = 0", "result", "0", "for j, k in zip(s[1:], i):\n if k != 1:\n temp = temp * 10 + j\n else:\n result += temp\n temp = j\n ", "j", "k", "zip(s[1:], i)", "zip", "s[1:]", "s", "1:", "1", "i", "if k != 1:\n temp = temp * 10 + j\n else:\n result += temp\n temp = j\n ", "k != 1", "k", "1", "temp = temp * 10 + j", "temp", "temp * 10 + j", "temp * 10", "temp", "10", "j", "result += temp", "result", "temp", "temp = j", "temp", "j", "result += temp", "result", "temp", "d.append(result)", "d.append", "d", "append", "result", "print(sum(d))", "print", "sum(d)", "sum", "d", "result += temp", "temp", "result", "result = 0", "0", "result", "result += temp", "temp", "result", "temp = j", "j", "temp", "temp = temp * 10 + j", "temp * 10 + j", "temp", "input = sys.stdin.readline", "sys.stdin.readline", "input", "def I(): return int(input())", "def I(): return int(input())", "I", "def LI(): return list(map(int, input().split()))", "def LI(): return list(map(int, input().split()))", "LI", "s = str(input().rstrip())", "str(input().rstrip())", "s", "s = tuple(int(s[i]) for i in range(len(s)))", "tuple(int(s[i]) for i in range(len(s)))", "s", "d = []", "[]", "d", "mylist = [1, 0]", "[1, 0]", "mylist", "def MI(): return map(int, input().split())", "def MI(): return map(int, input().split())", "MI", "temp = s[0]", "s[0]", "temp" ]
# coding: utf-8 # Your code here! import sys input = sys.stdin.readline import itertools def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) s = str(input().rstrip()) s = tuple(int(s[i]) for i in range(len(s))) mylist = [1, 0] d = [] for i in itertools.product(mylist, repeat = len(s)-1): temp = s[0] result = 0 for j, k in zip(s[1:], i): if k != 1: temp = temp * 10 + j else: result += temp temp = j result += temp d.append(result) print(sum(d))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 13, 17, 0, 13, 18, 13, 13, 14, 2, 13, 2, 17, 13, 0, 13, 17, 0, 13, 18, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 18, 13, 10, 18, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 77, 2 ], [ 83, 8 ], [ 78, 11 ], [ 62, 13 ], [ 17, 16 ], [ 84, 22 ], [ 65, 25 ], [ 29, 28 ], [ 84, 32 ], [ 68, 35 ], [ 78, 37 ], [ 28, 38 ], [ 16, 41 ], [ 28, 44 ], [ 74, 46 ], [ 71, 49 ], [ 78, 51 ], [ 80, 54 ], [ 72, 57 ], [ 75, 57 ], [ 69, 57 ], [ 66, 57 ], [ 81, 60 ], [ 63, 60 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ] ]
[ "s = list(input())\nn = len(s)\n\nans = 0\nfor i in range(1<<(n-1)):\n form = \"\"\n for j in range(n-1):\n form += s[j]\n if i & 1<<j:\n form += \"+\"\n form += s[-1]\n ans += eval(form)\n\nprint(ans)", "s = list(input())", "s", "list(input())", "list", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "ans = 0", "ans", "0", "for i in range(1<<(n-1)):\n form = \"\"\n for j in range(n-1):\n form += s[j]\n if i & 1<<j:\n form += \"+\"\n form += s[-1]\n ans += eval(form)", "i", "range(1<<(n-1))", "range", "1<<(n-1)", "1", "n-1", "n", "1", "form = \"\"", "form", "\"\"", "for j in range(n-1):\n form += s[j]\n if i & 1<<j:\n form += \"+\"\n ", "j", "range(n-1)", "range", "n-1", "n", "1", "form += s[j]", "form", "s[j]", "s", "j", "if i & 1<<j:\n form += \"+\"\n ", "i & 1<<j", "i", "1<<j", "1", "j", "form += \"+\"", "form", "\"+\"", "form += s[-1]", "form", "s[-1]", "s", "-1", "ans += eval(form)", "ans", "eval(form)", "eval", "form", "print(ans)", "print", "ans", "ans = 0", "0", "ans", "form = \"\"", "\"\"", "form", "form += s[j]", "s[j]", "form", "form += s[-1]", "s[-1]", "form", "form += \"+\"", "\"+\"", "form", "s = list(input())", "list(input())", "s", "ans += eval(form)", "eval(form)", "ans", "n = len(s)", "len(s)", "n" ]
s = list(input()) n = len(s) ans = 0 for i in range(1<<(n-1)): form = "" for j in range(n-1): form += s[j] if i & 1<<j: form += "+" form += s[-1] ans += eval(form) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 18, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 2, 13, 13, 17, 0, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 18, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 69, 2 ], [ 84, 6 ], [ 70, 9 ], [ 66, 11 ], [ 15, 14 ], [ 85, 20 ], [ 78, 23 ], [ 70, 25 ], [ 29, 28 ], [ 85, 32 ], [ 14, 37 ], [ 28, 38 ], [ 81, 41 ], [ 72, 44 ], [ 70, 46 ], [ 28, 48 ], [ 75, 51 ], [ 73, 59 ], [ 82, 59 ], [ 79, 59 ], [ 76, 64 ], [ 67, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ] ]
[ "S = input()\nn = len(S)\n\ntot = 0\n\nfor i in range(2**(n-1)):\n f = S[0]\n for j in range(n-1):\n if ((i >> j) & 1):\n f += \" \"\n f += S[j+1]\n \n tot += sum(map(int, f.split(\" \")))\n\nprint(tot)", "S = input()", "S", "input()", "input", "n = len(S)", "n", "len(S)", "len", "S", "tot = 0", "tot", "0", "for i in range(2**(n-1)):\n f = S[0]\n for j in range(n-1):\n if ((i >> j) & 1):\n f += \" \"\n f += S[j+1]\n \n tot += sum(map(int, f.split(\" \")))", "i", "range(2**(n-1))", "range", "2**(n-1)", "2", "n-1", "n", "1", "f = S[0]", "f", "S[0]", "S", "0", "for j in range(n-1):\n if ((i >> j) & 1):\n f += \" \"\n f += S[j+1]\n \n ", "j", "range(n-1)", "range", "n-1", "n", "1", "if ((i >> j) & 1):\n f += \" \"\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "f += \" \"", "f", "\" \"", "f += S[j+1]", "f", "S[j+1]", "S", "j+1", "j", "1", "tot += sum(map(int, f.split(\" \")))", "tot", "sum(map(int, f.split(\" \")))", "sum", "map(int, f.split(\" \"))", "map", "int", "f.split(\" \")", "f.split", "f", "split", "\" \"", "print(tot)", "print", "tot", "tot = 0", "0", "tot", "S = input()", "input()", "S", "f += S[j+1]", "S[j+1]", "f", "tot += sum(map(int, f.split(\" \")))", "sum(map(int, f.split(\" \")))", "tot", "f = S[0]", "S[0]", "f", "f += \" \"", "\" \"", "f", "n = len(S)", "len(S)", "n" ]
S = input() n = len(S) tot = 0 for i in range(2**(n-1)): f = S[0] for j in range(n-1): if ((i >> j) & 1): f += " " f += S[j+1] tot += sum(map(int, f.split(" "))) print(tot)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 2, 39, 17, 13, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 18, 13, 2, 2, 13, 17, 13, 17, 0, 13, 17, 28, 13, 13, 4, 13, 13, 2, 13, 39, 17, 0, 13, 2, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13 ]
[ [ 80, 2 ], [ 77, 8 ], [ 81, 12 ], [ 89, 15 ], [ 19, 18 ], [ 78, 23 ], [ 95, 25 ], [ 78, 29 ], [ 32, 31 ], [ 78, 34 ], [ 18, 38 ], [ 31, 39 ], [ 49, 42 ], [ 96, 43 ], [ 78, 46 ], [ 31, 48 ], [ 92, 51 ], [ 81, 58 ], [ 96, 60 ], [ 86, 64 ], [ 83, 69 ], [ 87, 72 ], [ 93, 72 ], [ 84, 75 ], [ 90, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ] ]
[ "s = str(input())\n\nn = len(s)-1\nans = 0\nfor i in range(2**n):\n op = [\"\"]*n\n for j in range(n):\n if (i>>j)&1:\n op [n - 1 - j] = \"+\"\n formula = \"\"\n for p1 ,p2 in zip(s, op + [\"\"]):\n formula += (p1 + p2)\n ans += eval(formula)\n\nprint(ans)\n \n ", "s = str(input())", "s", "str(input())", "str", "input()", "input", "n = len(s)-1", "n", "len(s)-1", "len(s)", "len", "s", "1", "ans = 0", "ans", "0", "for i in range(2**n):\n op = [\"\"]*n\n for j in range(n):\n if (i>>j)&1:\n op [n - 1 - j] = \"+\"\n formula = \"\"\n for p1 ,p2 in zip(s, op + [\"\"]):\n formula += (p1 + p2)\n ans += eval(formula)", "i", "range(2**n)", "range", "2**n", "2", "n", "op = [\"\"]*n", "op", "[\"\"]*n", "[\"\"]", "\"\"", "n", "for j in range(n):\n if (i>>j)&1:\n op [n - 1 - j] = \"+\"\n ", "j", "range(n)", "range", "n", "if (i>>j)&1:\n op [n - 1 - j] = \"+\"\n ", "(i>>j)&1", "i>>j", "i", "j", "1", "op [n - 1 - j] = \"+\"", "op [n - 1 - j]", "op", "n - 1 - j", "n - 1", "n", "1", "j", "\"+\"", "formula = \"\"", "formula", "\"\"", "for p1 ,p2 in zip(s, op + [\"\"]):\n formula += (p1 + p2)\n ", "p1", "p2", "zip(s, op + [\"\"])", "zip", "s", "op + [\"\"]", "op", "[\"\"]", "\"\"", "formula += (p1 + p2)", "formula", "p1 + p2", "p1", "p2", "ans += eval(formula)", "ans", "eval(formula)", "eval", "formula", "print(ans)", "print", "ans", "n = len(s)-1", "len(s)-1", "n", "s = str(input())", "str(input())", "s", "ans += eval(formula)", "eval(formula)", "ans", "formula += (p1 + p2)", "p1 + p2", "formula", "ans = 0", "0", "ans", "formula = \"\"", "\"\"", "formula", "op = [\"\"]*n", "[\"\"]*n", "op" ]
s = str(input()) n = len(s)-1 ans = 0 for i in range(2**n): op = [""]*n for j in range(n): if (i>>j)&1: op [n - 1 - j] = "+" formula = "" for p1 ,p2 in zip(s, op + [""]): formula += (p1 + p2) ans += eval(formula) print(ans)
[ 7, 12, 13, 29, 2, 2, 18, 13, 39, 13, 13, 18, 13, 39, 13, 23, 13, 23, 13, 23, 13, 12, 13, 41, 14, 40, 13, 4, 13, 13, 0, 13, 4, 13, 13, 29, 4, 13, 13, 2, 13, 17, 4, 13, 4, 13, 13, 13, 17, 2, 13, 17, 23, 13, 23, 13, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 4, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 12, 13, 10, 4, 13, 10, 12, 13, 10, 17, 13 ]
[ [ 16, 7 ], [ 20, 10 ], [ 16, 12 ], [ 16, 16 ], [ 18, 18 ], [ 20, 20 ], [ 55, 26 ], [ 53, 29 ], [ 32, 31 ], [ 53, 34 ], [ 53, 38 ], [ 55, 40 ], [ 86, 45 ], [ 53, 46 ], [ 55, 47 ], [ 55, 50 ], [ 53, 53 ], [ 55, 55 ], [ 82, 57 ], [ 76, 61 ], [ 83, 64 ], [ 88, 66 ], [ 80, 69 ], [ 83, 70 ], [ 89, 74 ], [ 76, 77 ], [ 82, 83 ], [ 88, 89 ] ]
[ "# coding: utf-8\n# Your code here!\n\n\n\n\ndef insert_str(target, i, char):\n return target[:i] + char + target[i:]\n\ndef calc(target, i):\n global ans\n if i >= len(target):\n ans += eval(target)\n return\n calc(target, i+1)\n calc(insert_str(target, i, \"+\"), i+2)\n \nS = input()\nN = len(S)\nans = 0\ncalc(S, 1)\n\n\nprint(ans)\n\n\n\n", "def insert_str(target, i, char):\n return target[:i] + char + target[i:]", "insert_str", "return target[:i] + char + target[i:]", "target[:i] + char + target[i:]", "target[:i] + char", "target[:i]", "target", ":i", "i", "char", "target[i:]", "target", "i:", "i", "target", "target", "i", "i", "char", "char", "def calc(target, i):\n global ans\n if i >= len(target):\n ans += eval(target)\n return\n calc(target, i+1)\n calc(insert_str(target, i, \"+\"), i+2)\n ", "calc", "global ans", "if i >= len(target):\n ans += eval(target)\n return\n ", "i >= len(target)", "i", "len(target)", "len", "target", "ans += eval(target)", "ans", "eval(target)", "eval", "target", "return", "calc(target, i+1)", "calc", "target", "i+1", "i", "1", "calc(insert_str(target, i, \"+\"), i+2)", "calc", "insert_str(target, i, \"+\")", "insert_str", "target", "i", "\"+\"", "i+2", "i", "2", "target", "target", "i", "i", "S = input()", "S", "input()", "input", "N = len(S)", "N", "len(S)", "len", "S", "ans = 0", "ans", "0", "calc(S, 1)", "calc", "S", "1", "print(ans)", "print", "ans", "N = len(S)", "len(S)", "N", "def calc(target, i):\n global ans\n if i >= len(target):\n ans += eval(target)\n return\n calc(target, i+1)\n calc(insert_str(target, i, \"+\"), i+2)\n ", "def calc(target, i):\n global ans\n if i >= len(target):\n ans += eval(target)\n return\n calc(target, i+1)\n calc(insert_str(target, i, \"+\"), i+2)\n ", "calc", "S = input()", "input()", "S", "def insert_str(target, i, char):\n return target[:i] + char + target[i:]", "def insert_str(target, i, char):\n return target[:i] + char + target[i:]", "insert_str", "ans = 0", "0", "ans" ]
# coding: utf-8 # Your code here! def insert_str(target, i, char): return target[:i] + char + target[i:] def calc(target, i): global ans if i >= len(target): ans += eval(target) return calc(target, i+1) calc(insert_str(target, i, "+"), i+2) S = input() N = len(S) ans = 0 calc(S, 1) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 39, 28, 13, 4, 13, 4, 13, 13, 0, 13, 18, 13, 13, 14, 40, 13, 2, 4, 13, 13, 17, 14, 2, 13, 2, 17, 13, 0, 13, 39, 17, 0, 13, 4, 13, 4, 18, 17, 13, 13, 4, 13, 13, 10, 39, 13, 10, 17, 13, 10, 4, 13, 10, 39, 13, 10, 18, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 88, 2 ], [ 76, 6 ], [ 89, 9 ], [ 73, 11 ], [ 15, 14 ], [ 77, 22 ], [ 79, 25 ], [ 29, 28 ], [ 77, 33 ], [ 82, 35 ], [ 77, 37 ], [ 28, 38 ], [ 28, 41 ], [ 77, 45 ], [ 14, 49 ], [ 28, 52 ], [ 70, 54 ], [ 85, 58 ], [ 71, 65 ], [ 83, 65 ], [ 80, 65 ], [ 86, 68 ], [ 74, 68 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ] ]
[ "N=input()\n\nnum=list(N)\nsum=0;\nfor i in range(1 << len(num)-1):\n l=[]\n for j in range(len(num)):\n l+=num[j]\n if (j != len(num)-1):\n if (i & (1<<j)):\n l+=['+']\n \n sum+=eval(\"\".join(l))\nprint(sum)", "N=input()", "N", "input()", "input", "num=list(N)", "num", "list(N)", "list", "N", "sum=0", "sum", "0", "for i in range(1 << len(num)-1):\n l=[]\n for j in range(len(num)):\n l+=num[j]\n if (j != len(num)-1):\n if (i & (1<<j)):\n l+=['+']\n \n sum+=eval(\"\".join(l))", "i", "range(1 << len(num)-1)", "range", "1 << len(num)-1", "1", "len(num)-1", "len(num)", "len", "num", "1", "l=[]", "l", "[]", "for j in range(len(num)):\n l+=num[j]\n if (j != len(num)-1):\n if (i & (1<<j)):\n l+=['+']\n \n ", "j", "range(len(num))", "range", "len(num)", "len", "num", "l+=num[j]", "l", "num[j]", "num", "j", "if (j != len(num)-1):\n if (i & (1<<j)):\n l+=['+']\n \n ", "j != len(num)-1", "j", "len(num)-1", "len(num)", "len", "num", "1", "if (i & (1<<j)):\n l+=['+']\n \n ", "i & (1<<j)", "i", "1<<j", "1", "j", "l+=['+']", "l", "['+']", "'+'", "sum+=eval(\"\".join(l))", "sum", "eval(\"\".join(l))", "eval", "\"\".join(l)", "\"\".join", "\"\"", "join", "l", "print(sum)", "print", "sum", "l+=['+']", "['+']", "l", "sum=0", "0", "sum", "num=list(N)", "list(N)", "num", "l=[]", "[]", "l", "l+=num[j]", "num[j]", "l", "sum+=eval(\"\".join(l))", "eval(\"\".join(l))", "sum", "N=input()", "input()", "N" ]
N=input() num=list(N) sum=0; for i in range(1 << len(num)-1): l=[] for j in range(len(num)): l+=num[j] if (j != len(num)-1): if (i & (1<<j)): l+=['+'] sum+=eval("".join(l)) print(sum)
[ 7, 0, 13, 4, 18, 4, 13, 13, 0, 13, 17, 0, 13, 4, 13, 28, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 4, 13, 18, 13, 13, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 4, 18, 4, 13, 13, 17, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 2, 2, 13, 17, 18, 13, 13, 0, 13, 17, 0, 13, 2, 2, 13, 17, 18, 13, 13, 0, 13, 2, 2, 13, 17, 18, 13, 17, 4, 13, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 114, 2 ], [ 126, 9 ], [ 120, 12 ], [ 17, 16 ], [ 115, 21 ], [ 121, 24 ], [ 115, 29 ], [ 16, 30 ], [ 33, 32 ], [ 115, 40 ], [ 129, 43 ], [ 32, 48 ], [ 115, 54 ], [ 123, 57 ], [ 61, 60 ], [ 121, 66 ], [ 130, 71 ], [ 60, 72 ], [ 117, 75 ], [ 124, 78 ], [ 133, 78 ], [ 109, 78 ], [ 121, 81 ], [ 60, 82 ], [ 108, 84 ], [ 132, 87 ], [ 124, 90 ], [ 133, 90 ], [ 109, 90 ], [ 121, 93 ], [ 60, 94 ], [ 111, 96 ], [ 133, 99 ], [ 109, 99 ], [ 124, 99 ], [ 121, 102 ], [ 112, 106 ], [ 118, 106 ], [ 127, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ], [ 123, 124 ], [ 126, 127 ], [ 129, 130 ], [ 132, 133 ] ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nS = input().strip()\nresult = 0\nnum = list()\nfor i in range(len(S)):\n num.append(int(S[i]))\n\nfor b in range(2**(len(S)-1)):\n b_str = format(b, 'b').zfill(len(S)-1)\n sum = 0\n for i in range(len(num) - 1):\n if b_str[i] == '0':\n result += sum * 10 + num[i]\n sum = 0\n else:\n sum = sum * 10 + num[i]\n result += sum * 10 + num[-1]\n\nprint(result)\n", "S = input().strip()", "S", "input().strip()", "().strip", "()", "input", "strip", "result = 0", "result", "0", "num = list()", "num", "list()", "list", "for i in range(len(S)):\n num.append(int(S[i]))", "i", "range(len(S))", "range", "len(S)", "len", "S", "num.append(int(S[i]))", "num.append", "num", "append", "int(S[i])", "int", "S[i]", "S", "i", "for b in range(2**(len(S)-1)):\n b_str = format(b, 'b').zfill(len(S)-1)\n sum = 0\n for i in range(len(num) - 1):\n if b_str[i] == '0':\n result += sum * 10 + num[i]\n sum = 0\n else:\n sum = sum * 10 + num[i]\n result += sum * 10 + num[-1]", "b", "range(2**(len(S)-1))", "range", "2**(len(S)-1)", "2", "len(S)-1", "len(S)", "len", "S", "1", "b_str = format(b, 'b').zfill(len(S)-1)", "b_str", "format(b, 'b').zfill(len(S)-1)", "(b, 'b').zfill", "(b, 'b')", "format", "b", "'b'", "zfill", "len(S)-1", "len(S)", "len", "S", "1", "sum = 0", "sum", "0", "for i in range(len(num) - 1):\n if b_str[i] == '0':\n result += sum * 10 + num[i]\n sum = 0\n else:\n sum = sum * 10 + num[i]\n ", "i", "range(len(num) - 1)", "range", "len(num) - 1", "len(num)", "len", "num", "1", "if b_str[i] == '0':\n result += sum * 10 + num[i]\n sum = 0\n else:\n sum = sum * 10 + num[i]\n ", "b_str[i] == '0'", "b_str[i]", "b_str", "i", "'0'", "result += sum * 10 + num[i]", "result", "sum * 10 + num[i]", "sum * 10", "sum", "10", "num[i]", "num", "i", "sum = 0", "sum", "0", "sum = sum * 10 + num[i]", "sum", "sum * 10 + num[i]", "sum * 10", "sum", "10", "num[i]", "num", "i", "result += sum * 10 + num[-1]", "result", "sum * 10 + num[-1]", "sum * 10", "sum", "10", "num[-1]", "num", "-1", "print(result)", "print", "result", "sum = 0", "0", "sum", "result += sum * 10 + num[-1]", "sum * 10 + num[-1]", "result", "S = input().strip()", "input().strip()", "S", "result += sum * 10 + num[i]", "sum * 10 + num[i]", "result", "num = list()", "list()", "num", "sum = 0", "0", "sum", "result = 0", "0", "result", "b_str = format(b, 'b').zfill(len(S)-1)", "format(b, 'b').zfill(len(S)-1)", "b_str", "sum = sum * 10 + num[i]", "sum * 10 + num[i]", "sum" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- S = input().strip() result = 0 num = list() for i in range(len(S)): num.append(int(S[i])) for b in range(2**(len(S)-1)): b_str = format(b, 'b').zfill(len(S)-1) sum = 0 for i in range(len(num) - 1): if b_str[i] == '0': result += sum * 10 + num[i] sum = 0 else: sum = sum * 10 + num[i] result += sum * 10 + num[-1] print(result)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 2, 13, 17, 0, 13, 39, 28, 13, 4, 13, 2, 17, 13, 0, 13, 39, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 18, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 18, 13, 13, 13, 17, 0, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 39, 13, 10, 39, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 18, 13, 10, 2, 13, 10, 18, 13, 10, 17, 13 ]
[ [ 112, 2 ], [ 118, 6 ], [ 113, 9 ], [ 124, 11 ], [ 119, 13 ], [ 103, 16 ], [ 20, 19 ], [ 125, 24 ], [ 106, 26 ], [ 30, 29 ], [ 125, 32 ], [ 19, 36 ], [ 29, 37 ], [ 107, 41 ], [ 104, 46 ], [ 107, 48 ], [ 130, 50 ], [ 54, 53 ], [ 125, 58 ], [ 121, 60 ], [ 113, 62 ], [ 66, 65 ], [ 125, 68 ], [ 104, 73 ], [ 53, 74 ], [ 65, 75 ], [ 115, 78 ], [ 127, 81 ], [ 113, 83 ], [ 65, 85 ], [ 109, 88 ], [ 128, 96 ], [ 116, 96 ], [ 122, 96 ], [ 110, 101 ], [ 131, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ], [ 130, 131 ] ]
[ "# n=int(input())\n# lst=[int(input()) for _ in range(n)]\n# ans1=sum(lst)\n# max1=max(lst)\n# print(ans1)\n# print(0 if max1<=ans1-max1 else max1-(ans1-max1))\ns=input()\nn=len(s)\nl=n-1\nlst_1=[]\nfor i in range(1<<l):\n lst=[]\n for j in range(l):\n if ((i>>j)&1):\n lst.append(\"+\")\n else:lst.append(\"_\")\n lst_1.append(lst)\n\nans=0\nfor i in range(1<<l):\n temp=s[0]\n for j in range(l):\n\n if lst_1[i][j]==\"+\":\n temp+=\"+\"\n temp += s[j+1]\n ans+=sum(map(int,temp.split(\"+\")))\nprint(ans)", "s=input()", "s", "input()", "input", "n=len(s)", "n", "len(s)", "len", "s", "l=n-1", "l", "n-1", "n", "1", "lst_1=[]", "lst_1", "[]", "for i in range(1<<l):\n lst=[]\n for j in range(l):\n if ((i>>j)&1):\n lst.append(\"+\")\n else:lst.append(\"_\")\n lst_1.append(lst)", "i", "range(1<<l)", "range", "1<<l", "1", "l", "lst=[]", "lst", "[]", "for j in range(l):\n if ((i>>j)&1):\n lst.append(\"+\")\n else:lst.append(\"_\")\n ", "j", "range(l)", "range", "l", "if ((i>>j)&1):\n lst.append(\"+\")\n else:lst.append(\"_\")\n ", "(i>>j)&1", "i>>j", "i", "j", "1", "lst.append(\"+\")", "lst.append", "lst", "append", "\"+\"", "lst_1.append(lst)", "lst_1.append", "lst_1", "append", "lst", "ans=0", "ans", "0", "for i in range(1<<l):\n temp=s[0]\n for j in range(l):\n\n if lst_1[i][j]==\"+\":\n temp+=\"+\"\n temp += s[j+1]\n ans+=sum(map(int,temp.split(\"+\")))", "i", "range(1<<l)", "range", "1<<l", "1", "l", "temp=s[0]", "temp", "s[0]", "s", "0", "for j in range(l):\n\n if lst_1[i][j]==\"+\":\n temp+=\"+\"\n temp += s[j+1]\n ", "j", "range(l)", "range", "l", "if lst_1[i][j]==\"+\":\n temp+=\"+\"\n ", "lst_1[i][j]==\"+\"", "lst_1[i][j]", "[i]", "lst_1", "i", "j", "\"+\"", "temp+=\"+\"", "temp", "\"+\"", "temp += s[j+1]", "temp", "s[j+1]", "s", "j+1", "j", "1", "ans+=sum(map(int,temp.split(\"+\")))", "ans", "sum(map(int,temp.split(\"+\")))", "sum", "map(int,temp.split(\"+\"))", "map", "int", "temp.split(\"+\")", "temp.split", "temp", "split", "\"+\"", "print(ans)", "print", "ans", "lst_1=[]", "[]", "lst_1", "lst=[]", "[]", "lst", "ans+=sum(map(int,temp.split(\"+\")))", "sum(map(int,temp.split(\"+\")))", "ans", "s=input()", "input()", "s", "temp+=\"+\"", "\"+\"", "temp", "n=len(s)", "len(s)", "n", "temp=s[0]", "s[0]", "temp", "l=n-1", "n-1", "l", "temp += s[j+1]", "s[j+1]", "temp", "ans=0", "0", "ans" ]
# n=int(input()) # lst=[int(input()) for _ in range(n)] # ans1=sum(lst) # max1=max(lst) # print(ans1) # print(0 if max1<=ans1-max1 else max1-(ans1-max1)) s=input() n=len(s) l=n-1 lst_1=[] for i in range(1<<l): lst=[] for j in range(l): if ((i>>j)&1): lst.append("+") else:lst.append("_") lst_1.append(lst) ans=0 for i in range(1<<l): temp=s[0] for j in range(l): if lst_1[i][j]=="+": temp+="+" temp += s[j+1] ans+=sum(map(int,temp.split("+"))) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 2, 39, 17, 13, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 18, 13, 13, 17, 0, 13, 17, 28, 13, 13, 4, 13, 13, 2, 13, 39, 17, 0, 13, 2, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 86, 2 ], [ 77, 6 ], [ 87, 10 ], [ 83, 13 ], [ 17, 16 ], [ 78, 21 ], [ 80, 23 ], [ 78, 27 ], [ 30, 29 ], [ 78, 32 ], [ 16, 36 ], [ 29, 37 ], [ 43, 40 ], [ 81, 41 ], [ 29, 42 ], [ 71, 45 ], [ 87, 52 ], [ 81, 54 ], [ 89, 58 ], [ 74, 63 ], [ 90, 66 ], [ 72, 66 ], [ 75, 69 ], [ 84, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ] ]
[ "nums = input()\n\nop_cnt = len(nums) -1\n\nsum = 0\n\nfor i in range(2 ** op_cnt):\n op = [\"\"] * op_cnt\n for j in range(op_cnt):\n if(i >> j & 1):\n op[j] = \"+\"\n # print(op)\n\n formula = \"\"\n\n for p_n,p_o in zip(nums,op + [\"\"]):\n formula += (p_n + p_o)\n\n sum += eval(formula)\n\nprint(sum)", "nums = input()", "nums", "input()", "input", "op_cnt = len(nums) -1", "op_cnt", "len(nums) -1", "len(nums)", "len", "nums", "1", "sum = 0", "sum", "0", "for i in range(2 ** op_cnt):\n op = [\"\"] * op_cnt\n for j in range(op_cnt):\n if(i >> j & 1):\n op[j] = \"+\"\n # print(op)\n\n formula = \"\"\n\n for p_n,p_o in zip(nums,op + [\"\"]):\n formula += (p_n + p_o)\n\n sum += eval(formula)", "i", "range(2 ** op_cnt)", "range", "2 ** op_cnt", "2", "op_cnt", "op = [\"\"] * op_cnt", "op", "[\"\"] * op_cnt", "[\"\"]", "\"\"", "op_cnt", "for j in range(op_cnt):\n if(i >> j & 1):\n op[j] = \"+\"\n # print(op)\n\n ", "j", "range(op_cnt)", "range", "op_cnt", "if(i >> j & 1):\n op[j] = \"+\"\n # print(op)\n\n ", "i >> j & 1", "i >> j", "i", "j", "1", "op[j] = \"+\"", "op[j]", "op", "j", "\"+\"", "formula = \"\"", "formula", "\"\"", "for p_n,p_o in zip(nums,op + [\"\"]):\n formula += (p_n + p_o)\n\n ", "p_n", "p_o", "zip(nums,op + [\"\"])", "zip", "nums", "op + [\"\"]", "op", "[\"\"]", "\"\"", "formula += (p_n + p_o)", "formula", "p_n + p_o", "p_n", "p_o", "sum += eval(formula)", "sum", "eval(formula)", "eval", "formula", "print(sum)", "print", "sum", "formula = \"\"", "\"\"", "formula", "sum += eval(formula)", "eval(formula)", "sum", "op_cnt = len(nums) -1", "len(nums) -1", "op_cnt", "op = [\"\"] * op_cnt", "[\"\"] * op_cnt", "op", "sum = 0", "0", "sum", "nums = input()", "input()", "nums", "formula += (p_n + p_o)", "p_n + p_o", "formula" ]
nums = input() op_cnt = len(nums) -1 sum = 0 for i in range(2 ** op_cnt): op = [""] * op_cnt for j in range(op_cnt): if(i >> j & 1): op[j] = "+" # print(op) formula = "" for p_n,p_o in zip(nums,op + [""]): formula += (p_n + p_o) sum += eval(formula) print(sum)
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 39, 17, 17, 0, 13, 4, 13, 4, 18, 13, 13, 13, 0, 13, 2, 13, 17, 0, 13, 17, 0, 13, 39, 28, 13, 13, 0, 13, 39, 28, 13, 4, 13, 13, 14, 2, 13, 2, 13, 17, 4, 18, 13, 13, 18, 13, 13, 0, 13, 4, 13, 4, 18, 17, 13, 13, 0, 13, 39, 14, 2, 18, 13, 13, 17, 4, 18, 13, 13, 18, 13, 13, 4, 18, 13, 13, 18, 13, 13, 0, 13, 4, 13, 4, 18, 17, 13, 13, 0, 13, 39, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 39, 13, 10, 4, 13, 10, 4, 13, 10, 39, 13, 10, 39, 13, 10, 39, 13, 10, 4, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 123, 4 ], [ 111, 10 ], [ 124, 13 ], [ 138, 15 ], [ 120, 20 ], [ 139, 27 ], [ 30, 29 ], [ 112, 31 ], [ 114, 34 ], [ 129, 37 ], [ 41, 40 ], [ 121, 40 ], [ 117, 43 ], [ 47, 46 ], [ 112, 49 ], [ 46, 52 ], [ 112, 54 ], [ 118, 58 ], [ 130, 58 ], [ 133, 58 ], [ 127, 58 ], [ 124, 61 ], [ 46, 62 ], [ 135, 64 ], [ 118, 71 ], [ 130, 71 ], [ 133, 71 ], [ 127, 71 ], [ 126, 73 ], [ 40, 78 ], [ 46, 79 ], [ 118, 83 ], [ 130, 83 ], [ 133, 83 ], [ 127, 83 ], [ 124, 86 ], [ 46, 87 ], [ 118, 90 ], [ 130, 90 ], [ 133, 90 ], [ 127, 90 ], [ 124, 93 ], [ 46, 94 ], [ 141, 96 ], [ 118, 103 ], [ 130, 103 ], [ 133, 103 ], [ 127, 103 ], [ 132, 105 ], [ 142, 109 ], [ 136, 109 ], [ 115, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ], [ 123, 124 ], [ 126, 127 ], [ 129, 130 ], [ 132, 133 ], [ 135, 136 ], [ 138, 139 ], [ 141, 142 ] ]
[ "import itertools\n\nS = list(input())\nN = len(S)\n# print('S:',S)\n\n#onとoff\na = ['nashi','+']\nLs = list(itertools.product(a, repeat=N-1))\n# print('Ls:',Ls)\n\nout=0\ndammy=[]\nfor L in Ls:\n # print('L,out:',L,out)\n dammy=[]\n for i in range(N):\n # print('dammy:',dammy)\n if i==N-1:\n dammy.append(S[i])\n out+=int(''.join(dammy))\n dammy=[]\n elif L[i] == 'nashi':\n dammy.append(S[i])\n else:\n dammy.append(S[i])\n out+=int(''.join(dammy))\n dammy=[]\n\nprint(out)", "import itertools", "itertools", "S = list(input())", "S", "list(input())", "list", "input()", "input", "N = len(S)", "N", "len(S)", "len", "S", "a = ['nashi','+']", "a", "['nashi','+']", "'nashi'", "'+'", "Ls = list(itertools.product(a, repeat=N-1))", "Ls", "list(itertools.product(a, repeat=N-1))", "list", "itertools.product(a, repeat=N-1)", "itertools.product", "itertools", "product", "a", "repeat=N-1", "repeat", "N-1", "N", "1", "out=0", "out", "0", "dammy=[]", "dammy", "[]", "for L in Ls:\n # print('L,out:',L,out)\n dammy=[]\n for i in range(N):\n # print('dammy:',dammy)\n if i==N-1:\n dammy.append(S[i])\n out+=int(''.join(dammy))\n dammy=[]\n elif L[i] == 'nashi':\n dammy.append(S[i])\n else:\n dammy.append(S[i])\n out+=int(''.join(dammy))\n dammy=[]", "L", "Ls", "dammy=[]", "dammy", "[]", "for i in range(N):\n # print('dammy:',dammy)\n if i==N-1:\n dammy.append(S[i])\n out+=int(''.join(dammy))\n dammy=[]\n elif L[i] == 'nashi':\n dammy.append(S[i])\n else:\n dammy.append(S[i])\n out+=int(''.join(dammy))\n dammy=[]", "i", "range(N)", "range", "N", "if i==N-1:\n dammy.append(S[i])\n out+=int(''.join(dammy))\n dammy=[]\n elif L[i] == 'nashi':\n dammy.append(S[i])\n else:\n dammy.append(S[i])\n out+=int(''.join(dammy))\n dammy=[]", "i==N-1", "i", "N-1", "N", "1", "dammy.append(S[i])", "dammy.append", "dammy", "append", "S[i]", "S", "i", "out+=int(''.join(dammy))", "out", "int(''.join(dammy))", "int", "''.join(dammy)", "''.join", "''", "join", "dammy", "dammy=[]", "dammy", "[]", "elif L[i] == 'nashi':\n dammy.append(S[i])\n ", "L[i] == 'nashi'", "L[i]", "L", "i", "'nashi'", "dammy.append(S[i])", "dammy.append", "dammy", "append", "S[i]", "S", "i", "dammy.append(S[i])", "dammy.append", "dammy", "append", "S[i]", "S", "i", "out+=int(''.join(dammy))", "out", "int(''.join(dammy))", "int", "''.join(dammy)", "''.join", "''", "join", "dammy", "dammy=[]", "dammy", "[]", "print(out)", "print", "out", "N = len(S)", "len(S)", "N", "out=0", "0", "out", "dammy=[]", "[]", "dammy", "Ls = list(itertools.product(a, repeat=N-1))", "list(itertools.product(a, repeat=N-1))", "Ls", "S = list(input())", "list(input())", "S", "dammy=[]", "[]", "dammy", "dammy=[]", "[]", "dammy", "dammy=[]", "[]", "dammy", "out+=int(''.join(dammy))", "int(''.join(dammy))", "out", "a = ['nashi','+']", "['nashi','+']", "a", "out+=int(''.join(dammy))", "int(''.join(dammy))", "out" ]
import itertools S = list(input()) N = len(S) # print('S:',S) #onとoff a = ['nashi','+'] Ls = list(itertools.product(a, repeat=N-1)) # print('Ls:',Ls) out=0 dammy=[] for L in Ls: # print('L,out:',L,out) dammy=[] for i in range(N): # print('dammy:',dammy) if i==N-1: dammy.append(S[i]) out+=int(''.join(dammy)) dammy=[] elif L[i] == 'nashi': dammy.append(S[i]) else: dammy.append(S[i]) out+=int(''.join(dammy)) dammy=[] print(out)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 67, 2 ], [ 82, 6 ], [ 68, 10 ], [ 64, 13 ], [ 17, 16 ], [ 83, 21 ], [ 73, 23 ], [ 27, 26 ], [ 83, 29 ], [ 16, 33 ], [ 26, 34 ], [ 79, 37 ], [ 68, 41 ], [ 26, 45 ], [ 70, 48 ], [ 26, 50 ], [ 76, 53 ], [ 68, 57 ], [ 77, 62 ], [ 80, 62 ], [ 65, 62 ], [ 64, 65 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ] ]
[ "#!/usr/bin/env python3\n# 入力\ns = input()\nnum = len(s)-1\nret = 0\n\nfor i in range(2**num):\n st = 0\n for j in range(num):\n if (i >> j) & 1:\n ret += int(s[st:j+1])\n st = j+1\n ret += int(s[st:])\n\nprint(ret)\n\n\n", "s = input()", "s", "input()", "input", "num = len(s)-1", "num", "len(s)-1", "len(s)", "len", "s", "1", "ret = 0", "ret", "0", "for i in range(2**num):\n st = 0\n for j in range(num):\n if (i >> j) & 1:\n ret += int(s[st:j+1])\n st = j+1\n ret += int(s[st:])", "i", "range(2**num)", "range", "2**num", "2", "num", "st = 0", "st", "0", "for j in range(num):\n if (i >> j) & 1:\n ret += int(s[st:j+1])\n st = j+1\n ", "j", "range(num)", "range", "num", "if (i >> j) & 1:\n ret += int(s[st:j+1])\n st = j+1\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "ret += int(s[st:j+1])", "ret", "int(s[st:j+1])", "int", "s[st:j+1]", "s", "st:j+1", "st", "j+1", "j", "1", "st = j+1", "st", "j+1", "j", "1", "ret += int(s[st:])", "ret", "int(s[st:])", "int", "s[st:]", "s", "st:", "st", "print(ret)", "print", "ret", "ret = 0", "0", "ret", "s = input()", "input()", "s", "st = j+1", "j+1", "st", "st = 0", "0", "st", "ret += int(s[st:])", "int(s[st:])", "ret", "ret += int(s[st:j+1])", "int(s[st:j+1])", "ret", "num = len(s)-1", "len(s)-1", "num" ]
#!/usr/bin/env python3 # 入力 s = input() num = len(s)-1 ret = 0 for i in range(2**num): st = 0 for j in range(num): if (i >> j) & 1: ret += int(s[st:j+1]) st = j+1 ret += int(s[st:]) print(ret)
[ 7, 0, 13, 4, 13, 0, 13, 39, 12, 13, 14, 2, 13, 4, 13, 13, 29, 13, 0, 13, 17, 14, 2, 18, 13, 17, 17, 0, 13, 18, 13, 13, 0, 13, 4, 13, 2, 13, 13, 2, 13, 17, 14, 13, 41, 28, 13, 4, 18, 13, 13, 17, 4, 4, 13, 13, 0, 13, 4, 13, 13, 4, 18, 13, 13, 13, 0, 13, 18, 13, 13, 0, 13, 4, 13, 2, 13, 13, 2, 13, 17, 14, 13, 41, 28, 13, 4, 18, 13, 13, 17, 4, 4, 13, 13, 0, 13, 4, 13, 13, 4, 18, 13, 13, 13, 0, 13, 4, 13, 2, 13, 17, 13, 14, 13, 41, 28, 13, 4, 18, 13, 13, 17, 4, 4, 13, 13, 0, 13, 4, 13, 13, 4, 18, 13, 13, 13, 23, 13, 23, 13, 14, 2, 4, 13, 13, 17, 4, 13, 4, 13, 13, 4, 13, 18, 13, 17, 17, 4, 13, 4, 13, 13, 10, 4, 13, 10, 39, 13, 10, 12, 13 ]
[ [ 164, 2 ], [ 167, 6 ], [ 140, 12 ], [ 165, 15 ], [ 138, 17 ], [ 20, 19 ], [ 138, 24 ], [ 29, 28 ], [ 165, 30 ], [ 140, 31 ], [ 34, 33 ], [ 138, 37 ], [ 28, 38 ], [ 19, 38 ], [ 140, 40 ], [ 47, 46 ], [ 33, 49 ], [ 46, 55 ], [ 58, 57 ], [ 168, 63 ], [ 57, 65 ], [ 68, 67 ], [ 165, 69 ], [ 140, 70 ], [ 73, 72 ], [ 138, 76 ], [ 67, 77 ], [ 19, 77 ], [ 140, 79 ], [ 86, 85 ], [ 72, 88 ], [ 85, 94 ], [ 97, 96 ], [ 168, 102 ], [ 96, 104 ], [ 57, 104 ], [ 107, 106 ], [ 138, 110 ], [ 140, 112 ], [ 118, 117 ], [ 106, 120 ], [ 33, 120 ], [ 72, 120 ], [ 117, 126 ], [ 129, 128 ], [ 168, 134 ], [ 128, 136 ], [ 96, 136 ], [ 57, 136 ], [ 138, 138 ], [ 140, 140 ], [ 165, 145 ], [ 165, 151 ], [ 171, 153 ], [ 165, 155 ], [ 168, 162 ], [ 164, 165 ], [ 167, 168 ] ]
[ "ss = input()\nans = []\n\ndef bfs(exp, x):\n # 探索終了\n if x == len(ss):\n return exp\n nxt = None\n # まだ使っていない数字を求める\n if exp[-1] == '+':\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n else:\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n ret = bfs(exp+'+', x)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\nif len(ss) == 1:\n print(int(ss))\nelse:\n bfs(ss[0],1)\n print(sum(ans))", "ss = input()", "ss", "input()", "input", "ans = []", "ans", "[]", "def bfs(exp, x):\n # 探索終了\n if x == len(ss):\n return exp\n nxt = None\n # まだ使っていない数字を求める\n if exp[-1] == '+':\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n else:\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n ret = bfs(exp+'+', x)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)", "bfs", "if x == len(ss):\n return exp\n ", "x == len(ss)", "x", "len(ss)", "len", "ss", "return exp", "exp", "nxt = None", "nxt", "None", "if exp[-1] == '+':\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n else:\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n ret = bfs(exp+'+', x)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)", "exp[-1] == '+'", "exp[-1]", "exp", "-1", "'+'", "nxt = ss[x]", "nxt", "ss[x]", "ss", "x", "ret = bfs(exp+nxt, x+1)", "ret", "bfs(exp+nxt, x+1)", "bfs", "exp+nxt", "exp", "nxt", "x+1", "x", "1", "if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n ", "ret", "int(i) for i in ret.split(\"+\")", "for i in ret.split(\"+\")", "i", "ret.split(\"+\")", "ret.split", "ret", "split", "\"+\"", "for i in ret.split(\"+\")", "int(i)", "int", "i", "s_ = sum([int(i) for i in ret.split(\"+\")])", "s_", "sum([int(i) for i in ret.split(\"+\")])", "sum", "[int(i) for i in ret.split(\"+\")]", "ans.append(s_)", "ans.append", "ans", "append", "s_", "nxt = ss[x]", "nxt", "ss[x]", "ss", "x", "ret = bfs(exp+nxt, x+1)", "ret", "bfs(exp+nxt, x+1)", "bfs", "exp+nxt", "exp", "nxt", "x+1", "x", "1", "if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n ", "ret", "int(i) for i in ret.split(\"+\")", "for i in ret.split(\"+\")", "i", "ret.split(\"+\")", "ret.split", "ret", "split", "\"+\"", "for i in ret.split(\"+\")", "int(i)", "int", "i", "s_ = sum([int(i) for i in ret.split(\"+\")])", "s_", "sum([int(i) for i in ret.split(\"+\")])", "sum", "[int(i) for i in ret.split(\"+\")]", "ans.append(s_)", "ans.append", "ans", "append", "s_", "ret = bfs(exp+'+', x)", "ret", "bfs(exp+'+', x)", "bfs", "exp+'+'", "exp", "'+'", "x", "if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)", "ret", "int(i) for i in ret.split(\"+\")", "for i in ret.split(\"+\")", "i", "ret.split(\"+\")", "ret.split", "ret", "split", "\"+\"", "for i in ret.split(\"+\")", "int(i)", "int", "i", "s_ = sum([int(i) for i in ret.split(\"+\")])", "s_", "sum([int(i) for i in ret.split(\"+\")])", "sum", "[int(i) for i in ret.split(\"+\")]", "ans.append(s_)", "ans.append", "ans", "append", "s_", "exp", "exp", "x", "x", "if len(ss) == 1:\n print(int(ss))\nelse:\n bfs(ss[0],1)\n print(sum(ans))", "len(ss) == 1", "len(ss)", "len", "ss", "1", "print(int(ss))", "print", "int(ss)", "int", "ss", "bfs(ss[0],1)", "bfs", "ss[0]", "ss", "0", "1", "print(sum(ans))", "print", "sum(ans)", "sum", "ans", "ss = input()", "input()", "ss", "ans = []", "[]", "ans", "def bfs(exp, x):\n # 探索終了\n if x == len(ss):\n return exp\n nxt = None\n # まだ使っていない数字を求める\n if exp[-1] == '+':\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n else:\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n ret = bfs(exp+'+', x)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)", "def bfs(exp, x):\n # 探索終了\n if x == len(ss):\n return exp\n nxt = None\n # まだ使っていない数字を求める\n if exp[-1] == '+':\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n else:\n nxt = ss[x]\n ret = bfs(exp+nxt, x+1)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)\n ret = bfs(exp+'+', x)\n if ret:\n s_ = sum([int(i) for i in ret.split(\"+\")])\n ans.append(s_)", "bfs" ]
ss = input() ans = [] def bfs(exp, x): # 探索終了 if x == len(ss): return exp nxt = None # まだ使っていない数字を求める if exp[-1] == '+': nxt = ss[x] ret = bfs(exp+nxt, x+1) if ret: s_ = sum([int(i) for i in ret.split("+")]) ans.append(s_) else: nxt = ss[x] ret = bfs(exp+nxt, x+1) if ret: s_ = sum([int(i) for i in ret.split("+")]) ans.append(s_) ret = bfs(exp+'+', x) if ret: s_ = sum([int(i) for i in ret.split("+")]) ans.append(s_) if len(ss) == 1: print(int(ss)) else: bfs(ss[0],1) print(sum(ans))
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 41, 28, 13, 13, 4, 4, 13, 13, 0, 13, 13, 0, 13, 4, 13, 13, 14, 2, 13, 17, 4, 13, 18, 13, 17, 4, 18, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 13, 0, 13, 17, 0, 13, 18, 13, 17, 42, 2, 13, 13, 14, 2, 2, 13, 17, 17, 0, 13, 17, 0, 13, 18, 13, 13, 14, 2, 2, 13, 17, 17, 0, 13, 13, 0, 13, 18, 13, 13, 0, 13, 2, 13, 17, 0, 13, 17, 0, 13, 13, 4, 13, 13, 10, 17, 13, 10, 13, 13, 10, 2, 13, 10, 18, 13, 10, 18, 13, 10, 13, 13, 10, 4, 13, 10, 13, 13, 10, 17, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13, 10, 13, 13 ]
[ [ 126, 4 ], [ 12, 11 ], [ 127, 11 ], [ 11, 16 ], [ 147, 18 ], [ 141, 21 ], [ 148, 24 ], [ 142, 27 ], [ 148, 32 ], [ 144, 39 ], [ 43, 42 ], [ 142, 48 ], [ 129, 51 ], [ 42, 52 ], [ 132, 54 ], [ 120, 57 ], [ 148, 59 ], [ 133, 63 ], [ 109, 63 ], [ 142, 64 ], [ 130, 68 ], [ 115, 68 ], [ 135, 72 ], [ 138, 75 ], [ 148, 77 ], [ 133, 78 ], [ 109, 78 ], [ 130, 82 ], [ 115, 82 ], [ 111, 86 ], [ 139, 87 ], [ 136, 87 ], [ 121, 87 ], [ 118, 87 ], [ 117, 89 ], [ 148, 91 ], [ 133, 92 ], [ 109, 92 ], [ 114, 94 ], [ 130, 96 ], [ 115, 96 ], [ 108, 99 ], [ 123, 102 ], [ 118, 103 ], [ 139, 103 ], [ 136, 103 ], [ 121, 103 ], [ 124, 106 ], [ 112, 106 ], [ 145, 106 ], [ 108, 109 ], [ 139, 111 ], [ 136, 111 ], [ 121, 111 ], [ 118, 111 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ], [ 118, 123 ], [ 139, 123 ], [ 136, 123 ], [ 121, 123 ], [ 123, 124 ], [ 126, 127 ], [ 42, 129 ], [ 129, 130 ], [ 132, 133 ], [ 135, 136 ], [ 138, 139 ], [ 141, 142 ], [ 144, 145 ], [ 147, 148 ] ]
[ "import sys\nS = list(input())\nT = [int(a) for a in S]\nN = len(T)\n\nif N == 1:\n print(T[0])\n sys.exit()\n \nans = 0\nfor i in range(2 ** (N-1)):\n i_ = i\n j = 1\n tmp = T[0]\n while j < N:\n #print(i,i_,j,N)\n if i_ % 2 == 0:\n tmp *= 10\n tmp += T[j]\n if i_ % 2 == 1:\n ans += tmp\n tmp = T[j]\n i_ = i_ >> 1\n j += 1\n ans += tmp\n #print(ans,i)\n \nprint(ans) ", "import sys", "sys", "S = list(input())", "S", "list(input())", "list", "input()", "input", "int(a) for a in S", "for a in S", "a", "S", "for a in S", "int(a)", "int", "a", "T = [int(a) for a in S]", "T", "[int(a) for a in S]", "N = len(T)", "N", "len(T)", "len", "T", "if N == 1:\n print(T[0])\n sys.exit()\n ", "N == 1", "N", "1", "print(T[0])", "print", "T[0]", "T", "0", "sys.exit()", "sys.exit", "sys", "exit", "ans = 0", "ans", "0", "for i in range(2 ** (N-1)):\n i_ = i\n j = 1\n tmp = T[0]\n while j < N:\n #print(i,i_,j,N)\n if i_ % 2 == 0:\n tmp *= 10\n tmp += T[j]\n if i_ % 2 == 1:\n ans += tmp\n tmp = T[j]\n i_ = i_ >> 1\n j += 1\n ans += tmp\n #print(ans,i)\n ", "i", "range(2 ** (N-1))", "range", "2 ** (N-1)", "2", "N-1", "N", "1", "i_ = i", "i_", "i", "j = 1", "j", "1", "tmp = T[0]", "tmp", "T[0]", "T", "0", "while j < N:\n #print(i,i_,j,N)\n if i_ % 2 == 0:\n tmp *= 10\n tmp += T[j]\n if i_ % 2 == 1:\n ans += tmp\n tmp = T[j]\n i_ = i_ >> 1\n j += 1\n ", "j < N", "j", "N", "if i_ % 2 == 0:\n tmp *= 10\n tmp += T[j]\n ", "i_ % 2 == 0", "i_ % 2", "i_", "2", "0", "tmp *= 10", "tmp", "10", "tmp += T[j]", "tmp", "T[j]", "T", "j", "if i_ % 2 == 1:\n ans += tmp\n tmp = T[j]\n ", "i_ % 2 == 1", "i_ % 2", "i_", "2", "1", "ans += tmp", "ans", "tmp", "tmp = T[j]", "tmp", "T[j]", "T", "j", "i_ = i_ >> 1", "i_", "i_ >> 1", "i_", "1", "j += 1", "j", "1", "ans += tmp", "ans", "tmp", "print(ans)", "print", "ans", "j += 1", "1", "j", "ans += tmp", "tmp", "ans", "i_ = i_ >> 1", "i_ >> 1", "i_", "tmp = T[j]", "T[j]", "tmp", "tmp = T[0]", "T[0]", "tmp", "ans += tmp", "tmp", "ans", "S = list(input())", "list(input())", "S", "i_ = i", "i", "i_", "j = 1", "1", "j", "tmp *= 10", "10", "tmp", "tmp += T[j]", "T[j]", "tmp", "N = len(T)", "len(T)", "N", "ans = 0", "0", "ans", "T = [int(a) for a in S]", "[int(a) for a in S]", "T" ]
import sys S = list(input()) T = [int(a) for a in S] N = len(T) if N == 1: print(T[0]) sys.exit() ans = 0 for i in range(2 ** (N-1)): i_ = i j = 1 tmp = T[0] while j < N: #print(i,i_,j,N) if i_ % 2 == 0: tmp *= 10 tmp += T[j] if i_ % 2 == 1: ans += tmp tmp = T[j] i_ = i_ >> 1 j += 1 ans += tmp #print(ans,i) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 18, 13, 17, 0, 13, 17, 28, 13, 4, 13, 17, 13, 0, 13, 2, 17, 18, 13, 13, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 13, 28, 13, 4, 13, 2, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 0, 13, 4, 13, 13, 0, 18, 13, 2, 2, 2, 17, 13, 17, 2, 17, 13, 17, 0, 13, 4, 18, 17, 13, 13, 0, 13, 4, 18, 13, 13, 17, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13, 10, 13, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 103, 2 ], [ 112, 6 ], [ 104, 9 ], [ 109, 11 ], [ 104, 13 ], [ 115, 16 ], [ 20, 19 ], [ 113, 23 ], [ 127, 25 ], [ 104, 29 ], [ 19, 30 ], [ 33, 32 ], [ 113, 38 ], [ 118, 41 ], [ 128, 42 ], [ 110, 42 ], [ 45, 44 ], [ 113, 48 ], [ 32, 54 ], [ 44, 55 ], [ 100, 59 ], [ 119, 62 ], [ 125, 62 ], [ 75, 64 ], [ 101, 65 ], [ 113, 70 ], [ 44, 74 ], [ 124, 77 ], [ 101, 82 ], [ 121, 84 ], [ 125, 87 ], [ 119, 87 ], [ 106, 92 ], [ 122, 95 ], [ 107, 98 ], [ 116, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ], [ 128, 118 ], [ 110, 118 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ] ]
[ "x = input()\nl = len(x)\ny_original = x[0]\ns = 0\n\nfor i in range(1,l):\n y_original += 't'+x[i]\n \nfor i in range(2**(l-1)):\n y = y_original\n for j in range(l-1): \n if ((i>>j) & 1) == 1:\n z = list(y)\n z[(2*l-3)-2*j] = '+'\n y = ''.join(z)\n y2 = y.replace('t','')\n s += eval(y2)\nprint(s)", "x = input()", "x", "input()", "input", "l = len(x)", "l", "len(x)", "len", "x", "y_original = x[0]", "y_original", "x[0]", "x", "0", "s = 0", "s", "0", "for i in range(1,l):\n y_original += 't'+x[i]\n ", "i", "range(1,l)", "range", "1", "l", "y_original += 't'+x[i]", "y_original", "'t'+x[i]", "'t'", "x[i]", "x", "i", "for i in range(2**(l-1)):\n y = y_original\n for j in range(l-1): \n if ((i>>j) & 1) == 1:\n z = list(y)\n z[(2*l-3)-2*j] = '+'\n y = ''.join(z)\n y2 = y.replace('t','')\n s += eval(y2)", "i", "range(2**(l-1))", "range", "2**(l-1)", "2", "l-1", "l", "1", "y = y_original", "y", "y_original", "for j in range(l-1): \n if ((i>>j) & 1) == 1:\n z = list(y)\n z[(2*l-3)-2*j] = '+'\n y = ''.join(z)\n ", "j", "range(l-1)", "range", "l-1", "l", "1", "if ((i>>j) & 1) == 1:\n z = list(y)\n z[(2*l-3)-2*j] = '+'\n y = ''.join(z)\n ", "((i>>j) & 1) == 1", "(i>>j) & 1", "i>>j", "i", "j", "1", "1", "z = list(y)", "z", "list(y)", "list", "y", "z[(2*l-3)-2*j] = '+'", "z[(2*l-3)-2*j]", "z", "(2*l-3)-2*j", "2*l-3", "2*l", "2", "l", "3", "2*j", "2", "j", "'+'", "y = ''.join(z)", "y", "''.join(z)", "''.join", "''", "join", "z", "y2 = y.replace('t','')", "y2", "y.replace('t','')", "y.replace", "y", "replace", "'t'", "''", "s += eval(y2)", "s", "eval(y2)", "eval", "y2", "print(s)", "print", "s", "z = list(y)", "list(y)", "z", "x = input()", "input()", "x", "s += eval(y2)", "eval(y2)", "s", "y_original = x[0]", "x[0]", "y_original", "l = len(x)", "len(x)", "l", "s = 0", "0", "s", "y = y_original", "y_original", "y", "y2 = y.replace('t','')", "y.replace('t','')", "y2", "y = ''.join(z)", "''.join(z)", "y", "y_original += 't'+x[i]", "'t'+x[i]", "y_original" ]
x = input() l = len(x) y_original = x[0] s = 0 for i in range(1,l): y_original += 't'+x[i] for i in range(2**(l-1)): y = y_original for j in range(l-1): if ((i>>j) & 1) == 1: z = list(y) z[(2*l-3)-2*j] = '+' y = ''.join(z) y2 = y.replace('t','') s += eval(y2) print(s)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 18, 4, 13, 4, 13, 4, 13, 13, 39, 17, 0, 13, 4, 13, 13, 28, 13, 4, 13, 2, 4, 13, 13, 17, 17, 17, 14, 2, 18, 13, 13, 17, 4, 18, 13, 13, 2, 40, 13, 17, 17, 0, 13, 4, 13, 4, 18, 17, 13, 13, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 18, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 90, 2 ], [ 81, 6 ], [ 91, 9 ], [ 93, 11 ], [ 15, 14 ], [ 82, 20 ], [ 84, 23 ], [ 14, 31 ], [ 87, 35 ], [ 91, 38 ], [ 41, 40 ], [ 85, 46 ], [ 85, 53 ], [ 40, 54 ], [ 88, 58 ], [ 40, 62 ], [ 78, 66 ], [ 88, 73 ], [ 79, 76 ], [ 94, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ] ]
[ "s=input()\nm=len(s)\nsm=0\nfor i in range(2**(m-1)):\n a=list(str(bin(i)))[::-1]\n b=list(s)\n for j in range(len(a)-1,-1,-1):\n if a[j]=='1':\n b.insert(-j-1,'+')\n sm+=eval(''.join(b))\nprint(sm)", "s=input()", "s", "input()", "input", "m=len(s)", "m", "len(s)", "len", "s", "sm=0", "sm", "0", "for i in range(2**(m-1)):\n a=list(str(bin(i)))[::-1]\n b=list(s)\n for j in range(len(a)-1,-1,-1):\n if a[j]=='1':\n b.insert(-j-1,'+')\n sm+=eval(''.join(b))", "i", "range(2**(m-1))", "range", "2**(m-1)", "2", "m-1", "m", "1", "a=list(str(bin(i)))[::-1]", "a", "list(str(bin(i)))[::-1]", "(str(bin(i)))", "list", "str(bin(i))", "str", "bin(i)", "bin", "i", "::-1", "-1", "b=list(s)", "b", "list(s)", "list", "s", "for j in range(len(a)-1,-1,-1):\n if a[j]=='1':\n b.insert(-j-1,'+')\n ", "j", "range(len(a)-1,-1,-1)", "range", "len(a)-1", "len(a)", "len", "a", "1", "-1", "-1", "if a[j]=='1':\n b.insert(-j-1,'+')\n ", "a[j]=='1'", "a[j]", "a", "j", "'1'", "b.insert(-j-1,'+')", "b.insert", "b", "insert", "-j-1", "-j", "j", "1", "'+'", "sm+=eval(''.join(b))", "sm", "eval(''.join(b))", "eval", "''.join(b)", "''.join", "''", "join", "b", "print(sm)", "print", "sm", "sm+=eval(''.join(b))", "eval(''.join(b))", "sm", "m=len(s)", "len(s)", "m", "a=list(str(bin(i)))[::-1]", "list(str(bin(i)))[::-1]", "a", "b=list(s)", "list(s)", "b", "s=input()", "input()", "s", "sm=0", "0", "sm" ]
s=input() m=len(s) sm=0 for i in range(2**(m-1)): a=list(str(bin(i)))[::-1] b=list(s) for j in range(len(a)-1,-1,-1): if a[j]=='1': b.insert(-j-1,'+') sm+=eval(''.join(b)) print(sm)
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 12, 4, 18, 4, 13, 13, 0, 13, 12, 4, 13, 4, 18, 4, 13, 13, 0, 13, 12, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 12, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 12, 4, 13, 31, 13, 0, 13, 17, 23, 0, 13, 4, 13, 0, 13, 17, 0, 13, 4, 13, 13, 0, 13, 2, 17, 2, 13, 17, 28, 13, 4, 13, 13, 0, 13, 4, 13, 13, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 4, 18, 13, 13, 2, 2, 13, 13, 17, 17, 0, 13, 4, 13, 4, 18, 17, 13, 13, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 4, 13, 10, 12, 13, 10, 12, 13, 10, 18, 13, 10, 12, 13, 10, 4, 13, 10, 18, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 154, 4 ], [ 163, 11 ], [ 157, 18 ], [ 155, 23 ], [ 166, 26 ], [ 155, 33 ], [ 148, 36 ], [ 155, 44 ], [ 151, 47 ], [ 155, 57 ], [ 169, 60 ], [ 68, 67 ], [ 136, 71 ], [ 158, 73 ], [ 133, 75 ], [ 145, 78 ], [ 137, 81 ], [ 142, 83 ], [ 146, 87 ], [ 91, 90 ], [ 143, 93 ], [ 139, 95 ], [ 137, 98 ], [ 101, 100 ], [ 146, 103 ], [ 90, 107 ], [ 100, 108 ], [ 140, 112 ], [ 146, 116 ], [ 100, 117 ], [ 160, 121 ], [ 140, 128 ], [ 161, 131 ], [ 134, 131 ], [ 133, 134 ], [ 136, 137 ], [ 139, 140 ], [ 142, 143 ], [ 145, 146 ], [ 148, 149 ], [ 151, 152 ], [ 154, 155 ], [ 157, 158 ], [ 160, 161 ], [ 163, 164 ], [ 166, 167 ], [ 169, 170 ] ]
[ "import sys\n\nreadline = sys.stdin.readline\nreadall = sys.stdin.read\nns = lambda: readline().rstrip()\nni = lambda: int(readline().rstrip())\nnm = lambda: map(int, readline().split())\nnl = lambda: list(map(int, readline().split()))\nprl = lambda x: print(*x ,sep='\\n')\n\ns = ns()\nans = 0\nn = len(s)\nt = 2**(n-1)\nfor i in range(t):\n moji = list(s)\n for j in range(n):\n if (i >> j) & 1:\n moji.insert(n-j-1,'+')\n ans += eval(''.join(moji))\nprint(ans)", "import sys", "sys", "readline = sys.stdin.readline", "readline", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "readall = sys.stdin.read", "readall", "sys.stdin.read", "sys.stdin", "sys", "stdin", "read", "ns = lambda: readline().rstrip()", "ns", "lambda: readline().rstrip()", "readline().rstrip()", "().rstrip", "()", "readline", "rstrip", "ni = lambda: int(readline().rstrip())", "ni", "lambda: int(readline().rstrip())", "int(readline().rstrip())", "int", "readline().rstrip()", "().rstrip", "()", "readline", "rstrip", "nm = lambda: map(int, readline().split())", "nm", "lambda: map(int, readline().split())", "map(int, readline().split())", "map", "int", "readline().split()", "().split", "()", "readline", "split", "nl = lambda: list(map(int, readline().split()))", "nl", "lambda: list(map(int, readline().split()))", "list(map(int, readline().split()))", "list", "map(int, readline().split())", "map", "int", "readline().split()", "().split", "()", "readline", "split", "prl = lambda x: print(*x ,sep='\\n')", "prl", "lambda x: print(*x ,sep='\\n')", "print(*x ,sep='\\n')", "print", "*x", "x", "sep='\\n'", "sep", "'\\n'", "x", "s = ns()", "s", "ns()", "ns", "ans = 0", "ans", "0", "n = len(s)", "n", "len(s)", "len", "s", "t = 2**(n-1)", "t", "2**(n-1)", "2", "n-1", "n", "1", "for i in range(t):\n moji = list(s)\n for j in range(n):\n if (i >> j) & 1:\n moji.insert(n-j-1,'+')\n ans += eval(''.join(moji))", "i", "range(t)", "range", "t", "moji = list(s)", "moji", "list(s)", "list", "s", "for j in range(n):\n if (i >> j) & 1:\n moji.insert(n-j-1,'+')\n ", "j", "range(n)", "range", "n", "if (i >> j) & 1:\n moji.insert(n-j-1,'+')\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "moji.insert(n-j-1,'+')", "moji.insert", "moji", "insert", "n-j-1", "n-j", "n", "j", "1", "'+'", "ans += eval(''.join(moji))", "ans", "eval(''.join(moji))", "eval", "''.join(moji)", "''.join", "''", "join", "moji", "print(ans)", "print", "ans", "ans = 0", "0", "ans", "s = ns()", "ns()", "s", "moji = list(s)", "list(s)", "moji", "t = 2**(n-1)", "2**(n-1)", "t", "n = len(s)", "len(s)", "n", "nm = lambda: map(int, readline().split())", "lambda: map(int, readline().split())", "nm", "nl = lambda: list(map(int, readline().split()))", "lambda: list(map(int, readline().split()))", "nl", "readline = sys.stdin.readline", "sys.stdin.readline", "readline", "ns = lambda: readline().rstrip()", "lambda: readline().rstrip()", "ns", "ans += eval(''.join(moji))", "eval(''.join(moji))", "ans", "readall = sys.stdin.read", "sys.stdin.read", "readall", "ni = lambda: int(readline().rstrip())", "lambda: int(readline().rstrip())", "ni", "prl = lambda x: print(*x ,sep='\\n')", "lambda x: print(*x ,sep='\\n')", "prl" ]
import sys readline = sys.stdin.readline readall = sys.stdin.read ns = lambda: readline().rstrip() ni = lambda: int(readline().rstrip()) nm = lambda: map(int, readline().split()) nl = lambda: list(map(int, readline().split())) prl = lambda x: print(*x ,sep='\n') s = ns() ans = 0 n = len(s) t = 2**(n-1) for i in range(t): moji = list(s) for j in range(n): if (i >> j) & 1: moji.insert(n-j-1,'+') ans += eval(''.join(moji)) print(ans)
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 39, 17, 17, 0, 13, 2, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 18, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 2, 17, 18, 13, 2, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 28, 13, 13, 0, 13, 13, 4, 13, 13, 10, 18, 13, 10, 4, 13, 10, 13, 13, 10, 4, 13, 10, 18, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 111, 3 ], [ 105, 7 ], [ 112, 10 ], [ 96, 12 ], [ 22, 21 ], [ 106, 23 ], [ 108, 26 ], [ 30, 29 ], [ 97, 29 ], [ 99, 32 ], [ 112, 34 ], [ 38, 37 ], [ 29, 42 ], [ 29, 46 ], [ 37, 47 ], [ 102, 50 ], [ 112, 54 ], [ 37, 56 ], [ 87, 59 ], [ 112, 61 ], [ 37, 63 ], [ 90, 66 ], [ 88, 74 ], [ 103, 74 ], [ 100, 74 ], [ 79, 78 ], [ 91, 78 ], [ 93, 81 ], [ 78, 82 ], [ 94, 85 ], [ 109, 85 ], [ 87, 88 ], [ 90, 91 ], [ 78, 93 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ] ]
[ "from itertools import product\nS = input()\nn = len(S)\nbit = list(product([0, 1], repeat = n - 1))\nans = 0\nfor state in bit:\n s = S[0]\n for i in range(len(state)):\n if state[i] == 1:\n s += '+' + S[i + 1]\n else:\n s += S[i + 1]\n ans_list = list(map(int,s.split('+')))\n for a in ans_list:\n ans += a\nprint(ans)", "from itertools import product", "S = input()", "S", "input()", "input", "n = len(S)", "n", "len(S)", "len", "S", "bit = list(product([0, 1], repeat = n - 1))", "bit", "list(product([0, 1], repeat = n - 1))", "list", "product([0, 1], repeat = n - 1)", "product", "[0, 1]", "0", "1", "repeat = n - 1", "repeat", "n - 1", "n", "1", "ans = 0", "ans", "0", "for state in bit:\n s = S[0]\n for i in range(len(state)):\n if state[i] == 1:\n s += '+' + S[i + 1]\n else:\n s += S[i + 1]\n ans_list = list(map(int,s.split('+')))\n for a in ans_list:\n ans += a", "state", "bit", "s = S[0]", "s", "S[0]", "S", "0", "for i in range(len(state)):\n if state[i] == 1:\n s += '+' + S[i + 1]\n else:\n s += S[i + 1]\n ", "i", "range(len(state))", "range", "len(state)", "len", "state", "if state[i] == 1:\n s += '+' + S[i + 1]\n else:\n s += S[i + 1]\n ", "state[i] == 1", "state[i]", "state", "i", "1", "s += '+' + S[i + 1]", "s", "'+' + S[i + 1]", "'+'", "S[i + 1]", "S", "i + 1", "i", "1", "s += S[i + 1]", "s", "S[i + 1]", "S", "i + 1", "i", "1", "ans_list = list(map(int,s.split('+')))", "ans_list", "list(map(int,s.split('+')))", "list", "map(int,s.split('+'))", "map", "int", "s.split('+')", "s.split", "s", "split", "'+'", "for a in ans_list:\n ans += a", "a", "ans_list", "ans += a", "ans", "a", "print(ans)", "print", "ans", "s += S[i + 1]", "S[i + 1]", "s", "ans_list = list(map(int,s.split('+')))", "list(map(int,s.split('+')))", "ans_list", "ans += a", "a", "ans", "bit = list(product([0, 1], repeat = n - 1))", "list(product([0, 1], repeat = n - 1))", "bit", "s = S[0]", "S[0]", "s", "s += '+' + S[i + 1]", "'+' + S[i + 1]", "s", "n = len(S)", "len(S)", "n", "ans = 0", "0", "ans", "S = input()", "input()", "S" ]
from itertools import product S = input() n = len(S) bit = list(product([0, 1], repeat = n - 1)) ans = 0 for state in bit: s = S[0] for i in range(len(state)): if state[i] == 1: s += '+' + S[i + 1] else: s += S[i + 1] ans_list = list(map(int,s.split('+'))) for a in ans_list: ans += a print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 2, 4, 13, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 2, 39, 17, 13, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 18, 13, 2, 2, 13, 13, 17, 17, 0, 13, 17, 28, 13, 13, 4, 13, 13, 2, 13, 39, 17, 0, 13, 2, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13, 10, 17, 13 ]
[ [ 75, 2 ], [ 93, 6 ], [ 84, 9 ], [ 76, 13 ], [ 17, 16 ], [ 85, 21 ], [ 87, 23 ], [ 85, 27 ], [ 30, 29 ], [ 85, 32 ], [ 16, 36 ], [ 29, 37 ], [ 47, 40 ], [ 88, 41 ], [ 85, 44 ], [ 29, 45 ], [ 78, 49 ], [ 76, 56 ], [ 88, 58 ], [ 90, 62 ], [ 81, 67 ], [ 91, 70 ], [ 79, 70 ], [ 82, 73 ], [ 94, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ] ]
[ "s = input()\n\nans = 0\nn = len(s) - 1\nfor i in range(2 ** n):\n op = [''] * n\n for j in range(n):\n if ((i >> j) & 1):\n op[n - j - 1] = '+'\n f = ''\n\n for p_n, p_o in zip(s,op+['']):\n f += p_n + p_o\n ans += eval(f)\n\nprint(ans)", "s = input()", "s", "input()", "input", "ans = 0", "ans", "0", "n = len(s) - 1", "n", "len(s) - 1", "len(s)", "len", "s", "1", "for i in range(2 ** n):\n op = [''] * n\n for j in range(n):\n if ((i >> j) & 1):\n op[n - j - 1] = '+'\n f = ''\n\n for p_n, p_o in zip(s,op+['']):\n f += p_n + p_o\n ans += eval(f)", "i", "range(2 ** n)", "range", "2 ** n", "2", "n", "op = [''] * n", "op", "[''] * n", "['']", "''", "n", "for j in range(n):\n if ((i >> j) & 1):\n op[n - j - 1] = '+'\n ", "j", "range(n)", "range", "n", "if ((i >> j) & 1):\n op[n - j - 1] = '+'\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "op[n - j - 1] = '+'", "op[n - j - 1]", "op", "n - j - 1", "n - j", "n", "j", "1", "'+'", "f = ''", "f", "''", "for p_n, p_o in zip(s,op+['']):\n f += p_n + p_o\n ", "p_n", "p_o", "zip(s,op+[''])", "zip", "s", "op+['']", "op", "['']", "''", "f += p_n + p_o", "f", "p_n + p_o", "p_n", "p_o", "ans += eval(f)", "ans", "eval(f)", "eval", "f", "print(ans)", "print", "ans", "s = input()", "input()", "s", "f = ''", "''", "f", "ans += eval(f)", "eval(f)", "ans", "n = len(s) - 1", "len(s) - 1", "n", "op = [''] * n", "[''] * n", "op", "f += p_n + p_o", "p_n + p_o", "f", "ans = 0", "0", "ans" ]
s = input() ans = 0 n = len(s) - 1 for i in range(2 ** n): op = [''] * n for j in range(n): if ((i >> j) & 1): op[n - j - 1] = '+' f = '' for p_n, p_o in zip(s,op+['']): f += p_n + p_o ans += eval(f) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 41, 28, 13, 13, 4, 13, 0, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 13, 2, 17, 13, 0, 13, 17, 4, 18, 13, 13, 2, 13, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 13, 28, 13, 4, 18, 13, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 17, 13, 10, 13, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 100, 2 ], [ 82, 6 ], [ 10, 9 ], [ 101, 17 ], [ 22, 21 ], [ 101, 21 ], [ 21, 24 ], [ 85, 26 ], [ 91, 29 ], [ 33, 32 ], [ 101, 38 ], [ 9, 42 ], [ 32, 45 ], [ 88, 47 ], [ 86, 51 ], [ 32, 54 ], [ 89, 55 ], [ 92, 55 ], [ 97, 58 ], [ 62, 61 ], [ 86, 61 ], [ 94, 64 ], [ 61, 65 ], [ 68, 67 ], [ 95, 70 ], [ 98, 70 ], [ 103, 74 ], [ 67, 77 ], [ 104, 80 ], [ 83, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 61, 94 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ] ]
[ "s = input()\nsum=0\nfor bit in range(1 << len(s)-1):\n list_i = [i for i in s]\n count=0\n for i in range(len(s)-1):\n if bit & (1<<i):\n count += 1\n list_i.insert(i+count,'+')\n ans=''\n for i in list_i:\n ans += i\n for i in ans.split('+'):\n sum += int(i)\nprint(sum)", "s = input()", "s", "input()", "input", "sum=0", "sum", "0", "for bit in range(1 << len(s)-1):\n list_i = [i for i in s]\n count=0\n for i in range(len(s)-1):\n if bit & (1<<i):\n count += 1\n list_i.insert(i+count,'+')\n ans=''\n for i in list_i:\n ans += i\n for i in ans.split('+'):\n sum += int(i)", "bit", "range(1 << len(s)-1)", "range", "1 << len(s)-1", "1", "len(s)-1", "len(s)", "len", "s", "1", "i for i in s", "for i in s", "i", "s", "for i in s", "i", "list_i = [i for i in s]", "list_i", "[i for i in s]", "count=0", "count", "0", "for i in range(len(s)-1):\n if bit & (1<<i):\n count += 1\n list_i.insert(i+count,'+')\n ", "i", "range(len(s)-1)", "range", "len(s)-1", "len(s)", "len", "s", "1", "if bit & (1<<i):\n count += 1\n list_i.insert(i+count,'+')\n ", "bit & (1<<i)", "bit", "1<<i", "1", "i", "count += 1", "count", "1", "list_i.insert(i+count,'+')", "list_i.insert", "list_i", "insert", "i+count", "i", "count", "'+'", "ans=''", "ans", "''", "for i in list_i:\n ans += i\n ", "i", "list_i", "ans += i", "ans", "i", "for i in ans.split('+'):\n sum += int(i)", "i", "ans.split('+')", "ans.split", "ans", "split", "'+'", "sum += int(i)", "sum", "int(i)", "int", "i", "print(sum)", "print", "sum", "sum=0", "0", "sum", "list_i = [i for i in s]", "[i for i in s]", "list_i", "count += 1", "1", "count", "count=0", "0", "count", "ans += i", "i", "ans", "ans=''", "''", "ans", "s = input()", "input()", "s", "sum += int(i)", "int(i)", "sum" ]
s = input() sum=0 for bit in range(1 << len(s)-1): list_i = [i for i in s] count=0 for i in range(len(s)-1): if bit & (1<<i): count += 1 list_i.insert(i+count,'+') ans='' for i in list_i: ans += i for i in ans.split('+'): sum += int(i) print(sum)
[ 7, 15, 13, 15, 13, 0, 13, 4, 13, 0, 13, 17, 28, 13, 4, 18, 13, 13, 39, 17, 17, 0, 13, 2, 4, 13, 13, 17, 0, 13, 4, 18, 13, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 17, 4, 13, 13, 14, 2, 18, 13, 2, 13, 17, 17, 0, 13, 4, 13, 18, 13, 39, 13, 13, 0, 13, 13, 0, 13, 4, 13, 18, 13, 39, 13, 0, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 13, 13, 10, 13, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 102, 6 ], [ 105, 10 ], [ 14, 13 ], [ 23, 22 ], [ 103, 26 ], [ 108, 29 ], [ 103, 34 ], [ 99, 36 ], [ 87, 39 ], [ 43, 42 ], [ 103, 48 ], [ 13, 52 ], [ 42, 54 ], [ 84, 58 ], [ 103, 62 ], [ 90, 67 ], [ 42, 68 ], [ 96, 70 ], [ 103, 74 ], [ 93, 78 ], [ 85, 79 ], [ 88, 79 ], [ 94, 82 ], [ 97, 82 ], [ 106, 82 ], [ 84, 85 ], [ 87, 88 ], [ 42, 90 ], [ 90, 91 ], [ 85, 93 ], [ 88, 93 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ] ]
[ "import itertools\nimport copy\nS = input()\n\nans = 0\nfor v in itertools.product([1,0], repeat=len(S)-1):\n S_copy = copy.deepcopy(S)\n idx = 0\n sum = 0\n for i in range(1,len(S)):\n if v[i-1] == 1:\n sum += int(S[idx:i])\n idx = i\n ans += int(S[idx:])\n ans += sum\nprint(ans)", "import itertools", "itertools", "import copy", "copy", "S = input()", "S", "input()", "input", "ans = 0", "ans", "0", "for v in itertools.product([1,0], repeat=len(S)-1):\n S_copy = copy.deepcopy(S)\n idx = 0\n sum = 0\n for i in range(1,len(S)):\n if v[i-1] == 1:\n sum += int(S[idx:i])\n idx = i\n ans += int(S[idx:])\n ans += sum", "v", "itertools.product([1,0], repeat=len(S)-1)", "itertools.product", "itertools", "product", "[1,0]", "1", "0", "repeat=len(S)-1", "repeat", "len(S)-1", "len(S)", "len", "S", "1", "S_copy = copy.deepcopy(S)", "S_copy", "copy.deepcopy(S)", "copy.deepcopy", "copy", "deepcopy", "S", "idx = 0", "idx", "0", "sum = 0", "sum", "0", "for i in range(1,len(S)):\n if v[i-1] == 1:\n sum += int(S[idx:i])\n idx = i\n ", "i", "range(1,len(S))", "range", "1", "len(S)", "len", "S", "if v[i-1] == 1:\n sum += int(S[idx:i])\n idx = i\n ", "v[i-1] == 1", "v[i-1]", "v", "i-1", "i", "1", "1", "sum += int(S[idx:i])", "sum", "int(S[idx:i])", "int", "S[idx:i]", "S", "idx:i", "idx", "i", "idx = i", "idx", "i", "ans += int(S[idx:])", "ans", "int(S[idx:])", "int", "S[idx:]", "S", "idx:", "idx", "ans += sum", "ans", "sum", "print(ans)", "print", "ans", "sum += int(S[idx:i])", "int(S[idx:i])", "sum", "sum = 0", "0", "sum", "idx = i", "i", "idx", "ans += sum", "sum", "ans", "ans += int(S[idx:])", "int(S[idx:])", "ans", "idx = 0", "0", "idx", "S = input()", "input()", "S", "ans = 0", "0", "ans", "S_copy = copy.deepcopy(S)", "copy.deepcopy(S)", "S_copy" ]
import itertools import copy S = input() ans = 0 for v in itertools.product([1,0], repeat=len(S)-1): S_copy = copy.deepcopy(S) idx = 0 sum = 0 for i in range(1,len(S)): if v[i-1] == 1: sum += int(S[idx:i]) idx = i ans += int(S[idx:]) ans += sum print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 13, 4, 13, 0, 13, 17, 15, 0, 13, 2, 4, 13, 13, 17, 28, 13, 4, 13, 39, 17, 17, 0, 13, 13, 0, 13, 18, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 2, 2, 13, 17, 18, 13, 2, 13, 17, 0, 13, 13, 0, 13, 18, 13, 2, 13, 17, 0, 13, 13, 4, 13, 13, 10, 2, 13, 10, 18, 13, 10, 17, 13, 10, 18, 13, 10, 13, 13, 10, 4, 13, 10, 2, 13, 10, 13, 13 ]
[ [ 92, 2 ], [ 83, 13 ], [ 77, 17 ], [ 93, 21 ], [ 25, 24 ], [ 32, 31 ], [ 78, 32 ], [ 86, 34 ], [ 93, 36 ], [ 40, 39 ], [ 78, 42 ], [ 24, 46 ], [ 39, 47 ], [ 95, 50 ], [ 87, 53 ], [ 81, 53 ], [ 96, 53 ], [ 93, 56 ], [ 39, 58 ], [ 89, 61 ], [ 87, 62 ], [ 81, 62 ], [ 96, 62 ], [ 80, 64 ], [ 93, 66 ], [ 39, 68 ], [ 98, 71 ], [ 81, 72 ], [ 96, 72 ], [ 87, 72 ], [ 99, 75 ], [ 90, 75 ], [ 84, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 87, 89 ], [ 81, 89 ], [ 96, 89 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 81, 98 ], [ 96, 98 ], [ 87, 98 ], [ 98, 99 ] ]
[ "A = list(map(int, list(input())))\n \nans = 0\nfrom itertools import *\nN = len(A)-1\nfor p in product([0,1],repeat=N):\n now = A[0]\n for i in range(N):\n if p[i] == 0:\n now = now*10+A[i+1]\n else:\n ans += now\n now = A[i+1]\n ans += now\nprint(ans)", "A = list(map(int, list(input())))", "A", "list(map(int, list(input())))", "list", "map(int, list(input()))", "map", "int", "list(input())", "list", "input()", "input", "ans = 0", "ans", "0", "from itertools import *", "N = len(A)-1", "N", "len(A)-1", "len(A)", "len", "A", "1", "for p in product([0,1],repeat=N):\n now = A[0]\n for i in range(N):\n if p[i] == 0:\n now = now*10+A[i+1]\n else:\n ans += now\n now = A[i+1]\n ans += now", "p", "product([0,1],repeat=N)", "product", "[0,1]", "0", "1", "repeat=N", "repeat", "N", "now = A[0]", "now", "A[0]", "A", "0", "for i in range(N):\n if p[i] == 0:\n now = now*10+A[i+1]\n else:\n ans += now\n now = A[i+1]\n ", "i", "range(N)", "range", "N", "if p[i] == 0:\n now = now*10+A[i+1]\n else:\n ans += now\n now = A[i+1]\n ", "p[i] == 0", "p[i]", "p", "i", "0", "now = now*10+A[i+1]", "now", "now*10+A[i+1]", "now*10", "now", "10", "A[i+1]", "A", "i+1", "i", "1", "ans += now", "ans", "now", "now = A[i+1]", "now", "A[i+1]", "A", "i+1", "i", "1", "ans += now", "ans", "now", "print(ans)", "print", "ans", "N = len(A)-1", "len(A)-1", "N", "now = A[i+1]", "A[i+1]", "now", "ans = 0", "0", "ans", "now = A[0]", "A[0]", "now", "ans += now", "now", "ans", "A = list(map(int, list(input())))", "list(map(int, list(input())))", "A", "now = now*10+A[i+1]", "now*10+A[i+1]", "now", "ans += now", "now", "ans" ]
A = list(map(int, list(input()))) ans = 0 from itertools import * N = len(A)-1 for p in product([0,1],repeat=N): now = A[0] for i in range(N): if p[i] == 0: now = now*10+A[i+1] else: ans += now now = A[i+1] ans += now print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 39, 28, 13, 4, 13, 13, 0, 13, 39, 13, 0, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 2, 13, 13, 17, 4, 18, 13, 13, 18, 18, 13, 17, 39, 2, 13, 17, 4, 18, 13, 13, 18, 18, 13, 17, 39, 2, 13, 17, 24, 18, 13, 17, 0, 13, 17, 0, 13, 17, 41, 28, 13, 13, 4, 4, 13, 13, 0, 13, 13, 4, 18, 13, 13, 4, 13, 13, 4, 13, 4, 13, 13, 10, 17, 13, 10, 39, 13, 10, 13, 13, 10, 39, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13 ]
[ [ 125, 2 ], [ 122, 8 ], [ 126, 14 ], [ 107, 17 ], [ 21, 20 ], [ 123, 23 ], [ 113, 25 ], [ 104, 29 ], [ 33, 32 ], [ 126, 38 ], [ 20, 43 ], [ 32, 44 ], [ 114, 48 ], [ 111, 48 ], [ 114, 52 ], [ 111, 52 ], [ 105, 56 ], [ 117, 56 ], [ 120, 56 ], [ 114, 60 ], [ 111, 60 ], [ 114, 64 ], [ 111, 64 ], [ 105, 68 ], [ 117, 68 ], [ 120, 68 ], [ 114, 72 ], [ 111, 72 ], [ 119, 75 ], [ 116, 78 ], [ 83, 82 ], [ 114, 82 ], [ 111, 82 ], [ 82, 87 ], [ 110, 89 ], [ 108, 93 ], [ 111, 97 ], [ 114, 97 ], [ 108, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 125, 126 ] ]
[ "S = str(input())\nN = 2 ** (len(S)-1)\nl = [] # それぞれの和を格納\nfor i in range(N):\n m = [S] # 分けた数字を格納\n cnt = 0\n for j in range(len(S)-1):\n if (i >> j) & 1:\n m.append(m[-1][:cnt+1])\n m.append(m[-2][cnt+1:])\n del m[-3]\n cnt = 0\n else:\n cnt += 1\n m = [int(s) for s in m]\n l.append(sum(m))\nprint(sum(l))", "S = str(input())", "S", "str(input())", "str", "input()", "input", "N = 2 ** (len(S)-1)", "N", "2 ** (len(S)-1)", "2", "len(S)-1", "len(S)", "len", "S", "1", "l = []", "l", "[]", "for i in range(N):\n m = [S] # 分けた数字を格納\n cnt = 0\n for j in range(len(S)-1):\n if (i >> j) & 1:\n m.append(m[-1][:cnt+1])\n m.append(m[-2][cnt+1:])\n del m[-3]\n cnt = 0\n else:\n cnt += 1\n m = [int(s) for s in m]\n l.append(sum(m))", "i", "range(N)", "range", "N", "m = [S]", "m", "[S]", "S", "cnt = 0", "cnt", "0", "for j in range(len(S)-1):\n if (i >> j) & 1:\n m.append(m[-1][:cnt+1])\n m.append(m[-2][cnt+1:])\n del m[-3]\n cnt = 0\n else:\n cnt += 1\n ", "j", "range(len(S)-1)", "range", "len(S)-1", "len(S)", "len", "S", "1", "if (i >> j) & 1:\n m.append(m[-1][:cnt+1])\n m.append(m[-2][cnt+1:])\n del m[-3]\n cnt = 0\n else:\n cnt += 1\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "m.append(m[-1][:cnt+1])", "m.append", "m", "append", "m[-1][:cnt+1]", "[-1]", "m", "-1", ":cnt+1", "cnt+1", "cnt", "1", "m.append(m[-2][cnt+1:])", "m.append", "m", "append", "m[-2][cnt+1:]", "[-2]", "m", "-2", "cnt+1:", "cnt+1", "cnt", "1", "del m[-3]", "m[-3]", "m", "-3", "cnt = 0", "cnt", "0", "cnt += 1", "cnt", "1", "int(s) for s in m", "for s in m", "s", "m", "for s in m", "int(s)", "int", "s", "m = [int(s) for s in m]", "m", "[int(s) for s in m]", "l.append(sum(m))", "l.append", "l", "append", "sum(m)", "sum", "m", "print(sum(l))", "print", "sum(l)", "sum", "l", "cnt = 0", "0", "cnt", "l = []", "[]", "l", "m = [int(s) for s in m]", "[int(s) for s in m]", "m", "m = [S]", "[S]", "m", "cnt += 1", "1", "cnt", "cnt = 0", "0", "cnt", "N = 2 ** (len(S)-1)", "2 ** (len(S)-1)", "N", "S = str(input())", "str(input())", "S" ]
S = str(input()) N = 2 ** (len(S)-1) l = [] # それぞれの和を格納 for i in range(N): m = [S] # 分けた数字を格納 cnt = 0 for j in range(len(S)-1): if (i >> j) & 1: m.append(m[-1][:cnt+1]) m.append(m[-2][cnt+1:]) del m[-3] cnt = 0 else: cnt += 1 m = [int(s) for s in m] l.append(sum(m)) print(sum(l))
[ 7, 12, 13, 14, 2, 4, 13, 13, 17, 28, 13, 4, 13, 17, 4, 13, 13, 4, 18, 13, 13, 4, 13, 18, 13, 39, 13, 0, 18, 13, 17, 2, 4, 13, 13, 4, 13, 18, 13, 39, 13, 4, 13, 18, 13, 39, 13, 13, 13, 4, 18, 13, 13, 23, 13, 23, 13, 23, 13, 0, 13, 4, 13, 0, 13, 39, 0, 13, 39, 4, 13, 13, 4, 13, 13, 13, 13, 4, 13, 18, 13, 17, 10, 4, 13, 10, 12, 13, 10, 39, 13, 10, 39, 13 ]
[ [ 54, 7 ], [ 11, 10 ], [ 54, 16 ], [ 56, 19 ], [ 54, 24 ], [ 31, 28 ], [ 58, 29 ], [ 56, 34 ], [ 54, 38 ], [ 54, 44 ], [ 56, 47 ], [ 58, 48 ], [ 56, 51 ], [ 54, 54 ], [ 56, 56 ], [ 58, 58 ], [ 83, 60 ], [ 89, 64 ], [ 92, 67 ], [ 84, 71 ], [ 87, 73 ], [ 84, 74 ], [ 90, 75 ], [ 93, 76 ], [ 93, 80 ], [ 83, 84 ], [ 89, 90 ], [ 92, 93 ] ]
[ "# ume 20/06/21\ndef dfs(s, seq, res):\n if len(s)==0: return\n for i in range(1, len(s)):\n seq.append(int(s[:i]))\n res[0] += sum(seq) + int(s[i:])\n dfs(s[i:], seq, res)\n seq.pop()\n \n\nS = input()\nseq = []\nres = [int(S)]\ndfs(S, seq, res)\nprint(res[0])", "def dfs(s, seq, res):\n if len(s)==0: return\n for i in range(1, len(s)):\n seq.append(int(s[:i]))\n res[0] += sum(seq) + int(s[i:])\n dfs(s[i:], seq, res)\n seq.pop()\n ", "dfs", "if len(s)==0: return\n ", "len(s)==0", "len(s)", "len", "s", "0", "for i in range(1, len(s)):\n seq.append(int(s[:i]))\n res[0] += sum(seq) + int(s[i:])\n dfs(s[i:], seq, res)\n seq.pop()\n ", "i", "range(1, len(s))", "range", "1", "len(s)", "len", "s", "seq.append(int(s[:i]))", "seq.append", "seq", "append", "int(s[:i])", "int", "s[:i]", "s", ":i", "i", "res[0] += sum(seq) + int(s[i:])", "res[0]", "res", "0", "sum(seq) + int(s[i:])", "sum(seq)", "sum", "seq", "int(s[i:])", "int", "s[i:]", "s", "i:", "i", "dfs(s[i:], seq, res)", "dfs", "s[i:]", "s", "i:", "i", "seq", "res", "seq.pop()", "seq.pop", "seq", "pop", "s", "s", "seq", "seq", "res", "res", "S = input()", "S", "input()", "input", "seq = []", "seq", "[]", "res = [int(S)]", "res", "[int(S)]", "int(S)", "int", "S", "dfs(S, seq, res)", "dfs", "S", "seq", "res", "print(res[0])", "print", "res[0]", "res", "0", "S = input()", "input()", "S", "def dfs(s, seq, res):\n if len(s)==0: return\n for i in range(1, len(s)):\n seq.append(int(s[:i]))\n res[0] += sum(seq) + int(s[i:])\n dfs(s[i:], seq, res)\n seq.pop()\n ", "def dfs(s, seq, res):\n if len(s)==0: return\n for i in range(1, len(s)):\n seq.append(int(s[:i]))\n res[0] += sum(seq) + int(s[i:])\n dfs(s[i:], seq, res)\n seq.pop()\n ", "dfs", "seq = []", "[]", "seq", "res = [int(S)]", "[int(S)]", "res" ]
# ume 20/06/21 def dfs(s, seq, res): if len(s)==0: return for i in range(1, len(s)): seq.append(int(s[:i])) res[0] += sum(seq) + int(s[i:]) dfs(s[i:], seq, res) seq.pop() S = input() seq = [] res = [int(S)] dfs(S, seq, res) print(res[0])
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 18, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 2, 13, 13, 17, 0, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 18, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 65, 2 ], [ 71, 6 ], [ 66, 9 ], [ 74, 11 ], [ 15, 14 ], [ 72, 20 ], [ 62, 23 ], [ 66, 25 ], [ 29, 28 ], [ 72, 32 ], [ 14, 37 ], [ 28, 38 ], [ 68, 41 ], [ 59, 44 ], [ 66, 46 ], [ 28, 48 ], [ 77, 51 ], [ 60, 54 ], [ 69, 54 ], [ 63, 54 ], [ 78, 57 ], [ 75, 57 ], [ 59, 60 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ] ]
[ "s = input()\nn = len(s)\n\nans = 0\nfor i in range(1<<n-1):\n f = s[0]\n for j in range(n-1):\n if i >> j & 1:\n f += \"+\"\n f += s[j+1]\n ans += eval(f)\nprint(ans)", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "ans = 0", "ans", "0", "for i in range(1<<n-1):\n f = s[0]\n for j in range(n-1):\n if i >> j & 1:\n f += \"+\"\n f += s[j+1]\n ans += eval(f)", "i", "range(1<<n-1)", "range", "1<<n-1", "1", "n-1", "n", "1", "f = s[0]", "f", "s[0]", "s", "0", "for j in range(n-1):\n if i >> j & 1:\n f += \"+\"\n f += s[j+1]\n ", "j", "range(n-1)", "range", "n-1", "n", "1", "if i >> j & 1:\n f += \"+\"\n ", "i >> j & 1", "i >> j", "i", "j", "1", "f += \"+\"", "f", "\"+\"", "f += s[j+1]", "f", "s[j+1]", "s", "j+1", "j", "1", "ans += eval(f)", "ans", "eval(f)", "eval", "f", "print(ans)", "print", "ans", "f += s[j+1]", "s[j+1]", "f", "f = s[0]", "s[0]", "f", "s = input()", "input()", "s", "f += \"+\"", "\"+\"", "f", "n = len(s)", "len(s)", "n", "ans = 0", "0", "ans", "ans += eval(f)", "eval(f)", "ans" ]
s = input() n = len(s) ans = 0 for i in range(1<<n-1): f = s[0] for j in range(n-1): if i >> j & 1: f += "+" f += s[j+1] ans += eval(f) print(ans)
[ 7, 0, 13, 4, 13, 15, 13, 0, 13, 4, 18, 13, 13, 39, 17, 17, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 18, 13, 17, 28, 13, 13, 4, 13, 13, 14, 13, 0, 13, 2, 17, 18, 13, 2, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 18, 13, 10, 2, 13 ]
[ [ 76, 2 ], [ 88, 8 ], [ 18, 17 ], [ 77, 21 ], [ 82, 24 ], [ 28, 27 ], [ 89, 27 ], [ 91, 30 ], [ 77, 32 ], [ 27, 39 ], [ 94, 43 ], [ 77, 47 ], [ 79, 52 ], [ 77, 54 ], [ 85, 59 ], [ 80, 69 ], [ 95, 69 ], [ 92, 69 ], [ 86, 74 ], [ 83, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ] ]
[ "s = input()\nimport itertools\na = itertools.product([0,1],repeat=len(s)-1)\n\nans = 0\nfor x in a: # x = (0,1)\n txt = s[0]\n for i,kigo in enumerate(x):\n if kigo:\n txt += \"+\" + s[i+1]\n else:\n txt += s[i+1]\n ans += sum(list(map(int,txt.split('+'))))\n\nprint(ans)", "s = input()", "s", "input()", "input", "import itertools", "itertools", "a = itertools.product([0,1],repeat=len(s)-1)", "a", "itertools.product([0,1],repeat=len(s)-1)", "itertools.product", "itertools", "product", "[0,1]", "0", "1", "repeat=len(s)-1", "repeat", "len(s)-1", "len(s)", "len", "s", "1", "ans = 0", "ans", "0", "for x in a: # x = (0,1)\n txt = s[0]\n for i,kigo in enumerate(x):\n if kigo:\n txt += \"+\" + s[i+1]\n else:\n txt += s[i+1]\n ans += sum(list(map(int,txt.split('+'))))", "x", "a", "txt = s[0]", "txt", "s[0]", "s", "0", "for i,kigo in enumerate(x):\n if kigo:\n txt += \"+\" + s[i+1]\n else:\n txt += s[i+1]\n ", "i", "kigo", "enumerate(x)", "enumerate", "x", "if kigo:\n txt += \"+\" + s[i+1]\n else:\n txt += s[i+1]\n ", "kigo", "txt += \"+\" + s[i+1]", "txt", "\"+\" + s[i+1]", "\"+\"", "s[i+1]", "s", "i+1", "i", "1", "txt += s[i+1]", "txt", "s[i+1]", "s", "i+1", "i", "1", "ans += sum(list(map(int,txt.split('+'))))", "ans", "sum(list(map(int,txt.split('+'))))", "sum", "list(map(int,txt.split('+')))", "list", "map(int,txt.split('+'))", "map", "int", "txt.split('+')", "txt.split", "txt", "split", "'+'", "print(ans)", "print", "ans", "s = input()", "input()", "s", "txt += s[i+1]", "s[i+1]", "txt", "ans = 0", "0", "ans", "ans += sum(list(map(int,txt.split('+'))))", "sum(list(map(int,txt.split('+'))))", "ans", "a = itertools.product([0,1],repeat=len(s)-1)", "itertools.product([0,1],repeat=len(s)-1)", "a", "txt = s[0]", "s[0]", "txt", "txt += \"+\" + s[i+1]", "\"+\" + s[i+1]", "txt" ]
s = input() import itertools a = itertools.product([0,1],repeat=len(s)-1) ans = 0 for x in a: # x = (0,1) txt = s[0] for i,kigo in enumerate(x): if kigo: txt += "+" + s[i+1] else: txt += s[i+1] ans += sum(list(map(int,txt.split('+')))) print(ans)
[ 7, 15, 13, 4, 18, 13, 13, 4, 13, 17, 0, 13, 4, 13, 0, 13, 4, 13, 13, 12, 13, 14, 2, 13, 2, 13, 17, 29, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 17, 13, 13, 18, 13, 2, 13, 17, 0, 13, 4, 18, 17, 13, 13, 18, 13, 2, 13, 17, 29, 2, 4, 13, 2, 13, 17, 13, 4, 13, 2, 13, 17, 13, 23, 13, 23, 13, 4, 13, 4, 13, 17, 18, 13, 17, 10, 4, 13, 10, 4, 13, 10, 12, 13 ]
[ [ 89, 11 ], [ 92, 15 ], [ 90, 18 ], [ 77, 23 ], [ 93, 25 ], [ 79, 35 ], [ 40, 39 ], [ 79, 44 ], [ 90, 46 ], [ 77, 48 ], [ 52, 51 ], [ 79, 56 ], [ 90, 58 ], [ 77, 60 ], [ 77, 67 ], [ 39, 69 ], [ 77, 73 ], [ 51, 75 ], [ 77, 77 ], [ 79, 79 ], [ 96, 83 ], [ 90, 86 ], [ 89, 90 ], [ 92, 93 ] ]
[ "import sys\nsys.setrecursionlimit(int(1e8))\n\n\ns = input()\nn = len(s)\n\ndef rec(op_index, part_s):\n if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n part_s1 = '{}{}'.format(part_s, s[op_index+1])\n part_s2 = '{}+{}'.format(part_s, s[op_index+1])\n return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)\n\nprint(rec(0, s[0]))", "import sys", "sys", "sys.setrecursionlimit(int(1e8))", "sys.setrecursionlimit", "sys", "setrecursionlimit", "int(1e8)", "int", "1e8", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "def rec(op_index, part_s):\n if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n part_s1 = '{}{}'.format(part_s, s[op_index+1])\n part_s2 = '{}+{}'.format(part_s, s[op_index+1])\n return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)", "rec", "if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n ", "op_index == n - 1", "op_index", "n - 1", "n", "1", "return sum(map(int, part_s.split('+')))", "sum(map(int, part_s.split('+')))", "sum", "map(int, part_s.split('+'))", "map", "int", "part_s.split('+')", "part_s.split", "part_s", "split", "'+'", "part_s1 = '{}{}'.format(part_s, s[op_index+1])", "part_s1", "'{}{}'.format(part_s, s[op_index+1])", "'{}{}'.format", "'{}{}'", "format", "part_s", "s[op_index+1]", "s", "op_index+1", "op_index", "1", "part_s2 = '{}+{}'.format(part_s, s[op_index+1])", "part_s2", "'{}+{}'.format(part_s, s[op_index+1])", "'{}+{}'.format", "'{}+{}'", "format", "part_s", "s[op_index+1]", "s", "op_index+1", "op_index", "1", "return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)", "rec(op_index+1, part_s1) + rec(op_index+1, part_s2)", "rec(op_index+1, part_s1)", "rec", "op_index+1", "op_index", "1", "part_s1", "rec(op_index+1, part_s2)", "rec", "op_index+1", "op_index", "1", "part_s2", "op_index", "op_index", "part_s", "part_s", "print(rec(0, s[0]))", "print", "rec(0, s[0])", "rec", "0", "s[0]", "s", "0", "s = input()", "input()", "s", "n = len(s)", "len(s)", "n", "def rec(op_index, part_s):\n if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n part_s1 = '{}{}'.format(part_s, s[op_index+1])\n part_s2 = '{}+{}'.format(part_s, s[op_index+1])\n return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)", "def rec(op_index, part_s):\n if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n part_s1 = '{}{}'.format(part_s, s[op_index+1])\n part_s2 = '{}+{}'.format(part_s, s[op_index+1])\n return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)", "rec" ]
import sys sys.setrecursionlimit(int(1e8)) s = input() n = len(s) def rec(op_index, part_s): if op_index == n - 1: return sum(map(int, part_s.split('+'))) part_s1 = '{}{}'.format(part_s, s[op_index+1]) part_s2 = '{}+{}'.format(part_s, s[op_index+1]) return rec(op_index+1, part_s1) + rec(op_index+1, part_s2) print(rec(0, s[0]))
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 18, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 0, 13, 2, 13, 17, 0, 13, 2, 13, 18, 13, 2, 13, 17, 0, 13, 2, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 18, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 96, 2 ], [ 78, 6 ], [ 97, 9 ], [ 93, 11 ], [ 15, 14 ], [ 97, 22 ], [ 87, 25 ], [ 97, 27 ], [ 31, 30 ], [ 97, 36 ], [ 14, 42 ], [ 30, 43 ], [ 84, 47 ], [ 88, 49 ], [ 91, 49 ], [ 85, 49 ], [ 90, 52 ], [ 85, 54 ], [ 88, 54 ], [ 91, 54 ], [ 97, 56 ], [ 30, 58 ], [ 81, 61 ], [ 94, 63 ], [ 82, 63 ], [ 91, 71 ], [ 85, 71 ], [ 88, 71 ], [ 82, 76 ], [ 94, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ] ]
[ "st_N=input()\nN=int(st_N)\n\n\noutput=0\nfor i in range(1<<(len(st_N)-1)):\n f=st_N[0]\n for j in range(len(st_N)-1):\n\n if((i>>j) & 1)==1:\n f=f+'+'\n f=f+st_N[j+1]\n #print(f)\n output=output+sum(map(int,f.split('+')))\n\nprint(output)", "st_N=input()", "st_N", "input()", "input", "N=int(st_N)", "N", "int(st_N)", "int", "st_N", "output=0", "output", "0", "for i in range(1<<(len(st_N)-1)):\n f=st_N[0]\n for j in range(len(st_N)-1):\n\n if((i>>j) & 1)==1:\n f=f+'+'\n f=f+st_N[j+1]\n #print(f)\n output=output+sum(map(int,f.split('+')))", "i", "range(1<<(len(st_N)-1))", "range", "1<<(len(st_N)-1)", "1", "len(st_N)-1", "len(st_N)", "len", "st_N", "1", "f=st_N[0]", "f", "st_N[0]", "st_N", "0", "for j in range(len(st_N)-1):\n\n if((i>>j) & 1)==1:\n f=f+'+'\n f=f+st_N[j+1]\n #print(f)\n ", "j", "range(len(st_N)-1)", "range", "len(st_N)-1", "len(st_N)", "len", "st_N", "1", "if((i>>j) & 1)==1:\n f=f+'+'\n ", "((i>>j) & 1)==1", "(i>>j) & 1", "i>>j", "i", "j", "1", "1", "f=f+'+'", "f", "f+'+'", "f", "'+'", "f=f+st_N[j+1]", "f", "f+st_N[j+1]", "f", "st_N[j+1]", "st_N", "j+1", "j", "1", "output=output+sum(map(int,f.split('+')))", "output", "output+sum(map(int,f.split('+')))", "output", "sum(map(int,f.split('+')))", "sum", "map(int,f.split('+'))", "map", "int", "f.split('+')", "f.split", "f", "split", "'+'", "print(output)", "print", "output", "N=int(st_N)", "int(st_N)", "N", "output=output+sum(map(int,f.split('+')))", "output+sum(map(int,f.split('+')))", "output", "f=f+'+'", "f+'+'", "f", "f=st_N[0]", "st_N[0]", "f", "f=f+st_N[j+1]", "f+st_N[j+1]", "f", "output=0", "0", "output", "st_N=input()", "input()", "st_N" ]
st_N=input() N=int(st_N) output=0 for i in range(1<<(len(st_N)-1)): f=st_N[0] for j in range(len(st_N)-1): if((i>>j) & 1)==1: f=f+'+' f=f+st_N[j+1] #print(f) output=output+sum(map(int,f.split('+'))) print(output)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 0, 13, 39, 28, 13, 4, 13, 2, 17, 13, 0, 13, 2, 39, 17, 13, 28, 13, 4, 13, 13, 14, 2, 2, 2, 13, 13, 17, 17, 0, 18, 13, 2, 2, 13, 17, 13, 17, 4, 18, 13, 13, 13, 28, 13, 13, 41, 28, 13, 13, 4, 13, 0, 13, 13, 28, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 2, 2, 17, 13, 17, 18, 13, 13, 0, 13, 4, 13, 4, 18, 17, 13, 13, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 13, 13, 10, 39, 13, 10, 2, 13 ]
[ [ 108, 2 ], [ 120, 6 ], [ 109, 10 ], [ 102, 13 ], [ 117, 16 ], [ 20, 19 ], [ 121, 24 ], [ 111, 26 ], [ 121, 30 ], [ 33, 32 ], [ 121, 35 ], [ 19, 40 ], [ 32, 41 ], [ 52, 45 ], [ 112, 46 ], [ 121, 49 ], [ 32, 51 ], [ 118, 55 ], [ 112, 57 ], [ 60, 59 ], [ 118, 59 ], [ 64, 63 ], [ 109, 63 ], [ 63, 66 ], [ 114, 68 ], [ 72, 71 ], [ 59, 76 ], [ 115, 79 ], [ 71, 84 ], [ 59, 87 ], [ 71, 88 ], [ 105, 90 ], [ 115, 97 ], [ 106, 100 ], [ 103, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ] ]
[ "# -*- coding: utf-8 -*-\ns = input()\nl = len(s)-1\nans = 0\nops = []\n\n# +あり/なしのbit全探索(桁数-1の2乗の範囲)\nfor i in range(1 << l):\n op = [''] * l\n for j in range(l):\n if ((i >> j) & 1) == 1:\n op[l-1-j] = '+'\n ops.append(op)\n\nfor op in ops:\n num = [digit for digit in s]\n for k in range(len(op)):\n # 演算子は奇数番目\n num.insert(2*k+1, op[k])\n ans += eval(''.join(num))\n\nprint(ans)", "s = input()", "s", "input()", "input", "l = len(s)-1", "l", "len(s)-1", "len(s)", "len", "s", "1", "ans = 0", "ans", "0", "ops = []", "ops", "[]", "for i in range(1 << l):\n op = [''] * l\n for j in range(l):\n if ((i >> j) & 1) == 1:\n op[l-1-j] = '+'\n ops.append(op)", "i", "range(1 << l)", "range", "1 << l", "1", "l", "op = [''] * l", "op", "[''] * l", "['']", "''", "l", "for j in range(l):\n if ((i >> j) & 1) == 1:\n op[l-1-j] = '+'\n ", "j", "range(l)", "range", "l", "if ((i >> j) & 1) == 1:\n op[l-1-j] = '+'\n ", "((i >> j) & 1) == 1", "(i >> j) & 1", "i >> j", "i", "j", "1", "1", "op[l-1-j] = '+'", "op[l-1-j]", "op", "l-1-j", "l-1", "l", "1", "j", "'+'", "ops.append(op)", "ops.append", "ops", "append", "op", "for op in ops:\n num = [digit for digit in s]\n for k in range(len(op)):\n # 演算子は奇数番目\n num.insert(2*k+1, op[k])\n ans += eval(''.join(num))", "op", "ops", "digit for digit in s", "for digit in s", "digit", "s", "for digit in s", "digit", "num = [digit for digit in s]", "num", "[digit for digit in s]", "for k in range(len(op)):\n # 演算子は奇数番目\n num.insert(2*k+1, op[k])\n ", "k", "range(len(op))", "range", "len(op)", "len", "op", "num.insert(2*k+1, op[k])", "num.insert", "num", "insert", "2*k+1", "2*k", "2", "k", "1", "op[k]", "op", "k", "ans += eval(''.join(num))", "ans", "eval(''.join(num))", "eval", "''.join(num)", "''.join", "''", "join", "num", "print(ans)", "print", "ans", "ans = 0", "0", "ans", "ans += eval(''.join(num))", "eval(''.join(num))", "ans", "s = input()", "input()", "s", "op = [''] * l", "[''] * l", "op", "num = [digit for digit in s]", "[digit for digit in s]", "num", "ops = []", "[]", "ops", "l = len(s)-1", "len(s)-1", "l" ]
# -*- coding: utf-8 -*- s = input() l = len(s)-1 ans = 0 ops = [] # +あり/なしのbit全探索(桁数-1の2乗の範囲) for i in range(1 << l): op = [''] * l for j in range(l): if ((i >> j) & 1) == 1: op[l-1-j] = '+' ops.append(op) for op in ops: num = [digit for digit in s] for k in range(len(op)): # 演算子は奇数番目 num.insert(2*k+1, op[k]) ans += eval(''.join(num)) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 13, 2, 17, 13, 0, 13, 4, 13, 18, 13, 39, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 4, 13, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 78, 2 ], [ 84, 6 ], [ 79, 9 ], [ 72, 11 ], [ 15, 14 ], [ 85, 20 ], [ 75, 23 ], [ 27, 26 ], [ 85, 30 ], [ 14, 34 ], [ 26, 37 ], [ 69, 39 ], [ 79, 43 ], [ 26, 47 ], [ 66, 50 ], [ 26, 52 ], [ 81, 55 ], [ 79, 59 ], [ 82, 64 ], [ 70, 64 ], [ 73, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ] ]
[ "s = input()\nn = len(s)\nsum = 0\nfor b in range(1 << (n-1)):\n t = 0\n for i in range(n-1):\n if b & (1 << i):\n sum += int(s[t:i+1])\n t = i+1\n sum += int(s[t:])\nprint(sum)", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "sum = 0", "sum", "0", "for b in range(1 << (n-1)):\n t = 0\n for i in range(n-1):\n if b & (1 << i):\n sum += int(s[t:i+1])\n t = i+1\n sum += int(s[t:])", "b", "range(1 << (n-1))", "range", "1 << (n-1)", "1", "n-1", "n", "1", "t = 0", "t", "0", "for i in range(n-1):\n if b & (1 << i):\n sum += int(s[t:i+1])\n t = i+1\n ", "i", "range(n-1)", "range", "n-1", "n", "1", "if b & (1 << i):\n sum += int(s[t:i+1])\n t = i+1\n ", "b & (1 << i)", "b", "1 << i", "1", "i", "sum += int(s[t:i+1])", "sum", "int(s[t:i+1])", "int", "s[t:i+1]", "s", "t:i+1", "t", "i+1", "i", "1", "t = i+1", "t", "i+1", "i", "1", "sum += int(s[t:])", "sum", "int(s[t:])", "int", "s[t:]", "s", "t:", "t", "print(sum)", "print", "sum", "t = i+1", "i+1", "t", "sum += int(s[t:i+1])", "int(s[t:i+1])", "sum", "sum = 0", "0", "sum", "t = 0", "0", "t", "s = input()", "input()", "s", "sum += int(s[t:])", "int(s[t:])", "sum", "n = len(s)", "len(s)", "n" ]
s = input() n = len(s) sum = 0 for b in range(1 << (n-1)): t = 0 for i in range(n-1): if b & (1 << i): sum += int(s[t:i+1]) t = i+1 sum += int(s[t:]) print(sum)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 12, 13, 14, 2, 13, 17, 0, 13, 17, 28, 13, 4, 18, 13, 13, 17, 0, 13, 4, 13, 13, 29, 13, 0, 13, 2, 2, 18, 13, 39, 13, 17, 18, 13, 39, 13, 29, 2, 4, 13, 2, 13, 17, 13, 4, 13, 2, 13, 17, 13, 23, 13, 23, 13, 4, 13, 4, 13, 13, 13, 10, 2, 13, 10, 4, 13, 10, 12, 13 ]
[ [ 76, 2 ], [ 73, 6 ], [ 77, 10 ], [ 63, 16 ], [ 20, 19 ], [ 23, 22 ], [ 65, 25 ], [ 30, 29 ], [ 22, 32 ], [ 29, 34 ], [ 19, 34 ], [ 37, 36 ], [ 65, 40 ], [ 65, 45 ], [ 63, 53 ], [ 36, 55 ], [ 63, 59 ], [ 65, 61 ], [ 63, 63 ], [ 65, 65 ], [ 80, 69 ], [ 74, 70 ], [ 77, 71 ], [ 73, 74 ], [ 76, 77 ] ]
[ "S = input()\nN = len(S) - 1\n\ndef add(n, s):\n if n == 0:\n tmp = 0\n for i in s.split('+'):\n tmp += int(i)\n return tmp\n else:\n st = s[:n] + '+' + s[n:]\n return add(n-1, st) + add(n-1, s)\n\nprint(add(N, S))", "S = input()", "S", "input()", "input", "N = len(S) - 1", "N", "len(S) - 1", "len(S)", "len", "S", "1", "def add(n, s):\n if n == 0:\n tmp = 0\n for i in s.split('+'):\n tmp += int(i)\n return tmp\n else:\n st = s[:n] + '+' + s[n:]\n return add(n-1, st) + add(n-1, s)", "add", "if n == 0:\n tmp = 0\n for i in s.split('+'):\n tmp += int(i)\n return tmp\n else:\n st = s[:n] + '+' + s[n:]\n return add(n-1, st) + add(n-1, s)", "n == 0", "n", "0", "tmp = 0", "tmp", "0", "for i in s.split('+'):\n tmp += int(i)\n ", "i", "s.split('+')", "s.split", "s", "split", "'+'", "tmp += int(i)", "tmp", "int(i)", "int", "i", "return tmp", "tmp", "st = s[:n] + '+' + s[n:]", "st", "s[:n] + '+' + s[n:]", "s[:n] + '+'", "s[:n]", "s", ":n", "n", "'+'", "s[n:]", "s", "n:", "n", "return add(n-1, st) + add(n-1, s)", "add(n-1, st) + add(n-1, s)", "add(n-1, st)", "add", "n-1", "n", "1", "st", "add(n-1, s)", "add", "n-1", "n", "1", "s", "n", "n", "s", "s", "print(add(N, S))", "print", "add(N, S)", "add", "N", "S", "N = len(S) - 1", "len(S) - 1", "N", "S = input()", "input()", "S", "def add(n, s):\n if n == 0:\n tmp = 0\n for i in s.split('+'):\n tmp += int(i)\n return tmp\n else:\n st = s[:n] + '+' + s[n:]\n return add(n-1, st) + add(n-1, s)", "def add(n, s):\n if n == 0:\n tmp = 0\n for i in s.split('+'):\n tmp += int(i)\n return tmp\n else:\n st = s[:n] + '+' + s[n:]\n return add(n-1, st) + add(n-1, s)", "add" ]
S = input() N = len(S) - 1 def add(n, s): if n == 0: tmp = 0 for i in s.split('+'): tmp += int(i) return tmp else: st = s[:n] + '+' + s[n:] return add(n-1, st) + add(n-1, s) print(add(N, S))
[ 7, 12, 13, 0, 13, 4, 13, 0, 13, 18, 13, 17, 4, 13, 4, 13, 17, 13, 13, 12, 13, 14, 2, 13, 2, 4, 13, 13, 17, 29, 4, 13, 13, 29, 2, 4, 13, 2, 13, 17, 13, 2, 13, 18, 13, 2, 13, 17, 4, 13, 2, 13, 17, 13, 2, 2, 13, 17, 18, 13, 2, 13, 17, 23, 13, 23, 13, 23, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 9, 8 ], [ 4, 10 ], [ 4, 17 ], [ 8, 18 ], [ 64, 23 ], [ 66, 27 ], [ 68, 32 ], [ 64, 38 ], [ 66, 40 ], [ 68, 42 ], [ 66, 44 ], [ 64, 46 ], [ 64, 51 ], [ 66, 53 ], [ 68, 56 ], [ 66, 59 ], [ 64, 61 ], [ 64, 64 ], [ 66, 66 ], [ 68, 68 ], [ 77, 74 ] ]
[ "# def bit():\n# S = input()\n# n = len(S) - 1\n# ieS = S[0]\n# for i in range(n):\n# ieS += '*'\n# ieS += S[i+1]\n# ans = 0\n# for i in range(2 ** n):\n# eS = ieS\n# for j in range(n):\n# if (i >> j) & 1:\n# eS = eS[:(j+1)*2-1] + '+' + eS[(j+1)*2:]\n# ans += eval(eS.replace('*', ''))\n# print(ans)\n\n\ndef solve():\n S = input()\n eS = S[0]\n print(dfs(0, S, eS))\n\n\ndef dfs(i, S, eS):\n if i == len(S)-1:\n return eval(eS)\n return dfs(i+1, S, eS+(S[i+1])) + dfs(i+1, S, eS+'+'+(S[i+1]))\n\n\nif __name__ == '__main__':\n solve()", "def solve():\n S = input()\n eS = S[0]\n print(dfs(0, S, eS))", "solve", "S = input()", "S", "input()", "input", "eS = S[0]", "eS", "S[0]", "S", "0", "print(dfs(0, S, eS))", "print", "dfs(0, S, eS)", "dfs", "0", "S", "eS", "def dfs(i, S, eS):\n if i == len(S)-1:\n return eval(eS)\n return dfs(i+1, S, eS+(S[i+1])) + dfs(i+1, S, eS+'+'+(S[i+1]))", "dfs", "if i == len(S)-1:\n return eval(eS)\n ", "i == len(S)-1", "i", "len(S)-1", "len(S)", "len", "S", "1", "return eval(eS)", "eval(eS)", "eval", "eS", "return dfs(i+1, S, eS+(S[i+1])) + dfs(i+1, S, eS+'+'+(S[i+1]))", "dfs(i+1, S, eS+(S[i+1])) + dfs(i+1, S, eS+'+'+(S[i+1]))", "dfs(i+1, S, eS+(S[i+1]))", "dfs", "i+1", "i", "1", "S", "eS+(S[i+1])", "eS", "S[i+1]", "S", "i+1", "i", "1", "dfs(i+1, S, eS+'+'+(S[i+1]))", "dfs", "i+1", "i", "1", "S", "eS+'+'+(S[i+1])", "eS+'+'", "eS", "'+'", "S[i+1]", "S", "i+1", "i", "1", "i", "i", "S", "S", "eS", "eS", "if __name__ == '__main__':\n solve()", "__name__ == '__main__'", "__name__", "'__main__'", "solve()", "solve", "def solve():\n S = input()\n eS = S[0]\n print(dfs(0, S, eS))", "def solve():\n S = input()\n eS = S[0]\n print(dfs(0, S, eS))", "solve", "def dfs(i, S, eS):\n if i == len(S)-1:\n return eval(eS)\n return dfs(i+1, S, eS+(S[i+1])) + dfs(i+1, S, eS+'+'+(S[i+1]))", "def dfs(i, S, eS):\n if i == len(S)-1:\n return eval(eS)\n return dfs(i+1, S, eS+(S[i+1])) + dfs(i+1, S, eS+'+'+(S[i+1]))", "dfs" ]
# def bit(): # S = input() # n = len(S) - 1 # ieS = S[0] # for i in range(n): # ieS += '*' # ieS += S[i+1] # ans = 0 # for i in range(2 ** n): # eS = ieS # for j in range(n): # if (i >> j) & 1: # eS = eS[:(j+1)*2-1] + '+' + eS[(j+1)*2:] # ans += eval(eS.replace('*', '')) # print(ans) def solve(): S = input() eS = S[0] print(dfs(0, S, eS)) def dfs(i, S, eS): if i == len(S)-1: return eval(eS) return dfs(i+1, S, eS+(S[i+1])) + dfs(i+1, S, eS+'+'+(S[i+1])) if __name__ == '__main__': solve()
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 4, 13, 13, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 18, 13, 2, 13, 13, 2, 17, 18, 13, 2, 13, 13, 0, 13, 4, 18, 4, 18, 17, 13, 13, 13, 17, 28, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 89, 2 ], [ 95, 6 ], [ 90, 9 ], [ 77, 11 ], [ 96, 13 ], [ 83, 16 ], [ 20, 19 ], [ 78, 24 ], [ 92, 26 ], [ 90, 29 ], [ 32, 31 ], [ 78, 34 ], [ 19, 38 ], [ 31, 39 ], [ 47, 42 ], [ 93, 43 ], [ 78, 45 ], [ 31, 46 ], [ 93, 50 ], [ 78, 52 ], [ 31, 53 ], [ 80, 55 ], [ 93, 62 ], [ 67, 66 ], [ 81, 66 ], [ 86, 69 ], [ 66, 72 ], [ 87, 75 ], [ 84, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ] ]
[ "data = input()\nlength = len(data)\n\nbetween = length - 1\nnum = 0\nfor i in range(2**between):\n list_data = list(data)\n for j in range(between):\n if ((i >> j) & 1):\n list_data[between - j] = '+'+list_data[between - j]\n hoge = ''.join(list_data).split('+')\n for k in hoge:\n num += int(k)\n\nprint(num)", "data = input()", "data", "input()", "input", "length = len(data)", "length", "len(data)", "len", "data", "between = length - 1", "between", "length - 1", "length", "1", "num = 0", "num", "0", "for i in range(2**between):\n list_data = list(data)\n for j in range(between):\n if ((i >> j) & 1):\n list_data[between - j] = '+'+list_data[between - j]\n hoge = ''.join(list_data).split('+')\n for k in hoge:\n num += int(k)", "i", "range(2**between)", "range", "2**between", "2", "between", "list_data = list(data)", "list_data", "list(data)", "list", "data", "for j in range(between):\n if ((i >> j) & 1):\n list_data[between - j] = '+'+list_data[between - j]\n ", "j", "range(between)", "range", "between", "if ((i >> j) & 1):\n list_data[between - j] = '+'+list_data[between - j]\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "list_data[between - j] = '+'+list_data[between - j]", "list_data[between - j]", "list_data", "between - j", "between", "j", "'+'+list_data[between - j]", "'+'", "list_data[between - j]", "list_data", "between - j", "between", "j", "hoge = ''.join(list_data).split('+')", "hoge", "''.join(list_data).split('+')", "''.join(list_data).split", "''.join(list_data)", "''.join", "''", "join", "list_data", "split", "'+'", "for k in hoge:\n num += int(k)", "k", "hoge", "num += int(k)", "num", "int(k)", "int", "k", "print(num)", "print", "num", "between = length - 1", "length - 1", "between", "hoge = ''.join(list_data).split('+')", "''.join(list_data).split('+')", "hoge", "num = 0", "0", "num", "num += int(k)", "int(k)", "num", "data = input()", "input()", "data", "list_data = list(data)", "list(data)", "list_data", "length = len(data)", "len(data)", "length" ]
data = input() length = len(data) between = length - 1 num = 0 for i in range(2**between): list_data = list(data) for j in range(between): if ((i >> j) & 1): list_data[between - j] = '+'+list_data[between - j] hoge = ''.join(list_data).split('+') for k in hoge: num += int(k) print(num)
[ 7, 0, 13, 4, 13, 0, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 18, 4, 13, 13, 39, 17, 0, 13, 2, 2, 17, 2, 2, 4, 13, 13, 17, 4, 13, 13, 13, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 2, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13, 10, 2, 13 ]
[ [ 89, 2 ], [ 113, 6 ], [ 90, 12 ], [ 92, 15 ], [ 19, 18 ], [ 114, 21 ], [ 107, 23 ], [ 18, 27 ], [ 95, 31 ], [ 90, 39 ], [ 108, 43 ], [ 96, 43 ], [ 108, 44 ], [ 96, 44 ], [ 110, 46 ], [ 50, 49 ], [ 96, 54 ], [ 108, 54 ], [ 96, 58 ], [ 108, 58 ], [ 49, 59 ], [ 98, 62 ], [ 90, 66 ], [ 49, 70 ], [ 101, 73 ], [ 49, 75 ], [ 104, 78 ], [ 90, 82 ], [ 105, 87 ], [ 99, 87 ], [ 93, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ] ]
[ "s = input()\n\nn = 2 ** (len(s) - 1)\nresult = 0\n\nfor i in range(n):\n bin_n = bin(i)[2:]\n bin_n = '0' * ((len(s) - 1) - len(bin_n)) + bin_n\n current_address = 0\n for j in range(len(bin_n)):\n if bin_n[j] == '1':\n result += int(s[current_address:j+1])\n current_address = j+1\n\n result += int(s[current_address:])\n\nprint(result)", "s = input()", "s", "input()", "input", "n = 2 ** (len(s) - 1)", "n", "2 ** (len(s) - 1)", "2", "len(s) - 1", "len(s)", "len", "s", "1", "result = 0", "result", "0", "for i in range(n):\n bin_n = bin(i)[2:]\n bin_n = '0' * ((len(s) - 1) - len(bin_n)) + bin_n\n current_address = 0\n for j in range(len(bin_n)):\n if bin_n[j] == '1':\n result += int(s[current_address:j+1])\n current_address = j+1\n\n result += int(s[current_address:])", "i", "range(n)", "range", "n", "bin_n = bin(i)[2:]", "bin_n", "bin(i)[2:]", "(i)", "bin", "i", "2:", "2", "bin_n = '0' * ((len(s) - 1) - len(bin_n)) + bin_n", "bin_n", "'0' * ((len(s) - 1) - len(bin_n)) + bin_n", "'0' * ((len(s) - 1) - len(bin_n))", "'0'", "(len(s) - 1) - len(bin_n)", "len(s) - 1", "len(s)", "len", "s", "1", "len(bin_n)", "len", "bin_n", "bin_n", "current_address = 0", "current_address", "0", "for j in range(len(bin_n)):\n if bin_n[j] == '1':\n result += int(s[current_address:j+1])\n current_address = j+1\n\n ", "j", "range(len(bin_n))", "range", "len(bin_n)", "len", "bin_n", "if bin_n[j] == '1':\n result += int(s[current_address:j+1])\n current_address = j+1\n\n ", "bin_n[j] == '1'", "bin_n[j]", "bin_n", "j", "'1'", "result += int(s[current_address:j+1])", "result", "int(s[current_address:j+1])", "int", "s[current_address:j+1]", "s", "current_address:j+1", "current_address", "j+1", "j", "1", "current_address = j+1", "current_address", "j+1", "j", "1", "result += int(s[current_address:])", "result", "int(s[current_address:])", "int", "s[current_address:]", "s", "current_address:", "current_address", "print(result)", "print", "result", "s = input()", "input()", "s", "result = 0", "0", "result", "bin_n = '0' * ((len(s) - 1) - len(bin_n)) + bin_n", "'0' * ((len(s) - 1) - len(bin_n)) + bin_n", "bin_n", "result += int(s[current_address:j+1])", "int(s[current_address:j+1])", "result", "current_address = j+1", "j+1", "current_address", "result += int(s[current_address:])", "int(s[current_address:])", "result", "bin_n = bin(i)[2:]", "bin(i)[2:]", "bin_n", "current_address = 0", "0", "current_address", "n = 2 ** (len(s) - 1)", "2 ** (len(s) - 1)", "n" ]
s = input() n = 2 ** (len(s) - 1) result = 0 for i in range(n): bin_n = bin(i)[2:] bin_n = '0' * ((len(s) - 1) - len(bin_n)) + bin_n current_address = 0 for j in range(len(bin_n)): if bin_n[j] == '1': result += int(s[current_address:j+1]) current_address = j+1 result += int(s[current_address:]) print(result)
[ 7, 0, 13, 4, 13, 0, 13, 39, 39, 18, 13, 17, 28, 13, 18, 13, 39, 17, 0, 13, 39, 28, 13, 18, 13, 17, 4, 18, 13, 13, 2, 13, 13, 4, 18, 13, 13, 2, 2, 13, 17, 13, 4, 18, 13, 13, 13, 0, 13, 17, 28, 13, 18, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 39, 13, 10, 39, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 80, 2 ], [ 74, 6 ], [ 81, 10 ], [ 14, 13 ], [ 81, 15 ], [ 71, 19 ], [ 23, 22 ], [ 75, 24 ], [ 72, 28 ], [ 22, 31 ], [ 13, 32 ], [ 72, 35 ], [ 22, 39 ], [ 13, 41 ], [ 75, 44 ], [ 72, 46 ], [ 83, 48 ], [ 52, 51 ], [ 75, 53 ], [ 77, 56 ], [ 51, 64 ], [ 78, 69 ], [ 84, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ] ]
[ "S = input()\n\nres = [[S[0]]]\n\nfor c in S[1:]:\n buf = []\n for dp in res[-1]:\n buf.append(dp+c)\n buf.append(dp+'+'+c)\n res.append(buf)\nsum_num = 0\n\nfor string in res[-1]:\n sum_num += sum(map(int, string.split('+')))\nprint(sum_num)", "S = input()", "S", "input()", "input", "res = [[S[0]]]", "res", "[[S[0]]]", "[S[0]]", "S[0]", "S", "0", "for c in S[1:]:\n buf = []\n for dp in res[-1]:\n buf.append(dp+c)\n buf.append(dp+'+'+c)\n res.append(buf)", "c", "S[1:]", "S", "1:", "1", "buf = []", "buf", "[]", "for dp in res[-1]:\n buf.append(dp+c)\n buf.append(dp+'+'+c)\n ", "dp", "res[-1]", "res", "-1", "buf.append(dp+c)", "buf.append", "buf", "append", "dp+c", "dp", "c", "buf.append(dp+'+'+c)", "buf.append", "buf", "append", "dp+'+'+c", "dp+'+'", "dp", "'+'", "c", "res.append(buf)", "res.append", "res", "append", "buf", "sum_num = 0", "sum_num", "0", "for string in res[-1]:\n sum_num += sum(map(int, string.split('+')))", "string", "res[-1]", "res", "-1", "sum_num += sum(map(int, string.split('+')))", "sum_num", "sum(map(int, string.split('+')))", "sum", "map(int, string.split('+'))", "map", "int", "string.split('+')", "string.split", "string", "split", "'+'", "print(sum_num)", "print", "sum_num", "buf = []", "[]", "buf", "res = [[S[0]]]", "[[S[0]]]", "res", "sum_num += sum(map(int, string.split('+')))", "sum(map(int, string.split('+')))", "sum_num", "S = input()", "input()", "S", "sum_num = 0", "0", "sum_num" ]
S = input() res = [[S[0]]] for c in S[1:]: buf = [] for dp in res[-1]: buf.append(dp+c) buf.append(dp+'+'+c) res.append(buf) sum_num = 0 for string in res[-1]: sum_num += sum(map(int, string.split('+'))) print(sum_num)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 39, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 4, 18, 13, 13, 4, 13, 18, 13, 39, 13, 2, 13, 17, 0, 13, 2, 13, 17, 4, 18, 13, 13, 4, 13, 18, 13, 39, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 2, 13, 10, 39, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 91, 2 ], [ 76, 6 ], [ 92, 10 ], [ 94, 13 ], [ 17, 16 ], [ 77, 21 ], [ 79, 23 ], [ 88, 26 ], [ 30, 29 ], [ 77, 32 ], [ 16, 36 ], [ 29, 37 ], [ 80, 41 ], [ 92, 46 ], [ 29, 50 ], [ 85, 53 ], [ 29, 55 ], [ 80, 59 ], [ 92, 64 ], [ 82, 68 ], [ 80, 71 ], [ 83, 74 ], [ 95, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ] ]
[ "s = input()\nn = len(s) - 1\nans = 0\nfor i in range(1 << n):\n tmp_l = []\n sep = 0\n for j in range(n):\n if (i >> j) & 1:\n tmp_l.append(int(s[sep:j + 1]))\n sep = j + 1\n tmp_l.append(int(s[sep:]))\n ans += sum(tmp_l)\nprint(ans)", "s = input()", "s", "input()", "input", "n = len(s) - 1", "n", "len(s) - 1", "len(s)", "len", "s", "1", "ans = 0", "ans", "0", "for i in range(1 << n):\n tmp_l = []\n sep = 0\n for j in range(n):\n if (i >> j) & 1:\n tmp_l.append(int(s[sep:j + 1]))\n sep = j + 1\n tmp_l.append(int(s[sep:]))\n ans += sum(tmp_l)", "i", "range(1 << n)", "range", "1 << n", "1", "n", "tmp_l = []", "tmp_l", "[]", "sep = 0", "sep", "0", "for j in range(n):\n if (i >> j) & 1:\n tmp_l.append(int(s[sep:j + 1]))\n sep = j + 1\n ", "j", "range(n)", "range", "n", "if (i >> j) & 1:\n tmp_l.append(int(s[sep:j + 1]))\n sep = j + 1\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "tmp_l.append(int(s[sep:j + 1]))", "tmp_l.append", "tmp_l", "append", "int(s[sep:j + 1])", "int", "s[sep:j + 1]", "s", "sep:j + 1", "sep", "j + 1", "j", "1", "sep = j + 1", "sep", "j + 1", "j", "1", "tmp_l.append(int(s[sep:]))", "tmp_l.append", "tmp_l", "append", "int(s[sep:])", "int", "s[sep:]", "s", "sep:", "sep", "ans += sum(tmp_l)", "ans", "sum(tmp_l)", "sum", "tmp_l", "print(ans)", "print", "ans", "n = len(s) - 1", "len(s) - 1", "n", "tmp_l = []", "[]", "tmp_l", "ans += sum(tmp_l)", "sum(tmp_l)", "ans", "sep = j + 1", "j + 1", "sep", "sep = 0", "0", "sep", "s = input()", "input()", "s", "ans = 0", "0", "ans" ]
s = input() n = len(s) - 1 ans = 0 for i in range(1 << n): tmp_l = [] sep = 0 for j in range(n): if (i >> j) & 1: tmp_l.append(int(s[sep:j + 1])) sep = j + 1 tmp_l.append(int(s[sep:])) ans += sum(tmp_l) print(ans)
[ 7, 15, 13, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 18, 13, 13, 39, 17, 17, 0, 13, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 18, 13, 13, 0, 13, 17, 0, 13, 18, 13, 13, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13, 10, 17, 13, 10, 18, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 18, 13 ]
[ [ 74, 4 ], [ 95, 8 ], [ 75, 11 ], [ 89, 13 ], [ 17, 16 ], [ 26, 25 ], [ 96, 27 ], [ 80, 30 ], [ 34, 33 ], [ 96, 37 ], [ 16, 42 ], [ 33, 43 ], [ 77, 46 ], [ 75, 48 ], [ 33, 49 ], [ 83, 51 ], [ 98, 54 ], [ 75, 56 ], [ 33, 57 ], [ 86, 59 ], [ 75, 61 ], [ 96, 63 ], [ 92, 66 ], [ 87, 69 ], [ 99, 69 ], [ 84, 69 ], [ 78, 69 ], [ 81, 69 ], [ 93, 72 ], [ 90, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ] ]
[ "#itertoolsを使うversion\nimport itertools\nS = input()\nN = len(S)\nres = 0\nfor ptr in itertools.product([0,1], repeat=(N-1)):\n formula = \"\"\n for i in range(N-1):\n if ptr[i] == 1:\n formula += S[i]\n formula += \"+\"\n else:\n formula += S[i]\n formula += S[N-1] \n res += eval(formula)\nprint(res)", "import itertools", "itertools", "S = input()", "S", "input()", "input", "N = len(S)", "N", "len(S)", "len", "S", "res = 0", "res", "0", "for ptr in itertools.product([0,1], repeat=(N-1)):\n formula = \"\"\n for i in range(N-1):\n if ptr[i] == 1:\n formula += S[i]\n formula += \"+\"\n else:\n formula += S[i]\n formula += S[N-1] \n res += eval(formula)", "ptr", "itertools.product([0,1], repeat=(N-1))", "itertools.product", "itertools", "product", "[0,1]", "0", "1", "repeat=(N-1)", "repeat", "N-1", "N", "1", "formula = \"\"", "formula", "\"\"", "for i in range(N-1):\n if ptr[i] == 1:\n formula += S[i]\n formula += \"+\"\n else:\n formula += S[i]\n ", "i", "range(N-1)", "range", "N-1", "N", "1", "if ptr[i] == 1:\n formula += S[i]\n formula += \"+\"\n else:\n formula += S[i]\n ", "ptr[i] == 1", "ptr[i]", "ptr", "i", "1", "formula += S[i]", "formula", "S[i]", "S", "i", "formula += \"+\"", "formula", "\"+\"", "formula += S[i]", "formula", "S[i]", "S", "i", "formula += S[N-1]", "formula", "S[N-1]", "S", "N-1", "N", "1", "res += eval(formula)", "res", "eval(formula)", "eval", "formula", "print(res)", "print", "res", "S = input()", "input()", "S", "formula += S[i]", "S[i]", "formula", "formula = \"\"", "\"\"", "formula", "formula += \"+\"", "\"+\"", "formula", "formula += S[N-1]", "S[N-1]", "formula", "res = 0", "0", "res", "res += eval(formula)", "eval(formula)", "res", "N = len(S)", "len(S)", "N", "formula += S[i]", "S[i]", "formula" ]
#itertoolsを使うversion import itertools S = input() N = len(S) res = 0 for ptr in itertools.product([0,1], repeat=(N-1)): formula = "" for i in range(N-1): if ptr[i] == 1: formula += S[i] formula += "+" else: formula += S[i] formula += S[N-1] res += eval(formula) print(res)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 4, 13, 18, 4, 13, 13, 39, 17, 0, 13, 2, 2, 39, 17, 2, 2, 13, 17, 4, 13, 13, 13, 0, 13, 17, 0, 13, 18, 13, 17, 42, 2, 13, 2, 13, 17, 14, 40, 18, 13, 13, 17, 0, 13, 4, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 18, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 18, 13 ]
[ [ 93, 2 ], [ 114, 8 ], [ 94, 11 ], [ 117, 13 ], [ 17, 16 ], [ 115, 22 ], [ 111, 25 ], [ 16, 31 ], [ 102, 35 ], [ 115, 42 ], [ 112, 46 ], [ 103, 46 ], [ 112, 47 ], [ 103, 47 ], [ 123, 49 ], [ 126, 52 ], [ 94, 54 ], [ 124, 58 ], [ 100, 58 ], [ 115, 60 ], [ 103, 65 ], [ 112, 65 ], [ 124, 66 ], [ 100, 66 ], [ 105, 69 ], [ 127, 72 ], [ 97, 72 ], [ 109, 72 ], [ 108, 74 ], [ 99, 77 ], [ 96, 80 ], [ 94, 82 ], [ 100, 83 ], [ 124, 83 ], [ 120, 85 ], [ 97, 88 ], [ 109, 88 ], [ 127, 88 ], [ 121, 91 ], [ 106, 91 ], [ 118, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ], [ 123, 124 ], [ 126, 127 ] ]
[ "s=list(input())\nn=len(s)\nans=0\nfor i in range(2**(n-1)):\n a=list(bin(i)[2:])\n a=['0']*(n-1-len(a))+a\n j=0\n num=s[0]\n while j<n-1:\n if a[j]!='0':\n ans += int(num)\n num=''\n j+=1\n num+=s[j]\n ans+=int(num)\nprint(ans)", "s=list(input())", "s", "list(input())", "list", "input()", "input", "n=len(s)", "n", "len(s)", "len", "s", "ans=0", "ans", "0", "for i in range(2**(n-1)):\n a=list(bin(i)[2:])\n a=['0']*(n-1-len(a))+a\n j=0\n num=s[0]\n while j<n-1:\n if a[j]!='0':\n ans += int(num)\n num=''\n j+=1\n num+=s[j]\n ans+=int(num)", "i", "range(2**(n-1))", "range", "2**(n-1)", "2", "n-1", "n", "1", "a=list(bin(i)[2:])", "a", "list(bin(i)[2:])", "list", "bin(i)[2:]", "(i)", "bin", "i", "2:", "2", "a=['0']*(n-1-len(a))+a", "a", "['0']*(n-1-len(a))+a", "['0']*(n-1-len(a))", "['0']", "'0'", "n-1-len(a)", "n-1", "n", "1", "len(a)", "len", "a", "a", "j=0", "j", "0", "num=s[0]", "num", "s[0]", "s", "0", "while j<n-1:\n if a[j]!='0':\n ans += int(num)\n num=''\n j+=1\n num+=s[j]\n ", "j<n-1", "j", "n-1", "n", "1", "if a[j]!='0':\n ans += int(num)\n num=''\n ", "a[j]!='0'", "a[j]", "a", "j", "'0'", "ans += int(num)", "ans", "int(num)", "int", "num", "num=''", "num", "''", "j+=1", "j", "1", "num+=s[j]", "num", "s[j]", "s", "j", "ans+=int(num)", "ans", "int(num)", "int", "num", "print(ans)", "print", "ans", "s=list(input())", "list(input())", "s", "num+=s[j]", "s[j]", "num", "j+=1", "1", "j", "a=['0']*(n-1-len(a))+a", "['0']*(n-1-len(a))+a", "a", "ans += int(num)", "int(num)", "ans", "num=''", "''", "num", "a=list(bin(i)[2:])", "list(bin(i)[2:])", "a", "n=len(s)", "len(s)", "n", "ans=0", "0", "ans", "ans+=int(num)", "int(num)", "ans", "j=0", "0", "j", "num=s[0]", "s[0]", "num" ]
s=list(input()) n=len(s) ans=0 for i in range(2**(n-1)): a=list(bin(i)[2:]) a=['0']*(n-1-len(a))+a j=0 num=s[0] while j<n-1: if a[j]!='0': ans += int(num) num='' j+=1 num+=s[j] ans+=int(num) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 2, 39, 17, 13, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 18, 13, 2, 2, 13, 17, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 18, 13, 13, 18, 13, 13, 0, 13, 18, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 2, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 18, 13 ]
[ [ 79, 2 ], [ 85, 6 ], [ 80, 10 ], [ 91, 13 ], [ 17, 16 ], [ 86, 21 ], [ 88, 23 ], [ 86, 27 ], [ 82, 29 ], [ 33, 32 ], [ 86, 35 ], [ 16, 39 ], [ 32, 40 ], [ 50, 43 ], [ 89, 44 ], [ 86, 47 ], [ 32, 49 ], [ 53, 52 ], [ 86, 55 ], [ 94, 57 ], [ 80, 60 ], [ 52, 61 ], [ 89, 63 ], [ 52, 64 ], [ 100, 66 ], [ 80, 68 ], [ 97, 71 ], [ 101, 74 ], [ 95, 74 ], [ 83, 74 ], [ 98, 77 ], [ 92, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ] ]
[ "s = input()\nn = len(s)-1\ntotal=0\nfor i in range(2**n):\n pl=['']*n\n ans=''\n for j in range(n):\n if ((i>>j)&1):\n pl[n-1-j] = '+'\n for k in range(n):\n ans += s[k]+pl[k]\n ans+=s[-1]\n total += eval(ans)\n \nprint(total)", "s = input()", "s", "input()", "input", "n = len(s)-1", "n", "len(s)-1", "len(s)", "len", "s", "1", "total=0", "total", "0", "for i in range(2**n):\n pl=['']*n\n ans=''\n for j in range(n):\n if ((i>>j)&1):\n pl[n-1-j] = '+'\n for k in range(n):\n ans += s[k]+pl[k]\n ans+=s[-1]\n total += eval(ans)\n ", "i", "range(2**n)", "range", "2**n", "2", "n", "pl=['']*n", "pl", "['']*n", "['']", "''", "n", "ans=''", "ans", "''", "for j in range(n):\n if ((i>>j)&1):\n pl[n-1-j] = '+'\n ", "j", "range(n)", "range", "n", "if ((i>>j)&1):\n pl[n-1-j] = '+'\n ", "(i>>j)&1", "i>>j", "i", "j", "1", "pl[n-1-j] = '+'", "pl[n-1-j]", "pl", "n-1-j", "n-1", "n", "1", "j", "'+'", "for k in range(n):\n ans += s[k]+pl[k]\n ", "k", "range(n)", "range", "n", "ans += s[k]+pl[k]", "ans", "s[k]+pl[k]", "s[k]", "s", "k", "pl[k]", "pl", "k", "ans+=s[-1]", "ans", "s[-1]", "s", "-1", "total += eval(ans)", "total", "eval(ans)", "eval", "ans", "print(total)", "print", "total", "s = input()", "input()", "s", "ans=''", "''", "ans", "n = len(s)-1", "len(s)-1", "n", "pl=['']*n", "['']*n", "pl", "total=0", "0", "total", "ans += s[k]+pl[k]", "s[k]+pl[k]", "ans", "total += eval(ans)", "eval(ans)", "total", "ans+=s[-1]", "s[-1]", "ans" ]
s = input() n = len(s)-1 total=0 for i in range(2**n): pl=['']*n ans='' for j in range(n): if ((i>>j)&1): pl[n-1-j] = '+' for k in range(n): ans += s[k]+pl[k] ans+=s[-1] total += eval(ans) print(total)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 17, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 2, 13, 13, 17, 0, 13, 2, 13, 13, 0, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 2, 13, 13, 4, 13, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13 ]
[ [ 92, 2 ], [ 89, 6 ], [ 93, 9 ], [ 95, 11 ], [ 15, 14 ], [ 90, 20 ], [ 83, 23 ], [ 71, 26 ], [ 93, 29 ], [ 98, 31 ], [ 35, 34 ], [ 90, 38 ], [ 14, 43 ], [ 34, 44 ], [ 74, 47 ], [ 72, 49 ], [ 102, 49 ], [ 84, 50 ], [ 87, 50 ], [ 81, 50 ], [ 101, 52 ], [ 72, 54 ], [ 102, 54 ], [ 84, 55 ], [ 87, 55 ], [ 81, 55 ], [ 80, 57 ], [ 86, 60 ], [ 77, 63 ], [ 75, 65 ], [ 99, 65 ], [ 102, 66 ], [ 72, 66 ], [ 78, 69 ], [ 96, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ] ]
[ "s = input()\nn = len(s)\n\nans = 0\nfor i in range(2**(n-1)):\n c = 10\n tmp = int(s)\n res = 0\n for j in range(n-1):\n if ((i>>j)&1):\n res+=tmp%c\n tmp=tmp//c\n c=10\n else:\n c*=10\n ans+=res+tmp\nprint(ans)", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "ans = 0", "ans", "0", "for i in range(2**(n-1)):\n c = 10\n tmp = int(s)\n res = 0\n for j in range(n-1):\n if ((i>>j)&1):\n res+=tmp%c\n tmp=tmp//c\n c=10\n else:\n c*=10\n ans+=res+tmp", "i", "range(2**(n-1))", "range", "2**(n-1)", "2", "n-1", "n", "1", "c = 10", "c", "10", "tmp = int(s)", "tmp", "int(s)", "int", "s", "res = 0", "res", "0", "for j in range(n-1):\n if ((i>>j)&1):\n res+=tmp%c\n tmp=tmp//c\n c=10\n else:\n c*=10\n ", "j", "range(n-1)", "range", "n-1", "n", "1", "if ((i>>j)&1):\n res+=tmp%c\n tmp=tmp//c\n c=10\n else:\n c*=10\n ", "(i>>j)&1", "i>>j", "i", "j", "1", "res+=tmp%c", "res", "tmp%c", "tmp", "c", "tmp=tmp//c", "tmp", "tmp//c", "tmp", "c", "c=10", "c", "10", "c*=10", "c", "10", "ans+=res+tmp", "ans", "res+tmp", "res", "tmp", "print(ans)", "print", "ans", "tmp = int(s)", "int(s)", "tmp", "res+=tmp%c", "tmp%c", "res", "ans+=res+tmp", "res+tmp", "ans", "c=10", "10", "c", "c = 10", "10", "c", "c*=10", "10", "c", "n = len(s)", "len(s)", "n", "s = input()", "input()", "s", "ans = 0", "0", "ans", "res = 0", "0", "res", "tmp=tmp//c", "tmp//c", "tmp" ]
s = input() n = len(s) ans = 0 for i in range(2**(n-1)): c = 10 tmp = int(s) res = 0 for j in range(n-1): if ((i>>j)&1): res+=tmp%c tmp=tmp//c c=10 else: c*=10 ans+=res+tmp print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 18, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 13, 2, 2, 13, 17, 18, 13, 2, 13, 17, 0, 13, 2, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13 ]
[ [ 79, 2 ], [ 76, 6 ], [ 80, 10 ], [ 85, 13 ], [ 17, 16 ], [ 77, 21 ], [ 82, 23 ], [ 80, 25 ], [ 29, 28 ], [ 77, 31 ], [ 16, 35 ], [ 28, 36 ], [ 70, 39 ], [ 83, 42 ], [ 74, 42 ], [ 71, 42 ], [ 80, 45 ], [ 28, 47 ], [ 73, 50 ], [ 83, 52 ], [ 74, 52 ], [ 71, 52 ], [ 80, 54 ], [ 28, 56 ], [ 67, 59 ], [ 74, 62 ], [ 71, 62 ], [ 83, 62 ], [ 68, 65 ], [ 86, 65 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ] ]
[ "s = input()\nn = len(s) - 1\n\na = 0\nfor x in range(2**n):\n ans = s[0]\n for y in range(n):\n if (x>>y)&1:\n ans = ans + \"+\" + s[y+1]\n else:\n ans = ans + s[y+1]\n a += eval(ans)\nprint(a)", "s = input()", "s", "input()", "input", "n = len(s) - 1", "n", "len(s) - 1", "len(s)", "len", "s", "1", "a = 0", "a", "0", "for x in range(2**n):\n ans = s[0]\n for y in range(n):\n if (x>>y)&1:\n ans = ans + \"+\" + s[y+1]\n else:\n ans = ans + s[y+1]\n a += eval(ans)", "x", "range(2**n)", "range", "2**n", "2", "n", "ans = s[0]", "ans", "s[0]", "s", "0", "for y in range(n):\n if (x>>y)&1:\n ans = ans + \"+\" + s[y+1]\n else:\n ans = ans + s[y+1]\n ", "y", "range(n)", "range", "n", "if (x>>y)&1:\n ans = ans + \"+\" + s[y+1]\n else:\n ans = ans + s[y+1]\n ", "(x>>y)&1", "x>>y", "x", "y", "1", "ans = ans + \"+\" + s[y+1]", "ans", "ans + \"+\" + s[y+1]", "ans + \"+\"", "ans", "\"+\"", "s[y+1]", "s", "y+1", "y", "1", "ans = ans + s[y+1]", "ans", "ans + s[y+1]", "ans", "s[y+1]", "s", "y+1", "y", "1", "a += eval(ans)", "a", "eval(ans)", "eval", "ans", "print(a)", "print", "a", "a += eval(ans)", "eval(ans)", "a", "ans = ans + \"+\" + s[y+1]", "ans + \"+\" + s[y+1]", "ans", "ans = ans + s[y+1]", "ans + s[y+1]", "ans", "n = len(s) - 1", "len(s) - 1", "n", "s = input()", "input()", "s", "ans = s[0]", "s[0]", "ans", "a = 0", "0", "a" ]
s = input() n = len(s) - 1 a = 0 for x in range(2**n): ans = s[0] for y in range(n): if (x>>y)&1: ans = ans + "+" + s[y+1] else: ans = ans + s[y+1] a += eval(ans) print(a)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 39, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 2, 39, 17, 2, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 2, 13, 13, 17, 0, 18, 13, 13, 17, 4, 18, 13, 13, 13, 0, 13, 39, 0, 13, 4, 13, 13, 0, 13, 39, 28, 13, 4, 13, 13, 14, 2, 13, 2, 13, 17, 4, 18, 13, 13, 18, 13, 13, 3, 4, 18, 13, 13, 18, 13, 13, 4, 18, 13, 13, 17, 0, 13, 39, 28, 13, 4, 13, 4, 13, 13, 0, 13, 13, 0, 18, 13, 39, 17, 17, 18, 13, 13, 41, 28, 13, 13, 40, 13, 17, 4, 13, 0, 13, 13, 0, 13, 4, 18, 17, 13, 13, 14, 2, 17, 13, 4, 18, 13, 13, 4, 13, 13, 4, 18, 13, 13, 4, 13, 13, 4, 13, 4, 13, 13, 10, 13, 13, 10, 39, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 13, 13, 10, 2, 13, 10, 4, 13, 10, 39, 13, 10, 39, 13, 10, 39, 13 ]
[ [ 166, 2 ], [ 169, 6 ], [ 167, 9 ], [ 187, 11 ], [ 15, 14 ], [ 170, 20 ], [ 178, 23 ], [ 170, 28 ], [ 32, 31 ], [ 170, 35 ], [ 14, 40 ], [ 31, 41 ], [ 47, 44 ], [ 179, 45 ], [ 31, 46 ], [ 188, 50 ], [ 179, 52 ], [ 184, 54 ], [ 172, 57 ], [ 167, 60 ], [ 190, 62 ], [ 66, 65 ], [ 170, 68 ], [ 65, 71 ], [ 170, 73 ], [ 191, 77 ], [ 173, 80 ], [ 167, 80 ], [ 65, 81 ], [ 191, 85 ], [ 173, 88 ], [ 167, 88 ], [ 65, 89 ], [ 191, 92 ], [ 163, 96 ], [ 100, 99 ], [ 188, 104 ], [ 175, 106 ], [ 191, 107 ], [ 114, 109 ], [ 176, 110 ], [ 179, 110 ], [ 161, 110 ], [ 188, 115 ], [ 99, 116 ], [ 120, 119 ], [ 176, 119 ], [ 179, 119 ], [ 161, 119 ], [ 119, 122 ], [ 119, 125 ], [ 160, 127 ], [ 181, 130 ], [ 161, 135 ], [ 176, 135 ], [ 179, 135 ], [ 182, 139 ], [ 185, 142 ], [ 182, 146 ], [ 185, 149 ], [ 182, 153 ], [ 185, 158 ], [ 160, 161 ], [ 163, 164 ], [ 166, 167 ], [ 169, 170 ], [ 172, 173 ], [ 191, 175 ], [ 175, 176 ], [ 178, 179 ], [ 181, 182 ], [ 184, 185 ], [ 187, 188 ], [ 190, 191 ] ]
[ "s = input()\nn = len(s)\np = []\nfor i in range(2 ** (n-1)):\n tmp = [' '] * (n-1)\n for j in range(n-1):\n if i >> j & 1:\n tmp[j] = \"+\"\n p.append(tmp)\nans = []\ns = list(s)\ns_ = []\nfor i in range(n):\n if(i == n-1):\n s_.append(s[i])\n break\n s_.append(s[i])\n s_.append(\" \")\n\ns__ = []\nfor i in range(len(p)):\n tmp = s_\n tmp[1::2] = p[i]\n #print(tmp)\n tmp = [a for a in tmp if a != ' ']\n temp = ''.join(tmp)\n #print(temp)\n if(\"+\" in temp):\n ans.append(eval(temp))\n else:\n ans.append(int(temp))\nprint(sum(ans))", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "p = []", "p", "[]", "for i in range(2 ** (n-1)):\n tmp = [' '] * (n-1)\n for j in range(n-1):\n if i >> j & 1:\n tmp[j] = \"+\"\n p.append(tmp)", "i", "range(2 ** (n-1))", "range", "2 ** (n-1)", "2", "n-1", "n", "1", "tmp = [' '] * (n-1)", "tmp", "[' '] * (n-1)", "[' ']", "' '", "n-1", "n", "1", "for j in range(n-1):\n if i >> j & 1:\n tmp[j] = \"+\"\n ", "j", "range(n-1)", "range", "n-1", "n", "1", "if i >> j & 1:\n tmp[j] = \"+\"\n ", "i >> j & 1", "i >> j", "i", "j", "1", "tmp[j] = \"+\"", "tmp[j]", "tmp", "j", "\"+\"", "p.append(tmp)", "p.append", "p", "append", "tmp", "ans = []", "ans", "[]", "s = list(s)", "s", "list(s)", "list", "s", "s_ = []", "s_", "[]", "for i in range(n):\n if(i == n-1):\n s_.append(s[i])\n break\n s_.append(s[i])\n s_.append(\" \")", "i", "range(n)", "range", "n", "if(i == n-1):\n s_.append(s[i])\n break\n ", "i == n-1", "i", "n-1", "n", "1", "s_.append(s[i])", "s_.append", "s_", "append", "s[i]", "s", "i", "break", "s_.append(s[i])", "s_.append", "s_", "append", "s[i]", "s", "i", "s_.append(\" \")", "s_.append", "s_", "append", "\" \"", "s__ = []", "s__", "[]", "for i in range(len(p)):\n tmp = s_\n tmp[1::2] = p[i]\n #print(tmp)\n tmp = [a for a in tmp if a != ' ']\n temp = ''.join(tmp)\n #print(temp)\n if(\"+\" in temp):\n ans.append(eval(temp))\n else:\n ans.append(int(temp))", "i", "range(len(p))", "range", "len(p)", "len", "p", "tmp = s_", "tmp", "s_", "tmp[1::2] = p[i]", "tmp[1::2]", "tmp", "1::2", "1", "2", "p[i]", "p", "i", "a for a in tmp if a != ' '", "for a in tmp if a != ' '", "a", "tmp", "a != ' '", "a", "' '", "if a != ' '", "a", "tmp = [a for a in tmp if a != ' ']", "tmp", "[a for a in tmp if a != ' ']", "temp = ''.join(tmp)", "temp", "''.join(tmp)", "''.join", "''", "join", "tmp", "if(\"+\" in temp):\n ans.append(eval(temp))\n else:\n ans.append(int(temp))", "\"+\" in temp", "\"+\"", "temp", "ans.append(eval(temp))", "ans.append", "ans", "append", "eval(temp)", "eval", "temp", "ans.append(int(temp))", "ans.append", "ans", "append", "int(temp)", "int", "temp", "print(sum(ans))", "print", "sum(ans)", "sum", "ans", "tmp = [a for a in tmp if a != ' ']", "[a for a in tmp if a != ' ']", "tmp", "s__ = []", "[]", "s__", "s = input()", "input()", "s", "n = len(s)", "len(s)", "n", "s = list(s)", "list(s)", "s", "tmp = s_", "s_", "tmp", "tmp = [' '] * (n-1)", "[' '] * (n-1)", "tmp", "temp = ''.join(tmp)", "''.join(tmp)", "temp", "ans = []", "[]", "ans", "p = []", "[]", "p", "s_ = []", "[]", "s_" ]
s = input() n = len(s) p = [] for i in range(2 ** (n-1)): tmp = [' '] * (n-1) for j in range(n-1): if i >> j & 1: tmp[j] = "+" p.append(tmp) ans = [] s = list(s) s_ = [] for i in range(n): if(i == n-1): s_.append(s[i]) break s_.append(s[i]) s_.append(" ") s__ = [] for i in range(len(p)): tmp = s_ tmp[1::2] = p[i] #print(tmp) tmp = [a for a in tmp if a != ' '] temp = ''.join(tmp) #print(temp) if("+" in temp): ans.append(eval(temp)) else: ans.append(int(temp)) print(sum(ans))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 12, 13, 4, 18, 13, 13, 4, 13, 4, 18, 17, 13, 13, 0, 13, 4, 13, 13, 14, 2, 13, 17, 29, 28, 13, 4, 13, 17, 13, 0, 13, 4, 18, 17, 13, 18, 13, 39, 13, 0, 13, 2, 17, 2, 2, 13, 13, 17, 28, 13, 4, 13, 13, 4, 18, 13, 13, 4, 13, 13, 4, 13, 18, 13, 39, 13, 23, 13, 4, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, 13, 10, 12, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 91, 2 ], [ 100, 8 ], [ 101, 15 ], [ 78, 23 ], [ 26, 25 ], [ 78, 28 ], [ 25, 31 ], [ 36, 35 ], [ 25, 39 ], [ 42, 41 ], [ 78, 47 ], [ 52, 51 ], [ 25, 56 ], [ 35, 57 ], [ 61, 60 ], [ 51, 63 ], [ 101, 66 ], [ 41, 70 ], [ 78, 74 ], [ 78, 78 ], [ 95, 80 ], [ 92, 81 ], [ 97, 83 ], [ 101, 86 ], [ 98, 89 ], [ 91, 92 ], [ 97, 98 ], [ 100, 101 ] ]
[ "S = list(input())\nSlist = list()\n\ndef split_list(S):\n Slist.append(int(''.join(S)))\n N = len(S)\n if N == 1:\n return\n for n in range(1, N):\n S1 = ''.join(S[:n])\n r = 2**(N-n-1)\n \n for i in range(r):\n \tSlist.append(int(S1))\n \n split_list(S[n:])\n \n \n\nsplit_list(S)\nans = sum(Slist)\nprint(ans)", "S = list(input())", "S", "list(input())", "list", "input()", "input", "Slist = list()", "Slist", "list()", "list", "def split_list(S):\n Slist.append(int(''.join(S)))\n N = len(S)\n if N == 1:\n return\n for n in range(1, N):\n S1 = ''.join(S[:n])\n r = 2**(N-n-1)\n \n for i in range(r):\n \tSlist.append(int(S1))\n \n split_list(S[n:])\n \n ", "split_list", "Slist.append(int(''.join(S)))", "Slist.append", "Slist", "append", "int(''.join(S))", "int", "''.join(S)", "''.join", "''", "join", "S", "N = len(S)", "N", "len(S)", "len", "S", "if N == 1:\n return\n ", "N == 1", "N", "1", "return", "for n in range(1, N):\n S1 = ''.join(S[:n])\n r = 2**(N-n-1)\n \n for i in range(r):\n \tSlist.append(int(S1))\n \n split_list(S[n:])\n \n ", "n", "range(1, N)", "range", "1", "N", "S1 = ''.join(S[:n])", "S1", "''.join(S[:n])", "''.join", "''", "join", "S[:n]", "S", ":n", "n", "r = 2**(N-n-1)", "r", "2**(N-n-1)", "2", "N-n-1", "N-n", "N", "n", "1", "for i in range(r):\n \tSlist.append(int(S1))\n \n ", "i", "range(r)", "range", "r", "Slist.append(int(S1))", "Slist.append", "Slist", "append", "int(S1)", "int", "S1", "split_list(S[n:])", "split_list", "S[n:]", "S", "n:", "n", "S", "S", "split_list(S)", "split_list", "S", "ans = sum(Slist)", "ans", "sum(Slist)", "sum", "Slist", "print(ans)", "print", "ans", "S = list(input())", "list(input())", "S", "def split_list(S):\n Slist.append(int(''.join(S)))\n N = len(S)\n if N == 1:\n return\n for n in range(1, N):\n S1 = ''.join(S[:n])\n r = 2**(N-n-1)\n \n for i in range(r):\n \tSlist.append(int(S1))\n \n split_list(S[n:])\n \n ", "def split_list(S):\n Slist.append(int(''.join(S)))\n N = len(S)\n if N == 1:\n return\n for n in range(1, N):\n S1 = ''.join(S[:n])\n r = 2**(N-n-1)\n \n for i in range(r):\n \tSlist.append(int(S1))\n \n split_list(S[n:])\n \n ", "split_list", "ans = sum(Slist)", "sum(Slist)", "ans", "Slist = list()", "list()", "Slist" ]
S = list(input()) Slist = list() def split_list(S): Slist.append(int(''.join(S))) N = len(S) if N == 1: return for n in range(1, N): S1 = ''.join(S[:n]) r = 2**(N-n-1) for i in range(r): Slist.append(int(S1)) split_list(S[n:]) split_list(S) ans = sum(Slist) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 17, 2, 4, 13, 13, 17, 28, 13, 4, 13, 2, 2, 4, 13, 13, 13, 17, 0, 13, 8, 2, 2, 13, 17, 2, 2, 13, 13, 4, 13, 13, 17, 17, 0, 13, 2, 17, 8, 2, 2, 2, 4, 13, 13, 13, 13, 17, 17, 2, 2, 4, 13, 13, 13, 13, 0, 13, 2, 13, 4, 13, 18, 13, 39, 13, 2, 13, 13, 4, 13, 13, 10, 2, 13, 10, 8, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13 ]
[ [ 90, 2 ], [ 93, 6 ], [ 10, 9 ], [ 91, 16 ], [ 20, 19 ], [ 91, 26 ], [ 9, 27 ], [ 87, 30 ], [ 19, 34 ], [ 19, 38 ], [ 9, 39 ], [ 91, 42 ], [ 84, 46 ], [ 91, 55 ], [ 9, 56 ], [ 88, 57 ], [ 91, 64 ], [ 9, 65 ], [ 88, 66 ], [ 96, 68 ], [ 85, 70 ], [ 91, 74 ], [ 19, 78 ], [ 9, 79 ], [ 97, 82 ], [ 94, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ] ]
[ "S = input()\nrt = 0\nfor l in range(1,len(S)+1):\n for i in range(len(S)-l+1):\n tmp = 1 if i == 0 or i+l==len(S) else 2\n tw = 2**(0 if len(S)-l-tmp<0 else len(S)-l-tmp)\n rt+=tw*int(S[i:i+l])\n\nprint(rt)", "S = input()", "S", "input()", "input", "rt = 0", "rt", "0", "for l in range(1,len(S)+1):\n for i in range(len(S)-l+1):\n tmp = 1 if i == 0 or i+l==len(S) else 2\n tw = 2**(0 if len(S)-l-tmp<0 else len(S)-l-tmp)\n rt+=tw*int(S[i:i+l])", "l", "range(1,len(S)+1)", "range", "1", "len(S)+1", "len(S)", "len", "S", "1", "for i in range(len(S)-l+1):\n tmp = 1 if i == 0 or i+l==len(S) else 2\n tw = 2**(0 if len(S)-l-tmp<0 else len(S)-l-tmp)\n rt+=tw*int(S[i:i+l])", "i", "range(len(S)-l+1)", "range", "len(S)-l+1", "len(S)-l", "len(S)", "len", "S", "l", "1", "tmp = 1 if i == 0 or i+l==len(S) else 2", "tmp", "1 if i == 0 or i+l==len(S) else 2", "i == 0 or i+l==len(S)", "i == 0", "i", "0", "i+l==len(S)", "i+l", "i", "l", "len(S)", "len", "S", "1", "2", "tw = 2**(0 if len(S)-l-tmp<0 else len(S)-l-tmp)", "tw", "2**(0 if len(S)-l-tmp<0 else len(S)-l-tmp)", "2", "0 if len(S)-l-tmp<0 else len(S)-l-tmp", "len(S)-l-tmp<0", "len(S)-l-tmp", "len(S)-l", "len(S)", "len", "S", "l", "tmp", "0", "0", "len(S)-l-tmp", "len(S)-l", "len(S)", "len", "S", "l", "tmp", "rt+=tw*int(S[i:i+l])", "rt", "tw*int(S[i:i+l])", "tw", "int(S[i:i+l])", "int", "S[i:i+l]", "S", "i:i+l", "i", "i+l", "i", "l", "print(rt)", "print", "rt", "tw = 2**(0 if len(S)-l-tmp<0 else len(S)-l-tmp)", "2**(0 if len(S)-l-tmp<0 else len(S)-l-tmp)", "tw", "tmp = 1 if i == 0 or i+l==len(S) else 2", "1 if i == 0 or i+l==len(S) else 2", "tmp", "S = input()", "input()", "S", "rt = 0", "0", "rt", "rt+=tw*int(S[i:i+l])", "tw*int(S[i:i+l])", "rt" ]
S = input() rt = 0 for l in range(1,len(S)+1): for i in range(len(S)-l+1): tmp = 1 if i == 0 or i+l==len(S) else 2 tw = 2**(0 if len(S)-l-tmp<0 else len(S)-l-tmp) rt+=tw*int(S[i:i+l]) print(rt)
[ 7, 0, 13, 4, 13, 12, 13, 14, 2, 13, 2, 4, 13, 13, 17, 29, 2, 13, 4, 13, 13, 29, 2, 4, 13, 2, 13, 17, 18, 13, 2, 13, 17, 2, 4, 13, 13, 13, 4, 13, 2, 13, 17, 2, 13, 18, 13, 2, 13, 17, 13, 23, 13, 23, 13, 23, 13, 4, 13, 4, 13, 17, 18, 13, 17, 17, 10, 4, 13, 10, 12, 13 ]
[ [ 67, 2 ], [ 52, 9 ], [ 68, 13 ], [ 56, 17 ], [ 54, 20 ], [ 52, 26 ], [ 68, 29 ], [ 52, 31 ], [ 54, 36 ], [ 56, 37 ], [ 52, 41 ], [ 54, 44 ], [ 68, 46 ], [ 52, 48 ], [ 56, 50 ], [ 52, 52 ], [ 54, 54 ], [ 56, 56 ], [ 71, 60 ], [ 68, 63 ], [ 67, 68 ] ]
[ "s = input()\n\ndef solve(i,psum,tmp):\n if i==len(s)-1:\n return tmp+int(psum) \n return solve(i+1,s[i+1],int(psum)+tmp) + solve(i+1,psum+s[i+1],tmp)\n\nprint(solve(0,s[0],0))", "s = input()", "s", "input()", "input", "def solve(i,psum,tmp):\n if i==len(s)-1:\n return tmp+int(psum) \n return solve(i+1,s[i+1],int(psum)+tmp) + solve(i+1,psum+s[i+1],tmp)", "solve", "if i==len(s)-1:\n return tmp+int(psum) \n ", "i==len(s)-1", "i", "len(s)-1", "len(s)", "len", "s", "1", "return tmp+int(psum)", "tmp+int(psum)", "tmp", "int(psum)", "int", "psum", "return solve(i+1,s[i+1],int(psum)+tmp) + solve(i+1,psum+s[i+1],tmp)", "solve(i+1,s[i+1],int(psum)+tmp) + solve(i+1,psum+s[i+1],tmp)", "solve(i+1,s[i+1],int(psum)+tmp)", "solve", "i+1", "i", "1", "s[i+1]", "s", "i+1", "i", "1", "int(psum)+tmp", "int(psum)", "int", "psum", "tmp", "solve(i+1,psum+s[i+1],tmp)", "solve", "i+1", "i", "1", "psum+s[i+1]", "psum", "s[i+1]", "s", "i+1", "i", "1", "tmp", "i", "i", "psum", "psum", "tmp", "tmp", "print(solve(0,s[0],0))", "print", "solve(0,s[0],0)", "solve", "0", "s[0]", "s", "0", "0", "s = input()", "input()", "s", "def solve(i,psum,tmp):\n if i==len(s)-1:\n return tmp+int(psum) \n return solve(i+1,s[i+1],int(psum)+tmp) + solve(i+1,psum+s[i+1],tmp)", "def solve(i,psum,tmp):\n if i==len(s)-1:\n return tmp+int(psum) \n return solve(i+1,s[i+1],int(psum)+tmp) + solve(i+1,psum+s[i+1],tmp)", "solve" ]
s = input() def solve(i,psum,tmp): if i==len(s)-1: return tmp+int(psum) return solve(i+1,s[i+1],int(psum)+tmp) + solve(i+1,psum+s[i+1],tmp) print(solve(0,s[0],0))
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 39, 28, 13, 4, 13, 13, 4, 18, 13, 13, 18, 13, 13, 14, 2, 2, 13, 13, 17, 0, 13, 4, 13, 4, 18, 17, 13, 13, 0, 13, 13, 0, 13, 39, 14, 40, 13, 39, 0, 13, 4, 13, 4, 18, 17, 13, 13, 0, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 39, 13, 10, 4, 13, 10, 13, 13, 10, 4, 13, 10, 39, 13, 10, 4, 13, 10, 13, 13 ]
[ [ 93, 2 ], [ 78, 6 ], [ 94, 9 ], [ 81, 11 ], [ 15, 14 ], [ 79, 20 ], [ 84, 23 ], [ 27, 26 ], [ 79, 29 ], [ 85, 32 ], [ 97, 32 ], [ 94, 35 ], [ 26, 36 ], [ 14, 40 ], [ 26, 41 ], [ 99, 44 ], [ 85, 51 ], [ 97, 51 ], [ 102, 53 ], [ 100, 54 ], [ 88, 54 ], [ 96, 56 ], [ 97, 60 ], [ 85, 60 ], [ 87, 63 ], [ 97, 70 ], [ 85, 70 ], [ 90, 72 ], [ 88, 73 ], [ 100, 73 ], [ 91, 76 ], [ 103, 76 ], [ 82, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 88, 90 ], [ 100, 90 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 100, 102 ], [ 88, 102 ], [ 102, 103 ] ]
[ "s = input()\nn = len(s)\nans = 0\nfor i in range(2**(n-1)):\n x = []\n for j in range(n):\n x.append(s[j])\n if (i>>j) & 1:\n y = int(\"\".join(x))\n ans += y\n x = []\n else:\n pass\n if x != []:\n y = int(\"\".join(x))\n ans += y\nprint(ans)", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "ans = 0", "ans", "0", "for i in range(2**(n-1)):\n x = []\n for j in range(n):\n x.append(s[j])\n if (i>>j) & 1:\n y = int(\"\".join(x))\n ans += y\n x = []\n else:\n pass\n if x != []:\n y = int(\"\".join(x))\n ans += y", "i", "range(2**(n-1))", "range", "2**(n-1)", "2", "n-1", "n", "1", "x = []", "x", "[]", "for j in range(n):\n x.append(s[j])\n if (i>>j) & 1:\n y = int(\"\".join(x))\n ans += y\n x = []\n else:\n pass\n ", "j", "range(n)", "range", "n", "x.append(s[j])", "x.append", "x", "append", "s[j]", "s", "j", "if (i>>j) & 1:\n y = int(\"\".join(x))\n ans += y\n x = []\n else:\n pass\n ", "(i>>j) & 1", "i>>j", "i", "j", "1", "y = int(\"\".join(x))", "y", "int(\"\".join(x))", "int", "\"\".join(x)", "\"\".join", "\"\"", "join", "x", "ans += y", "ans", "y", "x = []", "x", "[]", "if x != []:\n y = int(\"\".join(x))\n ans += y", "x != []", "x", "[]", "y = int(\"\".join(x))", "y", "int(\"\".join(x))", "int", "\"\".join(x)", "\"\".join", "\"\"", "join", "x", "ans += y", "ans", "y", "print(ans)", "print", "ans", "n = len(s)", "len(s)", "n", "ans = 0", "0", "ans", "x = []", "[]", "x", "y = int(\"\".join(x))", "int(\"\".join(x))", "y", "ans += y", "y", "ans", "s = input()", "input()", "s", "x = []", "[]", "x", "y = int(\"\".join(x))", "int(\"\".join(x))", "y", "ans += y", "y", "ans" ]
s = input() n = len(s) ans = 0 for i in range(2**(n-1)): x = [] for j in range(n): x.append(s[j]) if (i>>j) & 1: y = int("".join(x)) ans += y x = [] else: pass if x != []: y = int("".join(x)) ans += y print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 2, 13, 10, 4, 13 ]
[ [ 76, 2 ], [ 73, 6 ], [ 77, 10 ], [ 70, 13 ], [ 17, 16 ], [ 74, 21 ], [ 64, 23 ], [ 27, 26 ], [ 74, 29 ], [ 16, 33 ], [ 26, 34 ], [ 67, 37 ], [ 77, 41 ], [ 26, 45 ], [ 79, 48 ], [ 26, 50 ], [ 82, 53 ], [ 77, 57 ], [ 83, 62 ], [ 68, 62 ], [ 71, 62 ], [ 64, 65 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ] ]
[ "S = input()\nN = len(S)-1\nres = 0\n\nfor i in range(2 ** N):\n pw = 0\n for j in range(N):\n if ((i >> j) & 1):\n res += int(S[pw:j+1])\n pw = j+1\n res += int(S[pw:])\n \nprint(res)", "S = input()", "S", "input()", "input", "N = len(S)-1", "N", "len(S)-1", "len(S)", "len", "S", "1", "res = 0", "res", "0", "for i in range(2 ** N):\n pw = 0\n for j in range(N):\n if ((i >> j) & 1):\n res += int(S[pw:j+1])\n pw = j+1\n res += int(S[pw:])\n ", "i", "range(2 ** N)", "range", "2 ** N", "2", "N", "pw = 0", "pw", "0", "for j in range(N):\n if ((i >> j) & 1):\n res += int(S[pw:j+1])\n pw = j+1\n ", "j", "range(N)", "range", "N", "if ((i >> j) & 1):\n res += int(S[pw:j+1])\n pw = j+1\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "res += int(S[pw:j+1])", "res", "int(S[pw:j+1])", "int", "S[pw:j+1]", "S", "pw:j+1", "pw", "j+1", "j", "1", "pw = j+1", "pw", "j+1", "j", "1", "res += int(S[pw:])", "res", "int(S[pw:])", "int", "S[pw:]", "S", "pw:", "pw", "print(res)", "print", "res", "pw = 0", "0", "pw", "res += int(S[pw:j+1])", "int(S[pw:j+1])", "res", "res = 0", "0", "res", "N = len(S)-1", "len(S)-1", "N", "S = input()", "input()", "S", "pw = j+1", "j+1", "pw", "res += int(S[pw:])", "int(S[pw:])", "res" ]
S = input() N = len(S)-1 res = 0 for i in range(2 ** N): pw = 0 for j in range(N): if ((i >> j) & 1): res += int(S[pw:j+1]) pw = j+1 res += int(S[pw:]) print(res)
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 2, 39, 17, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 2, 13, 13, 17, 0, 18, 13, 13, 17, 28, 13, 4, 13, 4, 13, 13, 0, 13, 2, 18, 13, 13, 18, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13 ]
[ [ 81, 2 ], [ 75, 6 ], [ 10, 9 ], [ 82, 17 ], [ 87, 20 ], [ 82, 26 ], [ 78, 28 ], [ 32, 31 ], [ 82, 37 ], [ 9, 42 ], [ 31, 43 ], [ 49, 46 ], [ 88, 47 ], [ 31, 48 ], [ 52, 51 ], [ 82, 56 ], [ 90, 58 ], [ 82, 61 ], [ 51, 62 ], [ 88, 64 ], [ 51, 65 ], [ 84, 67 ], [ 91, 70 ], [ 79, 70 ], [ 85, 73 ], [ 76, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ] ]
[ "s = input()\nans = 0\nfor i in range(2**(len(s)-1)):\n plus = [\"\"]*(len(s))\n fomula = \"\"\n for j in range(len(s)-1):\n if(i >> j & 1):\n plus[j] = \"+\"\n for k in range(len(s)):\n fomula += s[k] + plus[k]\n ans += eval(fomula)\nprint(ans)", "s = input()", "s", "input()", "input", "ans = 0", "ans", "0", "for i in range(2**(len(s)-1)):\n plus = [\"\"]*(len(s))\n fomula = \"\"\n for j in range(len(s)-1):\n if(i >> j & 1):\n plus[j] = \"+\"\n for k in range(len(s)):\n fomula += s[k] + plus[k]\n ans += eval(fomula)", "i", "range(2**(len(s)-1))", "range", "2**(len(s)-1)", "2", "len(s)-1", "len(s)", "len", "s", "1", "plus = [\"\"]*(len(s))", "plus", "[\"\"]*(len(s))", "[\"\"]", "\"\"", "len(s)", "len", "s", "fomula = \"\"", "fomula", "\"\"", "for j in range(len(s)-1):\n if(i >> j & 1):\n plus[j] = \"+\"\n ", "j", "range(len(s)-1)", "range", "len(s)-1", "len(s)", "len", "s", "1", "if(i >> j & 1):\n plus[j] = \"+\"\n ", "i >> j & 1", "i >> j", "i", "j", "1", "plus[j] = \"+\"", "plus[j]", "plus", "j", "\"+\"", "for k in range(len(s)):\n fomula += s[k] + plus[k]\n ", "k", "range(len(s))", "range", "len(s)", "len", "s", "fomula += s[k] + plus[k]", "fomula", "s[k] + plus[k]", "s[k]", "s", "k", "plus[k]", "plus", "k", "ans += eval(fomula)", "ans", "eval(fomula)", "eval", "fomula", "print(ans)", "print", "ans", "ans = 0", "0", "ans", "fomula = \"\"", "\"\"", "fomula", "s = input()", "input()", "s", "ans += eval(fomula)", "eval(fomula)", "ans", "plus = [\"\"]*(len(s))", "[\"\"]*(len(s))", "plus", "fomula += s[k] + plus[k]", "s[k] + plus[k]", "fomula" ]
s = input() ans = 0 for i in range(2**(len(s)-1)): plus = [""]*(len(s)) fomula = "" for j in range(len(s)-1): if(i >> j & 1): plus[j] = "+" for k in range(len(s)): fomula += s[k] + plus[k] ans += eval(fomula) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 0, 13, 2, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 17, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 13, 0, 13, 13, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 13, 13, 10, 13, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 95, 2 ], [ 74, 6 ], [ 96, 9 ], [ 83, 11 ], [ 77, 14 ], [ 75, 16 ], [ 20, 19 ], [ 78, 24 ], [ 98, 26 ], [ 104, 29 ], [ 96, 32 ], [ 80, 34 ], [ 38, 37 ], [ 78, 40 ], [ 19, 44 ], [ 37, 45 ], [ 101, 48 ], [ 105, 50 ], [ 90, 50 ], [ 81, 51 ], [ 108, 51 ], [ 72, 51 ], [ 89, 53 ], [ 81, 54 ], [ 108, 54 ], [ 72, 54 ], [ 71, 56 ], [ 107, 59 ], [ 86, 62 ], [ 90, 63 ], [ 105, 63 ], [ 92, 65 ], [ 102, 66 ], [ 99, 66 ], [ 93, 69 ], [ 87, 69 ], [ 84, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 90, 86 ], [ 105, 86 ], [ 86, 87 ], [ 81, 89 ], [ 108, 89 ], [ 72, 89 ], [ 89, 90 ], [ 102, 92 ], [ 99, 92 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ] ]
[ "s = input()\nn = len(s)\n\nans = 0\nbit_n = n-1\nfor i in range(2**bit_n):\n tmp = 0\n res = int(s)\n mod = 10\n for j in range(bit_n):\n if ((i>>j)&1):\n tmp+=res%mod\n res//=mod\n mod=10\n else:\n mod*=10\n ans+=res\n ans+=tmp\nprint(ans)", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "ans = 0", "ans", "0", "bit_n = n-1", "bit_n", "n-1", "n", "1", "for i in range(2**bit_n):\n tmp = 0\n res = int(s)\n mod = 10\n for j in range(bit_n):\n if ((i>>j)&1):\n tmp+=res%mod\n res//=mod\n mod=10\n else:\n mod*=10\n ans+=res\n ans+=tmp", "i", "range(2**bit_n)", "range", "2**bit_n", "2", "bit_n", "tmp = 0", "tmp", "0", "res = int(s)", "res", "int(s)", "int", "s", "mod = 10", "mod", "10", "for j in range(bit_n):\n if ((i>>j)&1):\n tmp+=res%mod\n res//=mod\n mod=10\n else:\n mod*=10\n ", "j", "range(bit_n)", "range", "bit_n", "if ((i>>j)&1):\n tmp+=res%mod\n res//=mod\n mod=10\n else:\n mod*=10\n ", "(i>>j)&1", "i>>j", "i", "j", "1", "tmp+=res%mod", "tmp", "res%mod", "res", "mod", "res//=mod", "res", "mod", "mod=10", "mod", "10", "mod*=10", "mod", "10", "ans+=res", "ans", "res", "ans+=tmp", "ans", "tmp", "print(ans)", "print", "ans", "mod=10", "10", "mod", "n = len(s)", "len(s)", "n", "bit_n = n-1", "n-1", "bit_n", "mod = 10", "10", "mod", "ans = 0", "0", "ans", "ans+=res", "res", "ans", "res//=mod", "mod", "res", "ans+=tmp", "tmp", "ans", "s = input()", "input()", "s", "tmp = 0", "0", "tmp", "tmp+=res%mod", "res%mod", "tmp", "res = int(s)", "int(s)", "res", "mod*=10", "10", "mod" ]
s = input() n = len(s) ans = 0 bit_n = n-1 for i in range(2**bit_n): tmp = 0 res = int(s) mod = 10 for j in range(bit_n): if ((i>>j)&1): tmp+=res%mod res//=mod mod=10 else: mod*=10 ans+=res ans+=tmp print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 2, 17, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 18, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 13, 2, 17, 13, 0, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 18, 13, 10, 18, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 69, 2 ], [ 81, 6 ], [ 70, 9 ], [ 84, 11 ], [ 82, 15 ], [ 87, 18 ], [ 22, 21 ], [ 85, 24 ], [ 75, 26 ], [ 70, 28 ], [ 32, 31 ], [ 82, 35 ], [ 21, 39 ], [ 31, 42 ], [ 78, 44 ], [ 72, 47 ], [ 70, 49 ], [ 31, 51 ], [ 90, 54 ], [ 73, 62 ], [ 79, 62 ], [ 76, 62 ], [ 91, 67 ], [ 88, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ] ]
[ "S = input()\n\nn = len(S)\nSlen = 2**(n-1)\nans = 0\n\nfor i in range(Slen):\n Slis = S[0]\n for j in range(n-1):\n if i &(1 << j):\n Slis += \"+\"\n Slis += S[j+1]\n ans += sum(map(int,Slis.split(\"+\")))\n\nprint(ans)", "S = input()", "S", "input()", "input", "n = len(S)", "n", "len(S)", "len", "S", "Slen = 2**(n-1)", "Slen", "2**(n-1)", "2", "n-1", "n", "1", "ans = 0", "ans", "0", "for i in range(Slen):\n Slis = S[0]\n for j in range(n-1):\n if i &(1 << j):\n Slis += \"+\"\n Slis += S[j+1]\n ans += sum(map(int,Slis.split(\"+\")))", "i", "range(Slen)", "range", "Slen", "Slis = S[0]", "Slis", "S[0]", "S", "0", "for j in range(n-1):\n if i &(1 << j):\n Slis += \"+\"\n Slis += S[j+1]\n ", "j", "range(n-1)", "range", "n-1", "n", "1", "if i &(1 << j):\n Slis += \"+\"\n ", "i &(1 << j)", "i", "1 << j", "1", "j", "Slis += \"+\"", "Slis", "\"+\"", "Slis += S[j+1]", "Slis", "S[j+1]", "S", "j+1", "j", "1", "ans += sum(map(int,Slis.split(\"+\")))", "ans", "sum(map(int,Slis.split(\"+\")))", "sum", "map(int,Slis.split(\"+\"))", "map", "int", "Slis.split(\"+\")", "Slis.split", "Slis", "split", "\"+\"", "print(ans)", "print", "ans", "S = input()", "input()", "S", "Slis += S[j+1]", "S[j+1]", "Slis", "Slis = S[0]", "S[0]", "Slis", "Slis += \"+\"", "\"+\"", "Slis", "n = len(S)", "len(S)", "n", "Slen = 2**(n-1)", "2**(n-1)", "Slen", "ans = 0", "0", "ans", "ans += sum(map(int,Slis.split(\"+\")))", "sum(map(int,Slis.split(\"+\")))", "ans" ]
S = input() n = len(S) Slen = 2**(n-1) ans = 0 for i in range(Slen): Slis = S[0] for j in range(n-1): if i &(1 << j): Slis += "+" Slis += S[j+1] ans += sum(map(int,Slis.split("+"))) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 17, 0, 13, 39, 28, 13, 4, 13, 17, 2, 4, 13, 13, 17, 14, 2, 40, 13, 4, 13, 13, 2, 2, 2, 13, 2, 13, 17, 17, 17, 4, 18, 13, 13, 4, 13, 18, 13, 39, 13, 13, 0, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 39, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 89, 2 ], [ 80, 6 ], [ 10, 9 ], [ 90, 17 ], [ 77, 20 ], [ 74, 23 ], [ 27, 26 ], [ 90, 33 ], [ 26, 38 ], [ 90, 41 ], [ 9, 45 ], [ 26, 47 ], [ 75, 53 ], [ 90, 58 ], [ 83, 63 ], [ 26, 64 ], [ 86, 66 ], [ 75, 69 ], [ 87, 72 ], [ 81, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 26, 83 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ] ]
[ "s = input()\nans = 0\nfor bit in range(2 ** (len(s) - 1)):\n i = 0\n tmp = []\n for j in range(1, len(s) + 1):\n if j != len(s) and bit >> (j - 1) & 1 == 0: continue\n tmp.append(int(s[i:j]))\n i = j\n ans += sum(tmp)\nprint(ans)", "s = input()", "s", "input()", "input", "ans = 0", "ans", "0", "for bit in range(2 ** (len(s) - 1)):\n i = 0\n tmp = []\n for j in range(1, len(s) + 1):\n if j != len(s) and bit >> (j - 1) & 1 == 0: continue\n tmp.append(int(s[i:j]))\n i = j\n ans += sum(tmp)", "bit", "range(2 ** (len(s) - 1))", "range", "2 ** (len(s) - 1)", "2", "len(s) - 1", "len(s)", "len", "s", "1", "i = 0", "i", "0", "tmp = []", "tmp", "[]", "for j in range(1, len(s) + 1):\n if j != len(s) and bit >> (j - 1) & 1 == 0: continue\n tmp.append(int(s[i:j]))\n i = j\n ", "j", "range(1, len(s) + 1)", "range", "1", "len(s) + 1", "len(s)", "len", "s", "1", "if j != len(s) and bit >> (j - 1) & 1 == 0: continue\n ", "j != len(s) and bit >> (j - 1) & 1 == 0", "j != len(s)", "j", "len(s)", "len", "s", "bit >> (j - 1) & 1 == 0", "bit >> (j - 1) & 1", "bit >> (j - 1)", "bit", "j - 1", "j", "1", "1", "0", "tmp.append(int(s[i:j]))", "tmp.append", "tmp", "append", "int(s[i:j])", "int", "s[i:j]", "s", "i:j", "i", "j", "i = j", "i", "j", "ans += sum(tmp)", "ans", "sum(tmp)", "sum", "tmp", "print(ans)", "print", "ans", "tmp = []", "[]", "tmp", "i = 0", "0", "i", "ans = 0", "0", "ans", "i = j", "j", "i", "ans += sum(tmp)", "sum(tmp)", "ans", "s = input()", "input()", "s" ]
s = input() ans = 0 for bit in range(2 ** (len(s) - 1)): i = 0 tmp = [] for j in range(1, len(s) + 1): if j != len(s) and bit >> (j - 1) & 1 == 0: continue tmp.append(int(s[i:j])) i = j ans += sum(tmp) print(ans)
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 39, 12, 13, 14, 2, 13, 2, 4, 13, 13, 17, 4, 18, 13, 13, 4, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 29, 4, 13, 2, 13, 17, 2, 2, 13, 17, 18, 13, 2, 13, 17, 4, 13, 2, 13, 17, 2, 13, 18, 13, 2, 13, 17, 23, 13, 23, 13, 4, 13, 17, 18, 13, 17, 4, 13, 4, 13, 13, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 11, 10 ], [ 66, 16 ], [ 4, 20 ], [ 10, 24 ], [ 68, 35 ], [ 66, 42 ], [ 68, 46 ], [ 4, 49 ], [ 66, 51 ], [ 66, 56 ], [ 68, 59 ], [ 4, 61 ], [ 66, 63 ], [ 66, 66 ], [ 68, 68 ], [ 13, 70 ], [ 4, 73 ], [ 10, 79 ], [ 84, 81 ] ]
[ "def abc061_c():\n s = str(input())\n\n l = []\n def saiki(i,moji):\n if i == len(s)-1:\n #print(moji)\n l.append(sum(list(map(int,moji.split(\"+\")))))\n return\n\n #いれる\n saiki(i+1,moji+\"+\"+s[i+1])\n #いれない\n saiki(i+1,moji+s[i+1])\n\n saiki(0,s[0])\n\n print(sum(l))\n\n\nabc061_c()", "def abc061_c():\n s = str(input())\n\n l = []\n def saiki(i,moji):\n if i == len(s)-1:\n #print(moji)\n l.append(sum(list(map(int,moji.split(\"+\")))))\n return\n\n #いれる\n saiki(i+1,moji+\"+\"+s[i+1])\n #いれない\n saiki(i+1,moji+s[i+1])\n\n saiki(0,s[0])\n\n print(sum(l))", "abc061_c", "s = str(input())", "s", "str(input())", "str", "input()", "input", "l = []", "l", "[]", "def saiki(i,moji):\n if i == len(s)-1:\n #print(moji)\n l.append(sum(list(map(int,moji.split(\"+\")))))\n return\n\n #いれる\n saiki(i+1,moji+\"+\"+s[i+1])\n #いれない\n saiki(i+1,moji+s[i+1])\n\n ", "saiki", "if i == len(s)-1:\n #print(moji)\n l.append(sum(list(map(int,moji.split(\"+\")))))\n return\n\n #いれる\n ", "i == len(s)-1", "i", "len(s)-1", "len(s)", "len", "s", "1", "l.append(sum(list(map(int,moji.split(\"+\")))))", "l.append", "l", "append", "sum(list(map(int,moji.split(\"+\"))))", "sum", "list(map(int,moji.split(\"+\")))", "list", "map(int,moji.split(\"+\"))", "map", "int", "moji.split(\"+\")", "moji.split", "moji", "split", "\"+\"", "return", "saiki(i+1,moji+\"+\"+s[i+1])", "saiki", "i+1", "i", "1", "moji+\"+\"+s[i+1]", "moji+\"+\"", "moji", "\"+\"", "s[i+1]", "s", "i+1", "i", "1", "saiki(i+1,moji+s[i+1])", "saiki", "i+1", "i", "1", "moji+s[i+1]", "moji", "s[i+1]", "s", "i+1", "i", "1", "i", "i", "moji", "moji", "saiki(0,s[0])", "saiki", "0", "s[0]", "s", "0", "print(sum(l))", "print", "sum(l)", "sum", "l", "abc061_c()", "abc061_c", "def abc061_c():\n s = str(input())\n\n l = []\n def saiki(i,moji):\n if i == len(s)-1:\n #print(moji)\n l.append(sum(list(map(int,moji.split(\"+\")))))\n return\n\n #いれる\n saiki(i+1,moji+\"+\"+s[i+1])\n #いれない\n saiki(i+1,moji+s[i+1])\n\n saiki(0,s[0])\n\n print(sum(l))", "def abc061_c():\n s = str(input())\n\n l = []\n def saiki(i,moji):\n if i == len(s)-1:\n #print(moji)\n l.append(sum(list(map(int,moji.split(\"+\")))))\n return\n\n #いれる\n saiki(i+1,moji+\"+\"+s[i+1])\n #いれない\n saiki(i+1,moji+s[i+1])\n\n saiki(0,s[0])\n\n print(sum(l))", "abc061_c" ]
def abc061_c(): s = str(input()) l = [] def saiki(i,moji): if i == len(s)-1: #print(moji) l.append(sum(list(map(int,moji.split("+"))))) return #いれる saiki(i+1,moji+"+"+s[i+1]) #いれない saiki(i+1,moji+s[i+1]) saiki(0,s[0]) print(sum(l)) abc061_c()
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 4, 13, 18, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 2, 13, 2, 17, 13, 17, 0, 13, 2, 2, 13, 17, 4, 13, 18, 13, 2, 13, 17, 0, 13, 13, 0, 13, 4, 13, 18, 13, 2, 13, 17, 0, 13, 2, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 13, 13 ]
[ [ 92, 2 ], [ 95, 6 ], [ 10, 9 ], [ 93, 17 ], [ 98, 20 ], [ 93, 24 ], [ 83, 27 ], [ 31, 30 ], [ 93, 36 ], [ 9, 41 ], [ 30, 44 ], [ 86, 47 ], [ 99, 50 ], [ 81, 50 ], [ 87, 50 ], [ 93, 55 ], [ 30, 57 ], [ 101, 60 ], [ 99, 61 ], [ 81, 61 ], [ 87, 61 ], [ 80, 63 ], [ 93, 67 ], [ 30, 69 ], [ 89, 72 ], [ 81, 74 ], [ 87, 74 ], [ 99, 74 ], [ 102, 75 ], [ 84, 75 ], [ 90, 78 ], [ 96, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 99, 101 ], [ 81, 101 ], [ 87, 101 ], [ 101, 102 ] ]
[ "s=input()\nans=0\nfor i in range(2**(len(s)-1)):\n\ta=int(s[0])\n\tb=0\n\tfor j in range(len(s)-1):\n\t\tif i&(1<<j)==0 :\n\t\t\ta=a*10+int(s[j+1])\n\t\telse:\n\t\t\tb+=a\n\t\t\ta=int(s[j+1])\n\tans+=a+b\nprint(ans)", "s=input()", "s", "input()", "input", "ans=0", "ans", "0", "for i in range(2**(len(s)-1)):\n\ta=int(s[0])\n\tb=0\n\tfor j in range(len(s)-1):\n\t\tif i&(1<<j)==0 :\n\t\t\ta=a*10+int(s[j+1])\n\t\telse:\n\t\t\tb+=a\n\t\t\ta=int(s[j+1])\n\tans+=a+b", "i", "range(2**(len(s)-1))", "range", "2**(len(s)-1)", "2", "len(s)-1", "len(s)", "len", "s", "1", "a=int(s[0])", "a", "int(s[0])", "int", "s[0]", "s", "0", "b=0", "b", "0", "for j in range(len(s)-1):\n\t\tif i&(1<<j)==0 :\n\t\t\ta=a*10+int(s[j+1])\n\t\telse:\n\t\t\tb+=a\n\t\t\ta=int(s[j+1])\n\t", "j", "range(len(s)-1)", "range", "len(s)-1", "len(s)", "len", "s", "1", "if i&(1<<j)==0 :\n\t\t\ta=a*10+int(s[j+1])\n\t\telse:\n\t\t\tb+=a\n\t\t\ta=int(s[j+1])\n\t", "i&(1<<j)==0", "i&(1<<j)", "i", "1<<j", "1", "j", "0", "a=a*10+int(s[j+1])", "a", "a*10+int(s[j+1])", "a*10", "a", "10", "int(s[j+1])", "int", "s[j+1]", "s", "j+1", "j", "1", "b+=a", "b", "a", "a=int(s[j+1])", "a", "int(s[j+1])", "int", "s[j+1]", "s", "j+1", "j", "1", "ans+=a+b", "ans", "a+b", "a", "b", "print(ans)", "print", "ans", "a=int(s[j+1])", "int(s[j+1])", "a", "b=0", "0", "b", "a=a*10+int(s[j+1])", "a*10+int(s[j+1])", "a", "ans+=a+b", "a+b", "ans", "s=input()", "input()", "s", "ans=0", "0", "ans", "a=int(s[0])", "int(s[0])", "a", "b+=a", "a", "b" ]
s=input() ans=0 for i in range(2**(len(s)-1)): a=int(s[0]) b=0 for j in range(len(s)-1): if i&(1<<j)==0 : a=a*10+int(s[j+1]) else: b+=a a=int(s[j+1]) ans+=a+b print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 12, 13, 14, 2, 13, 2, 13, 17, 29, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 17, 13, 13, 18, 13, 2, 13, 17, 0, 13, 4, 18, 17, 13, 13, 18, 13, 2, 13, 17, 29, 2, 4, 13, 2, 13, 17, 13, 4, 13, 2, 13, 17, 13, 23, 13, 23, 13, 4, 13, 4, 13, 17, 18, 13, 17, 10, 4, 13, 10, 4, 13, 10, 12, 13 ]
[ [ 80, 2 ], [ 83, 6 ], [ 81, 9 ], [ 68, 14 ], [ 84, 16 ], [ 70, 26 ], [ 31, 30 ], [ 70, 35 ], [ 81, 37 ], [ 68, 39 ], [ 43, 42 ], [ 70, 47 ], [ 81, 49 ], [ 68, 51 ], [ 68, 58 ], [ 30, 60 ], [ 68, 64 ], [ 42, 66 ], [ 68, 68 ], [ 70, 70 ], [ 87, 74 ], [ 81, 77 ], [ 80, 81 ], [ 83, 84 ] ]
[ "s = input()\nn = len(s)\ndef rec(op_index, part_s):\n if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n part_s1 = '{}{}'.format(part_s, s[op_index+1])\n part_s2 = '{}+{}'.format(part_s, s[op_index+1])\n return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)\n \nprint(rec(0, s[0]))", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "def rec(op_index, part_s):\n if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n part_s1 = '{}{}'.format(part_s, s[op_index+1])\n part_s2 = '{}+{}'.format(part_s, s[op_index+1])\n return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)\n ", "rec", "if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n ", "op_index == n - 1", "op_index", "n - 1", "n", "1", "return sum(map(int, part_s.split('+')))", "sum(map(int, part_s.split('+')))", "sum", "map(int, part_s.split('+'))", "map", "int", "part_s.split('+')", "part_s.split", "part_s", "split", "'+'", "part_s1 = '{}{}'.format(part_s, s[op_index+1])", "part_s1", "'{}{}'.format(part_s, s[op_index+1])", "'{}{}'.format", "'{}{}'", "format", "part_s", "s[op_index+1]", "s", "op_index+1", "op_index", "1", "part_s2 = '{}+{}'.format(part_s, s[op_index+1])", "part_s2", "'{}+{}'.format(part_s, s[op_index+1])", "'{}+{}'.format", "'{}+{}'", "format", "part_s", "s[op_index+1]", "s", "op_index+1", "op_index", "1", "return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)", "rec(op_index+1, part_s1) + rec(op_index+1, part_s2)", "rec(op_index+1, part_s1)", "rec", "op_index+1", "op_index", "1", "part_s1", "rec(op_index+1, part_s2)", "rec", "op_index+1", "op_index", "1", "part_s2", "op_index", "op_index", "part_s", "part_s", "print(rec(0, s[0]))", "print", "rec(0, s[0])", "rec", "0", "s[0]", "s", "0", "s = input()", "input()", "s", "n = len(s)", "len(s)", "n", "def rec(op_index, part_s):\n if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n part_s1 = '{}{}'.format(part_s, s[op_index+1])\n part_s2 = '{}+{}'.format(part_s, s[op_index+1])\n return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)\n ", "def rec(op_index, part_s):\n if op_index == n - 1:\n return sum(map(int, part_s.split('+')))\n part_s1 = '{}{}'.format(part_s, s[op_index+1])\n part_s2 = '{}+{}'.format(part_s, s[op_index+1])\n return rec(op_index+1, part_s1) + rec(op_index+1, part_s2)\n ", "rec" ]
s = input() n = len(s) def rec(op_index, part_s): if op_index == n - 1: return sum(map(int, part_s.split('+'))) part_s1 = '{}{}'.format(part_s, s[op_index+1]) part_s2 = '{}+{}'.format(part_s, s[op_index+1]) return rec(op_index+1, part_s1) + rec(op_index+1, part_s2) print(rec(0, s[0]))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 0, 13, 17, 12, 13, 41, 14, 2, 4, 13, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 18, 13, 39, 13, 29, 28, 13, 4, 13, 13, 4, 18, 13, 13, 13, 4, 13, 13, 4, 18, 13, 13, 23, 13, 4, 13, 39, 4, 13, 13, 10, 17, 13, 10, 12, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 103, 2 ], [ 100, 8 ], [ 104, 12 ], [ 106, 15 ], [ 94, 18 ], [ 86, 27 ], [ 101, 28 ], [ 31, 30 ], [ 34, 33 ], [ 101, 36 ], [ 86, 40 ], [ 33, 41 ], [ 45, 44 ], [ 104, 48 ], [ 33, 52 ], [ 56, 55 ], [ 33, 57 ], [ 61, 60 ], [ 104, 64 ], [ 70, 69 ], [ 95, 72 ], [ 86, 75 ], [ 69, 77 ], [ 86, 80 ], [ 86, 83 ], [ 86, 86 ], [ 98, 88 ], [ 107, 92 ], [ 94, 95 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ] ]
[ "S=str(input())\nl=len(S)-1\nans=0\n\nM = 2#bit探査をしたい時はM=2\ndef dfs(A):\n global ans\n # 終端条件 --- l 重ループまで回したら処理して打ち切り\n if len(A) == l:\n memo=0\n for i in range(l):\n if A[i]==1:\n ans+=int(S[memo:i+1])\n memo=i+1\n ans+=int(S[memo:])\n return\n for v in range(M):\n A.append(v)\n dfs(A)\n A.pop() # これが結構ポイント\n\ndfs([])\nprint(ans)", "S=str(input())", "S", "str(input())", "str", "input()", "input", "l=len(S)-1", "l", "len(S)-1", "len(S)", "len", "S", "1", "ans=0", "ans", "0", "M = 2", "M", "2", "def dfs(A):\n global ans\n # 終端条件 --- l 重ループまで回したら処理して打ち切り\n if len(A) == l:\n memo=0\n for i in range(l):\n if A[i]==1:\n ans+=int(S[memo:i+1])\n memo=i+1\n ans+=int(S[memo:])\n return\n for v in range(M):\n A.append(v)\n dfs(A)\n A.pop() # これが結構ポイント", "dfs", "global ans", "if len(A) == l:\n memo=0\n for i in range(l):\n if A[i]==1:\n ans+=int(S[memo:i+1])\n memo=i+1\n ans+=int(S[memo:])\n return\n ", "len(A) == l", "len(A)", "len", "A", "l", "memo=0", "memo", "0", "for i in range(l):\n if A[i]==1:\n ans+=int(S[memo:i+1])\n memo=i+1\n ", "i", "range(l)", "range", "l", "if A[i]==1:\n ans+=int(S[memo:i+1])\n memo=i+1\n ", "A[i]==1", "A[i]", "A", "i", "1", "ans+=int(S[memo:i+1])", "ans", "int(S[memo:i+1])", "int", "S[memo:i+1]", "S", "memo:i+1", "memo", "i+1", "i", "1", "memo=i+1", "memo", "i+1", "i", "1", "ans+=int(S[memo:])", "ans", "int(S[memo:])", "int", "S[memo:]", "S", "memo:", "memo", "return", "for v in range(M):\n A.append(v)\n dfs(A)\n A.pop() # これが結構ポイント", "v", "range(M)", "range", "M", "A.append(v)", "A.append", "A", "append", "v", "dfs(A)", "dfs", "A", "A.pop()", "A.pop", "A", "pop", "A", "A", "dfs([])", "dfs", "[]", "print(ans)", "print", "ans", "M = 2", "2", "M", "def dfs(A):\n global ans\n # 終端条件 --- l 重ループまで回したら処理して打ち切り\n if len(A) == l:\n memo=0\n for i in range(l):\n if A[i]==1:\n ans+=int(S[memo:i+1])\n memo=i+1\n ans+=int(S[memo:])\n return\n for v in range(M):\n A.append(v)\n dfs(A)\n A.pop() # これが結構ポイント", "def dfs(A):\n global ans\n # 終端条件 --- l 重ループまで回したら処理して打ち切り\n if len(A) == l:\n memo=0\n for i in range(l):\n if A[i]==1:\n ans+=int(S[memo:i+1])\n memo=i+1\n ans+=int(S[memo:])\n return\n for v in range(M):\n A.append(v)\n dfs(A)\n A.pop() # これが結構ポイント", "dfs", "l=len(S)-1", "len(S)-1", "l", "S=str(input())", "str(input())", "S", "ans=0", "0", "ans" ]
S=str(input()) l=len(S)-1 ans=0 M = 2#bit探査をしたい時はM=2 def dfs(A): global ans # 終端条件 --- l 重ループまで回したら処理して打ち切り if len(A) == l: memo=0 for i in range(l): if A[i]==1: ans+=int(S[memo:i+1]) memo=i+1 ans+=int(S[memo:]) return for v in range(M): A.append(v) dfs(A) A.pop() # これが結構ポイント dfs([]) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 18, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 18, 13, 10, 17, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 79, 2 ], [ 82, 6 ], [ 80, 10 ], [ 70, 13 ], [ 17, 16 ], [ 83, 21 ], [ 73, 23 ], [ 80, 25 ], [ 29, 28 ], [ 83, 31 ], [ 16, 35 ], [ 28, 36 ], [ 67, 39 ], [ 64, 42 ], [ 80, 44 ], [ 28, 46 ], [ 76, 49 ], [ 65, 57 ], [ 68, 57 ], [ 74, 57 ], [ 77, 62 ], [ 71, 62 ], [ 64, 65 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ] ]
[ "s = input()\nn = len(s)-1\nans = 0\n\nfor i in range(2**n):\n num = s[0]\n for j in range(n):\n if (i >> j) & 1:\n num += \"+\"\n num += s[j + 1]\n ans += sum(map(int, num.split(\"+\")))\nprint(ans)", "s = input()", "s", "input()", "input", "n = len(s)-1", "n", "len(s)-1", "len(s)", "len", "s", "1", "ans = 0", "ans", "0", "for i in range(2**n):\n num = s[0]\n for j in range(n):\n if (i >> j) & 1:\n num += \"+\"\n num += s[j + 1]\n ans += sum(map(int, num.split(\"+\")))", "i", "range(2**n)", "range", "2**n", "2", "n", "num = s[0]", "num", "s[0]", "s", "0", "for j in range(n):\n if (i >> j) & 1:\n num += \"+\"\n num += s[j + 1]\n ", "j", "range(n)", "range", "n", "if (i >> j) & 1:\n num += \"+\"\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "num += \"+\"", "num", "\"+\"", "num += s[j + 1]", "num", "s[j + 1]", "s", "j + 1", "j", "1", "ans += sum(map(int, num.split(\"+\")))", "ans", "sum(map(int, num.split(\"+\")))", "sum", "map(int, num.split(\"+\"))", "map", "int", "num.split(\"+\")", "num.split", "num", "split", "\"+\"", "print(ans)", "print", "ans", "num += s[j + 1]", "s[j + 1]", "num", "num += \"+\"", "\"+\"", "num", "ans = 0", "0", "ans", "num = s[0]", "s[0]", "num", "ans += sum(map(int, num.split(\"+\")))", "sum(map(int, num.split(\"+\")))", "ans", "s = input()", "input()", "s", "n = len(s)-1", "len(s)-1", "n" ]
s = input() n = len(s)-1 ans = 0 for i in range(2**n): num = s[0] for j in range(n): if (i >> j) & 1: num += "+" num += s[j + 1] ans += sum(map(int, num.split("+"))) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 4, 13, 17, 2, 13, 17, 28, 13, 4, 13, 13, 28, 13, 4, 13, 13, 13, 14, 2, 13, 13, 0, 13, 2, 2, 13, 13, 4, 13, 18, 13, 2, 40, 13, 17, 0, 13, 17, 0, 13, 2, 2, 13, 13, 4, 13, 18, 13, 2, 40, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 98, 2 ], [ 83, 6 ], [ 99, 9 ], [ 77, 11 ], [ 101, 14 ], [ 92, 17 ], [ 84, 22 ], [ 26, 25 ], [ 84, 28 ], [ 31, 30 ], [ 25, 33 ], [ 84, 34 ], [ 30, 37 ], [ 25, 38 ], [ 86, 40 ], [ 102, 43 ], [ 81, 43 ], [ 93, 44 ], [ 96, 44 ], [ 99, 48 ], [ 30, 51 ], [ 95, 54 ], [ 89, 57 ], [ 102, 60 ], [ 81, 60 ], [ 93, 61 ], [ 96, 61 ], [ 99, 65 ], [ 30, 68 ], [ 80, 71 ], [ 90, 75 ], [ 87, 75 ], [ 78, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ] ]
[ "S = input()\nn = len(S)\n\nans = 0\np = 1\nc = pow(2, n - 1)\n\nfor i in range(n):\n for j in range(i, n):\n if j == i:\n ans += p * c * int(S[-j - 1])\n c //= 2\n else:\n ans += p * c * int(S[-j - 1])\n p *= 10\n\nprint(ans)", "S = input()", "S", "input()", "input", "n = len(S)", "n", "len(S)", "len", "S", "ans = 0", "ans", "0", "p = 1", "p", "1", "c = pow(2, n - 1)", "c", "pow(2, n - 1)", "pow", "2", "n - 1", "n", "1", "for i in range(n):\n for j in range(i, n):\n if j == i:\n ans += p * c * int(S[-j - 1])\n c //= 2\n else:\n ans += p * c * int(S[-j - 1])\n p *= 10", "i", "range(n)", "range", "n", "for j in range(i, n):\n if j == i:\n ans += p * c * int(S[-j - 1])\n c //= 2\n else:\n ans += p * c * int(S[-j - 1])\n ", "j", "range(i, n)", "range", "i", "n", "if j == i:\n ans += p * c * int(S[-j - 1])\n c //= 2\n else:\n ans += p * c * int(S[-j - 1])\n ", "j == i", "j", "i", "ans += p * c * int(S[-j - 1])", "ans", "p * c * int(S[-j - 1])", "p * c", "p", "c", "int(S[-j - 1])", "int", "S[-j - 1]", "S", "-j - 1", "-j", "j", "1", "c //= 2", "c", "2", "ans += p * c * int(S[-j - 1])", "ans", "p * c * int(S[-j - 1])", "p * c", "p", "c", "int(S[-j - 1])", "int", "S[-j - 1]", "S", "-j - 1", "-j", "j", "1", "p *= 10", "p", "10", "print(ans)", "print", "ans", "ans = 0", "0", "ans", "p *= 10", "10", "p", "n = len(S)", "len(S)", "n", "ans += p * c * int(S[-j - 1])", "p * c * int(S[-j - 1])", "ans", "ans += p * c * int(S[-j - 1])", "p * c * int(S[-j - 1])", "ans", "c = pow(2, n - 1)", "pow(2, n - 1)", "c", "c //= 2", "2", "c", "S = input()", "input()", "S", "p = 1", "1", "p" ]
S = input() n = len(S) ans = 0 p = 1 c = pow(2, n - 1) for i in range(n): for j in range(i, n): if j == i: ans += p * c * int(S[-j - 1]) c //= 2 else: ans += p * c * int(S[-j - 1]) p *= 10 print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 13, 2, 17, 2, 2, 13, 17, 13, 0, 13, 2, 2, 17, 13, 4, 13, 18, 13, 13, 0, 13, 17, 0, 13, 2, 2, 17, 13, 4, 13, 18, 13, 13, 0, 13, 2, 2, 17, 13, 4, 13, 18, 13, 17, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 2, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13 ]
[ [ 95, 2 ], [ 92, 6 ], [ 96, 9 ], [ 89, 11 ], [ 96, 16 ], [ 98, 18 ], [ 22, 21 ], [ 90, 27 ], [ 107, 30 ], [ 34, 33 ], [ 90, 37 ], [ 21, 41 ], [ 90, 46 ], [ 33, 48 ], [ 101, 50 ], [ 108, 54 ], [ 114, 54 ], [ 111, 54 ], [ 93, 58 ], [ 33, 59 ], [ 110, 61 ], [ 113, 64 ], [ 108, 68 ], [ 114, 68 ], [ 111, 68 ], [ 93, 72 ], [ 33, 73 ], [ 104, 75 ], [ 114, 79 ], [ 111, 79 ], [ 108, 79 ], [ 93, 83 ], [ 105, 87 ], [ 102, 87 ], [ 99, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ] ]
[ "S = input()\nS_str = str(S)\nn = len(str(S))\nans = 0\n\nfor i in range(2**(n-1)):\n tmp = 0\n for j in range(n-1):\n if i & (1 <<(n-2 -j)):\n ans += 10*tmp + int(S_str[j])\n tmp = 0\n else:\n tmp = 10*tmp + int(S_str[j]) \n ans += 10*tmp + int(S_str[-1])\nprint(ans)", "S = input()", "S", "input()", "input", "S_str = str(S)", "S_str", "str(S)", "str", "S", "n = len(str(S))", "n", "len(str(S))", "len", "str(S)", "str", "S", "ans = 0", "ans", "0", "for i in range(2**(n-1)):\n tmp = 0\n for j in range(n-1):\n if i & (1 <<(n-2 -j)):\n ans += 10*tmp + int(S_str[j])\n tmp = 0\n else:\n tmp = 10*tmp + int(S_str[j]) \n ans += 10*tmp + int(S_str[-1])", "i", "range(2**(n-1))", "range", "2**(n-1)", "2", "n-1", "n", "1", "tmp = 0", "tmp", "0", "for j in range(n-1):\n if i & (1 <<(n-2 -j)):\n ans += 10*tmp + int(S_str[j])\n tmp = 0\n else:\n tmp = 10*tmp + int(S_str[j]) \n ", "j", "range(n-1)", "range", "n-1", "n", "1", "if i & (1 <<(n-2 -j)):\n ans += 10*tmp + int(S_str[j])\n tmp = 0\n else:\n tmp = 10*tmp + int(S_str[j]) \n ", "i & (1 <<(n-2 -j))", "i", "1 <<(n-2 -j)", "1", "n-2 -j", "n-2", "n", "2", "j", "ans += 10*tmp + int(S_str[j])", "ans", "10*tmp + int(S_str[j])", "10*tmp", "10", "tmp", "int(S_str[j])", "int", "S_str[j]", "S_str", "j", "tmp = 0", "tmp", "0", "tmp = 10*tmp + int(S_str[j])", "tmp", "10*tmp + int(S_str[j])", "10*tmp", "10", "tmp", "int(S_str[j])", "int", "S_str[j]", "S_str", "j", "ans += 10*tmp + int(S_str[-1])", "ans", "10*tmp + int(S_str[-1])", "10*tmp", "10", "tmp", "int(S_str[-1])", "int", "S_str[-1]", "S_str", "-1", "print(ans)", "print", "ans", "n = len(str(S))", "len(str(S))", "n", "S_str = str(S)", "str(S)", "S_str", "S = input()", "input()", "S", "ans = 0", "0", "ans", "ans += 10*tmp + int(S_str[j])", "10*tmp + int(S_str[j])", "ans", "ans += 10*tmp + int(S_str[-1])", "10*tmp + int(S_str[-1])", "ans", "tmp = 0", "0", "tmp", "tmp = 0", "0", "tmp", "tmp = 10*tmp + int(S_str[j])", "10*tmp + int(S_str[j])", "tmp" ]
S = input() S_str = str(S) n = len(str(S)) ans = 0 for i in range(2**(n-1)): tmp = 0 for j in range(n-1): if i & (1 <<(n-2 -j)): ans += 10*tmp + int(S_str[j]) tmp = 0 else: tmp = 10*tmp + int(S_str[j]) ans += 10*tmp + int(S_str[-1]) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 18, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 13, 2, 17, 13, 0, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 69, 2 ], [ 84, 6 ], [ 70, 9 ], [ 72, 11 ], [ 15, 14 ], [ 85, 20 ], [ 75, 23 ], [ 70, 25 ], [ 29, 28 ], [ 85, 32 ], [ 14, 36 ], [ 28, 39 ], [ 81, 41 ], [ 66, 44 ], [ 70, 46 ], [ 28, 48 ], [ 78, 51 ], [ 67, 59 ], [ 82, 59 ], [ 76, 59 ], [ 79, 64 ], [ 73, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ] ]
[ "S = input()\nn = len(S)\n\nans = 0\n\nfor bit in range(1 << (n - 1)):\n partial_sum = S[0]\n for i in range(n-1):\n if bit & (1 << i):\n partial_sum += \"+\"\n partial_sum += S[i+1]\n ans += sum(map(int, partial_sum.split(\"+\")))\n\nprint(ans)", "S = input()", "S", "input()", "input", "n = len(S)", "n", "len(S)", "len", "S", "ans = 0", "ans", "0", "for bit in range(1 << (n - 1)):\n partial_sum = S[0]\n for i in range(n-1):\n if bit & (1 << i):\n partial_sum += \"+\"\n partial_sum += S[i+1]\n ans += sum(map(int, partial_sum.split(\"+\")))", "bit", "range(1 << (n - 1))", "range", "1 << (n - 1)", "1", "n - 1", "n", "1", "partial_sum = S[0]", "partial_sum", "S[0]", "S", "0", "for i in range(n-1):\n if bit & (1 << i):\n partial_sum += \"+\"\n partial_sum += S[i+1]\n ", "i", "range(n-1)", "range", "n-1", "n", "1", "if bit & (1 << i):\n partial_sum += \"+\"\n ", "bit & (1 << i)", "bit", "1 << i", "1", "i", "partial_sum += \"+\"", "partial_sum", "\"+\"", "partial_sum += S[i+1]", "partial_sum", "S[i+1]", "S", "i+1", "i", "1", "ans += sum(map(int, partial_sum.split(\"+\")))", "ans", "sum(map(int, partial_sum.split(\"+\")))", "sum", "map(int, partial_sum.split(\"+\"))", "map", "int", "partial_sum.split(\"+\")", "partial_sum.split", "partial_sum", "split", "\"+\"", "print(ans)", "print", "ans", "partial_sum += S[i+1]", "S[i+1]", "partial_sum", "S = input()", "input()", "S", "ans = 0", "0", "ans", "partial_sum = S[0]", "S[0]", "partial_sum", "ans += sum(map(int, partial_sum.split(\"+\")))", "sum(map(int, partial_sum.split(\"+\")))", "ans", "partial_sum += \"+\"", "\"+\"", "partial_sum", "n = len(S)", "len(S)", "n" ]
S = input() n = len(S) ans = 0 for bit in range(1 << (n - 1)): partial_sum = S[0] for i in range(n-1): if bit & (1 << i): partial_sum += "+" partial_sum += S[i+1] ans += sum(map(int, partial_sum.split("+"))) print(ans)
[ 7, 15, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 39, 17, 17, 0, 13, 13, 0, 13, 17, 28, 13, 13, 4, 13, 13, 14, 2, 13, 17, 0, 13, 13, 0, 13, 2, 18, 13, 2, 13, 17, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13, 10, 13, 13, 10, 4, 13 ]
[ [ 65, 3 ], [ 62, 7 ], [ 66, 11 ], [ 68, 14 ], [ 18, 17 ], [ 27, 26 ], [ 63, 27 ], [ 74, 29 ], [ 66, 36 ], [ 77, 42 ], [ 71, 45 ], [ 17, 48 ], [ 80, 54 ], [ 72, 57 ], [ 78, 57 ], [ 75, 57 ], [ 81, 60 ], [ 69, 60 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ] ]
[ "# C - たくさんの数式\nfrom itertools import product\nS = input()\nn = len(S)-1\ntotal =0\nfor i in list(product([\"\",\"+\"],repeat=n)):\n bag=\"\"\n for ind,val in enumerate(S):\n if ind ==0:\n bag+=val\n else:\n bag+=i[ind-1]+val\n total +=eval(bag) \nprint(total)", "from itertools import product", "S = input()", "S", "input()", "input", "n = len(S)-1", "n", "len(S)-1", "len(S)", "len", "S", "1", "total =0", "total", "0", "for i in list(product([\"\",\"+\"],repeat=n)):\n bag=\"\"\n for ind,val in enumerate(S):\n if ind ==0:\n bag+=val\n else:\n bag+=i[ind-1]+val\n total +=eval(bag) ", "i", "list(product([\"\",\"+\"],repeat=n))", "list", "product([\"\",\"+\"],repeat=n)", "product", "[\"\",\"+\"]", "\"\"", "\"+\"", "repeat=n", "repeat", "n", "bag=\"\"", "bag", "\"\"", "for ind,val in enumerate(S):\n if ind ==0:\n bag+=val\n else:\n bag+=i[ind-1]+val\n ", "ind", "val", "enumerate(S)", "enumerate", "S", "if ind ==0:\n bag+=val\n else:\n bag+=i[ind-1]+val\n ", "ind ==0", "ind", "0", "bag+=val", "bag", "val", "bag+=i[ind-1]+val", "bag", "i[ind-1]+val", "i[ind-1]", "i", "ind-1", "ind", "1", "val", "total +=eval(bag)", "total", "eval(bag)", "eval", "bag", "print(total)", "print", "total", "n = len(S)-1", "len(S)-1", "n", "S = input()", "input()", "S", "total =0", "0", "total", "bag+=i[ind-1]+val", "i[ind-1]+val", "bag", "bag=\"\"", "\"\"", "bag", "bag+=val", "val", "bag", "total +=eval(bag)", "eval(bag)", "total" ]
# C - たくさんの数式 from itertools import product S = input() n = len(S)-1 total =0 for i in list(product(["","+"],repeat=n)): bag="" for ind,val in enumerate(S): if ind ==0: bag+=val else: bag+=i[ind-1]+val total +=eval(bag) print(total)
[ 7, 0, 13, 4, 13, 12, 13, 14, 2, 13, 4, 13, 13, 29, 2, 13, 4, 13, 13, 29, 2, 4, 13, 2, 13, 17, 18, 13, 13, 2, 4, 13, 13, 13, 4, 13, 2, 13, 17, 2, 13, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 4, 13, 4, 13, 17, 18, 13, 17, 17, 10, 12, 13, 10, 4, 13 ]
[ [ 64, 2 ], [ 46, 9 ], [ 65, 12 ], [ 50, 15 ], [ 48, 18 ], [ 46, 24 ], [ 65, 27 ], [ 46, 28 ], [ 48, 32 ], [ 50, 33 ], [ 46, 37 ], [ 48, 40 ], [ 65, 42 ], [ 46, 43 ], [ 50, 44 ], [ 46, 46 ], [ 48, 48 ], [ 50, 50 ], [ 62, 54 ], [ 65, 57 ], [ 64, 65 ] ]
[ "s = input()\n\ndef solve(i,psum,tmp):\n if i==len(s):\n return tmp+int(psum) \n return solve(i+1,s[i],int(psum)+tmp) + solve(i+1,psum+s[i],tmp)\n\nprint(solve(1,s[0],0))", "s = input()", "s", "input()", "input", "def solve(i,psum,tmp):\n if i==len(s):\n return tmp+int(psum) \n return solve(i+1,s[i],int(psum)+tmp) + solve(i+1,psum+s[i],tmp)", "solve", "if i==len(s):\n return tmp+int(psum) \n ", "i==len(s)", "i", "len(s)", "len", "s", "return tmp+int(psum)", "tmp+int(psum)", "tmp", "int(psum)", "int", "psum", "return solve(i+1,s[i],int(psum)+tmp) + solve(i+1,psum+s[i],tmp)", "solve(i+1,s[i],int(psum)+tmp) + solve(i+1,psum+s[i],tmp)", "solve(i+1,s[i],int(psum)+tmp)", "solve", "i+1", "i", "1", "s[i]", "s", "i", "int(psum)+tmp", "int(psum)", "int", "psum", "tmp", "solve(i+1,psum+s[i],tmp)", "solve", "i+1", "i", "1", "psum+s[i]", "psum", "s[i]", "s", "i", "tmp", "i", "i", "psum", "psum", "tmp", "tmp", "print(solve(1,s[0],0))", "print", "solve(1,s[0],0)", "solve", "1", "s[0]", "s", "0", "0", "def solve(i,psum,tmp):\n if i==len(s):\n return tmp+int(psum) \n return solve(i+1,s[i],int(psum)+tmp) + solve(i+1,psum+s[i],tmp)", "def solve(i,psum,tmp):\n if i==len(s):\n return tmp+int(psum) \n return solve(i+1,s[i],int(psum)+tmp) + solve(i+1,psum+s[i],tmp)", "solve", "s = input()", "input()", "s" ]
s = input() def solve(i,psum,tmp): if i==len(s): return tmp+int(psum) return solve(i+1,s[i],int(psum)+tmp) + solve(i+1,psum+s[i],tmp) print(solve(1,s[0],0))
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 13, 17, 0, 13, 18, 13, 17, 28, 13, 4, 13, 2, 13, 17, 14, 2, 13, 2, 17, 13, 0, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 17, 4, 13, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 72, 2 ], [ 84, 6 ], [ 73, 9 ], [ 75, 11 ], [ 15, 14 ], [ 85, 20 ], [ 78, 23 ], [ 73, 25 ], [ 29, 28 ], [ 85, 32 ], [ 14, 36 ], [ 28, 39 ], [ 66, 41 ], [ 69, 44 ], [ 73, 46 ], [ 28, 48 ], [ 81, 51 ], [ 70, 59 ], [ 67, 59 ], [ 79, 59 ], [ 82, 64 ], [ 76, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ] ]
[ "S = input()\nn = len(S)\nans = 0\nfor bit in range(2**(n-1)):\n x = S[0]\n for i in range(n-1):\n if bit & (1<<i):\n x += '+'\n x += S[i+1]\n ans += sum(map(int, x.split('+')))\nprint(ans)", "S = input()", "S", "input()", "input", "n = len(S)", "n", "len(S)", "len", "S", "ans = 0", "ans", "0", "for bit in range(2**(n-1)):\n x = S[0]\n for i in range(n-1):\n if bit & (1<<i):\n x += '+'\n x += S[i+1]\n ans += sum(map(int, x.split('+')))", "bit", "range(2**(n-1))", "range", "2**(n-1)", "2", "n-1", "n", "1", "x = S[0]", "x", "S[0]", "S", "0", "for i in range(n-1):\n if bit & (1<<i):\n x += '+'\n x += S[i+1]\n ", "i", "range(n-1)", "range", "n-1", "n", "1", "if bit & (1<<i):\n x += '+'\n ", "bit & (1<<i)", "bit", "1<<i", "1", "i", "x += '+'", "x", "'+'", "x += S[i+1]", "x", "S[i+1]", "S", "i+1", "i", "1", "ans += sum(map(int, x.split('+')))", "ans", "sum(map(int, x.split('+')))", "sum", "map(int, x.split('+'))", "map", "int", "x.split('+')", "x.split", "x", "split", "'+'", "print(ans)", "print", "ans", "x += '+'", "'+'", "x", "x += S[i+1]", "S[i+1]", "x", "S = input()", "input()", "S", "ans = 0", "0", "ans", "x = S[0]", "S[0]", "x", "ans += sum(map(int, x.split('+')))", "sum(map(int, x.split('+')))", "ans", "n = len(S)", "len(S)", "n" ]
S = input() n = len(S) ans = 0 for bit in range(2**(n-1)): x = S[0] for i in range(n-1): if bit & (1<<i): x += '+' x += S[i+1] ans += sum(map(int, x.split('+'))) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 2, 17, 2, 4, 13, 13, 17, 0, 13, 4, 13, 4, 13, 13, 41, 28, 13, 4, 13, 2, 2, 4, 13, 13, 4, 13, 13, 17, 4, 17, 0, 13, 2, 13, 18, 13, 39, 17, 0, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 2, 2, 13, 13, 17, 0, 13, 4, 13, 4, 18, 17, 13, 18, 13, 39, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 4, 18, 17, 13, 18, 13, 39, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 4, 13 ]
[ [ 127, 2 ], [ 109, 8 ], [ 12, 11 ], [ 128, 19 ], [ 112, 22 ], [ 11, 27 ], [ 31, 30 ], [ 128, 37 ], [ 113, 40 ], [ 115, 45 ], [ 113, 49 ], [ 118, 53 ], [ 57, 56 ], [ 128, 62 ], [ 11, 67 ], [ 56, 68 ], [ 106, 71 ], [ 128, 79 ], [ 56, 83 ], [ 124, 86 ], [ 56, 88 ], [ 121, 91 ], [ 128, 99 ], [ 122, 104 ], [ 107, 104 ], [ 110, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ] ]
[ "# https://atcoder.jp/contests/arc061/tasks/arc061_a\n# 復習課題\n# シフト演算を用いてリファクタリングせよ。\n\nS = list(input())\nans = 0\n\nfor i in range(2**(len(S)-1)):\n p = list(bin(i))\n flag = ['0' for _ in range(len(S) - len(p) + 1)] + p[2:]\n l = 0\n for j in range(len(S)-1):\n if (i >> j) & 1:\n ans += int(\"\".join(S[l:j+1]))\n l = j+1\n ans += int(\"\".join(S[l:]))\n\nprint(ans)", "S = list(input())", "S", "list(input())", "list", "input()", "input", "ans = 0", "ans", "0", "for i in range(2**(len(S)-1)):\n p = list(bin(i))\n flag = ['0' for _ in range(len(S) - len(p) + 1)] + p[2:]\n l = 0\n for j in range(len(S)-1):\n if (i >> j) & 1:\n ans += int(\"\".join(S[l:j+1]))\n l = j+1\n ans += int(\"\".join(S[l:]))", "i", "range(2**(len(S)-1))", "range", "2**(len(S)-1)", "2", "len(S)-1", "len(S)", "len", "S", "1", "p = list(bin(i))", "p", "list(bin(i))", "list", "bin(i)", "bin", "i", "'0' for _ in range(len(S) - len(p) + 1)", "for _ in range(len(S) - len(p) + 1)", "_", "range(len(S) - len(p) + 1)", "range", "len(S) - len(p) + 1", "len(S) - len(p)", "len(S)", "len", "S", "len(p)", "len", "p", "1", "for _ in range(len(S) - len(p) + 1)", "'0'", "flag = ['0' for _ in range(len(S) - len(p) + 1)] + p[2:]", "flag", "['0' for _ in range(len(S) - len(p) + 1)] + p[2:]", "['0' for _ in range(len(S) - len(p) + 1)]", "p[2:]", "p", "2:", "2", "l = 0", "l", "0", "for j in range(len(S)-1):\n if (i >> j) & 1:\n ans += int(\"\".join(S[l:j+1]))\n l = j+1\n ", "j", "range(len(S)-1)", "range", "len(S)-1", "len(S)", "len", "S", "1", "if (i >> j) & 1:\n ans += int(\"\".join(S[l:j+1]))\n l = j+1\n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "ans += int(\"\".join(S[l:j+1]))", "ans", "int(\"\".join(S[l:j+1]))", "int", "\"\".join(S[l:j+1])", "\"\".join", "\"\"", "join", "S[l:j+1]", "S", "l:j+1", "l", "j+1", "j", "1", "l = j+1", "l", "j+1", "j", "1", "ans += int(\"\".join(S[l:]))", "ans", "int(\"\".join(S[l:]))", "int", "\"\".join(S[l:])", "\"\".join", "\"\"", "join", "S[l:]", "S", "l:", "l", "print(ans)", "print", "ans", "ans += int(\"\".join(S[l:j+1]))", "int(\"\".join(S[l:j+1]))", "ans", "ans = 0", "0", "ans", "p = list(bin(i))", "list(bin(i))", "p", "flag = ['0' for _ in range(len(S) - len(p) + 1)] + p[2:]", "['0' for _ in range(len(S) - len(p) + 1)] + p[2:]", "flag", "l = 0", "0", "l", "ans += int(\"\".join(S[l:]))", "int(\"\".join(S[l:]))", "ans", "l = j+1", "j+1", "l", "S = list(input())", "list(input())", "S" ]
# https://atcoder.jp/contests/arc061/tasks/arc061_a # 復習課題 # シフト演算を用いてリファクタリングせよ。 S = list(input()) ans = 0 for i in range(2**(len(S)-1)): p = list(bin(i)) flag = ['0' for _ in range(len(S) - len(p) + 1)] + p[2:] l = 0 for j in range(len(S)-1): if (i >> j) & 1: ans += int("".join(S[l:j+1])) l = j+1 ans += int("".join(S[l:])) print(ans)
[ 7, 0, 13, 4, 13, 12, 13, 0, 13, 17, 14, 2, 4, 13, 13, 17, 29, 4, 13, 13, 28, 13, 4, 13, 17, 4, 13, 13, 0, 13, 2, 2, 2, 17, 2, 2, 4, 13, 13, 13, 17, 4, 13, 18, 13, 39, 13, 4, 13, 18, 13, 39, 13, 29, 2, 13, 4, 13, 13, 23, 13, 4, 13, 4, 13, 13, 10, 12, 13, 10, 4, 13 ]
[ [ 70, 2 ], [ 9, 8 ], [ 60, 14 ], [ 60, 19 ], [ 22, 21 ], [ 60, 27 ], [ 30, 29 ], [ 60, 38 ], [ 21, 39 ], [ 60, 44 ], [ 60, 50 ], [ 29, 55 ], [ 8, 55 ], [ 60, 58 ], [ 60, 60 ], [ 68, 64 ], [ 71, 65 ], [ 70, 71 ] ]
[ "S=input()\n\ndef f(s):\n sum=0\n if len(s)==1:\n return int(s)\n for i in range(1,len(s)):\n sum+=(2**(len(s)-i-1))*int(s[:i])+f(s[i:])\n return sum+int(s)\n\nprint(f(S))", "S=input()", "S", "input()", "input", "def f(s):\n sum=0\n if len(s)==1:\n return int(s)\n for i in range(1,len(s)):\n sum+=(2**(len(s)-i-1))*int(s[:i])+f(s[i:])\n return sum+int(s)", "f", "sum=0", "sum", "0", "if len(s)==1:\n return int(s)\n ", "len(s)==1", "len(s)", "len", "s", "1", "return int(s)", "int(s)", "int", "s", "for i in range(1,len(s)):\n sum+=(2**(len(s)-i-1))*int(s[:i])+f(s[i:])\n ", "i", "range(1,len(s))", "range", "1", "len(s)", "len", "s", "sum+=(2**(len(s)-i-1))*int(s[:i])+f(s[i:])", "sum", "(2**(len(s)-i-1))*int(s[:i])+f(s[i:])", "(2**(len(s)-i-1))*int(s[:i])", "2**(len(s)-i-1)", "2", "len(s)-i-1", "len(s)-i", "len(s)", "len", "s", "i", "1", "int(s[:i])", "int", "s[:i]", "s", ":i", "i", "f(s[i:])", "f", "s[i:]", "s", "i:", "i", "return sum+int(s)", "sum+int(s)", "sum", "int(s)", "int", "s", "s", "s", "print(f(S))", "print", "f(S)", "f", "S", "def f(s):\n sum=0\n if len(s)==1:\n return int(s)\n for i in range(1,len(s)):\n sum+=(2**(len(s)-i-1))*int(s[:i])+f(s[i:])\n return sum+int(s)", "def f(s):\n sum=0\n if len(s)==1:\n return int(s)\n for i in range(1,len(s)):\n sum+=(2**(len(s)-i-1))*int(s[:i])+f(s[i:])\n return sum+int(s)", "f", "S=input()", "input()", "S" ]
S=input() def f(s): sum=0 if len(s)==1: return int(s) for i in range(1,len(s)): sum+=(2**(len(s)-i-1))*int(s[:i])+f(s[i:]) return sum+int(s) print(f(S))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 17, 13, 0, 13, 2, 39, 17, 13, 28, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 18, 13, 2, 2, 13, 17, 13, 17, 0, 13, 17, 28, 13, 13, 4, 13, 13, 2, 13, 39, 17, 0, 13, 2, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 2, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13 ]
[ [ 86, 2 ], [ 92, 8 ], [ 87, 12 ], [ 95, 15 ], [ 19, 18 ], [ 93, 23 ], [ 83, 25 ], [ 93, 29 ], [ 32, 31 ], [ 93, 34 ], [ 18, 38 ], [ 31, 39 ], [ 49, 42 ], [ 84, 43 ], [ 93, 46 ], [ 31, 48 ], [ 80, 51 ], [ 87, 58 ], [ 84, 60 ], [ 77, 64 ], [ 89, 69 ], [ 78, 72 ], [ 81, 72 ], [ 90, 75 ], [ 96, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ] ]
[ "# -*- coding: utf-8 -*-\n\ns = str(input())\nn = len(s) - 1\nanswer = 0\nfor i in range(2 ** n):\n operation = [\"\"] * n\n for j in range(n):\n if (i >> j) & 1:\n operation[n - 1 -j] = \"+\"\n \n formula = \"\"\n for p_n, p_o in zip(s, operation + [\"\"]):\n formula += (p_n + p_o)\n \n answer += eval(formula)\n\nprint(answer)", "s = str(input())", "s", "str(input())", "str", "input()", "input", "n = len(s) - 1", "n", "len(s) - 1", "len(s)", "len", "s", "1", "answer = 0", "answer", "0", "for i in range(2 ** n):\n operation = [\"\"] * n\n for j in range(n):\n if (i >> j) & 1:\n operation[n - 1 -j] = \"+\"\n \n formula = \"\"\n for p_n, p_o in zip(s, operation + [\"\"]):\n formula += (p_n + p_o)\n \n answer += eval(formula)", "i", "range(2 ** n)", "range", "2 ** n", "2", "n", "operation = [\"\"] * n", "operation", "[\"\"] * n", "[\"\"]", "\"\"", "n", "for j in range(n):\n if (i >> j) & 1:\n operation[n - 1 -j] = \"+\"\n \n ", "j", "range(n)", "range", "n", "if (i >> j) & 1:\n operation[n - 1 -j] = \"+\"\n \n ", "(i >> j) & 1", "i >> j", "i", "j", "1", "operation[n - 1 -j] = \"+\"", "operation[n - 1 -j]", "operation", "n - 1 -j", "n - 1", "n", "1", "j", "\"+\"", "formula = \"\"", "formula", "\"\"", "for p_n, p_o in zip(s, operation + [\"\"]):\n formula += (p_n + p_o)\n \n ", "p_n", "p_o", "zip(s, operation + [\"\"])", "zip", "s", "operation + [\"\"]", "operation", "[\"\"]", "\"\"", "formula += (p_n + p_o)", "formula", "p_n + p_o", "p_n", "p_o", "answer += eval(formula)", "answer", "eval(formula)", "eval", "formula", "print(answer)", "print", "answer", "formula += (p_n + p_o)", "p_n + p_o", "formula", "formula = \"\"", "\"\"", "formula", "operation = [\"\"] * n", "[\"\"] * n", "operation", "s = str(input())", "str(input())", "s", "answer += eval(formula)", "eval(formula)", "answer", "n = len(s) - 1", "len(s) - 1", "n", "answer = 0", "0", "answer" ]
# -*- coding: utf-8 -*- s = str(input()) n = len(s) - 1 answer = 0 for i in range(2 ** n): operation = [""] * n for j in range(n): if (i >> j) & 1: operation[n - 1 -j] = "+" formula = "" for p_n, p_o in zip(s, operation + [""]): formula += (p_n + p_o) answer += eval(formula) print(answer)
[ 7, 15, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 4, 13, 4, 13, 39, 17, 17, 0, 13, 13, 0, 13, 17, 28, 13, 13, 0, 13, 39, 28, 13, 13, 4, 13, 13, 4, 18, 13, 13, 18, 13, 13, 4, 18, 13, 13, 13, 4, 18, 13, 13, 18, 13, 17, 0, 13, 4, 13, 4, 18, 17, 13, 13, 4, 13, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 6, 5 ], [ 12, 11 ], [ 5, 15 ], [ 19, 18 ], [ 28, 27 ], [ 11, 28 ], [ 31, 30 ], [ 34, 33 ], [ 18, 33 ], [ 37, 36 ], [ 33, 43 ], [ 36, 46 ], [ 5, 49 ], [ 36, 53 ], [ 36, 58 ], [ 5, 61 ], [ 65, 64 ], [ 36, 71 ], [ 64, 74 ], [ 30, 74 ], [ 83, 80 ] ]
[ "from itertools import product\ndef main():\n s = list(input())\n koho = len(s) - 1\n pat = tuple(product(('+', ''), repeat = koho))\n r = 0\n for pate in pat:\n a = []\n for i, p in enumerate(pate):\n a.append(s[i])\n a.append(p)\n a.append(s[-1])\n r += eval(\"\".join(a))\n print(r)\n\nif __name__ == '__main__':\n main()", "from itertools import product", "def main():\n s = list(input())\n koho = len(s) - 1\n pat = tuple(product(('+', ''), repeat = koho))\n r = 0\n for pate in pat:\n a = []\n for i, p in enumerate(pate):\n a.append(s[i])\n a.append(p)\n a.append(s[-1])\n r += eval(\"\".join(a))\n print(r)", "main", "s = list(input())", "s", "list(input())", "list", "input()", "input", "koho = len(s) - 1", "koho", "len(s) - 1", "len(s)", "len", "s", "1", "pat = tuple(product(('+', ''), repeat = koho))", "pat", "tuple(product(('+', ''), repeat = koho))", "tuple", "product(('+', ''), repeat = koho)", "product", "('+', '')", "'+'", "''", "repeat = koho", "repeat", "koho", "r = 0", "r", "0", "for pate in pat:\n a = []\n for i, p in enumerate(pate):\n a.append(s[i])\n a.append(p)\n a.append(s[-1])\n r += eval(\"\".join(a))\n ", "pate", "pat", "a = []", "a", "[]", "for i, p in enumerate(pate):\n a.append(s[i])\n a.append(p)\n ", "i", "p", "enumerate(pate)", "enumerate", "pate", "a.append(s[i])", "a.append", "a", "append", "s[i]", "s", "i", "a.append(p)", "a.append", "a", "append", "p", "a.append(s[-1])", "a.append", "a", "append", "s[-1]", "s", "-1", "r += eval(\"\".join(a))", "r", "eval(\"\".join(a))", "eval", "\"\".join(a)", "\"\".join", "\"\"", "join", "a", "print(r)", "print", "r", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n s = list(input())\n koho = len(s) - 1\n pat = tuple(product(('+', ''), repeat = koho))\n r = 0\n for pate in pat:\n a = []\n for i, p in enumerate(pate):\n a.append(s[i])\n a.append(p)\n a.append(s[-1])\n r += eval(\"\".join(a))\n print(r)", "def main():\n s = list(input())\n koho = len(s) - 1\n pat = tuple(product(('+', ''), repeat = koho))\n r = 0\n for pate in pat:\n a = []\n for i, p in enumerate(pate):\n a.append(s[i])\n a.append(p)\n a.append(s[-1])\n r += eval(\"\".join(a))\n print(r)", "main" ]
from itertools import product def main(): s = list(input()) koho = len(s) - 1 pat = tuple(product(('+', ''), repeat = koho)) r = 0 for pate in pat: a = [] for i, p in enumerate(pate): a.append(s[i]) a.append(p) a.append(s[-1]) r += eval("".join(a)) print(r) if __name__ == '__main__': main()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 14, 2, 2, 4, 13, 13, 13, 13, 17, 17, 4, 13, 17, 4, 13, 4, 13, 2, 13, 13, 4, 13, 2, 13, 13, 2, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 48, 2 ], [ 48, 11 ], [ 48, 12 ], [ 46, 18 ], [ 43, 19 ], [ 49, 20 ], [ 46, 31 ], [ 43, 32 ], [ 43, 36 ], [ 49, 37 ], [ 49, 39 ], [ 46, 40 ], [ 48, 43 ], [ 48, 46 ], [ 48, 49 ] ]
[ "a, b, c = map(int, input().split())\n\nif max(a, b, c) % 2 == 0:\n print(0)\nelse:\n print(min(a*b, min(b*c, c*a)))", "a, b, c = map(int, input().split())", "a", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "b", "c", "if max(a, b, c) % 2 == 0:\n print(0)\nelse:\n print(min(a*b, min(b*c, c*a)))", "max(a, b, c) % 2 == 0", "max(a, b, c) % 2", "max(a, b, c)", "max", "a", "b", "c", "2", "0", "print(0)", "print", "0", "print(min(a*b, min(b*c, c*a)))", "print", "min(a*b, min(b*c, c*a))", "min", "a*b", "a", "b", "min(b*c, c*a)", "min", "b*c", "b", "c", "c*a", "c", "a", "b, c = map(int, input().split())", "map(int, input().split())", "b", "a, b, c = map(int, input().split())", "map(int, input().split())", "a", "c = map(int, input().split())", "map(int, input().split())", "c" ]
a, b, c = map(int, input().split()) if max(a, b, c) % 2 == 0: print(0) else: print(min(a*b, min(b*c, c*a)))
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 2, 17, 17, 14, 2, 2, 2, 2, 13, 17, 17, 2, 2, 13, 17, 17, 2, 2, 13, 17, 17, 0, 13, 17, 0, 13, 17, 0, 13, 4, 13, 2, 13, 17, 0, 13, 2, 2, 2, 2, 13, 17, 13, 13, 2, 2, 13, 13, 13, 0, 13, 4, 13, 2, 13, 17, 0, 13, 2, 2, 2, 2, 13, 17, 13, 13, 2, 2, 13, 13, 13, 0, 13, 4, 13, 2, 13, 17, 0, 13, 2, 2, 2, 2, 13, 17, 13, 13, 2, 2, 13, 13, 13, 0, 13, 4, 13, 39, 13, 13, 13, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 153, 2 ], [ 153, 11 ], [ 153, 12 ], [ 150, 14 ], [ 127, 23 ], [ 136, 28 ], [ 154, 33 ], [ 132, 37 ], [ 120, 40 ], [ 156, 43 ], [ 127, 47 ], [ 138, 50 ], [ 157, 55 ], [ 136, 57 ], [ 154, 58 ], [ 157, 61 ], [ 136, 62 ], [ 154, 63 ], [ 141, 65 ], [ 136, 69 ], [ 129, 72 ], [ 142, 77 ], [ 127, 79 ], [ 154, 80 ], [ 142, 83 ], [ 127, 84 ], [ 154, 85 ], [ 123, 87 ], [ 154, 91 ], [ 147, 94 ], [ 124, 99 ], [ 136, 101 ], [ 127, 102 ], [ 124, 105 ], [ 136, 106 ], [ 127, 107 ], [ 144, 109 ], [ 145, 118 ], [ 121, 118 ], [ 120, 121 ], [ 123, 124 ], [ 153, 127 ], [ 129, 130 ], [ 132, 133 ], [ 153, 136 ], [ 138, 139 ], [ 141, 142 ], [ 144, 145 ], [ 147, 148 ], [ 150, 151 ], [ 153, 154 ], [ 156, 157 ] ]
[ "A,B,C = map(int,input().split())\nmini = 10**27\nif A%2 == 0 or B%2 ==0 or C%2 ==0:\n mini = 0\n ans =0\nelse:\n x = int(A/2)\n ans1 = (x+1)*B*C-x*B*C \n y = int(B/2)\n ans2 = (y+1)*A*C - y*A*C\n z = int(C/2)\n ans3 = (z+1)*B*A - z*B*A\n\n ans = min([ans1,ans2,ans3])\nprint(ans)", "A,B,C = map(int,input().split())", "A", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "B", "C", "mini = 10**27", "mini", "10**27", "10", "27", "if A%2 == 0 or B%2 ==0 or C%2 ==0:\n mini = 0\n ans =0\nelse:\n x = int(A/2)\n ans1 = (x+1)*B*C-x*B*C \n y = int(B/2)\n ans2 = (y+1)*A*C - y*A*C\n z = int(C/2)\n ans3 = (z+1)*B*A - z*B*A\n\n ans = min([ans1,ans2,ans3])", "A%2 == 0 or B%2 ==0 or C%2 ==0", "A%2 == 0 or B%2 ==0", "A%2 == 0", "A%2", "A", "2", "0", "B%2 ==0", "B%2", "B", "2", "0", "C%2 ==0", "C%2", "C", "2", "0", "mini = 0", "mini", "0", "ans =0", "ans", "0", "x = int(A/2)", "x", "int(A/2)", "int", "A/2", "A", "2", "ans1 = (x+1)*B*C-x*B*C", "ans1", "(x+1)*B*C-x*B*C", "(x+1)*B*C", "(x+1)*B", "x+1", "x", "1", "B", "C", "x*B*C", "x*B", "x", "B", "C", "y = int(B/2)", "y", "int(B/2)", "int", "B/2", "B", "2", "ans2 = (y+1)*A*C - y*A*C", "ans2", "(y+1)*A*C - y*A*C", "(y+1)*A*C", "(y+1)*A", "y+1", "y", "1", "A", "C", "y*A*C", "y*A", "y", "A", "C", "z = int(C/2)", "z", "int(C/2)", "int", "C/2", "C", "2", "ans3 = (z+1)*B*A - z*B*A", "ans3", "(z+1)*B*A - z*B*A", "(z+1)*B*A", "(z+1)*B", "z+1", "z", "1", "B", "A", "z*B*A", "z*B", "z", "B", "A", "ans = min([ans1,ans2,ans3])", "ans", "min([ans1,ans2,ans3])", "min", "[ans1,ans2,ans3]", "ans1", "ans2", "ans3", "print(ans)", "print", "ans", "ans =0", "0", "ans", "z = int(C/2)", "int(C/2)", "z", "A,B,C = map(int,input().split())", "map(int,input().split())", "A", "ans2 = (y+1)*A*C - y*A*C", "(y+1)*A*C - y*A*C", "ans2", "mini = 0", "0", "mini", "B,C = map(int,input().split())", "map(int,input().split())", "B", "ans1 = (x+1)*B*C-x*B*C", "(x+1)*B*C-x*B*C", "ans1", "y = int(B/2)", "int(B/2)", "y", "ans = min([ans1,ans2,ans3])", "min([ans1,ans2,ans3])", "ans", "ans3 = (z+1)*B*A - z*B*A", "(z+1)*B*A - z*B*A", "ans3", "mini = 10**27", "10**27", "mini", "C = map(int,input().split())", "map(int,input().split())", "C", "x = int(A/2)", "int(A/2)", "x" ]
A,B,C = map(int,input().split()) mini = 10**27 if A%2 == 0 or B%2 ==0 or C%2 ==0: mini = 0 ans =0 else: x = int(A/2) ans1 = (x+1)*B*C-x*B*C y = int(B/2) ans2 = (y+1)*A*C - y*A*C z = int(C/2) ans3 = (z+1)*B*A - z*B*A ans = min([ans1,ans2,ans3]) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 4, 13, 2, 2, 2, 13, 17, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 33, 2 ], [ 33, 15 ], [ 33, 16 ], [ 31, 22 ], [ 28, 24 ], [ 34, 25 ], [ 33, 28 ], [ 33, 31 ], [ 33, 34 ] ]
[ "a, b, c = sorted(list(map(int, input().split())))\nprint(c % 2 * a * b)", "a, b, c = sorted(list(map(int, input().split())))", "a", "sorted(list(map(int, input().split())))", "sorted", "list(map(int, input().split()))", "list", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "b", "c", "print(c % 2 * a * b)", "print", "c % 2 * a * b", "c % 2 * a", "c % 2", "c", "2", "a", "b", "a, b, c = sorted(list(map(int, input().split())))", "sorted(list(map(int, input().split())))", "a", "c = sorted(list(map(int, input().split())))", "sorted(list(map(int, input().split())))", "c", "b, c = sorted(list(map(int, input().split())))", "sorted(list(map(int, input().split())))", "b" ]
a, b, c = sorted(list(map(int, input().split()))) print(c % 2 * a * b)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 14, 2, 2, 2, 2, 13, 17, 17, 2, 2, 13, 17, 17, 2, 2, 13, 17, 17, 4, 13, 17, 4, 13, 0, 13, 4, 13, 2, 2, 2, 13, 13, 2, 13, 17, 2, 2, 13, 13, 2, 13, 2, 13, 17, 0, 13, 4, 13, 2, 2, 2, 13, 13, 2, 13, 17, 2, 2, 13, 13, 2, 13, 2, 13, 17, 0, 13, 4, 13, 2, 2, 2, 13, 13, 2, 13, 17, 2, 2, 13, 13, 2, 13, 2, 13, 17, 4, 13, 4, 13, 13, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 122, 2 ], [ 122, 11 ], [ 122, 12 ], [ 117, 18 ], [ 108, 23 ], [ 123, 28 ], [ 119, 37 ], [ 117, 43 ], [ 108, 44 ], [ 123, 46 ], [ 117, 50 ], [ 108, 51 ], [ 123, 53 ], [ 123, 55 ], [ 110, 58 ], [ 117, 64 ], [ 123, 65 ], [ 108, 67 ], [ 117, 71 ], [ 123, 72 ], [ 108, 74 ], [ 108, 76 ], [ 113, 79 ], [ 123, 85 ], [ 108, 86 ], [ 117, 88 ], [ 123, 92 ], [ 108, 93 ], [ 117, 95 ], [ 117, 97 ], [ 120, 103 ], [ 111, 104 ], [ 114, 105 ], [ 122, 108 ], [ 110, 111 ], [ 113, 114 ], [ 122, 117 ], [ 119, 120 ], [ 122, 123 ] ]
[ "# agc004_a.py\nA,B,C = map(int,input().split())\nif A%2 == 0 or B%2 == 0 or C%2 == 0 :\n print(0)\n exit()\nL = abs(A*B*(C//2) - (A*B*(C-C//2)))\nN = abs(A*C*(B//2) - (A*C*(B-B//2)))\nM = abs(C*B*(A//2) - (C*B*(A-A//2)))\n\nprint(min(L,N,M))", "A,B,C = map(int,input().split())", "A", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "B", "C", "if A%2 == 0 or B%2 == 0 or C%2 == 0 :\n print(0)\n exit()", "A%2 == 0 or B%2 == 0 or C%2 == 0", "A%2 == 0 or B%2 == 0", "A%2 == 0", "A%2", "A", "2", "0", "B%2 == 0", "B%2", "B", "2", "0", "C%2 == 0", "C%2", "C", "2", "0", "print(0)", "print", "0", "exit()", "exit", "L = abs(A*B*(C//2) - (A*B*(C-C//2)))", "L", "abs(A*B*(C//2) - (A*B*(C-C//2)))", "abs", "A*B*(C//2) - (A*B*(C-C//2))", "A*B*(C//2)", "A*B", "A", "B", "C//2", "C", "2", "A*B*(C-C//2)", "A*B", "A", "B", "C-C//2", "C", "C//2", "C", "2", "N = abs(A*C*(B//2) - (A*C*(B-B//2)))", "N", "abs(A*C*(B//2) - (A*C*(B-B//2)))", "abs", "A*C*(B//2) - (A*C*(B-B//2))", "A*C*(B//2)", "A*C", "A", "C", "B//2", "B", "2", "A*C*(B-B//2)", "A*C", "A", "C", "B-B//2", "B", "B//2", "B", "2", "M = abs(C*B*(A//2) - (C*B*(A-A//2)))", "M", "abs(C*B*(A//2) - (C*B*(A-A//2)))", "abs", "C*B*(A//2) - (C*B*(A-A//2))", "C*B*(A//2)", "C*B", "C", "B", "A//2", "A", "2", "C*B*(A-A//2)", "C*B", "C", "B", "A-A//2", "A", "A//2", "A", "2", "print(min(L,N,M))", "print", "min(L,N,M)", "min", "L", "N", "M", "B,C = map(int,input().split())", "map(int,input().split())", "B", "N = abs(A*C*(B//2) - (A*C*(B-B//2)))", "abs(A*C*(B//2) - (A*C*(B-B//2)))", "N", "M = abs(C*B*(A//2) - (C*B*(A-A//2)))", "abs(C*B*(A//2) - (C*B*(A-A//2)))", "M", "A,B,C = map(int,input().split())", "map(int,input().split())", "A", "L = abs(A*B*(C//2) - (A*B*(C-C//2)))", "abs(A*B*(C//2) - (A*B*(C-C//2)))", "L", "C = map(int,input().split())", "map(int,input().split())", "C" ]
# agc004_a.py A,B,C = map(int,input().split()) if A%2 == 0 or B%2 == 0 or C%2 == 0 : print(0) exit() L = abs(A*B*(C//2) - (A*B*(C-C//2))) N = abs(A*C*(B//2) - (A*C*(B-B//2))) M = abs(C*B*(A//2) - (C*B*(A-A//2))) print(min(L,N,M))
[ 7, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 4, 18, 13, 13, 4, 13, 8, 2, 18, 13, 17, 17, 2, 18, 13, 17, 18, 13, 17, 17, 10, 13, 13 ]
[ [ 4, 3 ], [ 3, 12 ], [ 37, 14 ], [ 38, 18 ], [ 38, 25 ], [ 38, 30 ], [ 38, 33 ], [ 37, 38 ] ]
[ "side = [int(i) for i in input().split()]\nside.sort()\nprint(side[0]*side[1] if side[2]&1 else 0)", "int(i) for i in input().split()", "for i in input().split()", "i", "input().split()", "().split", "()", "input", "split", "for i in input().split()", "int(i)", "int", "i", "side = [int(i) for i in input().split()]", "side", "[int(i) for i in input().split()]", "side.sort()", "side.sort", "side", "sort", "print(side[0]*side[1] if side[2]&1 else 0)", "print", "side[0]*side[1] if side[2]&1 else 0", "side[2]&1", "side[2]", "side", "2", "1", "side[0]*side[1]", "side[0]", "side", "0", "side[1]", "side", "1", "0", "side = [int(i) for i in input().split()]", "[int(i) for i in input().split()]", "side" ]
side = [int(i) for i in input().split()] side.sort() print(side[0]*side[1] if side[2]&1 else 0)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 14, 2, 2, 4, 13, 13, 13, 13, 17, 17, 4, 13, 17, 0, 13, 2, 2, 2, 2, 2, 2, 4, 13, 13, 13, 13, 17, 17, 13, 13, 13, 4, 13, 13, 13, 13, 0, 13, 2, 2, 2, 2, 2, 4, 13, 13, 13, 13, 17, 13, 13, 13, 4, 13, 13, 13, 13, 4, 13, 2, 13, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 88, 2 ], [ 88, 11 ], [ 88, 12 ], [ 77, 18 ], [ 89, 19 ], [ 86, 20 ], [ 79, 27 ], [ 77, 36 ], [ 89, 37 ], [ 86, 38 ], [ 77, 41 ], [ 89, 42 ], [ 86, 43 ], [ 77, 46 ], [ 89, 47 ], [ 86, 48 ], [ 82, 50 ], [ 77, 58 ], [ 89, 59 ], [ 86, 60 ], [ 77, 62 ], [ 89, 63 ], [ 86, 64 ], [ 77, 67 ], [ 89, 68 ], [ 86, 69 ], [ 80, 73 ], [ 83, 74 ], [ 88, 77 ], [ 79, 80 ], [ 82, 83 ], [ 88, 86 ], [ 88, 89 ] ]
[ "a,b,c = map(int, input().split())\nif max(a,b,c)%2 == 0:\n print(0)\nelse:\n big = (((max(a,b,c)//2)+1)*a*b*c)//max(a,b,c)\n small = ((max(a,b,c)//2)*a*b*c)//max(a,b,c)\n print(big-small)", "a,b,c = map(int, input().split())", "a", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "b", "c", "if max(a,b,c)%2 == 0:\n print(0)\nelse:\n big = (((max(a,b,c)//2)+1)*a*b*c)//max(a,b,c)\n small = ((max(a,b,c)//2)*a*b*c)//max(a,b,c)\n print(big-small)", "max(a,b,c)%2 == 0", "max(a,b,c)%2", "max(a,b,c)", "max", "a", "b", "c", "2", "0", "print(0)", "print", "0", "big = (((max(a,b,c)//2)+1)*a*b*c)//max(a,b,c)", "big", "(((max(a,b,c)//2)+1)*a*b*c)//max(a,b,c)", "((max(a,b,c)//2)+1)*a*b*c", "((max(a,b,c)//2)+1)*a*b", "((max(a,b,c)//2)+1)*a", "(max(a,b,c)//2)+1", "max(a,b,c)//2", "max(a,b,c)", "max", "a", "b", "c", "2", "1", "a", "b", "c", "max(a,b,c)", "max", "a", "b", "c", "small = ((max(a,b,c)//2)*a*b*c)//max(a,b,c)", "small", "((max(a,b,c)//2)*a*b*c)//max(a,b,c)", "(max(a,b,c)//2)*a*b*c", "(max(a,b,c)//2)*a*b", "(max(a,b,c)//2)*a", "max(a,b,c)//2", "max(a,b,c)", "max", "a", "b", "c", "2", "a", "b", "c", "max(a,b,c)", "max", "a", "b", "c", "print(big-small)", "print", "big-small", "big", "small", "a,b,c = map(int, input().split())", "map(int, input().split())", "a", "big = (((max(a,b,c)//2)+1)*a*b*c)//max(a,b,c)", "(((max(a,b,c)//2)+1)*a*b*c)//max(a,b,c)", "big", "small = ((max(a,b,c)//2)*a*b*c)//max(a,b,c)", "((max(a,b,c)//2)*a*b*c)//max(a,b,c)", "small", "c = map(int, input().split())", "map(int, input().split())", "c", "b,c = map(int, input().split())", "map(int, input().split())", "b" ]
a,b,c = map(int, input().split()) if max(a,b,c)%2 == 0: print(0) else: big = (((max(a,b,c)//2)+1)*a*b*c)//max(a,b,c) small = ((max(a,b,c)//2)*a*b*c)//max(a,b,c) print(big-small)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 39, 13, 13, 13, 28, 13, 4, 13, 17, 14, 2, 2, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 0, 13, 2, 2, 2, 2, 2, 13, 17, 17, 13, 13, 2, 2, 2, 13, 17, 13, 13, 0, 13, 2, 2, 2, 13, 2, 2, 13, 17, 17, 13, 2, 2, 13, 2, 13, 17, 13, 0, 13, 2, 2, 2, 13, 13, 2, 2, 13, 17, 17, 2, 2, 13, 13, 2, 13, 17, 4, 13, 4, 13, 13, 13, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 39, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 117, 2 ], [ 117, 11 ], [ 117, 12 ], [ 114, 14 ], [ 21, 20 ], [ 115, 28 ], [ 20, 29 ], [ 102, 38 ], [ 112, 44 ], [ 118, 47 ], [ 109, 48 ], [ 112, 52 ], [ 118, 54 ], [ 109, 55 ], [ 105, 57 ], [ 112, 61 ], [ 118, 64 ], [ 109, 67 ], [ 112, 70 ], [ 118, 72 ], [ 109, 74 ], [ 120, 76 ], [ 112, 80 ], [ 118, 81 ], [ 109, 84 ], [ 112, 89 ], [ 118, 90 ], [ 109, 92 ], [ 103, 98 ], [ 106, 99 ], [ 121, 100 ], [ 102, 103 ], [ 105, 106 ], [ 117, 109 ], [ 117, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ] ]
[ "A,B,C=map(int,input().split())#どれか1つでも偶数ならばans=0\nl=[A,B,C]\nfor i in range(3):\n if l[i]%2==0:\n print(0)\n exit()\n#以下すべて奇数の場合)\nx=(A//2 +1)*B*C-(A//2)*B*C\ny=A*(B//2 +1)*C-A*(B//2)*C\nz=A*B*(C//2 +1)-A*B*(C//2)\nprint(min(x,y,z))", "A,B,C=map(int,input().split())", "A", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "B", "C", "l=[A,B,C]", "l", "[A,B,C]", "A", "B", "C", "for i in range(3):\n if l[i]%2==0:\n print(0)\n exit()\n#以下すべて奇数の場合)", "i", "range(3)", "range", "3", "if l[i]%2==0:\n print(0)\n exit()\n#以下すべて奇数の場合)", "l[i]%2==0", "l[i]%2", "l[i]", "l", "i", "2", "0", "print(0)", "print", "0", "exit()", "exit", "x=(A//2 +1)*B*C-(A//2)*B*C", "x", "(A//2 +1)*B*C-(A//2)*B*C", "(A//2 +1)*B*C", "(A//2 +1)*B", "A//2 +1", "A//2", "A", "2", "1", "B", "C", "(A//2)*B*C", "(A//2)*B", "A//2", "A", "2", "B", "C", "y=A*(B//2 +1)*C-A*(B//2)*C", "y", "A*(B//2 +1)*C-A*(B//2)*C", "A*(B//2 +1)*C", "A*(B//2 +1)", "A", "B//2 +1", "B//2", "B", "2", "1", "C", "A*(B//2)*C", "A*(B//2)", "A", "B//2", "B", "2", "C", "z=A*B*(C//2 +1)-A*B*(C//2)", "z", "A*B*(C//2 +1)-A*B*(C//2)", "A*B*(C//2 +1)", "A*B", "A", "B", "C//2 +1", "C//2", "C", "2", "1", "A*B*(C//2)", "A*B", "A", "B", "C//2", "C", "2", "print(min(x,y,z))", "print", "min(x,y,z)", "min", "x", "y", "z", "x=(A//2 +1)*B*C-(A//2)*B*C", "(A//2 +1)*B*C-(A//2)*B*C", "x", "y=A*(B//2 +1)*C-A*(B//2)*C", "A*(B//2 +1)*C-A*(B//2)*C", "y", "C=map(int,input().split())", "map(int,input().split())", "C", "A,B,C=map(int,input().split())", "map(int,input().split())", "A", "l=[A,B,C]", "[A,B,C]", "l", "B,C=map(int,input().split())", "map(int,input().split())", "B", "z=A*B*(C//2 +1)-A*B*(C//2)", "A*B*(C//2 +1)-A*B*(C//2)", "z" ]
A,B,C=map(int,input().split())#どれか1つでも偶数ならばans=0 l=[A,B,C] for i in range(3): if l[i]%2==0: print(0) exit() #以下すべて奇数の場合) x=(A//2 +1)*B*C-(A//2)*B*C y=A*(B//2 +1)*C-A*(B//2)*C z=A*B*(C//2 +1)-A*B*(C//2) print(min(x,y,z))
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 14, 2, 2, 2, 2, 13, 13, 13, 17, 17, 4, 13, 17, 4, 13, 0, 13, 39, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 52, 2 ], [ 52, 11 ], [ 52, 12 ], [ 50, 18 ], [ 47, 19 ], [ 53, 20 ], [ 55, 29 ], [ 50, 32 ], [ 47, 33 ], [ 47, 35 ], [ 53, 36 ], [ 50, 38 ], [ 53, 39 ], [ 56, 44 ], [ 52, 47 ], [ 52, 50 ], [ 52, 53 ], [ 55, 56 ] ]
[ "A,B,C = map(int, input().split())\n\nif A*B*C%2==0:\n print(0)\n exit()\n\nmylist=[A*B,B*C,A*C]\nprint(min(mylist))", "A,B,C = map(int, input().split())", "A", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "B", "C", "if A*B*C%2==0:\n print(0)\n exit()", "A*B*C%2==0", "A*B*C%2", "A*B*C", "A*B", "A", "B", "C", "2", "0", "print(0)", "print", "0", "exit()", "exit", "mylist=[A*B,B*C,A*C]", "mylist", "[A*B,B*C,A*C]", "A*B", "A", "B", "B*C", "B", "C", "A*C", "A", "C", "print(min(mylist))", "print", "min(mylist)", "min", "mylist", "B,C = map(int, input().split())", "map(int, input().split())", "B", "A,B,C = map(int, input().split())", "map(int, input().split())", "A", "C = map(int, input().split())", "map(int, input().split())", "C", "mylist=[A*B,B*C,A*C]", "[A*B,B*C,A*C]", "mylist" ]
A,B,C = map(int, input().split()) if A*B*C%2==0: print(0) exit() mylist=[A*B,B*C,A*C] print(min(mylist))
[ 7, 15, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 2, 17, 17, 0, 13, 2, 2, 17, 17, 17, 0, 13, 12, 4, 18, 4, 18, 18, 13, 13, 13, 13, 0, 13, 12, 4, 13, 8, 13, 39, 4, 13, 17, 4, 13, 17, 23, 0, 13, 12, 4, 13, 8, 13, 39, 4, 13, 17, 4, 13, 17, 23, 0, 13, 12, 2, 4, 13, 13, 17, 23, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 14, 2, 2, 2, 2, 13, 13, 13, 17, 17, 4, 13, 17, 4, 13, 4, 13, 2, 13, 13, 2, 13, 13, 2, 13, 13, 10, 2, 13, 10, 12, 13, 10, 12, 13, 10, 4, 13, 10, 4, 13, 10, 12, 13, 10, 4, 13, 10, 2, 13, 10, 12, 13 ]
[ [ 133, 11 ], [ 112, 16 ], [ 115, 23 ], [ 118, 35 ], [ 127, 50 ], [ 136, 65 ], [ 130, 74 ], [ 116, 81 ], [ 130, 83 ], [ 130, 84 ], [ 122, 90 ], [ 125, 91 ], [ 131, 92 ], [ 122, 103 ], [ 125, 104 ], [ 125, 106 ], [ 131, 107 ], [ 131, 109 ], [ 122, 110 ], [ 112, 113 ], [ 115, 116 ], [ 118, 119 ], [ 130, 122 ], [ 130, 125 ], [ 127, 128 ], [ 130, 131 ], [ 133, 134 ], [ 136, 137 ] ]
[ "# -*- coding: utf-8 -*-\nimport sys\nsys.setrecursionlimit(10**9)\nINF=10**18\nMOD=10**9+7\ninput=lambda: sys.stdin.readline().rstrip()\nYesNo=lambda b: bool([print('Yes')] if b else print('No'))\nYESNO=lambda b: bool([print('YES')] if b else print('NO'))\nint1=lambda x:int(x)-1\n\na,b,c=map(int,input().split())\nif a*b*c%2==0:\n print(0)\nelse:\n print(min(a*b,b*c,c*a))", "import sys", "sys", "sys.setrecursionlimit(10**9)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10**9", "10", "9", "INF=10**18", "INF", "10**18", "10", "18", "MOD=10**9+7", "MOD", "10**9+7", "10**9", "10", "9", "7", "input=lambda: sys.stdin.readline().rstrip()", "input", "lambda: sys.stdin.readline().rstrip()", "sys.stdin.readline().rstrip()", "sys.stdin.readline().rstrip", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "rstrip", "YesNo=lambda b: bool([print('Yes')] if b else print('No'))", "YesNo", "lambda b: bool([print('Yes')] if b else print('No'))", "bool([print('Yes')] if b else print('No'))", "bool", "[print('Yes')] if b else print('No')", "b", "[print('Yes')]", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "b", "YESNO=lambda b: bool([print('YES')] if b else print('NO'))", "YESNO", "lambda b: bool([print('YES')] if b else print('NO'))", "bool([print('YES')] if b else print('NO'))", "bool", "[print('YES')] if b else print('NO')", "b", "[print('YES')]", "print('YES')", "print", "'YES'", "print('NO')", "print", "'NO'", "b", "int1=lambda x:int(x)-1", "int1", "lambda x:int(x)-1", "int(x)-1", "int(x)", "int", "x", "1", "x", "a,b,c=map(int,input().split())", "a", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "b", "c", "if a*b*c%2==0:\n print(0)\nelse:\n print(min(a*b,b*c,c*a))", "a*b*c%2==0", "a*b*c%2", "a*b*c", "a*b", "a", "b", "c", "2", "0", "print(0)", "print", "0", "print(min(a*b,b*c,c*a))", "print", "min(a*b,b*c,c*a)", "min", "a*b", "a", "b", "b*c", "b", "c", "c*a", "c", "a", "MOD=10**9+7", "10**9+7", "MOD", "input=lambda: sys.stdin.readline().rstrip()", "lambda: sys.stdin.readline().rstrip()", "input", "YesNo=lambda b: bool([print('Yes')] if b else print('No'))", "lambda b: bool([print('Yes')] if b else print('No'))", "YesNo", "a,b,c=map(int,input().split())", "map(int,input().split())", "a", "b,c=map(int,input().split())", "map(int,input().split())", "b", "YESNO=lambda b: bool([print('YES')] if b else print('NO'))", "lambda b: bool([print('YES')] if b else print('NO'))", "YESNO", "c=map(int,input().split())", "map(int,input().split())", "c", "INF=10**18", "10**18", "INF", "int1=lambda x:int(x)-1", "lambda x:int(x)-1", "int1" ]
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**9) INF=10**18 MOD=10**9+7 input=lambda: sys.stdin.readline().rstrip() YesNo=lambda b: bool([print('Yes')] if b else print('No')) YESNO=lambda b: bool([print('YES')] if b else print('NO')) int1=lambda x:int(x)-1 a,b,c=map(int,input().split()) if a*b*c%2==0: print(0) else: print(min(a*b,b*c,c*a))
[ 7, 15, 15, 15, 15, 15, 15, 13, 15, 13, 4, 18, 13, 13, 17, 0, 13, 2, 2, 17, 17, 17, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 13, 13, 13, 4, 13, 4, 13, 2, 2, 2, 13, 13, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 13, 2, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13, 10, 2, 13 ]
[ [ 84, 16 ], [ 39, 38 ], [ 82, 42 ], [ 45, 44 ], [ 38, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 55 ], [ 46, 56 ], [ 47, 59 ], [ 47, 62 ], [ 44, 66 ], [ 46, 67 ], [ 47, 69 ], [ 79, 76 ], [ 84, 85 ] ]
[ "from statistics import median\n#import collections\n#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]\nfrom fractions import gcd\nfrom itertools import combinations # (string,3) 3回\nfrom collections import deque\nfrom collections import defaultdict\nimport bisect\n#\n# d = m - k[i] - k[j]\n# if kk[bisect.bisect_right(kk,d) - 1] == d:\n#\n#\n#\n# pythonで無理なときは、pypyでやると正解するかも!!\n#\n#\n\nimport sys\nsys.setrecursionlimit(10000000)\nmod = 10**9 + 7\n\ndef readInts():\n return list(map(int,input().split()))\ndef main():\n A = sorted(readInts())\n a,b,c = A\n #MaxArea = a * b * c\n #red = 0\n #dist = MaxArea - red\n # for i in range(1,MaxArea//(a*b)//2 + 1):\n # #print(red)\n # red += a * b\n # dist = min(dist,abs(MaxArea - red - red))\n #print(dist)\n print(abs(a*b*(c//2+c%2) - a*b*(c//2)))\nif __name__ == '__main__':\n main()", "from statistics import median", "from fractions import gcd", "from itertools import combinations", "from collections import deque", "from collections import defaultdict", "import bisect", "bisect", "import sys", "sys", "sys.setrecursionlimit(10000000)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10000000", "mod = 10**9 + 7", "mod", "10**9 + 7", "10**9", "10", "9", "7", "def readInts():\n return list(map(int,input().split()))", "readInts", "return list(map(int,input().split()))", "list(map(int,input().split()))", "list", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "def main():\n A = sorted(readInts())\n a,b,c = A\n #MaxArea = a * b * c\n #red = 0\n #dist = MaxArea - red\n # for i in range(1,MaxArea//(a*b)//2 + 1):\n # #print(red)\n # red += a * b\n # dist = min(dist,abs(MaxArea - red - red))\n #print(dist)\n print(abs(a*b*(c//2+c%2) - a*b*(c//2)))", "main", "A = sorted(readInts())", "A", "sorted(readInts())", "sorted", "readInts()", "readInts", "a,b,c = A", "a", "A", "b", "c", "print(abs(a*b*(c//2+c%2) - a*b*(c//2)))", "print", "abs(a*b*(c//2+c%2) - a*b*(c//2))", "abs", "a*b*(c//2+c%2) - a*b*(c//2)", "a*b*(c//2+c%2)", "a*b", "a", "b", "c//2+c%2", "c//2", "c", "2", "c%2", "c", "2", "a*b*(c//2)", "a*b", "a", "b", "c//2", "c", "2", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n A = sorted(readInts())\n a,b,c = A\n #MaxArea = a * b * c\n #red = 0\n #dist = MaxArea - red\n # for i in range(1,MaxArea//(a*b)//2 + 1):\n # #print(red)\n # red += a * b\n # dist = min(dist,abs(MaxArea - red - red))\n #print(dist)\n print(abs(a*b*(c//2+c%2) - a*b*(c//2)))", "def main():\n A = sorted(readInts())\n a,b,c = A\n #MaxArea = a * b * c\n #red = 0\n #dist = MaxArea - red\n # for i in range(1,MaxArea//(a*b)//2 + 1):\n # #print(red)\n # red += a * b\n # dist = min(dist,abs(MaxArea - red - red))\n #print(dist)\n print(abs(a*b*(c//2+c%2) - a*b*(c//2)))", "main", "def readInts():\n return list(map(int,input().split()))", "def readInts():\n return list(map(int,input().split()))", "readInts", "mod = 10**9 + 7", "10**9 + 7", "mod" ]
from statistics import median #import collections #aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] from fractions import gcd from itertools import combinations # (string,3) 3回 from collections import deque from collections import defaultdict import bisect # # d = m - k[i] - k[j] # if kk[bisect.bisect_right(kk,d) - 1] == d: # # # # pythonで無理なときは、pypyでやると正解するかも!! # # import sys sys.setrecursionlimit(10000000) mod = 10**9 + 7 def readInts(): return list(map(int,input().split())) def main(): A = sorted(readInts()) a,b,c = A #MaxArea = a * b * c #red = 0 #dist = MaxArea - red # for i in range(1,MaxArea//(a*b)//2 + 1): # #print(red) # red += a * b # dist = min(dist,abs(MaxArea - red - red)) #print(dist) print(abs(a*b*(c//2+c%2) - a*b*(c//2))) if __name__ == '__main__': main()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 17, 4, 13, 2, 2, 2, 13, 13, 13, 4, 13, 13, 13, 13, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 50, 2 ], [ 50, 11 ], [ 50, 12 ], [ 51, 18 ], [ 48, 21 ], [ 45, 24 ], [ 51, 32 ], [ 48, 33 ], [ 45, 34 ], [ 51, 37 ], [ 48, 38 ], [ 45, 39 ], [ 50, 45 ], [ 50, 48 ], [ 50, 51 ] ]
[ "A,B,C = map(int,input().split())\nif A%2 == B%2 == C%2 ==1:\n print(A*B*C//max(A,B,C))\nelse:\n print(0)", "A,B,C = map(int,input().split())", "A", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "B", "C", "if A%2 == B%2 == C%2 ==1:\n print(A*B*C//max(A,B,C))\nelse:\n print(0)", "A%2 == B%2 == C%2 ==1", "A%2 == B%2 == C%2", "A%2 == B%2", "A%2", "A", "2", "B%2", "B", "2", "C%2", "C", "2", "1", "print(A*B*C//max(A,B,C))", "print", "A*B*C//max(A,B,C)", "A*B*C", "A*B", "A", "B", "C", "max(A,B,C)", "max", "A", "B", "C", "print(0)", "print", "0", "C = map(int,input().split())", "map(int,input().split())", "C", "B,C = map(int,input().split())", "map(int,input().split())", "B", "A,B,C = map(int,input().split())", "map(int,input().split())", "A" ]
A,B,C = map(int,input().split()) if A%2 == B%2 == C%2 ==1: print(A*B*C//max(A,B,C)) else: print(0)
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 17, 4, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 0, 13, 17, 14, 2, 2, 18, 13, 17, 17, 17, 4, 13, 17, 4, 13, 2, 18, 13, 17, 18, 13, 17, 10, 17, 13, 10, 4, 13 ]
[ [ 65, 4 ], [ 62, 16 ], [ 20, 19 ], [ 66, 19 ], [ 19, 24 ], [ 63, 29 ], [ 66, 36 ], [ 40, 39 ], [ 66, 45 ], [ 66, 56 ], [ 66, 59 ], [ 62, 63 ], [ 65, 66 ] ]
[ "import sys\nC = list(map(int, input().split()))\n\nres = 0\n\nfor c in C:\n if c % 2 == 0:\n print(res)\n sys.exit()\n\nC.sort(reverse=True)\n\nif C[0] % 2 == 0:\n print(0)\nelse:\n print(C[1] * C[2])", "import sys", "sys", "C = list(map(int, input().split()))", "C", "list(map(int, input().split()))", "list", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "res = 0", "res", "0", "for c in C:\n if c % 2 == 0:\n print(res)\n sys.exit()", "c", "C", "if c % 2 == 0:\n print(res)\n sys.exit()", "c % 2 == 0", "c % 2", "c", "2", "0", "print(res)", "print", "res", "sys.exit()", "sys.exit", "sys", "exit", "C.sort(reverse=True)", "C.sort", "C", "sort", "reverse=True", "reverse", "True", "if C[0] % 2 == 0:\n print(0)\nelse:\n print(C[1] * C[2])", "C[0] % 2 == 0", "C[0] % 2", "C[0]", "C", "0", "2", "0", "print(0)", "print", "0", "print(C[1] * C[2])", "print", "C[1] * C[2]", "C[1]", "C", "1", "C[2]", "C", "2", "res = 0", "0", "res", "C = list(map(int, input().split()))", "list(map(int, input().split()))", "C" ]
import sys C = list(map(int, input().split())) res = 0 for c in C: if c % 2 == 0: print(res) sys.exit() C.sort(reverse=True) if C[0] % 2 == 0: print(0) else: print(C[1] * C[2])
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 4, 18, 13, 13, 14, 2, 2, 2, 2, 18, 13, 17, 18, 13, 17, 18, 13, 17, 17, 17, 4, 13, 17, 4, 13, 2, 18, 13, 17, 18, 13, 17, 10, 4, 13 ]
[ [ 46, 2 ], [ 47, 15 ], [ 47, 23 ], [ 47, 26 ], [ 47, 29 ], [ 47, 40 ], [ 47, 43 ], [ 46, 47 ] ]
[ "ls = list(map(int, input().split()))\nls.sort()\nif (ls[0] * ls[1] * ls[2]) % 2 == 0:\n print(0)\nelse:\n print(ls[0] * ls[1])", "ls = list(map(int, input().split()))", "ls", "list(map(int, input().split()))", "list", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "ls.sort()", "ls.sort", "ls", "sort", "if (ls[0] * ls[1] * ls[2]) % 2 == 0:\n print(0)\nelse:\n print(ls[0] * ls[1])", "(ls[0] * ls[1] * ls[2]) % 2 == 0", "(ls[0] * ls[1] * ls[2]) % 2", "ls[0] * ls[1] * ls[2]", "ls[0] * ls[1]", "ls[0]", "ls", "0", "ls[1]", "ls", "1", "ls[2]", "ls", "2", "2", "0", "print(0)", "print", "0", "print(ls[0] * ls[1])", "print", "ls[0] * ls[1]", "ls[0]", "ls", "0", "ls[1]", "ls", "1", "ls = list(map(int, input().split()))", "list(map(int, input().split()))", "ls" ]
ls = list(map(int, input().split())) ls.sort() if (ls[0] * ls[1] * ls[2]) % 2 == 0: print(0) else: print(ls[0] * ls[1])
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 2, 13, 17, 0, 13, 2, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 2, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 2, 13, 2, 13, 17, 0, 13, 4, 13, 2, 2, 2, 13, 13, 13, 2, 2, 13, 13, 13, 2, 2, 2, 13, 13, 13, 2, 2, 13, 13, 13, 0, 13, 4, 13, 13, 2, 2, 2, 13, 13, 13, 2, 2, 13, 13, 13, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 122, 2 ], [ 122, 11 ], [ 122, 12 ], [ 125, 14 ], [ 99, 16 ], [ 113, 19 ], [ 99, 21 ], [ 99, 23 ], [ 116, 26 ], [ 96, 28 ], [ 104, 31 ], [ 96, 33 ], [ 96, 35 ], [ 101, 38 ], [ 123, 40 ], [ 107, 43 ], [ 123, 45 ], [ 123, 47 ], [ 119, 50 ], [ 114, 56 ], [ 96, 57 ], [ 123, 58 ], [ 126, 61 ], [ 96, 62 ], [ 123, 63 ], [ 105, 67 ], [ 99, 68 ], [ 123, 69 ], [ 117, 72 ], [ 99, 73 ], [ 123, 74 ], [ 110, 76 ], [ 120, 79 ], [ 108, 83 ], [ 99, 84 ], [ 96, 85 ], [ 102, 88 ], [ 99, 89 ], [ 96, 90 ], [ 111, 93 ], [ 120, 93 ], [ 122, 96 ], [ 122, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 125, 126 ] ]
[ "a, b, c = map(int, input().split())\n\na1 = a//2\na2 = a - (a//2)\nb1 = b//2\nb2 = b - (b//2)\nc1 = c//2\nc2 = c - c//2\n\nans = min(a2*b*c - a1*b*c, b2 * a*c - b1*a*c)\nans = min(ans, c2 * a*b - c1 * a * b)\nprint(ans)", "a, b, c = map(int, input().split())", "a", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "b", "c", "a1 = a//2", "a1", "a//2", "a", "2", "a2 = a - (a//2)", "a2", "a - (a//2)", "a", "a//2", "a", "2", "b1 = b//2", "b1", "b//2", "b", "2", "b2 = b - (b//2)", "b2", "b - (b//2)", "b", "b//2", "b", "2", "c1 = c//2", "c1", "c//2", "c", "2", "c2 = c - c//2", "c2", "c - c//2", "c", "c//2", "c", "2", "ans = min(a2*b*c - a1*b*c, b2 * a*c - b1*a*c)", "ans", "min(a2*b*c - a1*b*c, b2 * a*c - b1*a*c)", "min", "a2*b*c - a1*b*c", "a2*b*c", "a2*b", "a2", "b", "c", "a1*b*c", "a1*b", "a1", "b", "c", "b2 * a*c - b1*a*c", "b2 * a*c", "b2 * a", "b2", "a", "c", "b1*a*c", "b1*a", "b1", "a", "c", "ans = min(ans, c2 * a*b - c1 * a * b)", "ans", "min(ans, c2 * a*b - c1 * a * b)", "min", "ans", "c2 * a*b - c1 * a * b", "c2 * a*b", "c2 * a", "c2", "a", "b", "c1 * a * b", "c1 * a", "c1", "a", "b", "print(ans)", "print", "ans", "b, c = map(int, input().split())", "map(int, input().split())", "b", "a, b, c = map(int, input().split())", "map(int, input().split())", "a", "c1 = c//2", "c//2", "c1", "b2 = b - (b//2)", "b - (b//2)", "b2", "c2 = c - c//2", "c - c//2", "c2", "ans = min(ans, c2 * a*b - c1 * a * b)", "min(ans, c2 * a*b - c1 * a * b)", "ans", "a2 = a - (a//2)", "a - (a//2)", "a2", "b1 = b//2", "b//2", "b1", "ans = min(a2*b*c - a1*b*c, b2 * a*c - b1*a*c)", "min(a2*b*c - a1*b*c, b2 * a*c - b1*a*c)", "ans", "c = map(int, input().split())", "map(int, input().split())", "c", "a1 = a//2", "a//2", "a1" ]
a, b, c = map(int, input().split()) a1 = a//2 a2 = a - (a//2) b1 = b//2 b2 = b - (b//2) c1 = c//2 c2 = c - c//2 ans = min(a2*b*c - a1*b*c, b2 * a*c - b1*a*c) ans = min(ans, c2 * a*b - c1 * a * b) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 28, 13, 13, 14, 2, 2, 13, 17, 17, 4, 13, 17, 4, 13, 4, 13, 4, 13, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 10, 4, 13 ]
[ [ 53, 2 ], [ 15, 14 ], [ 54, 14 ], [ 14, 19 ], [ 54, 33 ], [ 54, 36 ], [ 54, 40 ], [ 54, 43 ], [ 54, 47 ], [ 54, 50 ], [ 53, 54 ] ]
[ "l = list(map(int,input().split()))\n\nfor i in l:\n if i%2==0:\n print(0)\n exit()\n\nprint(min(l[0]*l[1], l[1]*l[2], l[2]*l[0]))", "l = list(map(int,input().split()))", "l", "list(map(int,input().split()))", "list", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "for i in l:\n if i%2==0:\n print(0)\n exit()", "i", "l", "if i%2==0:\n print(0)\n exit()", "i%2==0", "i%2", "i", "2", "0", "print(0)", "print", "0", "exit()", "exit", "print(min(l[0]*l[1], l[1]*l[2], l[2]*l[0]))", "print", "min(l[0]*l[1], l[1]*l[2], l[2]*l[0])", "min", "l[0]*l[1]", "l[0]", "l", "0", "l[1]", "l", "1", "l[1]*l[2]", "l[1]", "l", "1", "l[2]", "l", "2", "l[2]*l[0]", "l[2]", "l", "2", "l[0]", "l", "0", "l = list(map(int,input().split()))", "list(map(int,input().split()))", "l" ]
l = list(map(int,input().split())) for i in l: if i%2==0: print(0) exit() print(min(l[0]*l[1], l[1]*l[2], l[2]*l[0]))
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 2, 2, 2, 13, 13, 2, 13, 17, 2, 2, 13, 13, 2, 13, 2, 13, 17, 0, 13, 4, 13, 2, 2, 2, 13, 13, 2, 13, 17, 2, 2, 13, 13, 2, 13, 2, 13, 17, 0, 13, 4, 13, 2, 2, 2, 13, 13, 2, 13, 17, 2, 2, 13, 13, 2, 13, 2, 13, 17, 4, 13, 4, 13, 13, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 96, 2 ], [ 96, 11 ], [ 96, 12 ], [ 90, 14 ], [ 97, 20 ], [ 85, 21 ], [ 88, 23 ], [ 97, 27 ], [ 85, 28 ], [ 88, 30 ], [ 88, 32 ], [ 93, 35 ], [ 97, 41 ], [ 88, 42 ], [ 85, 44 ], [ 97, 48 ], [ 88, 49 ], [ 85, 51 ], [ 85, 53 ], [ 99, 56 ], [ 88, 62 ], [ 85, 63 ], [ 97, 65 ], [ 88, 69 ], [ 85, 70 ], [ 97, 72 ], [ 97, 74 ], [ 91, 80 ], [ 94, 81 ], [ 100, 82 ], [ 96, 85 ], [ 96, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ] ]
[ "A,B,C = map(int,input().split())\n#if A%2 == 0 or B%2 == 0 or C%2 == 0 :\n# print(0)\n# exit()\nL = abs(A*B*(C//2) - (A*B*(C-C//2)))\nN = abs(A*C*(B//2) - (A*C*(B-B//2)))\nM = abs(C*B*(A//2) - (C*B*(A-A//2)))\n\nprint(min(L,N,M))", "A,B,C = map(int,input().split())", "A", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "B", "C", "L = abs(A*B*(C//2) - (A*B*(C-C//2)))", "L", "abs(A*B*(C//2) - (A*B*(C-C//2)))", "abs", "A*B*(C//2) - (A*B*(C-C//2))", "A*B*(C//2)", "A*B", "A", "B", "C//2", "C", "2", "A*B*(C-C//2)", "A*B", "A", "B", "C-C//2", "C", "C//2", "C", "2", "N = abs(A*C*(B//2) - (A*C*(B-B//2)))", "N", "abs(A*C*(B//2) - (A*C*(B-B//2)))", "abs", "A*C*(B//2) - (A*C*(B-B//2))", "A*C*(B//2)", "A*C", "A", "C", "B//2", "B", "2", "A*C*(B-B//2)", "A*C", "A", "C", "B-B//2", "B", "B//2", "B", "2", "M = abs(C*B*(A//2) - (C*B*(A-A//2)))", "M", "abs(C*B*(A//2) - (C*B*(A-A//2)))", "abs", "C*B*(A//2) - (C*B*(A-A//2))", "C*B*(A//2)", "C*B", "C", "B", "A//2", "A", "2", "C*B*(A-A//2)", "C*B", "C", "B", "A-A//2", "A", "A//2", "A", "2", "print(min(L,N,M))", "print", "min(L,N,M)", "min", "L", "N", "M", "B,C = map(int,input().split())", "map(int,input().split())", "B", "C = map(int,input().split())", "map(int,input().split())", "C", "L = abs(A*B*(C//2) - (A*B*(C-C//2)))", "abs(A*B*(C//2) - (A*B*(C-C//2)))", "L", "N = abs(A*C*(B//2) - (A*C*(B-B//2)))", "abs(A*C*(B//2) - (A*C*(B-B//2)))", "N", "A,B,C = map(int,input().split())", "map(int,input().split())", "A", "M = abs(C*B*(A//2) - (C*B*(A-A//2)))", "abs(C*B*(A//2) - (C*B*(A-A//2)))", "M" ]
A,B,C = map(int,input().split()) #if A%2 == 0 or B%2 == 0 or C%2 == 0 : # print(0) # exit() L = abs(A*B*(C//2) - (A*B*(C-C//2))) N = abs(A*C*(B//2) - (A*C*(B-B//2))) M = abs(C*B*(A//2) - (C*B*(A-A//2))) print(min(L,N,M))
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 14, 2, 2, 2, 2, 13, 17, 17, 2, 2, 13, 17, 17, 2, 2, 13, 17, 17, 0, 13, 4, 13, 39, 13, 13, 13, 4, 13, 2, 18, 13, 17, 18, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 58, 2 ], [ 58, 11 ], [ 58, 12 ], [ 59, 18 ], [ 50, 23 ], [ 56, 28 ], [ 52, 32 ], [ 53, 43 ], [ 53, 46 ], [ 58, 50 ], [ 52, 53 ], [ 58, 56 ], [ 58, 59 ] ]
[ "A,B,C = map(int, input().split())\nif A % 2 == 0 or B % 2 == 0 or C % 2 == 0: print(0)\nelse:\n a=sorted((A,B,C))\n print(a[0]*a[1])", "A,B,C = map(int, input().split())", "A", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "B", "C", "if A % 2 == 0 or B % 2 == 0 or C % 2 == 0: print(0)\nelse:\n a=sorted((A,B,C))\n print(a[0]*a[1])", "A % 2 == 0 or B % 2 == 0 or C % 2 == 0", "A % 2 == 0 or B % 2 == 0", "A % 2 == 0", "A % 2", "A", "2", "0", "B % 2 == 0", "B % 2", "B", "2", "0", "C % 2 == 0", "C % 2", "C", "2", "0", "a=sorted((A,B,C))", "a", "sorted((A,B,C))", "sorted", "(A,B,C)", "A", "B", "C", "print(a[0]*a[1])", "print", "a[0]*a[1]", "a[0]", "a", "0", "a[1]", "a", "1", "B,C = map(int, input().split())", "map(int, input().split())", "B", "a=sorted((A,B,C))", "sorted((A,B,C))", "a", "C = map(int, input().split())", "map(int, input().split())", "C", "A,B,C = map(int, input().split())", "map(int, input().split())", "A" ]
A,B,C = map(int, input().split()) if A % 2 == 0 or B % 2 == 0 or C % 2 == 0: print(0) else: a=sorted((A,B,C)) print(a[0]*a[1])
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 2, 13, 17, 13, 40, 2, 40, 13, 17, 4, 13, 2, 2, 13, 13, 2, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 40, 13, 10, 2, 13 ]
[ [ 42, 2 ], [ 42, 13 ], [ 42, 14 ], [ 48, 16 ], [ 37, 18 ], [ 45, 20 ], [ 37, 24 ], [ 40, 30 ], [ 43, 31 ], [ 46, 33 ], [ 49, 34 ], [ 42, 37 ], [ 42, 40 ], [ 42, 43 ], [ 45, 46 ], [ 48, 49 ] ]
[ "a,b,c = sorted(map(int,input().split()))\nc1,c2 = c//2,-(-c//2)\nprint(a*b*(c2-c1))", "a,b,c = sorted(map(int,input().split()))", "a", "sorted(map(int,input().split()))", "sorted", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "b", "c", "c1,c2 = c//2,-(-c//2)", "c1", "c//2", "c", "2", "c2", "-(-c//2)", "-c//2", "-c", "c", "2", "print(a*b*(c2-c1))", "print", "a*b*(c2-c1)", "a*b", "a", "b", "c2-c1", "c2", "c1", "c = sorted(map(int,input().split()))", "sorted(map(int,input().split()))", "c", "a,b,c = sorted(map(int,input().split()))", "sorted(map(int,input().split()))", "a", "b,c = sorted(map(int,input().split()))", "sorted(map(int,input().split()))", "b", "c2 = c//2,-(-c//2)", "-(-c//2)", "c2", "c1,c2 = c//2,-(-c//2)", "c//2", "c1" ]
a,b,c = sorted(map(int,input().split())) c1,c2 = c//2,-(-c//2) print(a*b*(c2-c1))