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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s139165396 | p03998 | u771167374 | 1600539954 | Python | PyPy3 (7.3.0) | py | Runtime Error | 126 | 74648 | 386 | A = list(input())
B = list(input())
C = list(input())
s = A.pop(0)
while True:
if A == [] and s == 'a':
print('A')
exit()
if B == [] and s == 'b':
print('B')
exit()
if C == [] and s == 'c':
print('C')
exit()
if s == 'a':
s = A.pop(0)
if s ... |
s235244252 | p03998 | u624613992 | 1599451528 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9068 | 408 | sa = list(input())
sb = list(input())
sc = list(input())
start = sa.pop(0)
for i in range(399):
if len(sa) == 0 and start == "a" :
print("A")
exit()
if len(sb) == 0 and start == "b":
print("B")
exit()
if len(sc) == 0 and start == "c":
print("C")
exit()
if start == "a":
start = sa.p... |
s721211938 | p03998 | u624613992 | 1599451333 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9016 | 338 | sa = input()
sb = input()
sc = input()
start = sa.pop(0)
for i in range(399):
if len(sa) == 0 :
print("A")
exit()
if len(sb) == 0:
print("B")
exit()
if len(sc) == 0:
print("C")
exit()
if start == "a":
start = sa.pop(0)
if start == "b":
start = sb.pop(0)
if start == "c":
... |
s332841783 | p03998 | u705418271 | 1599358936 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9040 | 138 | s={'a': input(), 'b': input(), 'c' input()}
now='a'
while s[now]!="":
next =s[now][0]
s[now]=s[now][1:]
now= next
print(now.upper()) |
s609832655 | p03998 | u705418271 | 1599357184 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8932 | 317 | a=str(input())
b=str(input())
c=str(input())
x=a[1]
a=a[1:]
while True:
if x=='a':
x=a[1]
a=a[1:]
if len(a)==0:
print("A")
break
elif x=='b':
x=b[1]
b=b[1:]
if len(b)==0:
print("B")
break
else:
x=c[1]
c=c[1:]
if len(c)==0:
print("C")
break |
s580941024 | p03998 | u250734103 | 1599338987 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9104 | 240 | d = { 'a':input(), 'b':input(), 'c':input() }
pointer = 'a'
while True:
if 0 < len(d[pointer]):
tmp = d[pointer][0]
d[pointer] = s[pointer][1:]
pointer = tmp
else:
print(pointer.upper())
break |
s325665571 | p03998 | u250734103 | 1599338316 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9128 | 267 | SA = input()
SB = input()
SC = input()
pointer = SA[0]
SA = SA[1:]
d = {'a': SA, 'b': SB, 'c': SC}
while True:
tmp = d[pointer][0]
d[pointer] = d[pointer][1:]
pointer = tmp
if d[pointer] == '':
ans = pointer
break
print(ans.upper()) |
s003591664 | p03998 | u801274036 | 1599086261 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9152 | 469 | a = [int(input()) for i in range(3)]
S_a = a[0].split()
S_b = a[1].split()
S_c = a[2].split()
card_dict = {'a':S_a, 'b':S_b, 'c':S_c}
first_card = card_dict['a'][0]
card_dict['a'] = S_a[1:]
next_turn = first_card
stop_flag = 0
winner = 'z'
while(stop_flag == 0):
temp_card = card_dict[next_turn][0]
if not temp_card:... |
s401563745 | p03998 | u980753441 | 1598998034 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8992 | 226 | S = Sa
card = S.pop(0)
while True:
if card == 'a':
S = Sa
if card == 'b':
S = Sb
if card == 'c':
S = Sc
try:
card = S.pop(0)
except:
print(card.upper())
break |
s933271360 | p03998 | u460745860 | 1598909817 | Python | Python (3.8.2) | py | Runtime Error | 33 | 9348 | 505 | # ABC045
from collections import deque
S_A = deque(input())
S_B = deque(input())
S_C = deque(input())
next_turn = S_A.pop()
while True:
if next_turn == 'a':
next_turn = S_A.pop()
elif next_turn == 'b':
next_turn = S_B.pop()
else:
next_turn = S_C.pop()
# 勝利判定
if len(S_A) ==... |
s632798704 | p03998 | u909716307 | 1598560287 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8928 | 386 | a=input()
b=input()
c=input()
i=1
j=0
k=0
p=a[0]
while 1:
if p=='a':
if i==len(a)-1:
print('A')
break
i+=1
p=a[i]
elif p=='b':
if j==len(b)-1:
print('B')
break
j+=1
p=b[j]
elif p=='c':
if k==len(c)-1:
... |
s179751597 | p03998 | u894694822 | 1598445605 | Python | PyPy3 (7.3.0) | py | Runtime Error | 85 | 68812 | 340 | a=list(input())
b=list(input())
c=list(input())
next=a.pop(0)
while True:
if next=="a":
if not a:
print("A")
break
else:
next=a.pop(0)
elif next=="b":
if not b:
print("B")
break
else:
next=b.pop(0)
else :
if not b:
print("C")
break
else:
... |
s502020790 | p03998 | u468972478 | 1598192346 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8840 | 89 | S = {i: input() for i in "abc"}
n = "a"
while S[n]:
n = S[n].pop(0)
print(n.upper()) |
s387324871 | p03998 | u468972478 | 1598191847 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8888 | 101 | S = [n: list(input()) for n in "abc"]
i = "a"
while S[i]:
i = S[i].pop(0)
print(i.upper())
|
s683539823 | p03998 | u895918162 | 1596474364 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8912 | 750 | alice = input()
bob = input()
charlie = input()
for i in range(len(alice)):
if alice[i] == "a":
while alice[i] == "a":
alice.pop(i)
elif alice[i] == "b":
alice.pop(i)
if bob[i] == "b":
while bob[i] == "b":
bob.pop(i)
elif bob[i] == "a":
while bob[i] == "a":
alic... |
s437297138 | p03998 | u250662864 | 1596450743 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8820 | 437 | alice = list(input())
bob = list(input())
charlie = list(input())
current = alice
while(len(alice) > 0 and len(bob) > 0 and len(charlie) > 0):
if(current[0] == 'a'):
del current[0]
current = alice
elif(current[0] == 'b'):
del current[0]
currrent = bob
elif(current[0] == 'c'):
del current[0]
curren... |
s810351965 | p03998 | u200245833 | 1596376815 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9064 | 383 | a = list(input())
b = list(input())
c = list(input())
# print('a',a)
# print('b',b)
# print('c',c)
# exit()
ptr = 'a'
while (True):
if ptr == 'a':
ptr = a.pop(0)
if ptr == 'b':
ptr = b.pop(0)
if ptr == 'c':
ptr = c.pop(0)
if ptr == 'a' and a == []:
print('A')
break
elif ptr == 'b' and b == []:
print(... |
s466517065 | p03998 | u684743124 | 1595399459 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9052 | 161 | mb=input()
mc=input()
mdic={"a":ma,"b":mb,"c":mc}
m="a"
ndic={"a":0,"b":-1,"c":-1}
while ndic[m]<len(mdic[m]):
m=mdic[m][ndic[m]]
ndic[m]+=1
print(m.upper()) |
s079778578 | p03998 | u350093546 | 1595383616 | Python | PyPy3 (7.3.0) | py | Runtime Error | 88 | 74516 | 379 | a=list(input())
b=list(input())
c=list(input())
order='a'
while True:
if order='a':
order=a[0]
if len(a)==1:
print('A')
break
else:
a=a[1:]
elif order='b':
order=b[0]
if len(b)==1:
print('B')
break
else:
b=b[1:]
elif order='c':
order=c[0]
if len(... |
s690778089 | p03998 | u684743124 | 1595342192 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8968 | 175 | ma=input()
mb=input()
mc=input()
mdic={"a":ma,"b":mb,"c":mc}
m="a"
i=0
ndic={"a":0,"b":0,"c":0}
while ndic[m]=<len(mdic[m]):
m=mdic[m][ndic[m]]
ndic[m]+=1
print(m.upper()) |
s580631282 | p03998 | u326552320 | 1594956130 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9416 | 1050 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: B
# CreatedDate: 2020-07-16 23:00:42 +0900
# LastModified: 2020-07-16 23:21:33 +0900
#
from collections import deque
def main():
s_a = input()
s_b = input()
s_c = input()
s_a = [s for s in s_a if s != 'a']
s_b = [s for s in s_b if s != ... |
s921783446 | p03998 | u326552320 | 1594955899 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9084 | 1011 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: B
# CreatedDate: 2020-07-16 23:00:42 +0900
# LastModified: 2020-07-16 23:18:00 +0900
#
import os
import sys
# import numpy as np
# import pandas as pd
def main():
s_a = input()
s_b = input()
s_c = input()
s_a = [s for s in s_a if s != 'a'... |
s643790804 | p03998 | u326552320 | 1594955826 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9072 | 1023 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: B
# CreatedDate: 2020-07-16 23:00:42 +0900
# LastModified: 2020-07-16 23:16:42 +0900
#
import os
import sys
# import numpy as np
# import pandas as pd
def main():
s_a = input()
s_b = input()
s_c = input()
s_a = [s for s in s_a if s is not... |
s053289798 | p03998 | u081149041 | 1594939903 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8944 | 972 | def play():
card_a = input()
card_b = input()
card_c = input()
s = 0
while 1:
if s == 0:
if card_a[0] == a:
s = 0
if card_a[0] == b:
s = 1
if card_a[0] == c:
s = 2
card_a = card_a[1:]
... |
s037608481 | p03998 | u081149041 | 1594939816 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8996 | 972 | def play():
card_a = input()
card_b = input()
card_c = input()
s = 0
while 1:
if s == 0:
if card_a[0] == a:
s = 0
if card_a[0] == b:
s = 1
if card_a[0] == c:
s = 2
card_a = card_a[1:]
... |
s619059614 | p03998 | u081149041 | 1594939591 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8900 | 612 | def play():
card_a = input()
card_b = input()
card_c = input()
s = 0
while 1:
if s == 0:
s = card_a[0] - 48
card_a = card_a[1:]
if card_a == "":
print("A")
break
if s == 1:
s = card_b[0] - 48
... |
s127122595 | p03998 | u452337391 | 1594877088 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9052 | 415 | S = [input() for _ in range(3)]
for i in range(3):
S[i] = list(S[i])
p = 0 #プレイヤー
while True:
if not S[0] and p == 0:
print("A")
break
if not S[1] and p == 1:
print("B")
break
if not S[2] and p == 3:
print("C")
break
p_t = S[p].pop(0)
if p_t == "a"... |
s369786755 | p03998 | u586639900 | 1594448994 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8928 | 178 | S = dict()
S['a'] = input()[::-1]
S['b'] = input()[::-1]
S['c'] = input()[::-1]
player = 'a'
while S[player]:
player = S[player].pop()
res = player.upper()
print(res)
|
s509816597 | p03998 | u062999487 | 1594235660 | Python | PyPy3 (7.3.0) | py | Runtime Error | 94 | 74616 | 62 | N,K=map(int,input().split())
ans = (K-1)**(N-1)*K
print(ans) |
s776298831 | p03998 | u849029577 | 1594169758 | Python | PyPy3 (7.3.0) | py | Runtime Error | 83 | 74824 | 354 | s = [list(input()) for i in range(3)]
turn = s[0]
for i in range(300):
if "a" == turn.pop(0):
turn = s[0]
elif "b" == turn.pop(0):
turn = s[1]
else:
turn = s[2]
if not s[0]:
print("A")
exit()
if not s[1]:
print("B")
exit()
if not s[2]:... |
s867583426 | p03998 | u168416324 | 1594039642 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8956 | 182 | lis=[]
ll=["a","b","c"]
for i in range(3):
lis.append(list(input()))
turn=0
while 1:
x=ll.index(lis[turn].pop())
if lis[turn]=[]:
print(ll[turn].upper())
break
turn=x |
s392695587 | p03998 | u697615293 | 1593387309 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9092 | 590 | a = list(input())
b = list(input())
c = list(input())
x = "d"
a_idx = 0
b_idx = 0
c_idx = 0
while True:
if x == "a":
if a_idx == len(a):
print("A")
break
else:
x = str(a[a_idx])
a_idx += 1
elif x == "b":
if b_idx == len(b):
prin... |
s589816948 | p03998 | u697615293 | 1593358104 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9096 | 478 | a = list(input())
b = list(input())
c = list(input())
x = "d"
a_idx = 0
b_idx = 0
c_idx = 0
while a_idx != len(a) -1 and b_idx != len(b) -1 and c_idx != len(c) -1:
if x == "a":
x = str(a[a_idx])
a_idx += 1
elif x == "b":
x = str(b[b_idx])
b_odx += 1
elif x == "c":
x =... |
s514248822 | p03998 | u088488125 | 1593312768 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8936 | 312 | for i in range(3):
s.append(input())
member=["A","B","C"]
turn=0
while True:
if s[turn]=="":
winner=turn
break
elif s[turn][0]=="a":
s[turn]=s[turn][1:]
turn=0
elif s[turn][0]=="b":
s[turn]=s[turn][1:]
turn=1
else:
s[turn]=s[turn][1:]
turn=2
print(member[winner])
|
s876203419 | p03998 | u891847179 | 1593135209 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8908 | 879 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
struct Edge {
ll to;
ll cost;
};
i... |
s795346119 | p03998 | u350093546 | 1592601500 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9000 | 220 | a=list(input())
b=list(input())
c=list(input())
x=a
y=''
While True:
y=x[0]
x.pop(0)
x=y
if len(a)==0:
print('A'):
break
if len(b)==0:
print('B')
break
if len(c)==0:
print('C')
break |
s557449626 | p03998 | u583799976 | 1592535948 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8888 | 512 | A=input()
B=input()
C=input()
l='a'
for i in range(300):
if l=='a':
if len(A)==0:
print('A')
exit()
elif len(A)==1:
l=A[0]
A=''
else:
l=A[0]
A=A[1:]
elif l=='b':
l=B[0]
if len(B)==0:
print('B')
exit()
elif len(B)==1:
l=B[0]
B... |
s147264000 | p03998 | u289876798 | 1592169463 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38256 | 394 | #! env python
# -*- coding: utf-8 -*-
import os
import sys
# ac_py.main
# Date: 2020/06/14
# Filename: main
# Author: acto_mini
def main():
N, K = map(int, input().split())
# all = K ** N
# out_single, out_multi = 0, 0
# for i in range(2, N + 1):
# out_multi += (N - i + 1) * K
print(K *... |
s528645123 | p03998 | u942280986 | 1592085207 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 258 | a=input()
b=input()
c=input()
for i in a:
while a[i]=='a':
i+=1
elif a[i]='b':
for i in b:
while b[i]=='b':
i+=1
else:
for i in c:
while c[i]=='c':
i+=1
|
s671214556 | p03998 | u247830763 | 1591899101 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 501 | import sys
sa = list(input())
sb = list(input())
sc = list(input())
sa = sa[::-1]
sb = sb[::-1]
sc = sc[::-1]
p = "a"
while True:
if p == "a":
p = sa.pop(-1)
if len(sa) == 0 and p == "a":
print("A")
sys.exit()
elif p == "b":
p = sb.pop(-1)
if len(sb) == 0 ... |
s032983570 | p03998 | u222668979 | 1591821286 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 230 | strin = [input(), input(), input()]
l = ['a','b','c']
cnt, nxt = [0, 0, 0], 0
while True:
lttr = strin[nxt][cnt[nxt]]
cnt[nxt] += 1
if cnt[nxt] >= len(strin[nxt]):
print(l[nxt].upper())
nxt = l.index(lttr)
|
s727223583 | p03998 | u806403461 | 1591759227 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 445 | SA = list(input())
SB = list(input())
SC = list(input())
LenSA = len(SA)
LenSB = len(SB)
LenSC = len(SC)
NowCard = SA.pop()
while True:
if NowCard == 'a':
NowList = SA
elif NowCard == 'b':
NowList = SB
elif NowCard == 'c':
NowList = SC
NowCard = NowList.pop()
if SA == []... |
s973224098 | p03998 | u822179469 | 1591757840 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 442 | sa, sb, sc = [input() for i in range(3)]
sa, sb, sc = list(sa),list(sb),list(sc)
i = sa.pop(0)
while True :
if i =='a':
if lem(sa) ==0:
print(sa)
exit()
i = sa.pop(0)
if i =='b':
if lem(sb) ==0:
print(sb)
exit()
i = sb.p... |
s339262965 | p03998 | u822179469 | 1591757386 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 431 | sa, sb, sc = [input() for i in range(3)]
sa, sb, sc = list(sa),list(sb),list(sc)
i = sa.pop(0)
while len(sa) != 0 and len(sb) != 0 and len(sb) != 0 :
if i =='a':
i = sa.pop(0)
continue
elif i =='b':
i = sb.pop(0)
continue
elif i =='c':
i = sc.pop(0)
... |
s704626113 | p03998 | u822179469 | 1591757320 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 453 | sa, sb, sc = [input() for i in range(3)]
sa, sb, sc = list(sa),list(sb),list(sc)
i = sa.pop(0)
while len(sa) != 0 and len(sb) != 0 and len(sb) != 0 :
print(sa,sb,sc,i)
if i =='a':
i = sa.pop(0)
continue
elif i =='b':
i = sb.pop(0)
continue
elif i =='c':
... |
s854434300 | p03998 | u822179469 | 1591756209 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 368 | sa, sb, sc = [input() for i in range(3)]
sa, sb, sc = list(sa),list(sb),list(sc)
i = sa.pop(0)
while len(sa) != 0 and len(sb) != 0 and len(sb) != 0 :
if i =='a':
i = sa.pop(0)
if i =='b':
i = sb.pop(0)
if i =='c':
i = sc.pop(0)
if len(sa) == 0:
print('A')
elif len(sb) == 0:
... |
s726780650 | p03998 | u957957759 | 1591674146 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 431 | a=input()
b=input()
c=input()
l=a+b+c
n=a[0]
a=a.lstrip(n)
for i in range(len(l)-1):
if n=='a':
if len(a)==0:
print('A')
break
n=a[0]
a=a.lstrip(n)
elif x=='b':
if len(b)==0:
print('B')
break
n=b[0]
b=b.lstrip(n)
... |
s711504810 | p03998 | u641446860 | 1591585963 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 547 | A, B, C = [input() for _ in range(3)]
ca = 1
cb = 0
cc = 0
current = A[0]
while True:
if current == 'a':
ca += 1
if ca == len(A):
print('A')
break
else:
current = A[ca]
elif current == 'b':
cb += 1
if cb == len(B):
prin... |
s924752934 | p03998 | u492749916 | 1591513034 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 455 | sa = str(input())
sb = str(input())
sc = str(input())
dest = sa[0]
sa = sa[1:]
for i in range(0,len(sa)+len(sb)+len(sc)):
if dest == "a":
dest = str(sa[0])
if len(sa) ==1:
flag = "A"
else:
sa = sa[1:]
elif dest == "b":
dest = str(sb[0])
if len(sb) ==1:
flag = "B"
else:
... |
s045352907 | p03998 | u757274384 | 1591406926 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 470 | # -*- coding : utf-8 -*-
A = list(input())
B = list(input())
C = list(input())
X = [A,B,C]
x = 0
while True :
if X[x][0] == "a":
if X[0] == []:
print("A")
break
else:
X[0].remove(X[0][0])
x = 0
elif X[x][0] == "b":
if X[1] == []:
print("B")
break
else:
X[... |
s002869096 | p03998 | u757274384 | 1591406759 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 488 | # -*- coding : utf-8 -*-
A = list(input())
B = list(input())
C = list(input())
X = [A,B,C]
x = 0
while True :
if X[x][0] == "a":
if X[0] == []:
print("A")
break
else:
X[0].remove(X[0][0])
x == 0
elif X[x][0] == "b":
if X[1] == []:
print("B")
break
else:
... |
s379831401 | p03998 | u048176319 | 1591266835 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 314 | sa = str(input()) + "d"
sb = str(input()) + "d"
sc = str(input()) + "d"
s = sa
sa = sa[1:]
while s != "d":
x = s[0]
if x == "a":
sa = sa[1:]
s = sa
elif x == "b":
sb = sb[1:]
s = sb
elif x == "c":
sc = sc[1:]
s = sc
if sa == "d":
print("A")
elif sb == "d":
print("B")
elif sc == "d":
print("C")
|
s384059420 | p03998 | u663767599 | 1591187567 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3444 | 506 | from collections import deque
A = deque(input())
B = deque(input())
C = deque(input())
current = A.popleft()
while True:
if current == "a":
current = A.popleft()
elif current == "b":
current = B.popleft()
elif current == "c":
current = C.popleft()
if current == "a" and len(A) ... |
s522719661 | p03998 | u552738814 | 1590624469 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 379 | sa = list(reversed(input()))
sb = list(reversed(input()))
sc = list(reversed(input()))
turn = sa.pop()
while True:
if (turn == "a" and not sa) or (turn == "b" and not sb) or (turn == "c" and not sc):
break
elif turn == "a":
turn = sa.pop()
elif turn == "b":
turn = sb.pop()
else... |
s511618008 | p03998 | u646792990 | 1590617648 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 378 | sa = list(reversed(input()))
sb = list(reversed(input()))
sc = list(reversed(input()))
turn = sa.pop()
while True:
if turn == 'a':
turn = sa.pop()
elif turn == 'b':
turn = sb.pop()
else:
turn = sc.pop()
if (turn == 'a' and not sa) or (
turn == 'b' and not sb) or (tu... |
s255028485 | p03998 | u594956556 | 1590453615 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 292 | S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()
next = 'a'
lens = {'a':len(S['a']), 'b':len(S['b']), 'c':len(S['c'])}
counts = {'a':0, 'b':0, 'c':0}
while True:
now = next
if counts[now] == lens[now]:
print(now)
exit()
counts[now] += 1
next = S[now][counts[now]]
|
s805125017 | p03998 | u594956556 | 1590453448 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 291 | S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()
next = 'a'
lens = {'a':len(S['a']), 'b':len(S['b']), 'c':len(S['c'])}
counts = {'a':0, 'b':0, 'c':0}
while True:
now = next
if counts[now] == len[now]:
print(now)
exit()
next = S[now][counts[now]]
counts[now] += 1
|
s907325357 | p03998 | u594956556 | 1590453344 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 284 | S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()
next = 'a'
lens = {'a':len(S['a']), 'b':len(S['b']), 'c':len(S['c'])}
counts = {'a':0, 'b':0, 'c':0}
while True:
if counts[next] == len[next]:
print(next)
exit()
next = S[next][counts[next]]
counts[next] += 1
|
s206942105 | p03998 | u594956556 | 1590453292 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 278 | S = {}
S['a'] = input()
S['b'] = input()
S['c'] = input()
next = 'a'
lens = {'a':len(S[0]), 'b':len(S[1]), 'c':len(S[2])}
counts = {'a':0, 'b':0, 'c':0}
while True:
if counts[next] == len[next]:
print(next)
exit()
next = S[next][counts[next]]
counts[next] += 1
|
s778284181 | p03998 | u594956556 | 1590453003 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 289 | S = [input() for _ in range(3)]
next = 0
lens = [len(i) for i in S]
counts = [0]*3
while True:
if counts[next] == len[next]:
if next == 0:
print('a')
elif next == 1:
print('b')
else:
print('c')
exit()
next = S[next][counts[next]]
counts[next] += 1 |
s344210613 | p03998 | u344065503 | 1590360248 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38512 | 105 | a=list(input())
b=list(input())
c=list(input())
S=[a,b,c]
s=a
while True:
s=S[s].pop()
print(s.upper()) |
s943858335 | p03998 | u213580455 | 1590104273 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1001 | Alice = 'A'
Bob = 'B'
Charlie = 'C'
def answer(Sa, Sb, Sc):
currentUser = Alice
ai, bi, ci = (0, 0, 0)
while(True):
if currentUser == Alice:
if ai == len(Sa):
return Alice
if Sa[ai] == 'b':
currentUser = Bob
if Sa[ai] == 'c':
... |
s807241174 | p03998 | u167647458 | 1590017063 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 389 | s = []
for _ in range(3):
x = input().replace('a', '0').replace('b', '1').replace('c', '2')
s.append(str(x))
now = 0
while True:
if len(s[0])==0:
print('A')
break
elif len(s[1])==0:
print('B')
break
elif len(s[1])==0:
print('C')
break
... |
s489264497 | p03998 | u493130708 | 1590009431 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38256 | 3329 | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache
#############
# Constants #
#############
MOD = 10**9+7
INF = fl... |
s400296536 | p03998 | u203669169 | 1589996756 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 237 | A = input()
B = input()
C = input()
ABC = {"a":deque(A), "b":deque(B), "c":deque(C)}
ABC_H = {"a":"A", "b":"B", "c":"C"}
ind = A[0]
while True:
if len(ABC[ind]) == 0:
break
ind = ABC[ind].popleft()
print(ABC_H[ind])
|
s534231307 | p03998 | u370852395 | 1589481551 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 436 | s_a=list(input())
s_b=list(input())
s_c=list(input())
tmp =''
tmp=s_a.pop(0)
while 1:
if tmp=='a':
if s_a:
tmp=s_a.pop(0)
else:
print('A')
break
elif tmp=='b':
if s_b:
tmp=s_b.pop(0)
else:
print('B')
break
... |
s573648034 | p03998 | u370852395 | 1589481453 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 444 | s_a=list(input())
s_b=list(input())
s_c=list(input())
temp =''
temp=s_a.pop(0)
while 1:
if temp=='a':
if s_a:
temp=s_a.pop(0)
else:
print('A')
break
elif temp=='b':
if s_b:
temp=s_b.pop(0)
else:
print('B')
b... |
s167999217 | p03998 | u060793972 | 1589082369 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3060 | 179 | a = list(input()[::-1])
b = list(input()[::-1])
c = list(input()[::-1])
i=a.pop()
while True:
i=eval(i+'.pop()')
if len(eval(i))==0:
print(i.upper())
break |
s646211118 | p03998 | u158570493 | 1588899321 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 152 | a = input()
b = input()
c = input()
player = a
while True:
l = player[0]
player = player[1:]
if len(player) == 0
print(player)
player = l
|
s617799089 | p03998 | u308918401 | 1588714249 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 393 | A=input()
B=input()
C=input()
t=[0,0,0]
flag="a"
while True:
if flag=="a":
if len(A)==t[0]+1:
print("A")
break
else:
flag=A[t[0]]
t[0]+=1
elif flag=="b":
if len(B)==t[1]+1:
print("B")
break
else:
flag=B[t[1]]
t[1]+=1
elif flag=="c":
if len(C)==0:... |
s580345280 | p03998 | u308918401 | 1588713867 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 402 | A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
flag="a"
while True:
if flag=="a":
if len(A)==0:
print("A")
break
else:
flag=A.pop(0)
elif flag=="b":
if len(B)==0:
print("B")
break
else:
flag=B.pop(0)
elif flag=... |
s089315901 | p03998 | u383450070 | 1588346206 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 473 | a = list(input())
b = list(input())
c = list(input())
moji = a[0]
select = "a"
lengtha = len(a)
lengthb = len(b)
lengthc = len(c)
while True:
if select == "a":
select = a[0]
del a[0]
lengtha -= 1
if lengtha == 0:
print("A")
elif select == "b":
select = b[0]
del b[0]
lengthb -= 1
... |
s338870280 | p03998 | u199459731 | 1588142705 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1161 | a_list = list(input())
b_list = list(input())
c_list = list(input())
a_turn = True
b_turn = False
c_turn = False
max_battle = len(a_list) + len(b_list) + len(c_list)
for i in range(max_battle):
if(a_turn):
a_list.pop(0)
if(len(a_list) == 0):
print("A")
exit()
else... |
s494342303 | p03998 | u199459731 | 1588142658 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1161 | a_list = list(input())
b_list = list(input())
c_list = list(input())
a_turn = True
b_turn = False
c_turn = False
max_battle = len(a_list) + len(b_list) + len(c_list)
for i in range(max_battle):
if(a_turn):
a_list.pop(0)
if(len(a_list) == 0):
print("a")
exit()
else... |
s459089912 | p03998 | u199459731 | 1588142619 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1158 | a_list = list(input())
b_list = list(input())
c_list = list(input())
a_turn = True
b_turn = False
c_turn = False
max_battle = len(a_list) + len(b_list) + len(c_list)
for i in range(max_battle):
if(a_turn):
a_list.pop(0)
if(len(a_list) == 0):
print("a")
exit()
else... |
s141488179 | p03998 | u095094246 | 1588042148 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 80 | s={i:list(input())for i in'abc'}
i='a'
while d[i]:i=s[i].pop(0)
print(i.upper()) |
s510300172 | p03998 | u095094246 | 1588041479 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 175 | import sys
sa=input()
sb=input()
sc=input()
ss={'a':sa,'b':sb,'c':sc}
t='a'
while True:
t=ss[t][0]
if len(ss[t])==0:
print(t.upper())
sys.exit()
ss[t]=ss[t][1:]
|
s462648526 | p03998 | u252964975 | 1587912138 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 417 | A = str(input())
B = str(input())
C = str(input())
turn = "A"
while True:
if turn == "A":
turn = A[0].upper()
if len(A) == 0:
print(A.upper())
break
A = A[1:len(A)]
elif turn == "B":
turn = B[0].upper()
if len(B) == 0:
print(B.upper())
break
B = B[1:len(B)]
else:
... |
s073288481 | p03998 | u252964975 | 1587911219 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 398 | A = str(input())
B = str(input())
C = str(input())
turn = "A"
while True:
if turn = "A":
turn = A[0].upper()
if len(A) == 1:
print(A)
break
A = A[1:len(A)]
if turn = "B":
turn = B[0].upper()
if len(B) == 1:
print(B)
break
B = B[1:len(B)]
if turn = "C":
turn = C... |
s541279263 | p03998 | u870518235 | 1587762344 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 334 | Sa = str(input())
Sb = str(input())
Sc = str(input())
turn = Sa.pop(0)
while Sa <> [] or Sb <> [] or Sc <> []:
if turn == "a":
turn += Sa.pop(0)
elif turn == "b":
turn += Sb.pop(0)
elif turn == "c":
turn += Sc.pop(0)
if Sa == []:
print("A")
elif Sb == []:
print("B")
else:
... |
s149215241 | p03998 | u724687935 | 1587717482 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38256 | 258 | from collections import deque
Q = [deque() for _ in range(3)]
for i in range(3):
for s in list(input()):
Q[i].append(ord(s) - ord('a'))
k = Q[0].popleft()
while True:
k = Q[k].popleft()
if len(Q[k]) == 0:
break
print('ABC'[k])
|
s266334991 | p03998 | u068750695 | 1587692140 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 420 | a=input()
b=input()
c=input()
s=[a[0]]
a=a[1:]
for i in range(len(a)+len(b)+len(c)):
if s[-1]=="a":
s.append(a[0])
a=a[1:]
elif s[-1]=="b":
s.append(b[0])
b=b[1:]
else:
s.append(c[0])
c=c[1:]
if (not a and not b) or (not a and not c) or (not b and not c)... |
s956480717 | p03998 | u623349537 | 1587605131 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 501 | S = ["" for i in range(3)]
abc = "ABC"
for i in range(3):
S[i] = input()
turn = 0
zero_card = False
while True:
if len(S[turn]) == 1 and zero_card:
print(abc[turn])
break
else:
if len(S[turn]) == 1:
zero_card = True
next_turn = 0
if S[turn][0] == "a... |
s290274913 | p03998 | u281610856 | 1587605044 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 948 | from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations
from math import pi, gcd, ceil, floor
import numpy as np
from collections import defaultdict, deque
from operator import itemgetter
from bisect import bisect_left, bisect_right, insort_left, insort_right
import sys
input = ... |
s899463497 | p03998 | u094191970 | 1587604832 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 290 | sa=input()
sb=input()
sc=input()
t='a'
while True:
if t=='a':
if sa=='':
print('A')
exit()
t=sa[0]
sa=sa[1:]
if t=='b':
if sb=='':
print('B')
t=sb[0]
sb=sb[1:]
if t=='c':
if sc=='':
print('C')
exit()
t=sc[0]
sc=sc[1:] |
s846864730 | p03998 | u838486870 | 1587339093 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 258 | SA = list(str(input()))
SB = list(str(input()))
SC = list(str(input()))
list=[SA,SB,SC]
a=0
list[0].pop(0)
while True:
a=ord(list[a][0])-97
list[a].pop(0)
if len(list[0])==0 or len(list[1])==0 or len(list[2])==0:
break
print(chr(a+65)) |
s501990581 | p03998 | u581603131 | 1587334570 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 358 | while True:
if len(SA)==0:
print('A')
break
elif len(SB)==0:
print('B')
break
elif len(SC)==0:
print('C')
break
if card == 'a':
SA = SA[1:]
card = SA[0]
elif card == 'b':
SB = SB[1:]
card = SB[0]
elif card == 'c':
... |
s222865882 | p03998 | u581603131 | 1587334395 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 497 | SA = list(str(input()))
SB = list(str(input()))
SC = list(str(input()))
card = 'a'
for i in range(400):
if card == 'a':
SA = SA[1:]
card = SA[0]
elif card == 'b':
SB = SB[1:]
card = SB[0]
elif card == 'c':
SC =SC[1:]
card = SC[0]
if len(SA)==1 and ca... |
s290313171 | p03998 | u581603131 | 1587334377 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 410 | for i in range(400):
if card == 'a':
SA = SA[1:]
card = SA[0]
elif card == 'b':
SB = SB[1:]
card = SB[0]
elif card == 'c':
SC =SC[1:]
card = SC[0]
if len(SA)==1 and card=='a':
print('A')
break
elif len(SB)==1 and card=='b':
pr... |
s076772099 | p03998 | u396961814 | 1586906475 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 585 | SA = input()
SB = input()
SC = input()
WIN = [0, 0, 0]
card = SA[0]
SA_CNT = 1
SB_CNT = 0
SC_CNT = 0
while True:
if card == 'a':
SA_CNT += 1
if SA_CNT == len (SA):
print('A')
break
else:
card = SA[SA_CNT]
if card == 'b':
SB_CNT += 1
... |
s877996121 | p03998 | u396961814 | 1586906389 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 585 | SA = input()
SB = input()
SC = input()
WIN = [0, 0, 0]
card = SA[0]
SA_CNT = 1
SB_CNT = 0
SC_CNT = 0
while True:
if card == 'a':
SA_CNT += 1
if SA_CNT == len (SA):
print('A')
break
else:
card = SA[SA_CNT]
if card == 'b':
SB_CNT += 1
... |
s883232793 | p03998 | u289162337 | 1586806903 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 471 | a = input()
b = input()
c = input()
Sa = [a[i] for i in range(len(a))]
Sb = [b[i] for i in range(len(b))]
Sc = [c[i] for i in range(len(c))]
turn = "a"
while True:
if turn == "a":
if len(Sa) == 0:
print("A")
break
else:
turn = Sa.pop(0)
elif turn == "b":
if len(Sb) == 0:
print("B... |
s507283471 | p03998 | u289162337 | 1586806752 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 443 | a = input()
b = input()
c = input()
Sa = [a[i] for i in range(a)]
Sb = [b[i] for i in range(b)]
Sc = [c[i] for i in range(c)]
turn = "a"
while True:
if turn == "a":
if len(Sa) == 0:
print("A")
break
else:
turn = Sa.pop(0)
elif turn == "b":
if len(Sb) == 0:
print("B")
break
... |
s974968251 | p03998 | u000770457 | 1586618086 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 452 | #include<iostream>
using namespace std;
int main(){
string s[3];
cin >> s[0] >> s[1] >> s[2];
int turn=0;
while(!s[turn].empty()){
char tmp=s[turn][0];
s[turn].erase(0,1);
if(tmp=='a'){
turn=0;
}else if(tmp=='b'){
turn=1;
}else{
turn=2;
}... |
s702217075 | p03998 | u982591663 | 1586575265 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 471 | SA = list(input())
SB = list(input())
SC = list(input())
turn = SA.pop(0)
while True:
if turn == "a":
turn = SA.pop(0)
elif turn == "b":
turn = SB.pop(0)
elif turn == "c":
turn = SC.pop(0)
if turn == "a":
if not SA:
print("A")
break
elif turn... |
s968617862 | p03998 | u731448038 | 1586559885 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 308 | A = input()
B = input()
C = input()
next = A.popleft()
while 1:
if len(A)==0:
print('A')
break
elif len(B)==0:
print('B')
break
elif len(C)==0:
print('C')
break
if next=='a':
next = A.popleft()
elif next=='b':
next = B.popleft()
else:
next = C.popleft() |
s039377199 | p03998 | u235210692 | 1586450561 | Python | Python (3.4.3) | py | Runtime Error | 35 | 3284 | 297 | a=list(input()+"A")[::-1]
b=list(input()+"B")[::-1]
c=list(input()+"C")[::-1]
turn=a
def game(turn):
card=turn.pop()
if len(turn)==0:
print(card)
if card=="a":
turn=a
elif card=="b":
turn=b
else:
turn=c
game(turn)
game(turn) |
s406826037 | p03998 | u502731482 | 1586324432 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3316 | 355 | from collections import defaultdict
data = defaultdict()
for i in range(3):
s = input()
data[chr(ord("a") + i)] = s
cnt = defaultdict(int)
turn = "a"
while 1:
if cnt[turn] == len(data[chr(ord(turn))]):
ans = ord(turn) - (ord("a") - ord("A"))
break
cnt[turn] += 1
turn = data[chr(ord... |
s064501615 | p03998 | u485319545 | 1586311117 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 453 | s_a = list(input())
s_b = list(input())
s_c = list(input())
S=[s_a,s_b,s_c]
order=0
while true:
if S[order][0]=='a':
del S[0][0]
order=0
elif S[order][0]=='b':
del S[1][0]
order=1
else:
del S[2][0]
order=2
if len(S[order]==0:
print('A')
... |
s568855772 | p03998 | u870841038 | 1586300249 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 552 | h = list(input() for i in range(3))
a, b, c = h[0], h[1], h[2]
#nは文字列
n = a
#neはnextで、1文字
ne = 'a'
while True:
if n == a:
ne = a[0]
a[1:]
if not a:
print('A')
break
elif n == b:
ne = b[0]
b[1:]
if not b:
print('B')
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.