s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s576001542 | p03998 | u525796732 | 1586024095 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 378 | import sys
stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
p=[0]*3
p[0]=ns()
p[1]=ns()
p[2]=ns()
turn='A'
d={'A':0,'B':1,'C':2}
while(len[p[d[turn]]]==0):
tmp=p[d[turn]][0]
p[d[turn]][0]=[]
turn=tmp
print(d[turn])
|
s013772938 | p03998 | u634079249 | 1586024045 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 961 | import sys
import os
ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]
iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]
def main():
if os.getenv("LOCAL"):
sys.stdin = open("input.txt", "r")
*A, = iss()
*B, = iss()
*C, = iss()
tmp = "a"
while True:
if tmp == "a" and len(A) == 0:
print('A')
exit()
if tmp == "b" and len(B) == 0:
print('B')
exit()
if tmp == "c" and len(C) == 0:
print('C')
exit()
if tmp == 'a':
tmp = A.pop(0)
if tmp == 'b':
tmp = B.pop(0)
if tmp == 'c':
tmp = C.pop(0)
if __name__ == '__main__':
main()
|
s486618450 | p03998 | u409542115 | 1585988443 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 551 | A = input()
B = input()
C = input()
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[i]
elif X[i] == 'b':
return B[i]
else:
return C[i]
xa = 0
xb = 0
xc = 0
h = 'A'
k = next(A, xa) #最初
xa += 1
while xa <= len(A) and xb <= len(B) and xc <= len(C):
if k == 'a':
h = 'A'
k = next(A, xa)
xa += 1
elif k == 'b':
h = 'B'
k = next(B, xb)
xb += 1
else:
h = 'C'
k = next(C, xc)
xc += 1
print(h)
|
s682733900 | p03998 | u409542115 | 1585988361 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 547 | A = input()
B = input()
C = input()
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[i]
elif X[i] == 'b':
return B[i]
else:
return C[i]
xa = 0
xb = 0
xc = 0
h = 'A'
k = next(A, xa) #最初
xa += 1
while xa < len(A) and xb <len(B) and xc < len(C):
if k == 'a':
h = 'A'
k = next(A, xa)
xa += 1
elif k == 'b':
h = 'B'
k = next(B, xb)
xb += 1
else:
h = 'C'
k = next(C, xc)
xc += 1
print(h)
|
s877435459 | p03998 | u409542115 | 1585988017 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 717 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
h = 'A'
k = A[0] #最初の1枚を抜く
xa += 1
while True:
#抜いたカードに書かれている文字に注目
# 次の手番は A だった
if k == 'a':
h = 'A'
# xa はこの時点で 2、len(A)が 1 なら A の勝ち
if xa <= len(A):
k = A[xa]
xa += 1
else:
break
elif k == 'b':
h = 'B'
xb += 1
if xb <= len(B):
k = B[xb]
xb += 1
else:
break
else:
h = 'C'
xc += 1
if xc <= len(C):
k = C[xc]
xc += 1
else:
break
print(h)
|
s034773833 | p03998 | u409542115 | 1585987977 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 665 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
while True:
#抜いたカードに書かれている文字に注目
# 次の手番は A だった
if k == 'a':
h = 'A'
# xa はこの時点で 2、len(A)が 1 なら A の勝ち
if xa <= len(A):
k = A[xa]
xa += 1
else:
break
elif k == 'b':
h = 'B'
xb += 1
if xb <= len(B):
k = B[xb]
xb += 1
else:
break
else:
h = 'C'
xc += 1
if xc <= len(C):
k = C[xc]
xc += 1
else:
break
print(h)
|
s394857981 | p03998 | u409542115 | 1585987277 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 703 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
#配列の次のカードの文字を返す
def next(X, i):
if X[i - 1] == 'a':
return A[xa]
elif X[i - 1] == 'b':
return B[xb]
else:
return C[xc]
h = 'A'
xa += 1
k = next(A, xa) #最初
while True:
if k == 'a':
h = 'A'
xa += 1
if xa <= len(A):
k = next(A, xa)
else:
break
elif k == 'b':
h = 'B'
xb += 1
if xb <= len(B):
k = next(B, xb)
else:
break
else:
h = 'C'
xc += 1
if xc <= len(C):
k = next(C, xc)
else:
break
print(h)
|
s990577240 | p03998 | u409542115 | 1585987240 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 700 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
#配列の次のカードの文字を返す
def next(X, i):
if X[i - 1] == 'a':
return A[xa]
elif X[i - 1] == 'b':
return B[xb]
else:
return C[xc]
h = 'A'
xa += 1
k = next(A, xa) #最初
while True:
if k == 'a':
h = 'A'
xa += 1
if xa < len(A):
k = next(A, xa)
else:
break
elif k == 'b':
h = 'B'
xb += 1
if xb < len(B):
k = next(B, xb)
else:
break
else:
h = 'C'
xc += 1
if xc < len(C):
k = next(C, xc)
else:
break
print(h)
|
s877312632 | p03998 | u409542115 | 1585987054 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 708 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[xa]
elif X[i] == 'b':
return B[xb]
else:
return C[xc]
h = 'A'
xa += 1
k = next(A, xa - 1) #最初
while True:
if k == 'a':
h = 'A'
xa += 1
if xa < len(A):
k = next(A, xa - 1)
else:
break
elif k == 'b':
h = 'B'
xb += 1
if xb < len(B):
k = next(B, xb - 1)
else:
break
else:
h = 'C'
xc += 1
if xc < len(C):
k = next(C, xc - 1)
else:
break
print(h)
|
s320061467 | p03998 | u409542115 | 1585987016 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 711 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[xa]
elif X[i] == 'b':
return B[xb]
else:
return C[xc]
h = 'A'
xa += 1
k = next(A, xa - 1) #最初
while True:
if k == 'a':
h = 'A'
xa += 1
if xa <= len(A):
k = next(A, xa - 1)
else:
break
elif k == 'b':
h = 'B'
xb += 1
if xb <= len(B):
k = next(B, xb - 1)
else:
break
else:
h = 'C'
xc += 1
if xc <= len(C):
k = next(C, xc - 1)
else:
break
print(h)
|
s076148693 | p03998 | u409542115 | 1585986966 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3064 | 612 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[xa]
elif X[i] == 'b':
return B[xb]
else:
return C[xc]
h = 'A'
xa += 1
k = next(A, xa - 1) #最初
while True:
if k == 'a':
h = 'A'
xa += 1
if xa < len(A):
k = next(A, xa - 1)
elif k == 'b':
h = 'B'
xb += 1
if xb < len(B):
k = next(B, xb - 1)
else:
h = 'C'
xc += 1
if xc < len(C):
k = next(C, xc - 1)
print(h)
|
s069931901 | p03998 | u409542115 | 1585986893 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3064 | 615 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[xa]
elif X[i] == 'b':
return B[xb]
else:
return C[xc]
h = 'A'
xa += 1
k = next(A, xa - 1) #最初
while True:
if k == 'a':
h = 'A'
xa += 1
if xa <= len(A):
k = next(A, xa - 1)
elif k == 'b':
h = 'B'
xb += 1
if xb <= len(B):
k = next(B, xb - 1)
else:
h = 'C'
xc += 1
if xc <= len(C):
k = next(C, xc - 1)
print(h)
|
s832936114 | p03998 | u409542115 | 1585986689 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 570 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[xa]
elif X[i] == 'b':
return B[xb]
else:
return C[xc]
h = 'A'
xa += 1
k = next(A, xa - 1) #最初
while xa <= len(A) and xb <= len(B) and xc <= len(C):
if k == 'a':
h = 'A'
xa += 1
k = next(A, xa - 1)
elif k == 'b':
h = 'B'
xb += 1
k = next(B, xb - 1)
else:
h = 'C'
xc += 1
k = next(C, xc - 1)
print(h)
|
s152674840 | p03998 | u409542115 | 1585986495 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 566 | A = input()
B = input()
C = input()
xa = 0
xb = 0
xc = 0
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[xa]
elif X[i] == 'b':
return B[xb]
else:
return C[xc]
h = 'A'
xa += 1
k = next(A, xa - 1) #最初
while xa < len(A) and xb <len(B) and xc < len(C):
if k == 'a':
h = 'A'
xa += 1
k = next(A, xa - 1)
elif k == 'b':
h = 'B'
xb += 1
k = next(B, xb - 1)
else:
h = 'C'
xc += 1
k = next(C, xc - 1)
print(h)
|
s605721585 | p03998 | u409542115 | 1585985857 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 599 | A = input()
B = input()
C = input()
def next(X, i):
if X[i] == 'a':
return A[i]
elif X[i] == 'b':
return B[i]
else:
return C[i]
xa = 0
xb = 0
xc = 0
h = 'A'
k = next(A, xa) #最初
xa += 1
while True:
if k == 'a':
h = 'A'
if(len(A) <= xa):
break
k = next(A, xa)
xa += 1
elif k == 'b':
h = 'B'
if(len(B) <= xb):
break
k = next(B, xb)
xb += 1
else:
h = 'C'
if(len(C) <= xc):
break
k = next(C, xc)
xc += 1
print(h)
|
s783896315 | p03998 | u409542115 | 1585984930 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 551 | A = input()
B = input()
C = input()
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[i]
elif X[i] == 'b':
return B[i]
else:
return C[i]
xa = 0
xb = 0
xc = 0
h = 'A'
k = next(A, xa) #最初
xa += 1
while xa <= len(A) and xb <= len(B) and xc <= len(C):
if k == 'a':
h = 'A'
k = next(A, xa)
xa += 1
elif k == 'b':
h = 'B'
k = next(B, xb)
xb += 1
else:
h = 'C'
k = next(C, xc)
xc += 1
print(h)
|
s549130830 | p03998 | u409542115 | 1585984711 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 547 | A = input()
B = input()
C = input()
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[i]
elif X[i] == 'b':
return B[i]
else:
return C[i]
xa = 0
xb = 0
xc = 0
h = 'A'
k = next(A, xa) #最初
xa += 1
while xa < len(A) and xb <len(B) and xc < len(C):
if k == 'a':
h = 'A'
k = next(A, xa)
xa += 1
elif k == 'b':
h = 'B'
k = next(B, xb)
xb += 1
else:
h = 'C'
k = next(C, xc)
xc += 1
print(h)
|
s784464828 | p03998 | u409542115 | 1585984277 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 553 | A = input()
B = input()
C = input()
#配列の次のカードの文字を返す
def next(X, i):
if X[i] == 'a':
return A[i+1]
elif X[i] == 'b':
return B[i+1]
else:
return C[i+1]
xa = 0
xb = 0
xc = 0
h = 'A'
k = next(A, xa) #最初
xa += 1
while xa < len(A) and xb <len(B) and xc < len(C):
if k == 'a':
h = 'A'
k = next(A, xa)
xa += 1
elif k == 'b':
h = 'B'
k = next(B, xb)
xb += 1
else:
h = 'C'
k = next(C, xc)
xc += 1
print(h)
|
s378279327 | p03998 | u191423660 | 1585950719 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 463 | A = input()
B = input()
C = input()
def next(X, i):
if X[i] == 'a':
return A[i+1]
elif X[i] == 'b':
return B[i+1]
else:
return C[i+1]
xa = 0
xb = 0
xc = 0
k = next(A, xa)
xa += 1
while xa < len(A)-1 and xb < len(B)-1 and xc < len(C)-1:
if k == 'a':
k = next(A, xa)
xa += 1
elif k == 'b':
k = next(B, xb)
xb += 1
else:
k = next(C, xc)
xc += 1
print(str.upper(k))
|
s370899517 | p03998 | u191423660 | 1585950672 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 463 | A = input()
B = input()
C = input()
def next(X, i):
if X[i] == 'a':
return A[i+1]
elif X[i] == 'b':
return B[i+1]
else:
return C[i+1]
xa = 0
xb = 0
xc = 0
k = next(A, xa)
xa += 1
while xa < len(A)-1 and xb < len(B)-1 and xc < len(C)-1:
if k == 'a':
k = next(A, xa)
xa += 1
elif k == 'b':
k = next(B, xb)
xb += 1
else:
k = next(C, xc)
xc += 1
print(str.upper(k))
|
s826075585 | p03998 | u290187182 | 1585761682 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3828 | 783 | import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
def lcm(x, y):
return (x * y) // math.gcd(x, y)
if __name__ == '__main__':
a =input()
b=input()
c=input()
now = "A"
for i in range(300):
if now =="A":
if len(a) >0:
now = a.pop().upper()
else:
print("A")
break
if now =="B":
if len(b) >0:
now = b.pop().upper()
else:
print("B")
break
if now =="C":
if len(c) >0:
now = c.pop().upper()
else:
print("C")
break |
s777511609 | p03998 | u535659144 | 1585704169 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 393 | a_list = list(input())
b_list = list(input())
c_list = list(input())
x=a_list.pop(0)
while True:
if x=="a":
x = a_list.pop(0)
elif x == "b":
x = b_list.pop(0)
else:
x = c_list.pop(0)
if not len(a_list):
print("A")
break
elif not len(b_list):
print("B")
break
elif not len(c_list):
print("C")
break |
s175173539 | p03998 | u535659144 | 1585704076 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 387 | a_list = list(input())
b_list = list(input())
c_list = list(input())
x=a_list.pop(0)
while True:
if x=="a":
x = a_list.pop(0)
elif x == "b":
x = b_list.pop(0)
else:
x = c_list.pop(0)
if len(a_list)==0:
print("A")
break
elif len(b_list)==0:
print("B")
break
elif len(c_list):
print("C")
break |
s597785145 | p03998 | u535659144 | 1585704042 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 432 | a_list = list(input())
#print(a_list)
b_list = list(input())
#print(b_list)
c_list = list(input())
#print(c_list)
x=a_list.pop(0)
while True:
if x=="a":
x = a_list.pop(0)
elif x == "b":
x = b_list.pop(0)
else:
x = c_list.pop(0)
if len(a_list)==0:
print("A")
break
elif len(b_list)==0:
print("B")
break
elif len(c_list):
print("C")
break |
s241544515 | p03998 | u852798899 | 1585417718 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 362 | def nextTurn(a):
if a == "a":
return 0
elif a == "b":
return 1
else:
return 2
hand = [list(input()) for i in range(3)]
turn = nextTurn(hand[0].pop(0))
while(True):
turn = nextTurn(hand[turn].pop(0))
if len(hand[turn]) == 0:
if turn == 0:
print("A")
elif turn == 1:
print("B")
else:
print("C")
break
|
s025753504 | p03998 | u852798899 | 1585417599 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 372 | def nextTurn(a):
if a == "a":
return 0
elif a == "b":
return 1
else:
return 2
hand = [list(input()) for i in range(3)]
turn = nextTurn(hand[0].pop(0))
while(True):
tmp = turn
turn = nextTurn(hand[turn].pop(0))
if len(hand[tmp]) == 0:
if tmp == 0:
print("A")
elif tmp == 1:
print("B")
else:
print("C")
break
|
s567054475 | p03998 | u852798899 | 1585417507 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 373 | def nextTurn(a):
if a == "a":
return 0
elif a == "b":
return 1
else:
return 2
hand = [list(input()) for i in range(3)]
turn = nextTurn(hand[0].pop(0))
while(True):
tmp = turn
turn = nextTurn(hand[turn].pop(0))
if len(hand[turn]) == 0:
if tmp == 0:
print("A")
elif tmp == 1:
print("B")
else:
print("C")
break
|
s357976285 | p03998 | u288430479 | 1585189930 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 325 | A = input()
B = input()
C = input()
T = "a"
while not ((A=="" and T=="a") and (B==""and T=="b") and (C==""and T=="c")):
if T =="a":
T = A[0]
A = A[1:]
elif T =="b":
T = B[0]
B = B[1:]
elif T =="c":
T = C[0]
C = C[1:]
if (A==""):
print("a")
elif (B==""):
print("b")
elif (C==""):
print("c") |
s274184386 | p03998 | u223663729 | 1584335796 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 168 | s = open(0).read().split()
x = s[0][0]
s[0] = s[0][1:]
while True:
p = ord(x)-97
if len(s[p] == 0):
print(x.upper())
break
x = s[p][0]
s[p] = s[p][1:] |
s838812973 | p03998 | u223663729 | 1584335769 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 173 | s = open(0).read().split()
x = s[0][0]
s[0] = s[0][1:]
while True:
p = ord(x)-97
if len(s[p] == 0):
print(ord(x).upper())
break
x = s[p][0]
s[p] = s[p][1:] |
s402979923 | p03998 | u223663729 | 1584335732 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 172 | s = open(0).read().split()
x = s[0][0]
s[0] = s[0][1:]
while True:
p = ord(x)-97
if len(s[p] == 0):
print ord(x).upper()
break
x = s[p][0]
s[p] = s[p][1:]
|
s559689996 | p03998 | u841623074 | 1583955635 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 679 | A=input()
B=input()
C=input()
D=[]
E=[]
F=[]
s=a
x=len(A)
y=len(B)
z=len(C)
for i in range(len(A)):
D.append(A[i])
for i in range(len(B)):
E.append(B[i])
for i in range(len(C)):
F.append(C[i])
while x>=0 and y>=0 and z>=0:
if s==a:
if x==0:
print("A")
break
else:
count=D[0]
D.pop(0)
x-=1
elif s==b:
if y==0:
print("B")
break
else:
count=E[0]
E.pop(0)
y-=1
elif s==c:
if z==0:
print("C")
break
else:
count=F[0]
F.pop(0)
z-=1
|
s983755361 | p03998 | u841623074 | 1583955537 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 679 | A=input()
B=input()
C=input()
D=[]
E=[]
F=[]
s=a
x=len(A)
y=len(B)
z=len(C)
for i in range(len(A)):
D.append(A[i])
for i in range(len(B)):
E.append(B[i])
for i in range(len(C)):
F.append(C[i])
while x>=0 and y>=0 and z>=0:
if s==a:
if x==0:
print("A")
break
else:
count=D[0]
D.pop(0)
x-=1
elif s==b:
if y==0:
print("B")
break
else:
count=E[0]
E.pop(0)
y-=1
else:
if z==0:
print("C")
break
else:
count=F[0]
F.pop(0)
z-=1
|
s888251095 | p03998 | u767995501 | 1583805917 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 105 | #!/usr/bin/env python3
s={c:list(input()) for c in "abc"}
s="a"
while s[s]:s=s[s].pop(0)
print(s.upper()) |
s857724071 | p03998 | u767995501 | 1583805880 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 106 | #!/usr/bin/env python3
s={c:list(input()) for c in "abc"}
s="a"
while s[s]:s=s[s].pop(0)
print(s.upper()) |
s090904019 | p03998 | u595893956 | 1583535343 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 545 | s=input()
t=input()
u=input()
a=b=c=0
now = 0
while 1:
if now == 0:
if s[a] == 'a':
now = 0
elif s[a] == 'b':
now = 1
else:
now = 2
a+=1
if a==len(s):
print('A')
break
elif now == 1:
if s[b] == 'a':
now = 0
elif s[b] == 'b':
now = 1
else:
now = 2
b+=1
if b==len(t):
print('B')
break
else:
if s[c] == 'a':
now = 0
elif s[c] == 'b':
now = 1
else:
now = 2
c+=1
if c==len(u):
print('C')
break
|
s877773467 | p03998 | u077898957 | 1583344353 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 469 | A,B,C = (input() for i in range(3))
count_A=1
count_B=0
count_C=0
arr = A[0]
for i in range(len(A)+len(B)+len(C)):
if arr=='a':
count_A+=1
elif arr=='b':
count_B+=1
else:
count_C+=1
if count_A==len(A):
print('A')
break
elif count_B==len(B):
print('B')
break
elif count_C==len(C):
print('C')
break
arr = A[count_A] if arr=='a' else B[count_B] if arr=='b' else C[count_C] |
s495013586 | p03998 | u077898957 | 1583344005 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 496 | A,B,C = (input() for i in range(3))
count_A=1
count_B=0
count_C=0
arr = A[0]
for i in range(len(A)+len(B)+len(C)):
arr = A[count_A] if arr=='a' else B[count_B] if arr=='b' else C[count_C]
if arr=='a':
count_A+=1
elif arr=='b':
count_B+=1
else:
count_C+=1
if count_A==len(A):
print('A')
break
elif count_B==len(B):
print('B')
break
elif count_C==len(C):
print('C')
break
else:
continue |
s086404951 | p03998 | u077898957 | 1583343958 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3188 | 498 | A,B,C = (input() for i in range(3))
count_A=1
count_B=0
count_C=0
arr = A[0]
for i in range(len(A)+len(B)+len(C)-1):
arr = A[count_A] if arr=='a' else B[count_B] if arr=='b' else C[count_C]
if arr=='a':
count_A+=1
elif arr=='b':
count_B+=1
else:
count_C+=1
if count_A==len(A):
print('A')
break
elif count_B==len(B):
print('B')
break
elif count_C==len(C):
print('C')
break
else:
continue |
s226766960 | p03998 | u924373338 | 1583091783 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1032 | #include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,x) for(int i=((int)(x)-1);i>=0;i--)
using namespace std;
using ll = long long;
const int MOD = 1000000007;
const ll INF = numeric_limits<ll>::max();
const int inf = 1e8;
int main(){
cin.tie( 0 ); ios::sync_with_stdio( false );
string a,b,c;
cin >> a;
cin >> b;
cin >> c;
string who="a";
int ta=0,tb=0,tc=0;
int turn=0;
while(turn<1000){
if(who=="a"){
if(ta==(int)a.length()){
cout << 'A';
return 0;
}
who=a[ta];
ta++;
}
if(who=="b"){
if(tb==(int)b.length()){
cout << 'B';
return 0;
}
who=b[tb];
tb++;
}
if(who=="c"){
if(tc==(int)c.length()){
cout << 'C';
return 0;
}
who=c[tc];
tc++;
}
turn++;
}
} |
s035084326 | p03998 | u347640436 | 1582954802 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3068 | 172 | S = {}
S['A'] = input()
S['B'] = input()
S['C'] = input()
turn = 'A'
while True:
if S[turn] == '':
print(turn)
break
turn = S[turn].pop(0).upper()
|
s286561873 | p03998 | u995062424 | 1581778456 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 114 | dict = {ch: list(input()) for ch in "abc"}
ch = "a"
While (dict[ch]):
ch = dict[ch].pop(0)
print(ch.upper()) |
s908025470 | p03998 | u934868410 | 1581213514 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 282 | s = [input() for i in range(3)]
t = {'a':0, 'b':1, 'c':2}
winner = {0:'A', 1:'B', 2:'C'}
index = [0,0,0]
length = [len(s[i]) for i in range(3)]
turn = 0
while True:
if index[turn] >= length[turn]:
print(winner[turn])
c = s[turn][index[turn]]
index[turn] += 1
turn = t[c] |
s704819723 | p03998 | u989345508 | 1581004079 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 278 | s=[input() for i in range(3)]
l=[len(s[i]) for i in range(3)]
abc=[0,0,0]
now=0
while True:
if len(now)==abc[now]:
break
s_sub=s[now][abc[now]]
now=(0 if s_sub=="a" else 1 if s_sub=="b" else 2)
abc[now]+=1
print("A" if now==0 else "B" if now==1 else "C") |
s836400009 | p03998 | u672316981 | 1580819440 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 489 | sa = str(input())
sb = str(input())
sc = str(input())
sa_count = 0
sb_count = 0
sc_count = 0
lst = [sa,sb,sc]
count = [sa_count,sb_count,sc_count]
k = 0
abc = 'abc'
flag = False
for _ in range(len(sa)+len(sb)+len(sc)):
for i in range(3):
if lst[k][count[k]]==abc[i]:
count[k] += 1
count[i] += 1
k = i
if count[k]==len(lst[k])+1:
flag = True
break
if flag:
break
print(abc[k].upper()) |
s490979882 | p03998 | u672316981 | 1580818357 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 483 | sa = str(input())
sb = str(input())
sc = str(input())
sa_count = 0
sb_count = 0
sc_count = 0
lst = [sa,sb,sc]
count = [sa_count,sb_count,sc_count]
k = 0
abc = 'abc'
flag = False
for _ in range(len(sa)+len(sb)+len(sc)):
for i in range(3):
if lst[k][count[k]]==abc[i]:
count[i] += 1
if len(lst[k])==count[k]:
flag = True
break
else:
k = i
if flag:
break
print(abc[k].upper()) |
s596994661 | p03998 | u686036872 | 1580086502 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 403 | A=list(input())
B=list(input())
A=list(input())
X=A
while True:
if X[0] == "a":
X = A
X.pop(0)
if len(X) == 0:
print("A")
break
elif X[0] == "b":
X = B
X.pop(0)
if len(X) == 0:
print("B")
break
else:
X = C
X.pop(0)
if len(X) == 0:
print("C")
break |
s734738546 | p03998 | u686036872 | 1580086479 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 349 | A=list(input())
B=list(input())
A=list(input())
X=A
while True:
if X[0] == "a":
X = A
X.pop(0)
if len(X) == 0:
print("A")
elif X[0] == "b":
X = B
X.pop(0)
if len(X) == 0:
print("B")
else:
X = C
X.pop(0)
if len(X) == 0:
print("C") |
s015864938 | p03998 | u686036872 | 1579865927 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 411 | A = str(input())
B = str(input())
C = str(input())
X="a"
while True:
if X == "a":
if len(A) == 0:
print("A")
break
X = A[0]
A.pop(0)
elif X == "b":
if len(B) == 0:
print("B")
break
X = B[0]
B.pop(0)
else:
if len(C) == 0:
print("C")
break
X = C[0]
C.pop(0) |
s728513846 | p03998 | u686036872 | 1579865414 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 409 | A = str(input())
B = str(input())
C = str(input())
X="a"
while True:
if X == "a":
X = A[0]
A.pop(0)
if len(A) == 0:
print("A")
break
elif X == b:
X = B[0]
B.pop(0)
if len(B) == 0:
print("B")
break
else:
X = C[0]
C.pop(0)
if len(C) == 0:
print("C")
break |
s404849175 | p03998 | u686036872 | 1579865376 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 407 | A = str(input())
B = str(input())
C = str(input())
X=A
while True:
if X == "a":
X = A[0]
A.pop(0)
if len(A) == 0:
print("A")
break
elif X == b:
X = B[0]
B.pop(0)
if len(B) == 0:
print("B")
break
else:
X = C[0]
C.pop(0)
if len(C) == 0:
print("C")
break |
s060964745 | p03998 | u790048565 | 1579784241 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 299 | Sa = input()
Sb = input()
Sc = input()
dic = {'a':Sa, 'b':Sb, 'c':Sc}
doCont = True
person = 'a'
result = ''
while doCont:
if (len(dic[person]) == 0):
doCont = False
result = person.upper()
drop_card = dic[person][0]
dic[person] = dic[person][1:]
person = drop_card
print(result) |
s722858896 | p03998 | u775681539 | 1579722474 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3444 | 738 | #python3
from collections import deque
def main():
Qa = deque(input())
Qb = deque(input())
Qc = deque(input())
reserve = deque()
reserve.append('a')
while len(reserve) != 0:
v = reserve.popleft()
if v == 'a':
if len(Qa) == 0:
print('A')
break
else:
reserve.append(Qa.popleft())
elif v == 'b':
if len('b') == 0:
print('B')
break
else:
reserve.append(Qb.popleft())
elif v == 'c':
if len(Qc) == 0:
print('C')
break
else:
reserve.append(Qc.popleft())
main()
|
s470873290 | p03998 | u193019328 | 1579650465 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 399 | a = input()
b = input()
c = input()
first_str = a[0]
a = a[1:]
while(1):
if first_str == 'a':
first_str = a[0]
a = a[1:]
if len(a)==0:
print('A')
break
elif first_str == 'b':
first_str = b[0]
b = b[1:]
if len(b)==0:
print('B')
break
elif first_str == 'c':
first_str = c[0]
c = c[1:]
if len(c)==0:
print('C')
break
|
s853054446 | p03998 | u072717685 | 1579397651 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | ss = {i:list(input()) for i in "abc"}
x = ss[a].pop(0)
while True:
if not ss[x]:
print(x.upper())
break
else:
x = ss[x][0] |
s751315728 | p03998 | u871596687 | 1579382284 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 571 | sa = [s for s in input()]
sb = [s fir s in input()]
sc = [s for s in input()]
next_turn = "a"
flag = True
while flag:
if next_turn == "a":
if len(sa) == 0:
print("A")
flag = False
else:
next_turn = sa.pop(0)
elif next_turn == "b":
if len(sb) == 0:
print("B")
flag = False
else:
next_turn = sb.pop(0)
elif next_turn == "c":
if len(sc) ==0:
print("C")
flag = False
else:
next_turn = sc.pop(0)
|
s375049681 | p03998 | u871596687 | 1579382188 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 571 | sa = [s for s in input()]
sb = [s fir s in input()]
sc = [s for s in input()]
next_turn = "a"
flag = True
while flag:
if next_turn == "a":
if len(sa) == 0:
print("A")
flag = False
else:
next_turn = sa.pop(0)
elif next_tunr == "b":
if len(sb) == 0:
print("B")
flag = false
else:
next_turn = sb.pop(0)
elif next_turn == "c":
if len(sc) ==0:
print("C")
flag = False
else:
next_turn = sc.pop(0)
|
s347789510 | p03998 | u846652026 | 1579203533 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 318 | m={"A":list(input()),"B":list(input()),"C":list(input())}
t="A"
for i in range(100):
if (len(m["A"]) == 0 and t == "A") or (len(m["C"]) == 0 and t == "B") or (len(m["C"]) == 0 and t == "C"):
ans = t
break
c=m[t][0]
for s in "ABC":
if m[s][0] == c:
m[s].pop(0)
t=c.upper()
print(ans) |
s859623982 | p03998 | u225388820 | 1579189101 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 166 | d={}
d['a']=list(input())
d['b']=list(input())
d['c']=list(input())
now='a'
while True:
if d[now]>1:
now=d[now].pop(0)
else:
print(now.upper())
exit() |
s927025528 | p03998 | u225388820 | 1579189010 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 160 | d={}
d[a]=list(input())
d[b]=list(input())
d[c]=list(input())
now='a'
while True:
if d[now]>1:
now=d[now].pop(0)
else:
print(now.upper())
exit() |
s721798323 | p03998 | u225388820 | 1579188931 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 159 | d={}
d[a]=list(input())
d[b]=list(input())
d[c]=list(input())
now='a'
while True:
if d[now]>1:
now=d[now].pop(0)
else:
print(upper(now))
exit() |
s840155620 | p03998 | u225388820 | 1579188915 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 148 | d={}
d[a]=list(input())
d[b]=list(input())
d[c]=list(input())
now='a'
while True:
if d[now]>1:
now=d[now].pop(0)
else:
print(upper(now)) |
s131920082 | p03998 | u007263493 | 1577911142 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3064 | 201 | S = dict()
S['A'] = list(input())[::-1]
S['B'] = list(input())[::-1]
S['C'] = list(input())[::-1]
print(S)
player = 'a'
while S[player]:
player = S[player].pop()
ans = player.upper()
print(ans) |
s675019161 | p03998 | u609814378 | 1577235790 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1 | a |
s815293492 | p03998 | u355137116 | 1577224566 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 250 | n = A.pop(0)
while True:
if n == 'a':
if A == []:
print('A')
break
n = A.pop(0)
elif n == 'b':
if B == []:
print('B')
break
n = B.pop(0)
else:
if C == []:
print('C')
break
n = C.pop(0) |
s305128365 | p03998 | u344959886 | 1577204133 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 382 | sa=list(input())
sb=list(input())
sc=list(input())
n=sa.pop(0)
while True:
if n == 'a':
if len(sa)==0:
print('A')
break
n=sa.pop(0)
elif n == 'b':
if len(sa)==0:
print('B')
break
n=sb.pop(0)
elif n == 'c':
if len(sa)==0:
print('C')
break
n=sc.pop(0) |
s698040598 | p03998 | u006425112 | 1577028173 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 173 | s = dict()
s["a"] = list(input())[::-1]
s["b"] = list(input())[::-1]
s["c"] = list(input())[::-1]
index = s.pop()
while s[index]:
index = s.pop()
print(index.upper()) |
s999991115 | p03998 | u181215519 | 1576956755 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 183 | s = [ str( input() ) for x in range(3) ]
flag = 0
t = 0
while flag == 0
if len( s[t] ) != 0
t = s[t][0]
s[t] = s[t][1:]
else :
print( char( ord("A")+ t ) )
|
s288922583 | p03998 | u633450100 | 1576804523 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 808 | A = str(input())
B = str(input())
C = str(input())
na = int()
nb = int()
nc = int()
n = 'a'
while na < len(A)+1 and nb < len(B)+1 and nc < len(C)+1:
if n == 'a':
if A[na] == 'a':
na += 1
n = 'a'
elif A[na] == 'b':
na += 1
n = 'b'
elif A[na] == 'c':
na += 1
n = 'c'
if n == 'b':
if B[nb] == 'a':
nb += 1
n = 'a'
elif B[nb] == 'b':
nb += 1
n = 'b'
elif B[nb] == 'c':
nb += 1
n = 'c'
if n == 'c':
if C[nc] == 'a':
nc += 1
n = 'a'
elif C[nc] == 'b':
nc += 1
n = 'b'
elif C[nc] == 'c':
nc += 1
n = 'c'
print(n)
|
s193772747 | p03998 | u633450100 | 1576804089 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 807 | A = str(input())
B = str(input())
C = str(input())
na = int()
nb = int()
nc = int()
n = 'a'
while na < len(A)+1 and nb < len(B)+1 and nc < len(C)+1:
if n == 'a':
if A[na] == 'a':
na += 1
n = 'a'
elif A[na] == 'b':
nb += 1
n = 'b'
elif A[na] == 'c':
nc += 1
n = 'c'
if n == 'b':
if A[nb] == 'a':
na += 1
n = 'a'
elif A[nb] == 'b':
nb += 1
n = 'b'
elif A[nb] == 'c':
nc += 1
n = 'c'
if n == 'c':
if A[nc] == 'a':
na += 1
n = 'a'
elif A[nc] == 'b':
nb += 1
n = 'b'
elif A[nc] == 'c':
nc += 1
n = 'c'
print(n) |
s746800547 | p03998 | u905582793 | 1576638343 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 359 | from collections import deque
A=deque(list(input()+"A"))
B=deque(list(input()+"B"))
C=deque(list(input()+"C"))
x=A.pop()
while(True):
if x == "a":
x = A.pop()
elif x == "b":
x = B.pop()
elif x == "c:
x = C.pop()
elif x == "A":
x = a
break
elif x == "B":
x = b
break
elif x == "C":
x = c
break
print(x)
|
s983527772 | p03998 | u496966444 | 1576391046 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 559 | a_card = list(input())
b_card = list(input())
c_card = list(input())
turn = 'a'
while True:
if turn == 'a':
turn = a_card.pop(0)
print(a_card, b_card, c_card)
if len(a_card) == 0:
print('A')
exit()
elif turn == 'b':
turn = b_card.pop(0)
print(a_card, b_card, c_card)
if len(a_card) == 0:
print('B')
exit()
else:
turn = c_card.pop(0)
print(a_card, b_card, c_card)
if len(a_card) == 0:
print('C')
exit()
|
s005857835 | p03998 | u994521204 | 1576369095 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 385 | import sys
sys.setrecursionlimit(10000)
A=list(input())
B=list(input())
C=list(input())
t='a'
d=1
while d==1:
if t=='a':
t=A.pop(0)
if t=='b':
t=B.pop(0)
if t=='c':
t=C.pop(0)
if t=='a' and A==[]:
print('A')
break
if t=='b' and B==[]:
print('B')
break
if t=='c' and C==[]:
print('C')
break |
s787941198 | p03998 | u994521204 | 1576369016 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 389 | import sys
sys.setrecursionlimit(10000)
A=list(input())
B=list(input())
C=list(input())
t='a'
d=1
while d==1:
if t=='a':
t=A.pop(0)
if t=='b':
t=B.pop(0)
if t=='c':
t=C.pop(0)
if t=='a' and A==[]:
print('A')
break
elif t=='b' and B==[]:
print('B')
break
elif t=='c' and C==[]:
print('C')
break |
s641314554 | p03998 | u994521204 | 1576368622 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 349 | A=list(input())
B=list(input())
C=list(input())
t='a'
d=1
while d==1:
if t=='a':
t=A.pop(0)
if t=='b':
t=B.pop(0)
if t=='c':
t=C.pop(0)
if t=='a' and A==[]:
print('A')
break
elif t=='b' and B==[]:
print('B')
break
elif t=='c' and C==[]:
print('C')
break |
s855643647 | p03998 | u994521204 | 1576368507 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 349 | A=list(input())
B=list(input())
C=list(input())
t='a'
d=1
while d==1:
if t=='a' and A==[]:
print('A')
break
elif t=='b' and B==[]:
print('B')
break
elif t=='c' and C==[]:
print('C')
break
if t=='a':
t=A.pop(0)
if t=='b':
t=B.pop(0)
if t=='c':
t=C.pop(0) |
s910821005 | p03998 | u416223629 | 1576315153 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 237 | a=list(input())
b=list(input())
c=list(input())
turn='a'
while len(a)!=0 and len(b)!=0 or len(c)!=0:
if turn=='a':
turn=a.pop(0)
elif turn=='b':
turn=b.pop(0)
else:
turn=c.pop(0)
print(turn.upper()) |
s585577286 | p03998 | u301331835 | 1575829793 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3316 | 147 | N , K = map(int,input().split())
result = 1
for i in range(N):
if i == 0:
result = K
else:
result *= (K - 1)
print(result)
|
s631574189 | p03998 | u799691369 | 1574966692 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 448 |
def my_turn(card_list):
card_list.popleft
if not card_list:
cont_game = False
else:
your_turn = card_list[0]
card_a = [ _ for _ in input()]
card_b = [ _ for _ in input()]
card_c = [ _ for _ in input()]
your_turn = 'a'
cont_game = True
while cont_game:
if your_turn == 'a':
my_turn(card_a)
if your_turn == 'b':
my_turn(card_a)
if your_turn == 'c':
my_turn(card_a)
print(your_turn) |
s681651132 | p03998 | u836737505 | 1574361230 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 150 | D = {"a":0, "b":1, "c":2}
l = ["A", "B", "C"]
x = [[D[a] for a in input()] for _ in range(len(l))]
c = 0
while x[c]:
c = x[c].pop(0)
print(I[c]) |
s890818139 | p03998 | u727787724 | 1574038611 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 528 | sa=list(input())
sb=list(input())
sc=list(input())
cnt=sa[0]
sa.remove(sa[0])
while len(sa)!=0 or len(sb)!=0 or len(sc)!=0:
#print(sa,sb,sc)
if cnt=='a':
cnt=sa[0]
sa.remove(sa[0])
elif cnt=='b':
cnt=sb[0]
sb.remove(sb[0])
elif cnt=='c':
cnt=sc[0]
sc.remove(sc[0])
if len(sa)==0 and cnt=='a':
print("A")
break
elif len(sb)==0 and cnt=='b':
print("B")
break
elif len(sc)==0 and cnt=='c':
print("C")
break
|
s745027984 | p03998 | u452015170 | 1573857144 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 320 | sa = input()
sb = input()
sc = input()
dic = {"a" : sa, "b" : sb, "c" : sc}
letter = dic["a"][0]
while letter :
dic[letter] = dic[letter][1:]
letter = dic[letter][0]
else:
if dic["a"] == "" :
print("a")
elif dic["b"] == "" :
print("b")
elif dic["c"] == "" :
print("c") |
s480408098 | p03998 | u923659712 | 1573684856 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 359 | sa=input()
sb=input()
sc=input()
print(sa[0])
while True:
k="a"
if k=="a":
if sa==[]:
print("A")
exit()
else:
k=sa[0]
sa=sa[1:]
if k=="b":
if sb==[]:
print("B")
exit()
else:
k=sb[0]
sb=sb[1:]
if k=="c":
if sc==[]:
print("C")
exit()
else:
k=sc[0]
sc=sc[1:] |
s349114930 | p03998 | u311636831 | 1573575677 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 803 | A=input()
B=input()
C=input()
i=0
j=0
k=0
c=0
while(True):
if(c==0):
if(i>=(len(A)+1)):
print("A")
exit()
if(A[i]=="a"):
i+=1
c=0
elif(A[i]=="b"):
j+=1
c=1
else:
k+=1
c=2
elif(c==1):
if(j>=(len(B)+1)):
print("B")
exit()
if(B[j]=="a"):
i+=1
c=0
elif(B[j]=="b"):
j+=1
c=1
else:
k+=1
c=2
else:
if(k>=(len(C)+1)):
print("C")
exit()
if(C[k]=="a"):
i+=1
c=0
elif(C[k]=="b"):
j+=1
c=1
else:
k+=1
c=2
|
s496542461 | p03998 | u209619667 | 1573571314 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 11 | aca
accc
ca |
s469522963 | p03998 | u209619667 | 1573571175 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 257 | A = input()
B = input()
C = input()
s = A[0]
while(len(A) != 0) and (len(B) != 0) and (len(B) != 0):
if s == 'a':
s = A[0]
A = A[1:]
elif s == 'b':
s = B[0]
B = B[1:]
else:
s = C[0]
C = C[1:]
print(s.upper()) |
s990674914 | p03998 | u557494880 | 1573431810 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 422 | S_a = input()
S_b = input()
S_c = input()
a = []
b = []
c = []
for i in range(len(S_a)):
a.append(S_a[i])
for j in range(len(S_b)):
b.append(S_b[i])
for k in range(len(S_c)):
c.append(S_c[i])
l = a
winner = 'A'
wlile len(l) > 0:
x = l.pop(0)
if x == 'a':
l = a
winner = 'A'
elif x == 'b':
l = b
winner = 'B'
else:
l = c
winner = 'C'
print(winner) |
s758100372 | p03998 | u215315599 | 1572567873 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 573 | A = input()
B = input()
C = input()
A = list(A)
A.append("end")
B = list(B)
B.append("end")
C = list(C)
C.append("end")
i = 1
j = 0
k = 0
cur = A[0]
while i < len(A) and j < len(B) and k < len(C) :
if cur == "a":
cur = A[i]
if cur == "end":
print("A")
sys.exit()
i += 1
elif cur == "b":
cur = B[j]
if cur == "end":
print("B")
sys.exit()
j += 1
elif cur == "c":
cur = C[k]
if cur == "end":
print("C")
sys.exit()
k += 1 |
s156452329 | p03998 | u623516423 | 1572481889 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 400 | Sa=input()
Sb=input()
Sc=input()
card=Sa[0]
Sa=Sa[1:]
while True:
if card=='a':
card=Sa[0]
Sa=Sa[1:]
if card=='b':
card=Sb[0]
Sb=Sb[1:]
if card=='c':
card=Sc[0]
Sc=Sc[1:]
if (Sa=='' and Sb=='') or (Sb=='' and Sc=='') or (Sc=='' and Sa==''):
break
if card=='a' and Sa=='':
print('A')
elif card=='b' and Sb=='':
print('B')
elif card=='c' and Sc=='':
print('C') |
s714086442 | p03998 | u623516423 | 1572481848 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 403 | Sa=input()
Sb=input()
Sc=input()
card=Sa[0]
Sa=Sa[1:]
while True:
if card=='a':
card=Sa[0]
Sa=Sa[1:]
if card=='b':
card=Sb[0]
Sb=Sb[1:]
if card=='c':
card=Sc[0]
Sc=Sc[1:]
if (Sa=='' and Sb=='') or (Sb=='' and Sc=='') or (Sc=='' and Sa==''):
break
if card=='a' and Sa=='':
print('A')
elif card=='b' and Sb=='':
print('B')
elif card=='c' and Sc=='':
print('C') |
s974816841 | p03998 | u623516423 | 1572481826 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 421 | Sa=input()
Sb=input()
Sc=input()
card=Sa[0]
Sa=Sa[1:]
while True:
if card=='a':
card=Sa[0]
Sa=Sa[1:]
if card=='b':
card=Sb[0]
Sb=Sb[1:]
if card=='c':
card=Sc[0]
Sc=Sc[1:]
if (Sa=='' and Sb=='') or (Sb=='' and Sc=='') or (Sc=='' and Sa==''):
break
print(Sa,Sb,Sc)
if card=='a' and Sa=='':
print('A')
elif card=='b' and Sb=='':
print('B')
elif card=='c' and Sc=='':
print('C') |
s360080977 | p03998 | u523781418 | 1572274211 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 299 | s1=input()
s2=input()
s3=input()
s_list=[s1, s2, s3]
next=0
while(len(s_list[0])>=1 and len(s_list[1])>=1 and len(s_list[2])>=1):
temp=s_list[next][0]
s_list[next]=s_list[next][1:]
next=temp
if len(s_list[0])==0:
print("A")
elif len(s_list[1])==0:
print("B")
else:
print("C") |
s681665770 | p03998 | u247465867 | 1571258677 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1102 | Sa, Sb, Sc = open(0).read().split()
#print(Sa, Sb,Sc)
numSa = len(Sa)
numSb = len(Sb)
numSc = len(Sc)
#print(numSa,numSb,numSc)
i=j=k=0
flgA = True
flgB = flgC = False
l=0
while(True):
if flgA == True:
#print("A",i)
flgA = False
i+=1
if numSa==i:
print("A")
break
if Sa[i] == "a":
flgA = True
elif Sa[i] == "b":
flgB = True
else:
flgC = True
elif flgB == True:
#print("B",j)
flgB = False
j+=1
if numSb==j:
pritn("B")
break
if Sb[j] == "a":
flgA = True
elif Sb[j] == "b":
flgB = True
else:
flgC = True
elif flgC == True:
#print("C",k)
flgC = False
k+=1
if numSc==k:
print("C")
break
if Sc[k] == "a":
flgA = True
elif Sc[k] == "b":
flgB = True
else:
flgC = True
else:
pass
#print(l,"::",Sa[i],i,Sb[j],j,Sc[k],k)
l+=1 |
s435323209 | p03998 | u814986259 | 1571230174 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 225 | s=[reversed(list(input())) for i in range(3)]
flag=True
next=0
ans=0
ans_s=["a","b","c"]
while(flag):
if len(s[next]) >0:
tmp=s[next].pop()
next=ans_s.index(tmp)
else:
ans=next
flag=False
print(ans_s[ans]) |
s089913241 | p03998 | u814986259 | 1571230116 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 200 | s=[reversed(list(input())) for i in range(3)]
flag=True
next=0
ans=0
ans_s=["a","b","c"]
while(flag):
if len(s[next]) >0:
next=s[next].pop()
else:
ans=next
flag=False
print(ans_s[ans]) |
s707135803 | p03998 | u247465867 | 1571181927 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1056 | Sa, Sb, Sc = open(0).read().split()
#print(Sa, Sb,Sc)
numSa = len(Sa)
numSb = len(Sb)
numSc = len(Sc)
i=j=k=0
flgA = True
flgB = flgC = False
while(True):
if flgA == True:
flgA = False
if Sa[i] == "a":
i+=1
flgA = True
elif Sa[i] == "b":
j+=1
flgB = True
else:
k+=1
flgC = True
elif flgB == True:
flgB = False
if Sb[j] == "a":
i+=1
flgA = True
elif Sb[j] == "b":
j+=1
flgB = True
else:
k+=1
flgC = True
elif flgC == True:
flgC = False
if Sc[k] == "a":
i+=1
flgA = True
elif Sc[k] == "b":
j+=1
flgB = True
else:
k+=1
flgC = True
else:
pass
if numSa==i:
print("A")
break
elif numSb==j:
pritn("B")
break
elif numSc==k:
print("C")
break
else:
pass |
s619506251 | p03998 | u247465867 | 1571181879 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 1055 | Sa, Sb, Sc = open(0).read().split()
print(Sa, Sb,Sc)
numSa = len(Sa)
numSb = len(Sb)
numSc = len(Sc)
i=j=k=0
flgA = True
flgB = flgC = False
while(True):
if flgA == True:
flgA = False
if Sa[i] == "a":
i+=1
flgA = True
elif Sa[i] == "b":
j+=1
flgB = True
else:
k+=1
flgC = True
elif flgB == True:
flgB = False
if Sb[j] == "a":
i+=1
flgA = True
elif Sb[j] == "b":
j+=1
flgB = True
else:
k+=1
flgC = True
elif flgC == True:
flgC = False
if Sc[k] == "a":
i+=1
flgA = True
elif Sc[k] == "b":
j+=1
flgB = True
else:
k+=1
flgC = True
else:
pass
if numSa==i:
print("A")
break
elif numSb==j:
pritn("B")
break
elif numSc==k:
print("C")
break
else:
pass |
s395360160 | p03998 | u469953228 | 1570941745 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 428 | a = list(input())
b = list(input())
c = list(input())
key = "a"
for i in range(300):
if key = "a":
if len(a) == 0:
print("A")
break
else:
key = a[0]
a = a[1:]
elif key = "b":
if len(b) == 0:
print("B")
break
else:
key = b[0]
b = b[1:]
else:
if len(c) == 0:
print("C")
break
else:
key = c[0]
c = c[1:]
|
s146609585 | p03998 | u617203831 | 1570755451 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | S=int(input())
l=[]
while(S not in l):
l.append(S)
if S%2==0:S/=2
else:S=3*S+1
print(len(l)+1) |
s402269695 | p03998 | u408791346 | 1570305572 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 235 | a = input()
b = input()
c = input()
m = len(a+b+c)
ans = []
ans.append(a.count("a"))
ans.append(b.count("b"))
ans.append(c.count("C"))
if ans[0] == max(ans):
print("A")
elif ans{1} == max(ans):
print('B')
else:
print("C") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.