problem_id
stringlengths 6
6
| user_id
stringlengths 10
10
| time_limit
float64 1k
8k
| memory_limit
float64 262k
1.05M
| problem_description
stringlengths 48
1.55k
| codes
stringlengths 35
98.9k
| status
stringlengths 28
1.7k
| submission_ids
stringlengths 28
1.41k
| memories
stringlengths 13
808
| cpu_times
stringlengths 11
610
| code_sizes
stringlengths 7
505
|
---|---|---|---|---|---|---|---|---|---|---|
p03723 | u239653493 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\ncount=0\nh=sorted([a,b,c])\nif a==b==c:\n print(-1)\nelse: \n while True:\n a1=a//2\n b1=b//2\n c1=c//2\n if (a%2==0 and b%2==0 and c%2==0):\n count+=1\n a=b1+c1\n b=a1+c1\n c=a1+b1\n if sorted([a,b,c])==h:\n print(-1)\n else:\n print(count)\n break', 'a,b,c=map(int,input().split())\ncount=0\n\nif a==b==c and(a%2==0 and b%2==0 and c%2==0):\n print(-1)\nelse: \n while True:\n a1=a//2\n b1=b//2\n c1=c//2\n if (a%2==0 and b%2==0 and c%2==0):\n count+=1\n a=b1+c1\n b=a1+c1\n c=a1+b1\n else:\n print(count)\n break'] | ['Wrong Answer', 'Accepted'] | ['s691683661', 's474906666'] | [7496.0, 3064.0] | [2104.0, 17.0] | [392, 356] |
p03723 | u252828980 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\n\nif any((a%2==1,b%2!==1,c%2==1)):\n print(0)\n exit()\n \ncnt = 0\nwhile cnt <= 100:\n a,b,c = (b+c)/2, (a+c)/2,(a+b)/2\n cnt += 1\n if any((a%1!=0,b%1!=0,c%1!=0)):\n print(cnt-1)\n exit()\nprint(-1)', 'a,b,c = map(int,input().split())\n\nif any((a%2==1,b%2==1,c%2==1)):\n print(0)\n exit()\n \ncnt = 0\nwhile cnt <= 100:\n a,b,c = (b+c)/2, (a+c)/2,(a+b)/2\n cnt += 1\n if any((a%1!=0,b%1!=0,c%1!=0)):\n print(cnt-1)\n exit()\nprint(-1)'] | ['Runtime Error', 'Accepted'] | ['s067388177', 's836126857'] | [2940.0, 3060.0] | [17.0, 18.0] | [253, 252] |
p03723 | u257974487 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int,input().split())\nans = 0\nif a == b == c:\n print(-1)\n exit()\nelse:\n while True:\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n ans += 1\n a = a // 2\n b = b // 2\n c = c // 2\n else:\n break\n\nprint(ans)', 'a, b, c = map(int,input().split())\nans = 0\nif a == b == c:\n if a % 2 == 0:\n print(-1)\n else:\n print(0)\n exit()\nelse:\n while True:\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n ans += 1\n p = a // 2\n q = b // 2\n r = c // 2\n a = q + r\n b = r + p\n c = p + q\n else:\n break\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s164458939', 's860919349'] | [3060.0, 3060.0] | [17.0, 17.0] | [248, 337] |
p03723 | u265628533 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["a,b,c=list(map(int,input().split()))\nans=0\nwhile 1:\n\tif a%2!=0 or b%2!=0 or c%2!=0:\n\t\tprint(ans)\n\t\tbreak\n\tif a==b and b==c:\n\t\tprint('-1')\n\t\tbreak\n\ta,b,c=(b+c)>>1,(a+c)>>1,(a+b)>>2\n\tans+=1;", "a,b,c=list(map(int,input().split()))\nans=0\nwhile 1:\n\tif a&1 or b&1 or c&1:\n\t\tprint(ans)\n\t\tbreak\n\tif a==b and b==c:\n\t\tprint('-1')\n\t\tbreak\n\tans+=1;\n\td=(c+b)>>1\n\te=(a+c)>>1\n\tf=(a+b)>>1\n\ta,b,c=d,e,f"] | ['Wrong Answer', 'Accepted'] | ['s503275151', 's390985024'] | [3060.0, 3064.0] | [17.0, 17.0] | [188, 194] |
p03723 | u274635633 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(input().split())\nif a==b==c:\n print(-1)\nelif a%2==1 or b%2==1 or c%2==1:\n print(0)\nelse:\n ans=0\n while a%2==0 and b%2==0 and c%2==0:\n ans+=1\n a1=(b+c)//2\n b1=(c+a)//2\n c1=(a+b)//2\n a=a1\n b=b1\n c=c1\n print(ans)', 'a,b,c=map(input().split())\nif a==b==c:\n print(-1)\nelif a%2==1 or b%2==1 or c%2==1:\n print(0)\nelse:\n ans=0\n while a%2==0 and b%2==0 and c%2==0:\n ans+=1\n a1=(b+c)//2\n b1=(c+a)//2\n c1=(a+b)//2\n a=a1\n b=b1\n c=c1\nprint(ans)', 'a,b,c=map(int,input().split())\nif a%2==1 or b%2==1 or c%2==1:\n print(0)\nelif a==b==c:\n print(-1)\nelse:\n ans=0\n while a%2==0 and b%2==0 and c%2==0:\n ans+=1\n a1=(b+c)//2\n b1=(c+a)//2\n c1=(a+b)//2\n a=a1\n b=b1\n c=c1\n print(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s756466612', 's792739251', 's734129537'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [245, 243, 249] |
p03723 | u284854859 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\n\nif a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n for i in range(1,10**5):\n a2 = (b+c)//2\n b2 = (a+c)//2\n c2 = (a+b)//2\n a = a2\n b = b2\n c = c2\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n res = 0\n else:\n res = i\n print(res)\n break\n print(-1)\nelse:\n print(0)', 'a,b,c = map(int,input().split())\n\nif a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n for i in range(1,10**5):\n a2 = (b+c)//2\n b2 = (a+c)//2\n c2 = (a+b)//2\n a = a2\n b = b2\n c = c2\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n res = 0\n else:\n res = i\n print(res)\n break\n if i == 10**5-1:\n print(-1)\nelse:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s301865931', 's939522655'] | [3064.0, 3064.0] | [94.0, 96.0] | [399, 432] |
p03723 | u291766461 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = list(map(int, input().split()))\nif A % 2 == 1 and B % 2 == 1 and C % 2 == 1:\n print(0)\n exit()\nif A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n print(-1)\n exit()\n\ncount = 0\nold_A, old_B, old_C = None, None, None\nwhile True:\n half_A = A // 2\n half_B = B // 2\n half_C = C // 2\n A = half_B + half_C\n B = half_A + half_C\n C = half_A + half_B\n count += 1\n if old_A == A and old_B == B and old_C == C:\n print(-1)\n exit()\n\n if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:\n print(count)\n exit()\n old_A = A\n old_B = B\n old_C = C', 'A, B, C = map(int, input().split())\n\nif A == B == C:\n ans = -1 if A % 2 == 0 else 0\nelse:\n ans = 0\n while A % 2 + B % 2 + C % 2 == 0:\n A, B, C = (B + C) // 2, (C + A) // 2, (A + B) // 2\n ans += 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s622775207', 's026023788'] | [3064.0, 3060.0] | [17.0, 17.0] | [597, 229] |
p03723 | u325956328 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import sys\n\nA, B, C = map(int, input().split())\n\n\nif A == B == C:\n if A % 2 == 1:\n print(0)\n else:\n print(-1)\n sys.exit()\n\ncnt = 0\nwhile A % 2 == 0 or B % 2 == 0 or C % 2 == 0:\n a = B // 2 + C // 2\n b = A // 2 + C // 2\n c = A // 2 + B // 2\n A = a\n B = b\n C = c\n cnt += 1\nprint(cnt)\n', 'A, B, C = map(int, input().split())\n\n\ndef F(a, b, c):\n if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:\n return 0\n if a == b == c:\n return -1\n return F((a + b) // 2, (b + c) // 2, (c + a) // 2) + 1\n\n\nprint(F(A, B, C))\n\n'] | ['Wrong Answer', 'Accepted'] | ['s792898611', 's352732045'] | [3060.0, 2940.0] | [2104.0, 17.0] | [330, 236] |
p03723 | u328364772 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\n\nans = 0\nflag = False\nwhile True:\n if a == b == c and a % 2 == 0:\n flag = True\n break\n elif a % 2 == b % 2 == c % 2 == 0:\n a = b//2 + c//2\n b = c//2 + a//2\n c = a//2 + b//2\n ans += 1\n else:\n break\n\nif flag:\n print(-1)\nelse:\n print(ans)\n', 'a, b, c = map(int, input().split())\n\nans = 0\nflag = False\nwhile True:\n if a == b == c and a % 2 == 0:\n flag = True\n break\n elif a % 2 == b % 2 == c % 2 == 0:\n a, b, c = b//2 + c//2, c//2 + a//2, a//2 + b//2\n ans += 1\n else:\n break\n\nif flag:\n print(-1)\nelse:\n print(ans)'] | ['Wrong Answer', 'Accepted'] | ['s406004827', 's668153547'] | [3060.0, 3064.0] | [17.0, 17.0] | [336, 319] |
p03723 | u331997680 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["A, B, C = map(int, input().split())\nif A != B != C:\n D = 0\n while A%2 == 0 and B%2 == 0 and C%2 == 0:\n A = B/2 + C/2\n B = A/2 + C/2\n C = A/2 + B/2\n D += 1\n print(D)\nelse:\n print('-1')", 'A, B, C = map(int, input().split())\nif A == B == C and A%2 == 0:\n print(-1)\nelse:\n D = 0\n while A%2 == 0 and B%2 == 0 and C%2 == 0:\n D += 1\n AA = B/2 + C/2\n BB = A/2 + C/2\n CC = A/2 + B/2\n A = AA\n B = BB\n C = CC\n print(D)'] | ['Wrong Answer', 'Accepted'] | ['s566453883', 's779677032'] | [3060.0, 3064.0] | [19.0, 17.0] | [199, 246] |
p03723 | u357751375 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\ni = 0\n\nwhile a % 2 == 0 and b % 2 == 0 and c % 2 == 0 and i < 10 ** 5:\n x = a // 2\n y = b // 2\n z = c // 2\n a = a // 2\n b = b // 2\n c = c // 2\n a += y // 2 + z // 2\n b += x // 2 + z // 2\n c += x // 2 + y // 2\n i += 1\n\nif i < 10 ** 5:\n print(i)\nelse:\n print(-1)', 'a,b,c = map(int,input().split())\nif a % 2 == 0 and a == b == c:\n print(-1)\nelse:\n ans = 0\n while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n ab,bc,ac = a//2+b//2,b//2+c//2,a//2+c//2\n a,b,c = bc,ac,ab\n ans += 1\n print(ans)'] | ['Wrong Answer', 'Accepted'] | ['s362290159', 's603751223'] | [9144.0, 9096.0] | [110.0, 26.0] | [329, 253] |
p03723 | u357949405 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = map(int, input().split())\nif A == B == C:\n print(-1)\nelse:\n count = 0\n while 0 == A % 2 == B % 2 == C % 2:\n\tA = (B + C) // 2\n B = (C + A) // 2\n C = (A + B) // 2\n count += 1\n print(count)\n ', 'A, B, C = map(int, input().split())\nif A == B == C:\n print(-1)\nelse:\n count = 0\n while 0 == A % 2 == B % 2 == C % 2:\n A = (B + C) // 2\n B = (C + A) // 2\n C = (A + B) // 2\n count += 1\n print(count)\n ', 'A, B, C = map(int, input().split())\nif A == B == C and A % 2 == 0:\n print(-1)\nelse:\n count = 0\n while 0 == A % 2 == B % 2 == C % 2:\n _A = (B + C) // 2\n _B = (C + A) // 2\n _C = (A + B) // 2\n A = _A\n B = _B\n C = _C\n count += 1\n # print("A: {}, B: {}, C: {}".format(A, B, C))\n print(count)\n \n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s360341365', 's520339219', 's084554307'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [214, 217, 320] |
p03723 | u373745856 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['n = int(input())\np2 = [ int(i) for i in input().split() ]\nps = sorted(p2)\n\ncnt=0\nwhile True:\n if p2 == ps: break\n cnt += 1\n high = []\n low = []\n for i in range(len(p2)):\n if p2[i] == max(p2[0:i+1]):\n high.append(p2[i])\n else:\n low.append(p2[i])\n p2 = low + high\n\nprint(cnt)\n', '\na = [ int(i) for i in input().split() ]\n\ncnt=0\nif a[0] % 2 == 1 or a[1] % 2 == 1 or a[2] % 2 == 1:\n pass\nelif a[0] == a[1] and a[1] == a[2]:\n cnt=-1\nelse:\n while True:\n if a[0] % 2 == 1 or a[1] % 2 == 1 or a[2] % 2 == 1: break\n cnt += 1\n a[0], a[1], a[2] = (a[1]+a[2])/2 , (a[0]+a[2])/2, (a[0]+a[1])/2\n\nprint(cnt)\n\n'] | ['Runtime Error', 'Accepted'] | ['s943851255', 's555328178'] | [3064.0, 3064.0] | [17.0, 17.0] | [328, 370] |
p03723 | u375616706 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['def log_2(n):\n t = 0\n while n:\n if n % 2 == 1:\n break\n t += 1\n n //= 2\n return t\n\n\ndef solve(A, B, C)->int:\n\n s = A+B+C\n odd = log_2(s-C)\n even = log_2(s+A)\n\n if odd == even:\n return odd\n else:\n return odd+1\n\n\nA, B, C = map(int, input().split())\nA, B, C = sorted([A, B, C])\n\nans = 0\nif A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n ans = 0\nelif A == B == C:\n ans = -1\nelse:\n ans = solve(A, B, C)\nprint(ans)\n', 'def log_2(n):\n t = 0\n while n:\n if n % 2 == 1:\n break\n t += 1\n n //= 2\n return t\n\n\ndef solve(A, B, C)->int:\n\n s = A+B+C\n odd = log_2(s-C)\n even = log_2(s+A)\n\n if odd == even:\n return odd\n else:\n return odd+1\n\n\nA, B, C = map(int, input().split())\nA, B, C = sort([A, B, C])\n\nans = 0\nif A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n ans = 0\nelif A == B == C:\n ans = -1\nelse:\n ans = solve(A, B, C)\nprint(ans)\n', 'def log_2(n):\n t = 0\n while n:\n if n % 2 == 1:\n break\n t += 1\n n //= 2\n return t\n\n\ndef solve(A, B, C)->int:\n\n s = A+B+C\n odd = min(log_2(s-A), log_2(s-B), log_2(s-C))\n even = min(log_2(s+A), log_2(s+B), log_2(s+C))\n\n if odd == even:\n return odd\n else:\n return odd+1\n\n\nA, B, C = map(int, input().split())\n\nans = 0\nif A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n ans = 0\nelif A == B == C:\n ans = -1\nelse:\n ans = solve(A, B, C)\nprint(ans)\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s449293746', 's472875713', 's833940704'] | [3064.0, 3064.0, 3064.0] | [19.0, 18.0, 18.0] | [481, 479, 511] |
p03723 | u388415336 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C=map(int,input().split())\nif A == B == C:\n\tprint((A % 2) - 1)\nelse:\n\ti = 0\n\twhile (A % 2) == (B%2) == (C%2==0):\n\t\tA,B,C = (B/2) + (C/2), (C/2) + (A/2), (A/2) + (B/2)\n\t\ti += 1\n\tprint(i)\n', 'A,B,C=map(int,input().split())\nif A == B == C:\n\tprint((A % 2) - 1)\nelse:\n\ti = 0\n\twhile (A % 2) == (B%2) == (C%2==0):\n\t\tA,B,C = (B//2) + (C//2), (C//2) + (A//2), (A//2) + (B//2)\n\t\ti += 1\n\tprint(i)\n', 'A,B,C=map(int,input().split())\nif A == B == C:\n\tprint((A % 2) - 1)\nelse:\n\ti = 0\n\twhile (A % 2) == (B%2) == (C%2) == 0:\n\t\tA,B,C = (B//2) + (C//2), (C//2) + (A//2), (A//2) + (B//2)\n\t\ti += 1\n\tprint(i)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s218960605', 's941637001', 's428725574'] | [3060.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [190, 196, 198] |
p03723 | u402629484 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['def main():\n a, b, c = map(int, input().split())\n count = 0\n while (a | b | c) & 1 == 0:\n if a==b==c:\n print(-1)\n return\n a, b, c = (b + c) >> 1, (c + a) >> 1, (a + b) >> 1\n count += 1\n print(a,b,c)\n \n print(count)\n\nmain()\n', 'def main():\n a, b, c = map(int, input().split())\n count = 0\n while (a | b | c) & 1 == 0:\n if a==b==c:\n print(-1)\n return\n a, b, c = (b + c) >> 1, (c + a) >> 1, (a + b) >> 1\n count += 1\n print(a,b,c)\n \n print(count)\n\nwhile True:\n main()\n', 'def main():\n a, b, c = map(int, input().split())\n if a == b == c:\n print(0 if a & 1 else -1)\n return\n count = 0\n while (a | b | c) & 1 == 0:\n a, b, c = (b + c) >> 1, (c + a) >> 1, (a + b) >> 1\n count += 1\n \n print(count)\n \nmain()\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s488729301', 's904670275', 's838832535'] | [3060.0, 3316.0, 3060.0] | [17.0, 21.0, 17.0] | [288, 304, 276] |
p03723 | u402666025 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\n\n\ndef is_even(a, b, c):\n if a % 2 != 0:\n return False\n if b % 2 != 0:\n return False\n if c % 2 != 0:\n return False\n return True\n\ncount = 0\nrem = []\n\nflag = True\n\nwhile is_even(a, b, c) and flag:\n if (a, b, c) in rem:\n print("-1")\n flag = False\n break\n a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2\n count += 1\n rem.append((a, b, c))\n\nif flag is True:\n print(count)\n', 'a, b, c = map(int, input().split())\n\n\ndef is_even(a, b, c):\n if a % 2 != 0:\n return False\n if b % 2 != 0:\n return False\n if c % 2 != 0:\n return False\n return True\n\ncount = 0\nrem = []\n\nflag = True\n\nwhile is_even(a, b, c) and flag:\n a, b, c = (b + c) / 2, (a + c) / 2, (a + b) / 2\n count += 1\n if (a, b, c) in rem:\n print("-1")\n flag = False\n break\n rem.append((a, b, c))\n\n\nif flag is True:\n print(count)\n'] | ['Wrong Answer', 'Accepted'] | ['s848277314', 's092298680'] | [3064.0, 3064.0] | [17.0, 17.0] | [471, 472] |
p03723 | u405256066 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['from sys import stdin\nA,B,C = [int(x) for x in stdin.readline().rstrip().split()]\ndef factorize(n):\n fct = [] \n b, e = 2, 0 \n while b * b <= n:\n while n % b == 0:\n n = n // b\n e = e + 1\n if e > 0:\n fct.append((b, e))\n b, e = b + 1, 0\n if n > 1:\n fct.append((n, 1))\n return fct\n\na = factorize(A)[0][1]\nb = factorize(B)[0][1]\nc = factorize(C)[0][1]\n\nans = max(a,b,c)\nif ans == 1:\n ans = -1\nprint(ans)', 'from sys import stdin\nA,B,C = [int(x) for x in stdin.readline().rstrip().split()]\n \nans = 0\n \nif A == B == C:\n if A % 2 == 0:\n ans = -1\n else:\n ans = 0\nelse:\n for _ in range(1000):\n \n if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n break\n ans += 1\n ta = A\n tb = B\n tc = C\n A = (tb/2) + (tc/2)\n B = (ta/2) + (tc/2)\n C = (ta/2) + (tb/2)\n \n \nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s555396854', 's573150039'] | [3064.0, 3316.0] | [20.0, 19.0] | [509, 456] |
p03723 | u408620326 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = map(int, input().strip().split())\ndef f(a):\n if a % 4 == 0:\n return 2\n elif a % 2 == 0:\n return 1\n else:\n return 0\n\nif f(A) == 0 or f(B) == 0 or f(C) == 0:\n print(0)\nelif f(A) == 1 or f(B) == 1 or f(C) == 1:\n print(1)\nelse:\n print(-1)', 'A, B, C = map(int, input().strip().split())\nans = 0\nwhile A != B and B != C and (A % 2) + (B % 2) + (C % 2) == 0:\n A, B, C = (B + C) // 2, (A, C) // 2, (A + B) // 2\n ans += 1\nprint(ans)', 'A, B, C = map(int, input().strip().split())\nans = 0\nwhile (A != B or B != C) and (A % 2) + (B % 2) + (C % 2) == 0:\n A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2\n ans += 1\nif (A % 2) + (B % 2) + (C % 2) == 0 and A == B == C:\n ans = -1\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s289567483', 's831035036', 's584848840'] | [3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [259, 187, 253] |
p03723 | u413165887 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\nif (a+b)%4 == (b+c)%4 == (c+a)%4 == 0:\n print(-1)\nelse:\n counter = 0\n while a%2==b%2==c%2==0:\n a, b, c = (b+c)//2, (a+c)//2, (a+b)//2\n counter += 1\n print(counter)', 'a, b, c = map(int, input().split())\n\ncounter = 0\nwhile a%2==b%2==c%2==0:\n a, b, c = (b+c)//2, (a+c)//2, (a+b)//2\n counter += 1\n if counter > 26:\n counter = -1\n break\nprint(counter)'] | ['Wrong Answer', 'Accepted'] | ['s809978588', 's458610157'] | [3060.0, 3060.0] | [17.0, 17.0] | [225, 203] |
p03723 | u426649993 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['from fractions import gcd\n\nif __name__ == "__main__":\n a, b, c = map(int, input().split())\n\n if a == b == c:\n print(-1)\n exit()\n\n ab = abs(a-b)\n bc = abs(b-c)\n ca = abs(c-a)\n\n g = gcd(ab, bc)\n g = gcd(g, ca)\n\n ans = 0\n while g % 2 == 0:\n ans += 1\n g //= 2\n\n print(ans)\n', 'from fractions import gcd\n\nif __name__ == "__main__":\n a, b, c = map(int, input().split())\n\n if a == b == c:\n print(-1)\n exit()\n\n ab = abs(a-b)\n bc = abs(b-c)\n\n g = gcd(ab, bc)\n\n ans = 0\n while g % 2 == 0:\n ans += 1\n g //= 2\n\n print(ans)\n', 'if __name__ == "__main__":\n a, b, c = map(int, input().split())\n\n if a == b == c and a % 2 == 0:\n print(-1)\n exit()\n\n ans = 0\n while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n a_tmp = (b+c)//2\n b_tmp = (a+c)//2\n c_tmp = (c+a)//2\n a = a_tmp\n b = b_tmp\n c = c_tmp\n ans += 1\n\n print(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s074540939', 's562189540', 's444685851'] | [5044.0, 5052.0, 3064.0] | [36.0, 35.0, 17.0] | [327, 290, 363] |
p03723 | u430928274 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\na_tmp = a ; b_tmp = b ; c_tmp = c\ncount = 0\nwhile True :\n count += 1\n a = b_tmp/2 + c_tmp/2\n b = a_tmp/2 + c_tmp/2\n c = a_tmp/2 + b_tmp/2\n if a == a_tmp and b == b_tmp and c = c_tmp :\n print("-1")\n break\n a_tmp = a ; b_tmp = b ; c_tmp = c\n if a%2 == 1 or b%2 == 1 or c%2 == 1 :\n print(count)\n break\n else :\n continue\n', 'a, b, c = map(int, input().split())\na_tmp = a ; b_tmp = b ; c_tmp = c\ncount = 0\nwhile True :\n count += 1\n a = b_tmp/2 + c_tmp/2\n b = a_tmp/2 + c_tmp/2\n c = a_tmp/2 + b_tmp/2\n if a == a_tmp and b == b_tmp and c = c_tmp :\n print("-1")\n break\n a_tmp = a ; b_tmp = b ; c_tmp = c\n if a%2 == 1 or b%2 == 1 or c%2 == 1 :\n print(count)\n break\n else :\n continue\n', 'a, b, c = map(int, input().split())\na_tmp = a ; b_tmp = b ; c_tmp = c\ncount = 0\nwhile True :\n if a == b == c and a%2 == 0 :\n print("-1")\n break\n elif a%2 == 1 or b%2 == 1 or c%2 == 1 :\n print(count)\n break\n else :\n a = b_tmp/2 + c_tmp/2\n b = a_tmp/2 + c_tmp/2\n c = a_tmp/2 + b_tmp/2\n a_tmp = a ; b_tmp = b ; c_tmp = c\n count += 1\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s270394382', 's670972191', 's156636880'] | [9012.0, 8892.0, 9196.0] | [29.0, 24.0, 30.0] | [412, 412, 402] |
p03723 | u432453907 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\nif a==b and a==c:\n ans=-1\nfor i in range(1,100000):\n x=a//2\n y=b//2\n z=c//2\n a=y+z\n b=x+z\n c=x+y\n print("{}-{}-{}".format(a,b,c))\n if a%2==1 or b%2==1 or c%2==1:\n ans=i\n break\nprint(ans)', 'a,b,c=map(int,input().split())\nans=-1\nfor i in range(1,10000):\n x=a//2\n y=b//2\n z=c//2\n a=y+z\n b=x+z\n c=x+y\n print("{}-{}-{}".format(a,b,c))\n if a%2==1 or b%2==1 or c%2==1:\n ans=i\n break\nprint(ans)', 'import sys\na,b,c=map(int,input().split())\nif a%2==1 or b%2==1 or c%2==1:\n print(0)\n sys.exit(0)\nelif a==b and b==c:\n print(-1)\n sys.exit(0)\nans=0\nfor i in range(1,10000):\n x=a//2\n y=b//2\n z=c//2\n a=y+z\n b=x+z\n c=x+y\n if a%2==1 or b%2==1 or c%2==1:\n ans=i\n break\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s133325179', 's547394747', 's715028605'] | [9060.0, 9140.0, 9124.0] | [147.0, 40.0, 30.0] | [258, 235, 319] |
p03723 | u441246928 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C = list(map(int,input().split()))\nif A == B == C and A%2 == 0 :\n print(-1)\nelif A == B == C and A%2 == 1 :\n print(0)\nelse :\n cnt=0\n while a%2==b%2==c%2==0:\n total=a+b+c\n a=total//2-a//2\n b=total//2-b//2\n c=total//2-c//2\n cnt+=1\n print(cnt)\n', 'A,B,C = list(map(int,input().split()))\nif A == B == C and A%2 == 0 :\n print(-1)\nelif A == B == C and A%2 == 1 :\n print(0)\nelse :\n cnt=0\n while A%2==B%2==C%2==0:\n total=A+B+C\n A=total//2-A//2\n B=total//2-B//2\n C=total//2-C//2\n cnt+=1\n print(cnt)\n'] | ['Runtime Error', 'Accepted'] | ['s523693789', 's369958270'] | [3060.0, 3060.0] | [17.0, 17.0] | [295, 295] |
p03723 | u442877951 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C = map(int,input().split())\nans = 0\nif A == B == C and A%2 == 0 or B%2 == 0 or C%2 == 0:\n ans = -1\nelse:\n while A%2 == 0 and B%2 == 0 and C%2 == 0:\n if A == B == C:\n ans = -1\n break\n A,B,C = B//2+C//2,A//2+C//2,A//2+B//2\n ans += 1\nprint(ans)', 'A,B,C = map(int,input().split())\nans = 0\nif A == B == C:\n if A%2 != 0 or B%2 != 0 or C%2 != 0:\n pass\n else:\n ans = -1\nelse:\n while A%2 == 0 and B%2 == 0 and C%2 == 0:\n A,B,C = B//2+C//2,A//2+C//2,A//2+B//2\n ans += 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s294996887', 's641062151'] | [9200.0, 9128.0] | [29.0, 27.0] | [267, 241] |
p03723 | u457601965 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["import sys\nimport numpy as np\nimport numba\nfrom numba import jit\n \nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n@jit\ndef main(p):\n count = 0\n if np.any(p%2==1):\n return 0\n if np.unique(p).size == 1:\n return -1\n while True:\n if np.all(p%2 == 0):\n print('hoge')\n p = p/2\n count += 1\n continue\n break\n return count\n\n\np = np.array(readline().split(), np.int64)\nprint(main(p))\n", 'import sys\nimport numpy as np\nimport numba\nfrom numba import jit\n \nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n@jit\ndef main(p):\n count = 0\n if np.any(p%2==1):\n return 0\n if np.unique(p).size == 1:\n return -1\n while True:\n if np.any(p%2 == 1):\n return count\n p[0] = p[1]/2 + p[2]/2\n p[1] = p[0]/2 + p[2]/2\n p[2] = p[0]/2 + p[1]/2\n count += 1\n\n\np = np.array(readline().split(), np.int64)\nprint(main(p))', 'import sys\nimport numpy as np\nimport numba\nfrom numba import jit\n \nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n@jit\ndef main(p):\n count = 0\n if np.any(p%2==1):\n return 0\n if np.unique(p).size == 1:\n return -1\n while True:\n if np.any(p%2 == 1):\n return count\n p[0], p[1], p[2] = p[1]/2 + p[2]/2, p[0]/2 + p[2]/2, p[0]/2 + p[1]/2\n count += 1\n\n\np = np.array(readline().split(), np.int64)\n\nprint(main(p))', 'a, b, c = map(int, input().split())\nif a == b and b == c:\n if a % 2 == 0:\n print(-1)\n else:\n print(0)\nelse:\n count = 0\n while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2\n count += 1\n print(count)'] | ['Runtime Error', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s109341926', 's292106513', 's683639686', 's050530297'] | [127996.0, 130040.0, 129952.0, 9128.0] | [2016.0, 2085.0, 2130.0, 35.0] | [470, 493, 486, 288] |
p03723 | u462329577 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['#!/usr/bin/env python3\na, b, c = map(int, input().split())\nif (a + b + c) % 2 != 1:\n print(-1)\nelse:\n cnt = 0\n\n while True:\n if a % 2 or b % 2 or c % 2:\n break\n cnt += 1\n a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2\n print(cnt)\n', '#!/usr/bin/env python3\na, b, c = map(int, input().split())\nif True:\n cnt = 0\n while True:\n if a % 2 or b % 2 or c % 2:\n break\n if cnt > 10 ** 3:\n break\n cnt += 1\n a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2\n if cnt < 10 ** 3:\n print(cnt)\n else:\n print(-1)\n'] | ['Wrong Answer', 'Accepted'] | ['s284121794', 's162275469'] | [2940.0, 2940.0] | [17.0, 18.0] | [278, 339] |
p03723 | u463655976 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = map(int, input().split())\n\nif any([A % 2, B % 2, C % 2]):\n\tprint(0)\n\texit()\n\nif A == B == C:\n\tprint(-1)\n\texit()\n\ncount = 0\n while all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):\n A, B, C = ((B+C)//2, (A+C)//2, (A+B)//2)\n\tcount += 1\nprint(count)\n', 'A, B, C = map(int, input().split())\n\nif not all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):\n print(0)\n\nelif A == B == C:\n print(-1)\nelse:\n cnt = 0\n while all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):\n cnt += 1\n A, B, C = ((B+C)//2, (A+C)//2, (A+B)//2)\n print((A,B,C))\n print(cnt)\n', 'A, B, C = map(int, input().split())\n\nif not all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):\n print(0)\n\nelif A == B == C:\n print(-1)\nelse:\n cnt = 0\n while all([A % 2 == 0, B % 2 == 0, C % 2 == 0]):\n cnt += 1\n A, B, C = ((B+C)//2, (A+C)//2, (A+B)//2)\n print(cnt)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s430882030', 's938651999', 's302663086'] | [2940.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0] | [260, 308, 285] |
p03723 | u467307100 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\nfor i in range(600):\n if a == b and b == c:\n break\n a,b,c = a//2, b//2, c//2\n a, b, c = b + c, a + c, a + b\nans = i if i < 600 else -1\nprint(ans)\n ', 'a,b,c = map(int,input().split())\ncount = 0\n\n\nfor i in range(600):\n if a == b and b == c:\n break\n a,b,c = a//2, b//2, c//2\n a, b, c = b + c, a + c, a + b\nans = i if i < 600 else -1\nprint(-1', 'a,b,c = map(int,input().split())\nfor i in range(600):\n if a&1 or b&1 or c&1:\n break\n a,b,c = a//2, b//2, c//2\n a, b, c = b + c, a + c, a + b\nans = i if i < 500 else -1\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s292190112', 's855203100', 's831591490'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 18.0] | [189, 194, 184] |
p03723 | u478417863 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['if a%2==1 or b%2==1 or c%2==1:\n print(f)\nelif a==b and b==c:\n f=-1\n print(f)\nelse:\n while a%2==0 and b%2==0 and c%2==0:\n A=a\n B=b\n C=c\n a=B//2+C//2\n b=A//2+C//2\n c=A//2+B//2\n f=f+1\n else:\n print(f)', 'a,b,c = list(map(int, input().strip().split()))\nf=0\nif a%2==1 or b%2==1 or c%2==1:\n print(f)\nelif a==b and b==c:\n f=-1\n print(f)\nelse:\n while a%2==0 and b%2==0 and c%2==0:\n A=a\n B=b\n C=c\n a=B//2+C//2\n b=A//2+C//2\n c=A//2+B//2\n f=f+1\n else:\n print(f)\n '] | ['Runtime Error', 'Accepted'] | ['s256916739', 's524831120'] | [9100.0, 9128.0] | [20.0, 29.0] | [268, 329] |
p03723 | u481333386 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['# -*- coding: utf-8 -*-\n\n\ndef main(a, b, c):\n if a == b == c:\n return -1\n\n count = 0\n while a % 2 != 1 or b % 2 != 1 or c % 2 != 1:\n aa, bb, cc = a, b, c\n a = bb // 2 + cc // 2\n b = aa // 2 + cc // 2\n c = aa // 2 + bb // 2\n count += 1\n return count\n\n\na, b, c = [int(e) for e in input().split()]\nprint(main(a, b, c))\n', ' # -*- coding: utf-8 -*-\n\n \na, b, c = [int(e) for e in input().split()]\n# a, b, c = [4, 2, 1]\n# a, b, c = [4, 12, 20]\n# a, b, c = [454, 414, 444]\n\n# a, b, c = [1, 1, 1]\n\nif a == b == c == 1:\n print(0)\nelif a == b == c: \n print(-1)\nelse:\n count = 0\n while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n aa, bb, cc = a, b, c\n a = bb // 2 + cc // 2\n b = aa // 2 + cc // 2\n c = aa // 2 + bb // 2\n count += 1\n print(count)'] | ['Wrong Answer', 'Accepted'] | ['s286803511', 's269810938'] | [3060.0, 3064.0] | [2104.0, 17.0] | [370, 511] |
p03723 | u485566817 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import math\n\na, b, c = map(int, input().split())\n\ncnt = 0\n\nif a == b == c and (a+b+c)%2 == 0:\n print(-1)\n exit()\nelse:\n while a%2 == 0 and b%2 == 0 and c%2 == 0:\n a, b, c = b/2 + c/2, a/2 + c/2, a/2 + b/2\n cnt += 1\n print(a, b, c)\nprint(cnt)', 'import math\n\na, b, c = map(int, input().split())\n\ncnt = 0\n\nif a == b == c and (a+b+c)%2 == 0:\n print(-1)\n exit()\nelse:\n while a%2 == 0 and b%2 == 0 and c%2 == 0:\n a, b, c = b/2 + c/2, a/2 + c/2, a/2 + b/2\n cnt += 1\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s526820226', 's522260660'] | [3064.0, 3060.0] | [18.0, 17.0] | [271, 248] |
p03723 | u488884575 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["import time\nN = list(map(int, input().split()))\nN2 = [0,0,0]\nans = 0\nwhile True:\n time.sleep(1)\n for i in range(3):\n if not N[i] %2 == 0:\n print(ans)\n exit()\n N2[0] = (N[1] + N[2]) /2\n N2[1] = (N[0] + N[2]) /2\n N2[2] = (N[0] + N[1]) /2\n #print(N2)\n if N == N2:\n print('-1')\n exit()\n N = N2.copy()\n ans += 1\n", "N = list(map(int, input().split()))\nN2 = [0,0,0]\nans = 0\nwhile True:\n for i in range(3):\n if not N[i] %2 == 0:\n print(ans)\n exit()\n N2[0] = (N[1] + N[2]) /2\n N2[1] = (N[0] + N[2]) /2\n N2[2] = (N[0] + N[1]) /2\n #print(N2)\n if N == N2:\n print('-1')\n exit()\n N = N2.copy()\n ans += 1\n"] | ['Time Limit Exceeded', 'Accepted'] | ['s695604702', 's995074272'] | [3064.0, 3064.0] | [2104.0, 18.0] | [378, 348] |
p03723 | u492737043 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['X=[int(x) for x in input().split()]\ncount=0\nif ((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0 and X[0]==X[1] and X[1]==X[2]):\n count=-1\nelse:\n while((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0):\n X[0]=(X[1]+X[2])/2\n X[1]=(X[0]+X[2])/2\n X[2]=(X[1]+X[0])/2\n count =count+1\nprint(count) ', 'X=[int(x) for x in input().split()]\ncount=0\nif ((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0 and X[0]==X[1] and X[1]==X[2]):\n count=-1\nelse:\n while((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0):\n Y=[0,0,0]\n Y[0]=(X[1]+X[2])/2\n Y[1]=(X[0]+X[2])/2\n Y[2]=(X[1]+X[0])/2\n X=Y\n count =count+1\nprint(count) '] | ['Wrong Answer', 'Accepted'] | ['s442849148', 's137896376'] | [9176.0, 9192.0] | [26.0, 29.0] | [280, 302] |
p03723 | u500376440 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['def check(A,B,C):\n if A==0 or B==0 or C==0:\n return False\n if A%2!=0 or B%2!=0 or C%2!=0:\n return False\n return True\n\nA,B,C=map(int,input().split())\nans=0\nif A==B==C:\n print(-1)\n exit()\nwhile check(A,B,C)==True:\n a=B//2+C//2\n b=A//2+C//2\n c=A//2+B//2\n A,B,C=a,b,c\n print(A,B,C)\n ans+=1\n if 10**9<ans:\n ans=-1\n break\nprint(ans)\n', 'def check(A,B,C):\n if A==0 or B==0 or C==0:\n return False\n if A%2!=0 or B%2!=0 or C%2!=0:\n return False\n return True\n\nA,B,C=map(int,input().split())\nans=0\nif A%2==B%2==C%2==0 and A==B==C:\n print(-1)\n exit()\nwhile check(A,B,C)==True:\n a=B//2+C//2\n b=A//2+C//2\n c=A//2+B//2\n A,B,C=a,b,c\n ans+=1\n if 10**9<ans:\n ans=-1\n break\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s552655977', 's081845164'] | [9128.0, 9124.0] | [29.0, 29.0] | [351, 357] |
p03723 | u502200133 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\ncnt = 0\nwhile True:\n if a == b == c and a%2 == 0:\n cnt = -1\n elif a%2 == 0 and b%2 == 0 and c%2 == 0:\n a, b, c, = (b+c)//2, (a+c)//2, (a+b)//2\n cnt += 1\nprint(cnt)', 'a, b, c = map(int, input().split())\ncnt = 0\nwhile True:\n if a == b == c and a%2 == 0:\n cnt = -1\n elif a%2 == 0 and b%2 == 0 and c%2 == 0:\n a, b, c, = (b+c)//2, (a+c)//2, (a+b)//2\n cnt += 1\nprint(cnt)', 'a, b, c = map(int, input().split())\ncnt = 0\nwhile True:\n if a == b == c and a%2 == 0:\n cnt = -1\n break\n elif a%2 != 0 or b%2 != 0 or c%2 != 0:\n break\n elif a%2 == 0 and b%2 == 0 and c%2 == 0:\n a, b, c, = (b+c)//2, (a+c)//2, (a+b)//2\n cnt += 1\nprint(cnt)'] | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s617173852', 's742875401', 's453981053'] | [2940.0, 2940.0, 3064.0] | [2104.0, 2103.0, 17.0] | [226, 226, 297] |
p03723 | u504562455 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = [int(i) for i in input().split()]\nif x%2 == 1 or y%2 == 1 or z%2 == 1:\n print(0)\nelif a == b and b == c:\n print(-1)\nelse:\n x = a\n y = b\n z = c\n cnt = 0\n while True:\n if x%2 == 1 or y%2 == 1 or z%2 == 1:\n break\n else:\n x, y, z = y//2 + z//2, x//2 + z//2, x//2 + y//2\n cnt += 1\n\n print(cnt)', 'a, b, c = [int(i) for i in input().split()]\n\n\nif a%2 == 1 or b%2 == 1 or c%2 == 1:\n print(0)\nelif a == b and b == c:\n print(-1)\nelse:\n x = a\n y = b\n z = c\n cnt = 0\n while True:\n if x%2 == 1 or y%2 == 1 or z%2 == 1:\n break\n else:\n x, y, z = y//2 + z//2, x//2 + z//2, x//2 + y//2\n cnt += 1\n\n print(cnt)'] | ['Runtime Error', 'Accepted'] | ['s298636871', 's369657621'] | [3064.0, 3064.0] | [18.0, 17.0] | [369, 371] |
p03723 | u532966492 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\nn=a+b+c\nif a%2==b%2==c%2==0 and (a==n/3 or b==n/3 or c==n/3):\n print(-1)\nelif not a%2==b%2==c%2==0:\n print(0)\nelse:\n cnt=0\n while(a%2==b%2==c%2==0):\n a=(n-a)//2\n b=(n-b)//2\n c=(n-c)//2\n cnt+=1\n print(cnt)', 'a,b,c=map(int,input().split())\nn=a+b+c\nif a%2==0 and a==b==c:\n print(-1)\nelif not a%2==b%2==c%2==0:\n print(0)\nelse:\n cnt=0\n while(a%2==b%2==c%2==0):\n a=(n-a)//2\n b=(n-b)//2\n c=(n-c)//2\n cnt+=1\n print(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s071258600', 's401850193'] | [3064.0, 3064.0] | [17.0, 17.0] | [278, 247] |
p03723 | u543954314 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import math\nn = list(map(int, input().split()))\nd = max(m)-min(m)\nif d:\n cnt = 0\n while d%2 == 0:\n d //= 2\n cnt += 1\n print(cnt)\nelif n[0]%2:\n print(0)\nelse:\n print(-1)', 'import math\nn = list(map(int, input().split()))\nd = max(n)-min(n)\nif d:\n cnt = 0\n while d%2 == 0:\n d //= 2\n cnt += 1\n print(cnt)\nelif n[0]%2:\n print(0)\nelse:\n print(-1)\n', 'a,b,c = map(int, input().split())\nif a==b==c:\n if a%2:\n print(0)\n else:\n print(-1)\nelse:\n cnt = 0\n while a%2 == b%2 == c%2 == 0:\n a,b,c = (b+c)//2,(a+c)//2,(a+b)//2\n cnt += 1\n print(cnt)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s550322481', 's580495557', 's196720159'] | [3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [179, 180, 203] |
p03723 | u562015767 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\ncnt = 0\n\nif a == b and a== c and a%2 == 0:\n print(-1)\n exit()\n\nwhile acnt%2 == 0 and bcnt%2 == 0 and ccnt%2 == 0:\n cnt+=1\n i=a\n j=b\n a=(b+c)//2\n b=(i+c)//2\n c=(i+j)//2\n\nprint(cnt)', 'a,b,c = map(int,input().split())\nacnt = 0\nbcnt = 0\nccnt = 0\ncnt = 0\nif a == b and a== c and a%2 == 0:\n print(-1)\n exit()\nwhile a%2 == 0 and b%2 == 0 and c%2 == 0:\n cnt += 1\n acnt = (b+c)//2\n bcnt = (a+c)//2\n ccnt = (a+b)//2\n a = acnt\n b = bcnt \n c = ccnt\nprint(cnt)\n'] | ['Runtime Error', 'Accepted'] | ['s550672770', 's875669415'] | [9176.0, 9176.0] | [25.0, 30.0] | [236, 293] |
p03723 | u562016607 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = map(int, input().split())\nprint(-1)', 'A, B, C = map(int, input().split())\ni = 0\nif A == B == C:\n print(-1)\n exit()\nelif A%2==1 or B%2==1 or C%2==1:\n print(0)\n exit()\nwhile(True):\n A, B, C = (B+C)//2, (C+A)//2, (A+B)//2\n i += 1\n print("{0} {1} {2}".format(A, B, C))\n if A%2 == 1 or B%2 == 1 or C%2 == 1:\n break\nprint(i)\n', 'A, B, C = map(int, input().split())\ni = 0\nif A%2==1 or B%2==1 or C%2==1:\n print(0)\n exit()\nelif A == B == C:\n print(-1)\n exit()\nwhile(True):\n A, B, C = (B+C)//2, (C+A)//2, (A+B)//2\n i += 1\n if A%2 == 1 or B%2 == 1 or C%2 == 1:\n break\nprint(i)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s360960608', 's605413726', 's961925476'] | [2940.0, 3064.0, 3060.0] | [17.0, 18.0, 17.0] | [45, 312, 271] |
p03723 | u583507988 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\n\nif a%2==1 or b%2==1 or c%2==1:\n print(0)\nelif a==b==c:\n print(-1)\nelse:\n cnt=0\n d=a\n e=b\n f=c\n while d%2==0 and e%2==0 and f%2==0:\n d=(e+f)/2\n e=(f+d)/2\n f=(d+e)/2\n cnt+=1 \n print(cnt)', 'a,b,c=map(int,input().split())\n\nif a%2==1 or b%2==1 or c%2==1:\n print(0)\n exit()\nif a==b==c:\n print(-1)\n exit()\ncnt=0\nwhile a%2==0 and b%2==0 and c%2==0:\n a=(b+c)//2\n b=(c+a)//2\n c=(a+b)//2\n cnt+=1 \nprint(cnt)', 'a,b,c=map(int,input().split())\n\nif a%2==1 or b%2==1 or c%2==1:\n print(0)\n exit()\nif a==b==c:\n print(-1)\n exit()\nans=0\nwhile a%2==0 and b%2==0 and c%2==0:\n a,b,c=(b+c)//2,(c+a)//2,(a+b)//2\n ans+=1 \nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s362753495', 's675313192', 's509737389'] | [9176.0, 9144.0, 9116.0] | [29.0, 27.0, 29.0] | [236, 225, 217] |
p03723 | u587589241 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import sys\nn=int(input())\nif n==1:\n print(1)\n sys.exit()\nk=2\nans=0\nwhile k*2<=n:\n k*=2\n ans+=1\nprint(k)', 'import sys\na,b,c=map(int,input().split())\nans=0\nif a%2==1 or b%2==1 or c%2==1:\n print(0)\n sys.exit()\nif a%2==0 and a==b==c:\n print(-1)\n sys.exit()\nwhile a%2==0 and b%2==0 and c%2==0:\n ta=a/2\n tb=b/2\n tc=c/2\n a=tb+tc\n b=ta+tc\n c=ta+tb\n ans+=1\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s835559822', 's340373423'] | [2940.0, 3064.0] | [17.0, 18.0] | [115, 285] |
p03723 | u593567568 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C = map(int,input().split())\nans = None\n\nif A == B and B == C:\n print(-1)\n exit()\n \nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n A,B,C = (B+C)//2,(C+A)//2,(A+B)//2\n ans += 1\n \n if A == B and B == C:\n print(-1)\n exit()\n \nprint(ans)\n', 'A,B,C = int(input())\nans = None\n\nif A == B and B == C:\n print(-1)\n exit()\n \nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n A,B,C = (B+C)//2,(C+A)//2,(A+B)//2\n ans += 1\n \n if A == B and B == C:\n print(-1)\n exit()\n \nprint(ans)', 'A,B,C = map(int,input().split())\nans = 0\n\nif not (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):\n print(0)\n exit()\n\nif A == B and B == C:\n print(-1)\n exit()\n \nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n A,B,C = (B+C)//2,(C+A)//2,(A+B)//2\n ans += 1\n \n if A == B and B == C:\n print(-1)\n exit()\n \nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s254696268', 's703310449', 's515219094'] | [3060.0, 3064.0, 3064.0] | [17.0, 20.0, 17.0] | [255, 242, 324] |
p03723 | u597374218 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C=map(int,input().split())\nif A==B==C:\n print(-1)\nelse:\n count=0\n while A%2==B%2==C%2==0:\n A=(B+C)/2\n B=(C+A)/2\n C=(A+B)/2\n count+=1\n print(count)', 'A,B,C=map(int,input().split())\nif A==B==C:\n print(0 if A%2 else -1)\nelse:\n count=0\n while A%2==B%2==C%2==0:\n A,B,C=(B+C)/2,(C+A)/2,(A+B)/2\n count+=1\n print(count)'] | ['Wrong Answer', 'Accepted'] | ['s279719100', 's063386587'] | [3060.0, 9164.0] | [17.0, 27.0] | [190, 188] |
p03723 | u600402037 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import sys\nimport numpy as np\nsys.setrecursionlimit(10 ** 7)\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\ncookies = np.array(lr())\nif len(set(cookies)) == 1:\n print(-1)\n exit()\nif any(cookies&1):\n print(0)\n exit()\ncount = 0\nhalf_total = cookies.sum() // 2\nwhile True:\n cookies = half_total - cookies//2\n print(cookies)\n count += 1\n if any(cookies&1):\n print(count)\n break\n if count == 10000:\n print(-1)\n exit()\n', 'import sys\nimport numpy as np\nsys.setrecursionlimit(10 ** 7)\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\ncookies = np.array(lr())\nif any(cookies&1):\n print(0)\n exit()\nif len(set(cookies)) == 1:\n print(-1)\n exit()\n\ncount = 0\nhalf_total = cookies.sum() // 2\nwhile True:\n cookies = half_total - cookies//2\n count += 1\n if any(cookies&1):\n print(count)\n break\n if count == 1000000:\n print(-1)\n exit()\n'] | ['Wrong Answer', 'Accepted'] | ['s216217034', 's830861364'] | [12516.0, 14512.0] | [155.0, 149.0] | [531, 515] |
p03723 | u601575292 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['def mapint_inp():\n return map(int, input().split())\n\nA, B, C = mapint_inp()\n\nprint(-1)', 'def mapint_inp():\n return map(int, input().split())\n\nA, B, C = mapint_inp()\n\nans = 0\nwhile(1):\n if A%2==1 or B%2==1 or C%2==1:\n break\n if A == B and B == C:\n ans = -1\n break\n halvedA = A//2\n halvedB = B//2\n halvedC = C//2\n A = halvedB+halvedC\n B = halvedA+halvedC\n C = halvedA+halvedB\n ans+=1\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s517784254', 's384110706'] | [2940.0, 3064.0] | [17.0, 17.0] | [89, 355] |
p03723 | u602860891 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = list(map(int, input().split()))\n\npattern = list()\ni = 0\nwhile True:\n if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n print(i)\n break\n if (A, B, C) in pattern:\n print(-1)\n break\n tmp_A = A\n tmp_B = B\n A = (B + C) / 2\n B = (C + tmp_A) / 2\n C = (tmp_B + tmp_A) / 2\n\n i += 1\n\n pattern.append((A, B, C))\n\n', 'A, B, C = list(map(int, input().split()))\n\npattern = list()\ni = 0\nwhile True:\n if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n print(i)\n break\n tmp_A = A\n tmp_B = B\n A = (B + C) / 2\n B = (C + tmp_A) / 2\n C = (tmp_B + tmp_A) / 2\n\n i += 1\n\n if (A, B, C) in pattern:\n print(-1)\n break\n pattern.append((A, B, C))\n\n'] | ['Wrong Answer', 'Accepted'] | ['s981746498', 's199889377'] | [3064.0, 3064.0] | [18.0, 17.0] | [361, 361] |
p03723 | u603234915 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["def abc(a, b, c):\n ans = -1\n v = a%2 + b%2 + c%2\n while v==0:\n ans += 1\n v = a%2 + b%2 + c%2\n x, y, z = a, b, c\n a = y//2 + z//2\n b = z//2 + x//2\n c = x//2 + y//2\n print('{} {} {}'.format(a, b, c))\n return ans\n\ndef main():\n a, b, c = map(int, input().split())\n if a==b and b==c:\n print(-1)\n else:\n print(abc(a,b,c))\n\nif __name__=='__main__':\n main()", 'def abc(a, b, c):\n ans = -1\n v = a%2 + b%2 + c%2\n while v==0:\n ans += 1\n v = a%2 + b%2 + c%2\n x, y, z = a, b, c\n a = (y+z)/2\n b = (z+x)/2\n c = (x+y)/2\n return ans\n\ndef main():\n a, b, c = map(int, input().split())\n if a==b and b==c:\n print(-1)\n else:\n print(abc(a,b,c))', "def abc(a, b, c):\n ans = 0\n while a%2 + b%2 + c%2==0:\n if a==b and b==c:\n ans = -1\n break\n ans += 1\n x, y, z = a, b, c\n a = (y+z)//2\n b = (z+x)//2\n c = (x+y)//2\n return ans\n\ndef main():\n a, b, c = map(int, input().split())\n print(abc(a,b,c))\nif __name__=='__main__':\n main()"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s455502208', 's872837765', 's425166125'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [436, 345, 356] |
p03723 | u604262137 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["cookie = input('三人のクッキー枚数は?').split()\nA,B,C = int(cookie[0]),int(cookie[1]),int(cookie[2])\nkaisuu = 0\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n A,B,C = (B+C)/2,(A+C)/2,(A+B)/2\n if A == B and B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n kaisuu = -1\n break\n else:\n kaisuu += 1\nprint(kaisuu)", 'cookie = input().split()\nA,B,C = int(cookie[0]),int(cookie[1]),int(cookie[2])\nkaisuu = 0\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n A,B,C = (B+C)/2,(A+C)/2,(A+B)/2\n if A == B and B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n kaisuu = -1\n break\n else:\n kaisuu += 1\nprint(kaisuu)'] | ['Wrong Answer', 'Accepted'] | ['s909153169', 's816879153'] | [3064.0, 3064.0] | [17.0, 17.0] | [356, 321] |
p03723 | u614875193 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\nimport sys\nif a%2+b%2+c%2>0:\n print(0)\n sys.exit()\ne=0\n\nwhile e<10000:\n a,b,c=b//2+c//2,a//2+c//2,a//2+b//2\n e+=1\n print(a,b,c)\n if a%2+b%2+c%2>0:\n break\n\nif e==10000:\n print(-1)\nelse:\n print(e)', 'a,b,c=map(int,input().split())\nimport sys\nif a%2+b%2+c%2>0:\n print(0)\n sys.exit()\ne=0\n\nwhile e<10000:\n a,b,c=b//2+c//2,a//2+c//2,a//2+b//2\n e+=1\n if a%2+b%2+c%2>0:\n break\n\nif e==10000:\n print(-1)\nelse:\n print(e)'] | ['Wrong Answer', 'Accepted'] | ['s184105573', 's030436015'] | [3656.0, 3060.0] | [44.0, 26.0] | [256, 239] |
p03723 | u623687794 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\nif a%2==1 or b%2==1 or c%2==1:\n print(0)\nelse:\n if a==b and b==c:\n print(-1)\n else:\n cnt=0\n flag=0\n while flag==0:\n if a%2==1 or b%2==1 or c%2==1:\n flag=1\n break\n a//=2\n b//=2\n c//=2\n cnt+=1\n print(cnt)', 'a,b,c=map(int,input().split())\nif a==b and b==c and a%2==0:print(-1)\nelse:\n ans=0\n while a%2==0 and b%2==0 and c%2==0:\n a//=2;b//=2;c//=2\n ans+=1\n print(ans)', 'a,b,c=map(int,input().split())\nif a==b and b==c and a%2==0:print(-1)\nelse:\n ans=0\n while a%2==0 and b%2==0 and c%2==0:\n a,b,c=b//2+c//2,a//2+c//2,b//2+a//2\n ans+=1\n print(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s500141815', 's867919274', 's396531480'] | [3064.0, 3064.0, 2940.0] | [17.0, 17.0, 17.0] | [290, 166, 185] |
p03723 | u625582050 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = [int(x) for x in input().strip().split()]\n\ndef f(a, b, c, count):\n if a // 2 % 2 == 1 and b // 2 % 2 == 1 and c // 2 % 2 == 1:\n count += 1\n return f(a/2+b/2, c/2+b/2, a/2+c/2, count)\n elif a // 2 % 2 == 0 and b // 2 % 2 == 0 and c // 2 % 2 == 0:\n count += 1\n return f(a/2+b/2, c/2+b/2, a/2+c/2, count)\n else:\n return count\n\nif a == b and b == c:\n print(-1)\nelse:\n print(f(a, b, c, 0))', 'a, b, c = [int(x) for x in input().strip().split()]\n\ndef f(a, b, c, count):\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n count += 1\n return f(a/2+b/2, c/2+b/2, a/2+c/2, count)\n else:\n return count\n\nif a == b and b == c and a % 2 == 0:\n print(-1)\nelse:\n print(f(a, b, c, 0))'] | ['Wrong Answer', 'Accepted'] | ['s810567078', 's021215969'] | [3188.0, 3064.0] | [19.0, 17.0] | [444, 308] |
p03723 | u629540524 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\nd=0\nif a==b==c and a%2==0:\n print(-1)\nelse:\n while a%2==0 and b%2==0 and c%2==0:\n a,b,c=(b+c),(a+c),(a+b)\n d+=1\nprint(d)', 'a,b,c=map(int,input().split())\nif a==b==c and a%2==0:\n print(-1)\nd=0\nelse:\n while a%2==0 and b%2==0 and c%2==0:\n a,b,c=(b+c),(a+c),(a+b)\n d+=1\nprint(d)', 'a,b,c=map(int,input().split())\nd=0\nif a==b==c and a%2==0:\n print(-1)\nelse:\n while a%2==0 and b%2==0 and c%2==0:\n a,b,c=(b+c)//2,(a+c)//2,(a+b)//2\n d+=1\n print(d)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s512071146', 's863481315', 's565354461'] | [9248.0, 8884.0, 8916.0] | [2206.0, 22.0, 26.0] | [171, 171, 184] |
p03723 | u634046173 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C = map(int,input().split())\n\nif A == B == C:\n print(-1)\nelse:\n c = 0\n while A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n A = B//2 + C//2\n B = A//2 + C//2\n C = B//2 + C//2\n c+=1\n print(c)', 'A,B,C = map(int,input().split())\n\nif A == B == C: \n print(-1 if A%2==0 else 0)\nelse:\n c = 0\n while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n ba = A\n bb = B\n bc = C\n A = (bb + bc)//2\n B = (ba + bc)//2\n C = (ba + bb)//2\n c+=1\n print(c)\n'] | ['Wrong Answer', 'Accepted'] | ['s338007961', 's333095535'] | [9212.0, 9120.0] | [28.0, 30.0] | [203, 260] |
p03723 | u634461820 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C = list(map(int,input().split()))\n\nif A == B and A == C:\n print(-1)\n exit(\nelse:\n cnt = 0\n while True:\n if A%2==0 and B%2==0 and C%2==0:\n A,B,C = (B+C)//2,(A+C)//2,(A+B)//2\n cnt += 1\n continue\n else:\n break\n \nprint(cnt)', 'A,B,C = list(map(int,input().split()))\n\nif A == B and A == C:\n if A%2==0:\n print(-1)\n else:\n print(0)\n exit()\nelse:\n cnt = 0\n while True:\n if A%2==0 and B%2==0 and C%2==0:\n A,B,C = (B+C)//2,(A+C)//2,(A+B)//2\n cnt += 1\n continue\n else:\n break\n \nprint(cnt)'] | ['Runtime Error', 'Accepted'] | ['s542013238', 's920187619'] | [2940.0, 3064.0] | [17.0, 17.0] | [259, 296] |
p03723 | u667084803 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import sys\n\nN,M=list(map(int, input().split()))\np=[]\nq=0\ncount=0\nfor i in range(0,M):\n p.append(list(map(int, input().split())))\nfor i in range(0,M):\n q+=p[i][0]-p[i][1]\nif q%2==1:\n print("NO")\nelse:\n m=int(M/100)\n for j in range(0,M,m):\n for i in range(0,M):\n if p[i][0]==j or p[i][1]==j:\n count+=1\n if count%2==1:\n print("NO")\n sys.exit()\n else: \n print("YES")', '# -*- coding: utf-8 -*-\nimport sys\n\nA, B, C= map(int, input().split())\n\nif A==B and B==C:\n if A%2 ==0 and B%2==0 and C%2==0:\n print(-1)\n sys.exit()\ncount=0\nwhile True:\n if A%2 ==1 or B%2==1 or C%2==1:\n print(count)\n sys.exit()\n else:\n A_a=B/2+C/2\n B_a=A/2+C/2\n C_a=A/2+B/2\n A=A_a\n B=B_a\n C=C_a\n count+=1\n'] | ['Runtime Error', 'Accepted'] | ['s508284002', 's923029083'] | [3064.0, 3064.0] | [17.0, 17.0] | [416, 340] |
p03723 | u672475305 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\nlst = [a,b,c]\nlst.sort()\nres = True\nif a==b-=c:\n print(-1)\nelse:\n while True:\n if a%2!=0 or b%2!=0 or c%2!=0:\n break\n else:\n res += 1\n nx_a = b//2 + c//2\n nx_b = a//2 + c//2\n nx_c = a//2 + b//2\n tmp = [nx_a, nx_b, nx_c]\n tmp.sort()\n if lst==tmp:\n print(-1)\n exit()\n a,b,c = nx_a, nx_b, nx_c\n print(res)', 'a,b,c = map(int,input().split())\nres = 0\nwhile True:\n if a%2!=0 or b%2!=0 or c%2!=0:\n break\n elif a==b==c:\n res = -1\n break\n else:\n res += 1\n a,b,c = (b+c)//2, (c+a)//2, (a+b)//2\nprint(res)'] | ['Runtime Error', 'Accepted'] | ['s629172112', 's668271681'] | [2940.0, 3060.0] | [17.0, 17.0] | [487, 233] |
p03723 | u692632484 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import copy\ntemp=input().split()\nA=int(temp[0])\nB=int(temp[1])\nC=int(temp[2])\n\nsetT=[A,B,C]\nsetT.sort()\nallSet=[]\nallSet.append(setT)\nans=0\ndef distribute(x,y,z):\n\ttemp=[y+z,z+x,x+y]\n\tfor i in range(len(temp)):\n\t\tif temp[i]%2==0:\n\t\t\ttemp[i]/=2\n\t\telse:\n\t\t\treturn [0]\n\treturn temp\n\nsetNext=distribute(A,B,C)\nwhile len(setNext)==3:\n\tprint(setNext)\n\tans+=1\n\tsetT=copy.deepcopy(setNext)\n\tsetNext=distribute(setT[0],setT[1],setT[2])\n\tsetNext.sort()\n\tif setNext in allSet:\n\t\tans=-1\n\t\tbreak\n\telse:\n\t\tallSet.append(setNext)\nprint(ans)', 'import copy\ntemp=input().split()\nA=int(temp[0])\nB=int(temp[1])\nC=int(temp[2])\n\nsetT=[A,B,C]\nsetT.sort()\nallSet=[]\nallSet.append(setT)\nans=0\ndef distribute(x,y,z):\n\ttemp=[y+z,z+x,x+y]\n\tfor i in range(len(temp)):\n\t\tif temp[i]%4==0:\n\t\t\ttemp[i]/=2\n\t\telse:\n\t\t\treturn [0]\n\treturn temp\n\nsetNext=copy.deepcopy(setT)\nfor i in setT:\n\tif i%2==1:\n\t\tbreak\nelse:\n\tsetNext=distribute(setT[0],setT[1],setT[2])\n\tans+=1\n\twhile len(setNext)==3:\n\t\t#print(setNext)\n\t\tans+=1\n\t\tsetT=copy.deepcopy(setNext)\n\t\tsetNext=distribute(setT[0],setT[1],setT[2])\n\t\tsetNext.sort()\n\t\tif setNext in allSet:\n\t\t\tans=-1\n\t\t\tbreak\n\t\telse:\n\t\t\tallSet.append(setNext)\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s744867149', 's645788201'] | [3700.0, 3956.0] | [116.0, 112.0] | [525, 633] |
p03723 | u701318346 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['def solve(A, B, C):\n if (A % 2 == 1 or B % 2 == 1 or C % 2 == 1):\n return 1\n elif (A == B == C):\n return -1\n else:\n return solve((B/2 + C/2), (A/2 + C/2), (A/2 + B/2)) + 1 \n\nA, B, C = map(int, input().split())\nans = solve(A, B, C)\nprint(ans)\n\n', '\ndef solve(A, B, C):\n \n if (A % 2 == 1 or B % 2 == 1 or C % 2 == 1): return 0\n \n elif (A == B == C): return -1\n \n else: return solve((B/2 + C/2), (A/2 + C/2), (A/2 + B/2)) + 1\n\nA, B, C = map(int, input().split())\nans = solve(A, B, C)\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s605945327', 's338806620'] | [3060.0, 3064.0] | [17.0, 17.0] | [273, 520] |
p03723 | u711452853 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['def cookies_exchanges(a, b, c):\n counter = 0\n if a is b is c:\n return -1\n while int(a%2) is 0 and int(b%2) is 0 and int(c%2) is 0:\n o_a, o_b, o_c = a ,b ,c\n a = o_b/2 + o_c/2\n b = o_a/2 + o_c/2\n c = o_a/2 + o_b/2\n counter += 1\n\n return counter\n\na, b, c = map(int, input().split())\n# print(cookies_exchanges(454, 414, 444))', 'def cookies_exchanges(a, b, c):\n counter = 0\n\n olds = []\n while int(a%2) is 0 and int(b%2) is 0 and int(c%2) is 0:\n if (a, b, c) in olds:\n return -1\n\n olds.append((a,b,c))\n o_a, o_b, o_c = olds[counter]\n a = o_b/2 + o_c/2\n b = o_a/2 + o_c/2\n c = o_a/2 + o_b/2\n counter += 1\n\n return counter\n\na, b, c = map(int, input().split())\nprint(cookies_exchanges(a, b, c))\n'] | ['Wrong Answer', 'Accepted'] | ['s346514007', 's586441055'] | [3064.0, 3064.0] | [17.0, 17.0] | [376, 434] |
p03723 | u713914478 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C = map(int, input().split())\n\ndef even(a):\n\tif a % 2 == 0:\n\t\treturn True\n\telse:\n\t\treturn False\n\nif A == B and B == C:\n\tprint("-1")\nelif:\n\tif not (even(A) and even(B) and even(C)):\n\t\tprint("0")\n\t\t\nelse:\n\tcnt = 0\n\twhile even(A) and even(B) and even(C):\n\t\ttmp1, tmp2, tmp3 = A,B,C\n\t\tA = (tmp2+tmp3) // 2\n\t\tB = (tmp3+tmp1) // 2\n\t\tC = (tmp1+tmp2) // 2\n\t\tcnt += 1\n\tprint(cnt)\n', 'A,B,C = map(int, input().split())\n\ndef even(a):\n\tif a % 2 == 0:\n\t\treturn True\n\telse:\n\t\treturn False\n\ncnt = 0\n\nwhile even(A) and even(B) and even(C):\n\tif A == B and B == C:\n\t\tcnt = -1\n\t\tbreak\n\telse:\n\t\ttmp1, tmp2, tmp3 = A,B,C\n\t\tA = (tmp2+tmp3) // 2\n\t\tB = (tmp3+tmp1) // 2\n\t\tC = (tmp1+tmp2) // 2\n\t\tcnt += 1\n\nprint(cnt)\n\n'] | ['Runtime Error', 'Accepted'] | ['s787358010', 's451986622'] | [2940.0, 3060.0] | [17.0, 17.0] | [375, 318] |
p03723 | u727787724 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\nif a==b and b==c:\n print(-1)\nelif if a%2!=0 or b%2!=0 or c%2!=0:\n print(0)\nelse:\n a1=0\n a2=0\n a3=0\n c1=0\n c2=0\n c3=0\n ans=0\n for i in range(200000):\n if a%2!=0:\n c1=1 \n if b%2!=0:\n c2=1 \n if c%2!=0:\n c3=1\n if c1==1 or c3==1 or c2==1:\n ans=i\n break\n else:\n a3=(a+b)//2\n a2=(a+c)//2\n a1=(b+c)//2\n a=a1\n b=a2\n c=a3\n #print(a,b,c)\n if i==199999:\n ans=-1\n print(ans)', 'a,b,c=map(int,input().split())\nif a%2!=0 or b%2!=0 or c%2!=0:\n print(0)\nelse:\n a1=0\n a2=0\n a3=0\n c1=0\n c2=0\n c3=0\n ans=0\n for i in range(2*10**5):\n if a%2!=0:\n c1=1 \n if b%2!=0:\n c2=1 \n if c%2!=0:\n c3=1\n if c1==1 or c3==1 or c2==1:\n ans=i\n break\n else:\n a3=(a+b)//2\n a2=(a+c)//2\n a1=(b+c)//2\n a=a1\n b=a2\n c=a3\n #print(a,b,c)\n if i==199999:\n ans=-1\n print(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s185526484', 's186471573'] | [2940.0, 3064.0] | [17.0, 191.0] | [620, 585] |
p03723 | u729133443 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['print(0)', "a,b,c=map(int,input().split())\ne=a-b|b-c\nprint(len(f'{e&-e:b}')-(e==b&1))", 'a,b,c=map(int,input().split())\ne=a-b|b-c\nprint((e^b&1)*(e^e-1).bit_length()-1)', 'a,b,c=map(int,input().split())\ne=a-b|c-b\nprint(len(bin(e&-e))-3or~c%-2)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s118299371', 's379255134', 's542025926', 's908403691'] | [9096.0, 9104.0, 9100.0, 8928.0] | [28.0, 27.0, 26.0, 31.0] | [8, 73, 78, 71] |
p03723 | u740284863 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\nif a == b and b == c:\n print(-1)\nelse:\n ans = 0\n while True:\n if a % 2 == 0 and b % 2 -= 0 and c % 2 == 0:\n ans += 1\n A = b / 2 + c / 2\n B = c / 2 + a / 2\n C = a / 2 + b / 2\n a = A\n b = B\n c = C\n else:\n break\n print(ans)', 'from math import log2\na,b,c = map(int,input().split())\nif a == b == c:\n print(-1)\nelse:\n print(int(log2(max(a,b,c))))', 'a,b,c = map(int,input().split())\nif a == b and b == c:\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n print(-1)\n else:\n print(0)\nelse:\n ans = 0\n while True:\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n ans += 1\n A = b / 2 + c / 2\n B = c / 2 + a / 2\n C = a / 2 + b / 2\n a = A\n b = B\n c = C\n else:\n break\n print(ans)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s196006392', 's922522804', 's613939157'] | [2940.0, 3188.0, 3064.0] | [18.0, 20.0, 17.0] | [367, 123, 447] |
p03723 | u745514010 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int(input().split()))\nans = 0\n\nwhile a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n if a == b == c:\n print(-1)\n exit()\n a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2\n ans += 1\nprint(ans)\n', 'a, b, c = map(int, input().split())\nans = 0\n\nwhile a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n if a == b == c:\n print(-1)\n exit()\n a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2\n ans += 1\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s722350702', 's078391519'] | [2940.0, 2940.0] | [17.0, 17.0] | [225, 225] |
p03723 | u749770850 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\nza = a\nzb = b\nzc = c\n\nd = 0\n\nif a == b == c:\n print(-1)\n exit()\n\nwhile True:\n a = int(zb / 2) + int(zc / 2)\n b = int(za / 2) + int(zc / 2)\n c = int(za / 2) + int(zb / 2)\n\n za = a\n zb = b\n zc = c\n\n d += 1\n print(a,b,c)\n\n if a % 2 != 0 or b % 2 != 0 or b % 2 != 0:\n print(d)\n exit()\n', 'a, b, c = map(int, input().split())\nza = 0\nzb = 0\nzc = 0\n\nd = 0\n\nif a == b == c and a % 2 == 0:\n print(-1)\n exit()\nelif not(a % 2 == 0 and b % 2 == 0 and c % 2 ==0):\n print(0)\n exit()\n\n\nwhile a % 2 == 0 and b % 2 == 0 and b % 2 == 0:\n\n za = a\n zb = b\n zc = c\n\n a = zb // 2 + zc // 2\n b = za // 2 + zc // 2\n c = za // 2 + zb // 2\n\n d += 1\n\nprint(d)'] | ['Wrong Answer', 'Accepted'] | ['s082682958', 's659093943'] | [3064.0, 3064.0] | [17.0, 20.0] | [364, 380] |
p03723 | u751843916 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['s=list(input().split())\nn=int(input())\nt=[input() for i in range(n)]\nr=[]\nfor x in s:\n for y in t:\n if len(x)==len(y):\n l=list(x)\n for z in range(len(x)):\n if y[z]=="*":l[z]="*"\n if "".join(l)==y:\n r.append("*"*len(x))\n break\n else:r.append(x)\nprint(*r)', 'a,b,c=map(int,input().split())\nd=0\nwhile a%2==0 and b%2==0 and c%2==0:\n if a==b==c:\n print(-1)\n break\n d+=1\n ha=a//2\n hb=b//2\n hc=c//2\n a=hb+hc\n b=ha+hc\n c=ha+hb\nelse:print(d)'] | ['Runtime Error', 'Accepted'] | ['s398589505', 's284121688'] | [3064.0, 3064.0] | [17.0, 17.0] | [344, 213] |
p03723 | u753803401 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import fractions\na, b, c = map(int, input().split())\nif a == b == c:\n print(-1)\nelse:\n gcd1 = fractions.gcd(a, fractions.gcd(b, c))\n gcd2 = fractions.gcd(abs(a-b), fractions.gcd(abs(b-c), abs(a-c)))\n cnt1 = 0\n cnt2 = 0\n while True:\n if gcd1 % 2 == 0:\n gcd1 //= 2\n cnt1 += 1\n elif gcd2 & 2 == 0:\n gcd2 //= 2\n cnt2 += 1\n else:\n cnt1 += cnt2 - 1 if cnt2 != 0 else 0\n print(cnt1)\n exit()\n', 'a, b, c = map(int, input().split())\nif a == b == c:\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n print(-1)\n else:\n print(0)\nelse:\n cnt = 0\n while True:\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n ab = a // 2 + b // 2\n bc = b // 2 + c // 2\n ac = a // 2 + c // 2\n a = bc\n b = ac\n c = ab\n cnt += 1\n else:\n print(cnt)\n exit()\n'] | ['Wrong Answer', 'Accepted'] | ['s328935755', 's180658755'] | [5536.0, 3060.0] | [2104.0, 17.0] | [500, 466] |
p03723 | u765690804 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['import math\nimport sys\n\na, b, c = map(int, input().split())\nif (a == b == c and a % 2 == 0):\n print(-1)\n sys.exit()\n\ncnt = 0\nwhile(True):\n half_a, half_b, half_c = a / 2, b / 2, c / 2\n ea = half_a % 2 == 0\n eb = half_b % 2 == 0\n ec = half_c % 2 == 0\n if (ea and eb and ec or (not ea) and (not eb) and (not ec)):\n cnt += 1\n a = half_b + half_c\n b = half_a + half_c\n c = half_a + half_b\n else:\n break\n\nprint(cnt)\n', 'import math\nimport sys\n\na, b, c = map(int, input().split())\nif (a == b == c):\n if (a % 2 == 0):\n print(-1)\n sys.exit()\n else:\n print(0)\n sys.exit()\n\ncnt = 0\nwhile(True):\n half_a, half_b, half_c = a / 2, b / 2, c / 2\n ea = a % 2 == 0\n eb = b % 2 == 0\n ec = c % 2 == 0\n if (ea and eb and ec or (not ea) and (not eb) and (not ec)):\n cnt += 1\n a = half_b + half_c\n b = half_a + half_c\n c = half_a + half_b\n else:\n break\n\nprint(cnt)\n'] | ['Wrong Answer', 'Accepted'] | ['s409155989', 's127005435'] | [3064.0, 3316.0] | [2104.0, 24.0] | [470, 515] |
p03723 | u766684188 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["import sys\ninput=sys.stdin.readline\nsys.setrecursionlimit(10**9)\nfrom collections import deque\nfrom math import ceil\n\ndef dist(h,w,x,y):\n return min(x-1,h-x,y-1,w-y)\n\nh,w,k=map(int,input().split())\nMAP=[]\nA=['#']*(w+2)\nMAP.append(A)\nfor i in range(h):\n s='#'+input().strip()+'#'\n for j,t in enumerate(s):\n if t=='S':\n sx,sy=i+1,j\n MAP.append(list(s))\nMAP.append(A)\ndelta=[[1,0],[0,1],[-1,0],[0,-1]]\nP=[]\nVisited=[[False]*(w+2) for _ in range(h+2)]\nVisited[sx][sy]=True\nq=deque()\nq.append((sx,sy,k))\nwhile q:\n x,y,t=q.popleft()\n if t<0:\n break\n P.append([x,y])\n t-=1\n for dx,dy in delta:\n if MAP[y+dy][x+dx]=='.' and not Visited[x+dx][y+dy]:\n q.append((y+dy,x+dx,t))\n Visited[x+dx][y+dy]=True\nans=float('inf')\nfor x,y in P:\n ans=min(ans,1+ceil(dist(h,w,x,y)/k))\nprint(ans)", 'a,b,c=map(int,input().split())\nif a==b==c:\n print(-int(not a%2))\nelse:\n cnt=0\n while not (a%2 or b%2 or c%2):\n cnt+=1\n a,b,c=(b+c)//2,(c+a)//2,(a+b)//2\n print(cnt)'] | ['Runtime Error', 'Accepted'] | ['s303134811', 's318762217'] | [2027500.0, 3060.0] | [2132.0, 18.0] | [855, 189] |
p03723 | u771007149 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['#ABC014-A\nabc = list(map(int,input().split()))\n\ncnt = 0\n\nwhile True:\n prev = abc[:]\n tmp = [abc[0]//2,abc[1]//2,abc[2]//2]\n cnt += 1\n abc = [tmp[1]+tmp[2],tmp[0]+tmp[2],tmp[0]+tmp[1]]\n \n if abc[0] == prev[0] and abc[1] == prev[1] and abc[2] == prev[2]:\n cnt = -1\n break\n elif abc[0] % 2 == 0 and abc[1] % 2 == 0 and abc[2] % 2 == 0:\n print(*abc)\n \n else:\n break\n \n \n \nprint(cnt)', '#ABC014-A\nabc = list(map(int,input().split()))\n\ncnt = 0\n\nwhile True:\n prev = abc[:]\n if abc[0] % 2 == 1 or abc[1] % 2 == 1 or abc[2] % 2 == 1:\n break\n tmp = [abc[0]//2,abc[1]//2,abc[2]//2]\n\n abc = [tmp[1]+tmp[2],tmp[0]+tmp[2],tmp[0]+tmp[1]]\n cnt += 1\n \n\n \n if abc[0] == prev[0] and abc[1] == prev[1] and abc[2] == prev[2]:\n cnt = -1\n break\n else:\n continue\n \n \n \nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s223160551', 's152157736'] | [3064.0, 3064.0] | [18.0, 17.0] | [455, 449] |
p03723 | u785578220 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["a = input()\nb = int(a)\n\ns = (9-len(a))*'0'+a\nans = 0\nfor i in range(9):\n if s[i] == '0' and ans==0:\n continue\n ans+=(b//((10**(8-i))*10))*(10**(8-i))\n c = (b%((10**(8-i))*10))+1\n #print(0,c)\n if 2*(10**(8-i))>= c > 10**(8-i):\n ans+=c-10**(8-i)\n elif c>=2*10**((8-i)):\n ans+=10**(8-i)\n #print(ans)\nprint(ans)\n", 'a = lma()\nf = 1\nc =0\nwhile f:\n if (a[0] == a[1] and a[0] == a[2]) :\n c=-1\n break\n if a[0]%2==1 or a[1]%2==1 or a[2]%2 ==1:break\n a[0],a[1],a[2] = (a[1]+a[2])/2,(a[0]+a[2])/2,(a[1]+a[0])/2\n c+=1\nprint(c)', '\na,b,c = map(int,input().split())\n\nif a == b and a== c:\n print(-1)\n exit(0)\nif a%2!=0 or b%2!=0 or c%2!=0:\n print(0)\n exit(0)\n# a//=2\n# b//=2\n# c//=2\ns = 0\ndef c2(a,b,c):\n d = -1\n if a%2!=0 or b%2!=0 or c%2!=0:\n d = 0\n a//=2\n b//=2\n c//=2\n if (b+c)%2==0 and (a+c)%2==0 and (a+b)%2==0 and d!=0:\n d = 1\n else:\n d = 0\n return (b+c), (a+c) ,(a+b) ,d\n\nwhile 1:\n a,b,c,d = c2(a,b,c)\n if d == 1:\n s+=1\n else:\n break\nprint(s)', '\na,b,c = map(int,input().split())\n\ns = 0\ndef c2(a,b,c):\n d = 1\n if a%2!=0 or b%2!=0 or c%2!=0:\n d = 0\n elif a == b and a== c:d=-1\n return (b+c)/2, (a+c)/2 ,(a+b)/2,d\n\nwhile 1:\n a,b,c,d = c2(a,b,c)\n if d == 1:\n s+=1\n elif d== -1:\n s=-1\n break\n else:\n break\nprint(s)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s224782324', 's537397390', 's541075243', 's097976473'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0, 17.0] | [350, 228, 499, 323] |
p03723 | u796563423 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\nif a==b==c:\n print(-1)\nelse:\n while True:\n total=0\n x=a/2\n y=b/2\n z=c/2\n a=y+z\n b=x+z\n c=x+y\n total+=1\n if a%2!=0 or b%2!=0 or c%2!=0:\n print(total)\n break', 'a,b,c=map(int,input().split())\nif a==b==c:\n print(-1)\ntotal=0\nelse:\n while True:\n x=a/2\n y=b/2\n z=c/2\n a=y+z\n b=x+z\n c=x+y\n total+=1\n if a%2!=0 or b%2!=0 or c%2!=0:\n print(total)\n break', 'a,b,c=map(int,input().split())\nif a%2!=0 or b%2!=0 or c%2!=0:\n print(0)\nelif a==b==c:\n print(-1)\nelse:\n total=0\n while True:\n x=a/2\n y=b/2\n z=c/2\n a=y+z\n b=x+z\n c=x+y\n total+=1\n if a%2!=0 or b%2!=0 or c%2!=0:\n print(total)\n break'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s757998231', 's792630338', 's232125268'] | [9200.0, 8952.0, 9268.0] | [28.0, 25.0, 29.0] | [277, 269, 319] |
p03723 | u798818115 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['l=list(map(int,input().split()))\n\nif l.count(l[0])==3:\n print(-1)\n exit()\n\ncount=0\nwhile True:\n temp=list(map(lambda x:x%2,l))\n all=sum(temp)\n if all==3:\n print(count+1)\n exit()\n elif all==2:\n print(count)\n exit()\n elif all==1:\n print(count)\n exit()\n l=list(map(lambda x:x//2,l))\n count+=1\n print(l)\n', 'l=list(map(int,input().split()))\n\nfor i in range(3):\n if l[i]%2==1:\n print(0)\n exit()\n\nif l.count(l[0])==3:\n if l[0]%2==0:\n print(-1)\n exit()\n else:\n print(0)\n exit()\n\ncount=0\nwhile True:\n temp=list(map(lambda x:x%2,l))\n all=sum(temp)\n if all==3:\n print(count+1)\n exit()\n elif all==2:\n print(count)\n exit()\n elif all==1:\n print(count)\n exit()\n l=list(map(lambda x:x//2,l))\n count+=1\n\n'] | ['Wrong Answer', 'Accepted'] | ['s731922699', 's769779314'] | [3064.0, 3064.0] | [18.0, 17.0] | [372, 498] |
p03723 | u803617136 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\ncnt = 0\ntotal = a + b + c\nwhile a % 2 == 0 or b % 2 == 0 or c % 2 == 0:\n if a == (total - a) // 2:\n cnt = -1\n break\n a = (total - a) // 2\n b = (total - b) // 2\n c = (total - c) // 2\n cnt += 1\nprint(cnt)', 'a, b, c = map(int, input().split())\ncnt = 0\ntotal = a + b + c\nwhile a % 2 == 0 and b % 2 == 0 and c % 2 == 0:\n if a == (total - a) // 2:\n cnt = -1\n break\n a = (total - a) // 2\n b = (total - b) // 2\n c = (total - c) // 2\n cnt += 1\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s739660534', 's113165945'] | [3064.0, 3060.0] | [18.0, 17.0] | [267, 269] |
p03723 | u808427016 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = [int(_) for _ in input().split()]\n \ndef solve(A, B, C):\n result = 0\n if A == B == C and A % 2 == 0 or B % 2 == 0 or C % 2 == 0:\n return -1\n while 1:\n if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n return result\n A, B, C = A/2+B/2, B/2+C/2, C/2+A/2\n result += 1\n\nprint(solve(A, B, C))\n', 'A, B, C = [int(_) for _ in input().split()]\n \ndef solve(A, B, C):\n result = 0\n if A == B == C and A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n return -1\n while 1:\n if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n return result\n A, B, C = A/2+B/2, B/2+C/2, C/2+A/2\n result += 1\n\nprint(solve(A, B, C))\n'] | ['Wrong Answer', 'Accepted'] | ['s188500996', 's168078358'] | [3060.0, 3060.0] | [17.0, 17.0] | [339, 341] |
p03723 | u810356688 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["import sys\ndef input(): return sys.stdin.readline().rstrip()\ndef main():\n a,b,c=map(int,input().split())\n cunt=0\n if a==b and b==c and a%2==0:\n print(-1)\n sys.exit()\n while True:\n if a%2 or b%2 or c%2:\n print(cunt)\n break\n cunt+=1\n a1,b1,c1=a,b,c\n a=(b1+c1)//2\n b=(a1+c1)//2\n c=(a1+b1)//2\n print(a,b,c)\n\nif __name__=='__main__':\n main()", "import sys\ndef input(): return sys.stdin.readline().rstrip()\ndef main():\n a,b,c=map(int,input().split())\n cunt=0\n while True:\n if a==b and b==c:\n print(-1)\n break\n if a%2 or b%2 or c%2:\n print(cunt)\n break\n cunt+=1\n a1,b1,c1=a,b,c\n a=(b1+c1)//2\n b=(a1+c1)//2\n c=(a1+b1)//2\n print(a,b,c)\n\nif __name__=='__main__':\n main()", "import sys\ndef input(): return sys.stdin.readline().rstrip()\ndef main():\n a,b,c=map(int,input().split())\n cunt=0\n if a==b and b==c and a%2==0:\n print(-1)\n sys.exit()\n while True:\n if a%2 or b%2 or c%2:\n print(cunt)\n break\n cunt+=1\n a1,b1,c1=a,b,c\n a=(b1+c1)//2\n b=(a1+c1)//2\n c=(a1+b1)//2\n\nif __name__=='__main__':\n main()"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s655875385', 's997279374', 's206876257'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 19.0] | [436, 432, 415] |
p03723 | u813174766 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['def(a,b,c):\n if a%2+b%2+c%2>0:\n return 0\n if a==b==c:\n return -1\n return f((b+c)//2,(c+a)//2,(a+b)//2)+1\n\na,b,c=map(int,input().split())\nprint(f(a,b,c))', 'def f(a,b,c):\n if a%2+b%2+c%2>0:\n return 0\n if a==b==c:\n return -1\n return f((b+c)//2,(c+a)//2,(a+b)//2)+1\n\na,b,c=map(int,input().split())\nprint(f(a,b,c))\n'] | ['Runtime Error', 'Accepted'] | ['s022098372', 's663291826'] | [8940.0, 9116.0] | [25.0, 27.0] | [161, 164] |
p03723 | u820351940 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\nif a == b == c:\n if a & 1:\n print(0)\n else:\n print(-1)\n exit()\n\ncount = 0\nwhile True:\n if (a | b | c) & 1:\n break\n half_a = a // 2\n half_b = b // 2\n half_c = c // 2\n a = half_b + half_c\n b = half_a + half_c\n c = half_a + half_b\n count += 1\nprint(count)\n\nif a == b == c:\n print(-1)\n exit()\n\ncount = 0\nwhile True:\n if (a | b | c) & 1:\n break\n half_a = a // 2\n half_b = b // 2\n half_c = c // 2\n a = half_b + half_c\n b = half_a + half_c\n c = half_a + half_b\n count += 1\nprint(count)\n\n', 'a, b, c = map(int, input().split())\nif a == b == c:\n if a & 1:\n print(0)\n else:\n print(-1)\n exit()\n\ncount = 0\nwhile True:\n if (a | b | c) & 1:\n break\n half_a = a // 2\n half_b = b // 2\n half_c = c // 2\n a = half_b + half_c\n b = half_a + half_c\n c = half_a + half_b\n count += 1\nprint(count)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s716081772', 's839975303'] | [3064.0, 3060.0] | [17.0, 17.0] | [607, 344] |
p03723 | u830881690 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\n\nif a==b==c and a%2==0:\n print(-1)\nelse:\n num=0\n while True:\n if a%2==1 or b%2==1 or c%2==1:\n break\n num+=1\n l0=(b+c)/2\n l1=(c+a)/2\n l2=(a+b)/2\n a,b,c=l0,l1,l2\n else:\n print(num)', 'a,b,c=map(int,input().split())\n\nif a==b==c and a%2==0:\n print(-1)\nelse:\n num=0\n while True:\n if a%2==1 or b%2==1 or c%2==1:\n break\n else:\n l=[(b+c)/2,(c+a)/2,(a+b)/2]\n num+=1\n l=[(l[1]+l[2])/2, (l[2]+l[0])/2, (l[0]+l[2])/2]\n a=l[0]\n b=l[1]\n c=l[2]\n else:\n print(num)', 'a,b,c=map(int,input().split())\n\nif a==b==c and a%2==0:\n print(-1)\nelse:\n num=0\n while True:\n if a%2==1 or b%2==1 or c%2==1:\n break\n else:\n num+=1\n l0=(b+c)/2\n l1=(c+a)/2\n l2=(a+b)/2\n a,b,c=l0,l1,l2\n else:\n print(num)', 'a,b,c=map(int,open(0).read().split())\n\ndef is_integer(x):\n tf=1\n for i in range(3):\n tf*=float.is_integer(l[i])\n return tf\n\nif a==b==c:\n print(-1)\nelse:\n num=-1\n tf=1\n while tf!=0:\n l=[(b+c)/2,(c+a)/2,(a+b)/2]\n tf=is_integer(l)\n num+=1\n l=[(l[1]+l[2])/2, (l[2]+l[0])/2, (l[0]+l[2])/2]\n else:\n print(num)', 'a,b,c=map(int,open(0).read().split())\n\nif a==b==c and a%2==0:\n print(-1)\nelse:\n num=0\n while true:\n if a%2==1 or b%2==1 or c%2==1:\n break\n else:\n l=[(b+c)/2,(c+a)/2,(a+b)/2]\n num+=1\n l=[(l[1]+l[2])/2, (l[2]+l[0])/2, (l[0]+l[2])/2]\n a=l[0]\n b=l[1]\n c=l[2]\n else:\n print(num)', 'a,b,c=map(int,open(0).read().split())\n\nif a==b==c and a%2==0:\n print(-1)\nelse:\n num=0\n while true:\n if a%2==1 or b%2==1 or c%2==1:\n break\n else:\n l=[(b+c)/2,(c+a)/2,(a+b)/2]\n num+=1\n l=[(l[1]+l[2])/2, (l[2]+l[0])/2, (l[0]+l[2])/2]\n a,b,c=l[0],l[1],l[2]\n else:\n print(num)', 'a,b,c=map(int,input().split())\n\nif a==b==c and a%2==0:\n print(-1)\nelse:\n num=0\n while True:\n if a%2==1 or b%2==1 or c%2==1:\n break\n num+=1\n l0=(b+c)/2\n l1=(c+a)/2\n l2=(a+b)/2\n a,b,c=l0,l1,l2\n print(num)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s053168023', 's259187352', 's269518979', 's340645815', 's554773680', 's954582621', 's327527539'] | [9156.0, 9248.0, 9264.0, 9160.0, 9176.0, 9112.0, 8968.0] | [27.0, 2206.0, 22.0, 2205.0, 24.0, 25.0, 27.0] | [281, 376, 315, 369, 383, 359, 267] |
p03723 | u842747358 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["import sys\n\nA, B, C = map(int, input().split())\n\ncount = 0\nwhile True:\n a = B//2 + C//2\n b = C//2 + A//2\n c = A//2 + B//2\n count += 1\n if (a == b and b == c) or (a % 4 == 0 and b % 4 == 0 and c % 4 == 0):\n print('-1')\n sys.exit()\n if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:\n break\n A = a\n B = b\n C = c\n\nprint(count)", "import sys\n\nA, B, C = map(int, input().split())\n\ncount = 0\nwhile True:\n a = B//2 + C//2\n b = C//2 + A//2\n c = A//2 + B//2\n count += 1\n if (A == B and B == C) or (A % 4 == 0 and B % 4 == 0 and C % 4 == 0):\n print('-1')\n sys.exit()\n if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:\n break\n A = a\n B = b\n C = c\n\nprint(count)", 'def func(A, B, C):\n if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n return 0\n if A == B and B == C:\n return -1\n return func((B+C)//2, (C+A)//2, (A+B)//2) + 1\n\n\nA, B, C = map(int, input().split())\n\nans = func(A, B, C)\n\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s414207906', 's704566867', 's763898111'] | [9236.0, 9208.0, 9180.0] | [23.0, 22.0, 22.0] | [363, 363, 247] |
p03723 | u845573105 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C =map(int,input().split())\ncon = 0\nif A % 2 == 1 or B % 2 == 1 or C % 1 == 0:\n print(0)\n exit()\nif A == B and B == C:\n print(-1)\n exit()\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n con += 1\n D = A / 2\n E = B / 2\n F = C / 2\n A = E + F\n B = D + F\n C = D + E\n \nprint(con)\nA,B,C =map(int,input().split())\ncon = 0\nif A % 2 == 1 or B % 2 == 1 or C % 1 == 0:\n print(0)\n exit()\nif A == B and B == C:\n print(-1)\n exit()\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n con += 1\n D = A / 2\n E = B / 2\n F = C / 2\n A = E + F\n B = D + F\n C = D + E\n \nprint(con)', 'A,B,C =map(int,input().split())\ncon = 0\n\nif A == B and B == C:\n print(-1)\n exit()\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n break\n con += 1\n D = A / 2\n E = B / 2\n F = C / 2\n A = E + F\n B = D + F\n C = D + E\n \nprint(con)', 'A,B,C =map(int,input().split())\ncon = 0\nif A % 2 == 1 or B % 2 == 1 or C % 1 == 0:\n print(0)\n exit()\nif A == B and B == C:\n print(-1)\n exit()\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n con += 1\n D = A / 2\n E = B / 2\n F = C / 2\n A = E + F\n B = D + F\n C = D + E\n \nprint(con)', 'A,B,C =map(int,input().split())\ncon = 0\nif A % 2 == 1 or B % 2 == 1 or C % 1 == 1:\n print(0)\n exit()\nif A == B and B == C:\n print(-1)\n exit()\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n con += 1\n D = A / 2\n E = B / 2\n F = C / 2\n A = E + F\n B = D + F\n C = D + E\nprint(con)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s080987607', 's188265554', 's692369128', 's582964885'] | [9264.0, 9056.0, 9092.0, 9188.0] | [31.0, 25.0, 28.0, 29.0] | [581, 238, 290, 287] |
p03723 | u849756457 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = [int(i) for i in input().split()]\n\ncnt = 0\nhistory = set()\nwhile True:\n print(a, b, c, "-", cnt, history)\n if (a, b, c) in history:\n print(-1)\n exit(0)\n if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:\n print(cnt)\n exit(0)\n a, b, c = sorted([a, b, c])\n history.add((a, b, c))\n na = b // 2 + c // 2\n nb = a // 2 + c // 2\n nc = a // 2 + b // 2\n a = na\n b = nb \n c = nc\n cnt += 1', 'a, b, c = [int(i) for i in input().split()]\n\ncnt = 0\nhistory = set()\nwhile True:\n if (a, b, c) in history:\n print(-1)\n exit(0)\n if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:\n print(cnt)\n exit(0)\n a, b, c = sorted([a, b, c])\n history.add((a, b, c))\n na = b // 2 + c // 2\n nb = a // 2 + c // 2\n nc = a // 2 + b // 2\n a = na\n b = nb \n c = nc\n cnt += 1'] | ['Wrong Answer', 'Accepted'] | ['s414817783', 's217923622'] | [9148.0, 9044.0] | [27.0, 31.0] | [404, 368] |
p03723 | u851704997 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A,B,C = map(int,input().split())\ncou = 0\nif(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):\n print("0")\nwhile(cou < 10*7):\n cou += 1\n A = B/2 + C/2\n B = A/2 + C/2\n C = A/2 + B/2\n if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):\n print(str(cou))\n break\n else:\n pass\nprint("-1")', 'A,B,C = map(int,input().split())\ncou = 0\nif(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):\n print("0")\n exit()\nwhile(cou < 10**6):\n cou += 1\n a = A\n b = B\n c = C\n A = b/2 + c/2\n B = a/2 + c/2\n C = a/2 + b/2\n if(A % 2 == 1 or B % 2 == 1 or C % 2 == 1):\n print(str(cou))\n exit()\n else:\n pass\nprint("-1")'] | ['Wrong Answer', 'Accepted'] | ['s100938095', 's030587358'] | [3060.0, 3064.0] | [18.0, 1350.0] | [280, 315] |
p03723 | u858670323 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["a,b,c=map(int,input().rstrip().split(' '))\nif(a==b and b==c):\n\tif(a%2==0):\n \tprint(-1)\n\telse:\n\t\tprint(0)\nelse:\n\tn=0\n\twhile(a%2==0 and b%2==0 and c%2==0):\n\t\tn+=1\n\t\ttmp_a=(b+c)/2\n\t\ttmp_b=(a+c)/2\n\t\ttmp_c=(b+a)/2\n\t\ta=tmp_a\n\t\tb=tmp_b\n\t\tc=tmp_c\n\tprint(n)\n", 'a,b,c=map(int,input())\nif(a==b and b==c):\n\tprint(-1)\nelse:\n\tn=0\n\twhile(a%2==0 and b%2==0 and c%2==0):\n\t\tn+=1\n \ta=(b+c)/2\n \tb=(a+c)/2\n \tc=(b+a)/2\n\tprint(n)\n ', "a,b,c=map(int,input().rstrip().split(' '))\nif(a==b and b==c):\n\tif(a%2==0):\n\t\tprint(-1)\n\telse:\n\t\tprint(0)\nelse:\n\tn=0\n\twhile(a%2==0 and b%2==0 and c%2==0):\n\t\tn+=1\n\t\ttmp_a=(b+c)/2\n\t\ttmp_b=(a+c)/2\n\t\ttmp_c=(b+a)/2\n\t\ta=tmp_a\n\t\tb=tmp_b\n\t\tc=tmp_c\n\tprint(n)\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s122974005', 's659713394', 's008220405'] | [2940.0, 2940.0, 3064.0] | [18.0, 17.0, 17.0] | [252, 168, 249] |
p03723 | u860338101 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = map(int, input().split())\ncount = 0\nABC = []\nwhile True:\n if A % 2 ==0 and B % 2 == 0 and C % 2 == 0:\n nA = B/2 + C/2\n nB = A/2 + C/2\n nC = A/2 + B/2\n A, B, C = nA, nB, nC\n ABC.append([A, B, C])\n count += 1\n if [A, B, C] in ABC:\n count = -1\n break\n else:\n break\nprint(count)', 'A, B, C = map(int, input().split())\ncount = 0\nABC = []\nwhile True:\n if A % 2 ==0 and B % 2 == 0 and C % 2 == 0:\n nA = B/2 + C/2\n nB = A/2 + C/2\n nC = A/2 + B/2\n A, B, C = nA, nB, nC\n count += 1\n if [A, B, C] in ABC:\n count = -1\n break\n ABC.append([A, B, C])\n else:\n break\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s191006024', 's573164152'] | [9100.0, 9256.0] | [29.0, 28.0] | [368, 368] |
p03723 | u867826040 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['ms = list(map(int,input().split()))\nans=0\nif len(set(ms))==1 and ms[0]%2==0:\n print(-1)\nelse:\n while(not any([i%2==0 for i in ms])):\n l = [0]*3\n for i in range(3):\n x = ms[i]/2\n if i==0:\n l[1]+=x\n l[2]+=x\n elif i==1:\n l[0]+=x\n l[2]+=x\n elif i==2:\n l[0]+=x\n l[1]+=x\n ms = l[:]\n ans+=1\n print(ans)', 'ms = list(map(int,input().split()))\nif len(set(ms))==1 and ms[0]%2==0:\n print(-1)\nelse:\n ans=0\n while(all([i%2==0 for i in ms])):\n l = [0]*3\n for i in range(3):\n x = ms[i]/2\n if i==0:\n l[1]+=x\n l[2]+=x\n elif i==1:\n l[0]+=x\n l[2]+=x\n elif i==2:\n l[0]+=x\n l[1]+=x\n ms = l[:]\n ans+=1\n print(ans)'] | ['Wrong Answer', 'Accepted'] | ['s548925304', 's749209978'] | [3064.0, 3064.0] | [2104.0, 17.0] | [466, 466] |
p03723 | u869265610 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\ni=0\nif a==b==c :\n\tprint("-1")\nelse:\n while a%2==0 and b%2==0 and c%2==0:\n a/2\n b/2\n c/2\n i+=1\n \nprint(i)', 'a,b,c=list(map(int,input().split()))\nn=0\nH=[]\nwhile True:\n S=[a,b,c]\n if S in H:\n print("-1")\n exit()\n H.append(S)\n if a%2!=0 and b%2!=0 and c%2!=0:\n print(n)\n exit()\n else:\n A=a/4\n B=b/4\n C=c/4\n a=a/2+B+C\n b=b/2+A+C\n c=c/2+A+B\n n+=1', 'a,b,c=list(map(int,input().split()))\nn=0\nH=[]\nwhile True:\n S=[a,b,c]\n if S in H:\n print("-1")\n exit()\n H.append(S)\n if a%2!=0 or b%2!=0 or c%2!=0:\n print(n)\n exit()\n else:\n A=a/2\n B=b/2\n C=c/2\n a=int(B+C)\n b=int(A+C)\n c=int(A+B)\n n+=1'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s387119645', 's555016363', 's229218485'] | [2940.0, 9152.0, 9192.0] | [2104.0, 30.0, 29.0] | [177, 271, 272] |
p03723 | u877283726 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = map(int,input().split())\n\nans = 0\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n if A == B and A == C:\n print(-1)\n exit()\n a = (B+C)//2\n b = (A+C)//2\n c = (A+B)//2\n A = a\n B = b\n C = c\n print(A,B,C)\n ans += 1\n\nprint(ans)', 'A, B, C = map(int,input().split())\n\nans = 0\nwhile A % 2 == 0 and B % 2 == 0 and C % 2 == 0:\n if A == B and A == C:\n print(-1)\n exit()\n a = (B+C)//2\n b = (A+C)//2\n c = (A+B)//2\n A = a\n B = b\n C = c\n ans += 1\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s579737534', 's958808795'] | [3064.0, 3064.0] | [18.0, 17.0] | [273, 256] |
p03723 | u899975427 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\n\nif a == b == c:\n if a%2 = 0:\n print(-1)\n exit()\n else:\n print(0)\n exit()\nans = 0\nwhile(a%2 == b%2 == c%2 == 0):\n temp_a = (b+c)//2\n temp_b = (a+c)//2\n temp_c = (b+a)//2\n ans += 1\n a = temp_a\n b = temp_b\n c = temp_c\nprint(ans)', 'a,b,c = map(int,input().split())\n\nif a == b == c:\n if a%2 == 0:\n print(-1)\n exit()\n else:\n print(0)\n exit()\nans = 0\nwhile(a%2 == b%2 == c%2 == 0):\n temp_a = (b+c)//2\n temp_b = (a+c)//2\n temp_c = (b+a)//2\n ans += 1\n a = temp_a\n b = temp_b\n c = temp_c\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s708325959', 's648273026'] | [2940.0, 3064.0] | [17.0, 17.0] | [280, 281] |
p03723 | u924594299 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = (int(i) for i in input().split()) \n\n\nresult = 0\nmemory = []\nwhile True:\n memory.append(sorted([A, B, C]))\n\n a = A / 2\n b = B / 2\n c = C / 2\n\n A = b + c\n B = a + c\n C = a + b\n\n\n for m in memory:\n l = sorted([A, B, C])\n if m[0] == l[0] and m[1] == l[1] and m[2] == l[2]:\n result = -1\n \n if result == -1:\n break\n\n\n\n if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:\n break\n\n \n\nprint(result)\n\n\n', 'A, B, C = (int(i) for i in input().split()) \n\n\n\n\n\n\nresult = 0\nmemory = [[A, B, C]]\nwhile True:\n if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:\n break\n else:\n result += 1\n \n a = A / 2\n b = B / 2\n c = C / 2\n\n A = b + c\n B = a + c\n C = a + b\n\n l = sorted([A, B, C])\n for m in memory:\n if m[0] == l[0] and m[1] == l[1] and m[2] == l[2]:\n result = -1\n break\n \n if result == -1:\n break\n\n\t\n\n \n\n memory.append(l)\n \n\nprint(result)\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s990940780', 's404422021'] | [3064.0, 3064.0] | [18.0, 17.0] | [468, 518] |
p03723 | u927534107 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['print(-1)', 'a,b,c=map(int,input().split())\nif a%2==b%2==c%2==0 and a==b==c:print(-1)\n', 'a,b,c=map(int,input().split())\nif a%2==b%2==c%2==0 and a==b==c:print(-1);exit()\nelse:\n ans=0\n while a%2==b%2==c%2==0:\n a,b,c=b//2+c//2,a//2+c//2,a//2+b//2\n ans+=1\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s213394791', 's432849167', 's988225614'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [9, 73, 193] |
p03723 | u950708010 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ["def solve():\n n,m = (int(i) for i in input().split())\n a = [0]*n\n for i in range(m):\n a1,b1 = (int(i) for i in input().split())\n a[a1-1]+=1\n a[b1-1]+=1\n ans = 'YES'\n for i in range(1,n+1):\n if a[i]%2 == 1:\n ans ='NO'\n return ans\n \n \nif __name__ == '__main__':\n print(solve())", "def solve():\n a,b,c = (int(i) for i in input().split())\n queue = [[a,b,c]] \n ct = 0\n while ct <100000000:\n if a%2 ==1 or b%2 ==1 or c%2 == 1: break\n \n tmpa = a//2\n tmpb = b//2\n tmpc = c//2\n a = tmpb+tmpc\n b = tmpa+tmpc\n c = tmpa+tmpb\n if [a,b,c] in queue: \n return -1\n else:\n ct += 1\n queue.append([a,b,c])\n \n return ct\n \n \nif __name__ == '__main__':\n print(solve())"] | ['Runtime Error', 'Accepted'] | ['s914528138', 's338777690'] | [3064.0, 3064.0] | [18.0, 18.0] | [315, 498] |
p03723 | u953379577 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c = map(int,input().split())\n\nx = 0\ny = 0\nz = 0\n\nwhile a%2 == 0:\n x += 1\nwhile b%2 == 0:\n y += 1\nwhile c%2 == 0:\n z += 1\n \nif a == b == c:\n print(-1)\nelse:\n print(min(a,b,c))', 'x,y,z = map(int,input().split())\n\nans = 0\n\ns = []\n\nwhile True:\n if x%2 == 0 and y%2 == 0 and z%2 == 0:\n ans += 1\n if [x,y,z] in s:\n print(-1)\n break\n else:\n s.append([x,y,z])\n else:\n print(ans)\n break\n \n x,y,z = y//2+z//2,x//2+z//2,x//2+y//2'] | ['Wrong Answer', 'Accepted'] | ['s622221128', 's755077576'] | [9032.0, 9196.0] | [2205.0, 27.0] | [184, 321] |
p03723 | u968404618 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a, b, c = map(int, input().split())\n\nif a == b == c:\n print(-1)\n exit()\n\nif a%2!=0 or b%2!=0 or c%2!=0:\n \tprint(0)\n exit()\n\nN = (a+b+c)//3\ncnt = 1\nwhile N:\n if N%2 != 0: break\n N //= 2\n cnt += 1\n \nprint(cnt)', 'a, b, c = map(int, input().split())\n \nif a % 2 != 0 or b % 2 != 0 or c % 2 != 0:\n print(0) \n exit() \n \nif a == b == c:\n print(-1)\n exit()\n \ncnt = 0\nwhile (a % 2 == 0 and b % 2 == 0 and c % 2 == 0): \n a, b, c = (b+c)//2, (a+c)//2, (a+b)//2\n cnt += 1\n \nprint(cnt)'] | ['Runtime Error', 'Accepted'] | ['s245609826', 's781207186'] | [8944.0, 9092.0] | [26.0, 31.0] | [229, 288] |
p03723 | u977193988 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['A, B, C = map(int, input().split())\n\n\ndef cnt(N):\n cnt = 0\n while N % 2 == 0:\n cnt += 1\n N //= 2\n\n return cnt\n\n\nif A == B == C and A % 2 == 0:\n print(-1)\nelif len(set([cnt(A), cnt(B), cnt(C)])) <= 2:\n print(min(cnt(A), cnt(B), cnt(C)))\nelse:\n print(min(cnt(A), cnt(B), cnt(C)) + 1)\n\n', 'A, B, C = map(int, input().split())\n\n\ndef check(A, B, C):\n if A & 1 or B & 1 or C & 1:\n return 0\n if A == B == C:\n return -1\n return 1 + check((A + B) // 2, (B + C) // 2, (C + A) // 2)\n\n\nanswer = check(A, B, C)\nprint(answer)\n'] | ['Wrong Answer', 'Accepted'] | ['s683098078', 's605223506'] | [3060.0, 2940.0] | [18.0, 17.0] | [315, 248] |
p03723 | u992088972 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['# coding: utf-8\n\na, b, c = map(int, input().rstrip().split())\ncount = 0\n\nwhile True:\n elif a == b and b == c and c == a :\n count = -1 if a % 2 == 1 else 0\n break\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0 :\n a, b, c = (b+c)/2, (c+a)/2, (a+b)/2\n count += 1\n else:\n break\nprint(count)', '# coding: utf-8\n\na, b, c = map(int, input().rstrip().split())\ncount = 0\n\nwhile True:\n elif a == b and b == c and c == a :\n count = -1 if a % 2 == 1 else 0\n break\n if a % 2 == 0 and b % 2 == 0 and c % 2 == 0 :\n a, b, c = (b+c)/2, (c+a)/2, (a+b)/2\n count += 1\n else:\n break\nprint(count)', '# coding: utf-8\n\na, b, c = map(int, input().rstrip().split())\ncount = 0\n\nwhile True:\n if a == b and b == c and c == a :\n count = -1 if a % 2 == 0 else 0\n break\n elif a % 2 == 0 and b % 2 == 0 and c % 2 == 0 :\n a, b, c = (b+c)/2, (c+a)/2, (a+b)/2\n count += 1\n else:\n break\nprint(count)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s363832071', 's488906732', 's196302549'] | [2940.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0] | [328, 328, 328] |
p03723 | u994935583 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['def resolve():\n A,B,C = map(int,input().split())\n count = 0\n if A == C and A == B:\n if A % 2 == 1:\n print(0)\n else:\n print(-1)\n else:\n while (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):\n tmpA = (B + C) / 2 \n tmpB = (A + C) / 2 \n tmpC = (A + B) / 2\n A = tmpA\n B = tmpB\n C = tmpC\n count = count + 1\n print(count)\nresolve():', 'def resolve():\n A,B,C = map(int,input().split())\n count = 0\n if A == C and A == B:\n if A % 2 == 1:\n print(0)\n else:\n print(-1)\n else:\n while (A % 2 == 0 and B % 2 == 0 and C % 2 == 0):\n tmpA = (B + C) / 2 \n tmpB = (A + C) / 2 \n tmpC = (A + B) / 2\n A = tmpA\n B = tmpB\n C = tmpC\n count = count + 1\n print(count)\nresolve()'] | ['Runtime Error', 'Accepted'] | ['s430038631', 's646142042'] | [3064.0, 3064.0] | [17.0, 17.0] | [459, 458] |
p03723 | u999503965 | 2,000 | 262,144 | Takahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below: * Each person simultaneously divides his cookies in half and gives one half to each of the other two persons. This action will be repeated until there is a person with odd number of cookies in hand. How many times will they repeat this action? Note that the answer may not be finite. | ['a,b,c=map(int,input().split())\n\nans=0\nif a==b==c:\n print(-1)\nelse:\n while a%2==0 and b%2==0 and c%2==0:\n num_a,num_b,num_c=a/2,b/2,c/2\n a=num_b+num_c\n b=num_a+num_c\n c=num_a+num_b\n print(a,b,c)\n ans+=1\n print(ans)', 'a,b,c=454,414,444\n\nans=0\nif a==b==c:\n print("-1")\nelse:\n while a%2==0 and b%2==0 and c%2==0:\n num_a,num_b,num_c=a/2,b/2,c/2\n a=num_b+num_c\n b=num_a+num_c\n c=num_a+num_b\n ans+=1\n \nprint(ans)', 'a,b,c=map(int,input().split())\n\nif a%2!=0 or b%2!=0 or c%2!=0:\n print(0)\n exit()\nelif a==b==c:\n print(-1)\n exit()\n \nans=0 \n\nwhile a%2==0 and b%2==0 and c%2==0:\n num_a,num_b,num_c=a/2,b/2,c/2\n a=num_b+num_c\n b=num_a+num_c\n c=num_a+num_b\n ans+=1\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s483119699', 's491543890', 's454414681'] | [9152.0, 8996.0, 9160.0] | [27.0, 30.0, 26.0] | [234, 207, 268] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.