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
s124163687
p03814
u602863587
1571007169
Python
Python (3.4.3)
py
Runtime Error
17
2940
177
s=str(input()) for i in range(len(s)): if s[i]=='a': S=s.index(s[i]) break for j in reversed(range(len(s)): if s[j]=='z': G=s.index(s[j]) break print(G-S+1)
s867595359
p03814
u153902122
1570999382
Python
Python (3.4.3)
py
Runtime Error
64
5096
336
string = input() ans=[] for i in range(len(string)): if string[i] == 'A': ans.append(string[i]) start=i break for j in range(start+1,len(string)): if string[j]=='Z': ans.append(string[j]) if string[j+1] not in 'Z': break else: ans.append(string[j]) print(len(ans))
s291061059
p03814
u143509139
1570588715
Python
Python (3.4.3)
py
Runtime Error
18
3516
118
s=input() for i in len(s): if s[i] == 'A': a=i break for i in len(s): if s[i] == 'Z': z=i print(z-a+1)
s169951731
p03814
u687159441
1569977489
Python
Python (3.4.3)
py
Runtime Error
201
36484
305
s = list(input()) a_index = [i for i, x in enumerate(s) if x == 'A'] z_index = [i for i, x in enumerate(s) if x == 'Z'] distance = [] for i in a_index: for j in z_index: if i <= j: dis = j-i distance.append(dis) else: break print(max(distance)+1)
s917779870
p03814
u687159441
1569977371
Python
Python (3.4.3)
py
Runtime Error
265
36484
310
s = list(input()) a_index = [i for i, x in enumerate(s) if x == 'A'] z_index = [i for i, x in enumerate(s) if x == 'Z'] distance = [] for i in a_index: for j in z_index: if i <= j: dis = abs(i-j) distance.append(dis) else: break print(max(distance)+1)
s218985512
p03814
u687159441
1569977273
Python
Python (3.4.3)
py
Runtime Error
257
36484
308
s = list(input()) a_index = [i for i, x in enumerate(s) if x == 'A'] z_index = [i for i, x in enumerate(s) if x == 'Z'] distance = [] for i in a_index: for j in z_index: if i < j: dis = abs(i-j) distance.append(dis) else: break print(max(distance)+1)
s686441223
p03814
u223904637
1569709048
Python
Python (3.4.3)
py
Runtime Error
28
4840
181
s=list(input()) a=0 for i in range(len(s)): if s[i]=='A': a=i break b=0 for i in range(len(s)): if s[n-i-1]=='Z': b=n-i-1 break print(a-b+1)
s463314364
p03814
u580093517
1568857910
Python
Python (3.4.3)
py
Runtime Error
18
3500
49
s = input() print(s.index("Z",-1)-s.index("A")+1)
s091124775
p03814
u572142121
1567545098
Python
Python (3.4.3)
py
Runtime Error
18
3512
88
s = input() A= s.index('A') for r in s[::-1]: Z = r.index('Z') print(s-Amin-Zmax+2)
s857093736
p03814
u572142121
1567544710
Python
Python (3.4.3)
py
Runtime Error
17
2940
91
s = input() Amin = s.index('A') for r in s[::-1]: Zmax = r.index('Z') print(s-Amin-Zmax+2)
s057294304
p03814
u733738237
1567482302
Python
Python (3.4.3)
py
Runtime Error
68
3516
153
s = input() l = len(s) dif = 0 val=0 for i in range (l): if s[i] == 'A' and val==0: a = i val=1 if s[i] == 'Z': z = i dif = z-a print(dif+1)
s957672292
p03814
u733738237
1567481748
Python
Python (3.4.3)
py
Runtime Error
58
3516
127
s = input() l = len(s) dif = 0 for i in range (l): if s[i] == 'A': a = i elif s[i] == 'Z': z = i dif = z-a print(dif+1)
s381661681
p03814
u045408189
1566962001
Python
Python (3.4.3)
py
Runtime Error
18
3512
54
s=input() print(len(s)-s.index('A')-s[:-1].index('Z'))
s330512575
p03814
u835482198
1566252859
Python
Python (3.4.3)
py
Runtime Error
26
3516
250
# https://atcoder.jp/contests/abc053/tasks/abc053_b s = input() n = len(s) for i in range(n): if s[i] == 'A': start = i break for i in range(n - 1, -1): if s[i] == 'Z': end = i break print(len(s[start:end]))
s867903877
p03814
u835482198
1566252828
Python
Python (3.4.3)
py
Runtime Error
23
3516
251
# https://atcoder.jp/contests/abc053/tasks/abc053_b s = input() n = len(s) for i in range(n): if s[i] == 'A': start = i break for i in range(n - 1, -1): if s[i] == 'Z': end = i break print(len(s[start:end+1]))
s133759119
p03814
u618373524
1566158163
Python
Python (3.4.3)
py
Runtime Error
18
3516
57
s = input() print(len(s)-s[::-1].index("z")-s.index("a"))
s990100861
p03814
u260036763
1565919490
Python
Python (3.4.3)
py
Runtime Error
26
3516
104
s = input() i = 0 while s[i] != 'A': i += 1 s.reverse() j = 0 while s[j] != 'Z': j += 1 print(j-i+1)
s604380683
p03814
u248670337
1565899297
Python
Python (3.4.3)
py
Runtime Error
18
3500
55
s=input() print(len(s)-s[::-1].index("z")-s.index("A"))
s179600279
p03814
u248670337
1565899019
Python
Python (3.4.3)
py
Runtime Error
18
3500
55
s=input() print(len(s)-s[::-1].index("z")+s.index("A"))
s103488196
p03814
u889344512
1565395250
Python
PyPy3 (2.4.0)
py
Runtime Error
166
39792
182
s = input() start = len(s) end = 0 for i in range(s): if s[i] == "A": start = min(start,i) if s[len(s)-1-i] == "Z": end = max(end,i) print(len(s)-start-end)
s785453948
p03814
u137443009
1565145967
Python
Python (3.4.3)
py
Runtime Error
17
2940
215
s = str(input()) print(len(s)) for i in range(len(s)): if s[i] == 'A': min = i break for i in reversed(range(len(s))): if s[i] =='Z': max = i break print(max)print(max-min+1)
s030042683
p03814
u626337957
1565056942
Python
Python (3.4.3)
py
Runtime Error
18
3512
225
S = input() pos_a = -1 pos_z = -1 for i in range(len(S)): if S[i] == 'A' and pos_a < 0: pos_a = i if S[len(S)-i] == 'Z' and pos_z < 0: pos_z = len(S)-i if pos_a >= 0 and pos_z > 0: break print(pos_z-pos_a+1)
s798651393
p03814
u908763441
1564895061
Python
Python (3.4.3)
py
Runtime Error
19
3512
130
S = input() s = None//初期値 for i in range(len(S)): c = S[i] if c == "A": s = i if c == "Z": e = i print(e-s+1)
s513825427
p03814
u908763441
1564895027
Python
Python (3.4.3)
py
Runtime Error
18
3512
145
S = input() s = None//初期値 for i in range(len(S)): c = S[i] if c == "A" and s is None : s = i if c == "Z": e = i print(e-s+1)
s092083025
p03814
u908763441
1564894483
Python
Python (3.4.3)
py
Runtime Error
29
3512
115
S = input() for i in range(len(S)): c = S[i] if c == "A" and s is None :s = i if c == "Z":e = i print(e-s+1)
s676457484
p03814
u908763441
1564893350
Python
Python (3.4.3)
py
Runtime Error
17
3064
128
S = input() s = 0 for i in range(len(S)): c = S[i] s = i if c == "A" and s == 0 if c == "Z": print(S[s:i+1]) break
s458798222
p03814
u908763441
1564893078
Python
Python (3.4.3)
py
Runtime Error
18
2940
123
S = input() s=0 for i in range(len(S)): c = S[i] s = i if c =="A" && s <> 0 if c =="Z": print(S[s:i+1]) break
s703680325
p03814
u908763441
1564892901
Python
Python (3.4.3)
py
Runtime Error
17
2940
116
S = input() s=0 for i in len(S): c = S[i] s = i if c =="A" && s <> 0 if c =="Z": print(S[s:i+1]) break
s824824800
p03814
u908763441
1564892739
Python
Python (3.4.3)
py
Runtime Error
17
2940
102
S = input() for i in len(S): c = S[i] s = i if c =='A' if c =='Z': print(S[s:i+1]) break
s621139975
p03814
u506858457
1564883761
Python
Python (3.4.3)
py
Runtime Error
19
3516
103
s=list(input().split()) for i in range(len(s)): if i=='A': a=i if i=='Z': z=i print(z-a+1)
s977648488
p03814
u001495709
1564115705
Python
Python (3.4.3)
py
Runtime Error
44
4840
173
s = list(input()) for num in s : if num == "A": index1 = s.index(num) continue if num == "Z": index2 = s.index(num) break print(index2 - index1 + 1)
s239378458
p03814
u355137116
1563590320
Python
Python (3.4.3)
py
Runtime Error
17
2940
225
s = list(map(int, input().split()) int ans = 0; for i in range(len(s)): if s[i] == "A": for i in range(len(s)) ans ++; if s[i] == "Z": out; print(ans)
s473550415
p03814
u423585790
1563567877
Python
PyPy3 (2.4.0)
py
Runtime Error
195
61808
1432
#!/usr/bin/env python3 from collections import defaultdict from collections import deque from heapq import heappush, heappop import sys import math import bisect import random import itertools sys.setrecursionlimit(10**5) stdin = sys.stdin bisect_left = bisect.bisect_left bisect_right = bisect.bisect_right def LI(): return list(map(int, stdin.readline().split())) def LF(): return list(map(float, stdin.readline().split())) def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split())) def II(): return int(stdin.readline()) def IF(): return float(stdin.readline()) def LS(): return list(map(list, stdin.readline().split())) def S(): return list(stdin.readline().rstrip()) def IR(n): return [II() for _ in range(n)] def LIR(n): return [LI() for _ in range(n)] def FR(n): return [IF() for _ in range(n)] def LFR(n): return [LI() for _ in range(n)] def LIR_(n): return [LI_() for _ in range(n)] def SR(n): return [S() for _ in range(n)] def LSR(n): return [LS() for _ in range(n)] mod = 1000000007 inf = float('INF') #A def A(): x = II() if x < 1200: print("ABC") else: print("ARC") return #B def B(): s = S() a = inf z = 0 for num,si in enumerate(s): if si == "A": a = min(a, num) if si == "Z": z = max(z, si) print(z-a+1) return #C def C(): return #D def D(): return #Solve if __name__ == '__main__': B()
s736444163
p03814
u423585790
1563567779
Python
PyPy3 (2.4.0)
py
Runtime Error
184
47216
1528
#!/usr/bin/env python3 from collections import defaultdict from collections import deque from heapq import heappush, heappop import sys import math import bisect import random import itertools sys.setrecursionlimit(10**5) stdin = sys.stdin bisect_left = bisect.bisect_left bisect_right = bisect.bisect_right def LI(): return list(map(int, stdin.readline().split())) def LF(): return list(map(float, stdin.readline().split())) def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split())) def II(): return int(stdin.readline()) def IF(): return float(stdin.readline()) def LS(): return list(map(list, stdin.readline().split())) def S(): return list(stdin.readline().rstrip()) def IR(n): return [II() for _ in range(n)] def LIR(n): return [LI() for _ in range(n)] def FR(n): return [IF() for _ in range(n)] def LFR(n): return [LI() for _ in range(n)] def LIR_(n): return [LI_() for _ in range(n)] def SR(n): return [S() for _ in range(n)] def LSR(n): return [LS() for _ in range(n)] mod = 1000000007 inf = float('INF') #A def A(): x = II() if x < 1200: print("ABC") else: print("ARC") return #B def B(): s = S() a = inf z = 0 for num,si in enumerate(s): if si == "a": a = min(a, num) if si == "z": z = max(z, si) print(z-a+1) return #C def C(): return #D def D(): return #E def E(): return #F def F(): return #G def G(): return #H def H(): return #Solve if __name__ == '__main__': A()
s198476758
p03814
u777283665
1562869678
Python
Python (3.4.3)
py
Runtime Error
17
2940
154
for i in range(n): if s[i] == "A": ind_a = i break for i in range(n): if s[i] == "Z": ind_z = i print(ind_z - ind_a + 1)
s186280875
p03814
u777283665
1562869395
Python
Python (3.4.3)
py
Runtime Error
17
2940
154
for i in range(n): if s[i] == "A": ind_a = i break for i in range(n): if s[i] == "Z": ind_z = i print(ind_z - ind_a + 1)
s319572093
p03814
u777283665
1562869345
Python
Python (3.4.3)
py
Runtime Error
17
2940
154
for i in range(n): if s[i] == "A": ind_a = i break for i in range(n): if s[i] == "Z": ind_z = i print(ind_z - ind_a + 1)
s440122980
p03814
u855819610
1562787401
Python
Python (3.4.3)
py
Runtime Error
17
2940
61
first = s.find("A") last = s.rfind("Z") print(last - first+1)
s672508978
p03814
u292735000
1562278612
Python
Python (3.4.3)
py
Runtime Error
18
3500
51
s = input() print(s.rindex('Z') - a.index('A') + 1)
s399323264
p03814
u395202850
1561950236
Python
Python (3.4.3)
py
Runtime Error
37
4840
275
def start(l): for i in range(1, l-1): if S_list[i] == "A": return i + 1 def finish(l): for i in range(1, l-1): if S_list[l - i] == "Z": return l - i + 1 S_list = list(input()) l = len(S_list) print(finish(l) - start(l) + 1)
s824027363
p03814
u395202850
1561949927
Python
Python (3.4.3)
py
Runtime Error
52
4840
282
def start(l): for i in range(1, l): if S_list[i] == "A": return i def finish(l): for i in range(1, l): if S_list[l - i] == "Z": return l - i S_list = list(input()) l = len(S_list) start(l) finish(l) print(finish(l) - start(l) + 1)
s097629751
p03814
u551692187
1560880695
Python
Python (3.4.3)
py
Runtime Error
17
2940
401
s = input() cnt = 0 cntflg = False endflg = False for i in s: if i == 'Z' and cntflg: cnt += 1 endflg = True elif i == 'Z' and endflg: cnt += 1 elif endflg break elif cntflg: cnt += 1 elif i == 'A' and not(cntflg): cnt = 1 cntflg = True print(cnt)
s467950913
p03814
u551692187
1560879838
Python
Python (3.4.3)
py
Runtime Error
17
2940
155
s = input() cnt = 0 cntflg = True for i in s: if i == 'Z': break elif cntflg: cnt += 1 elif i == 'A' cnt = 1 cntflg = True print(cnt)
s397117804
p03814
u239316561
1560263152
Python
Python (3.4.3)
py
Runtime Error
55
4840
464
s = list(input()) flagA = False flagZ = False if s[0] == 'A': flagA = True # 文字列の両端から探索していきAのうち最左端にあるものZのうち最右端にあるものの要素数を記録 O(N/2) i = 1 while not (flagA == True and flagZ == True): if s[i] == 'A' and flagA == False: a = i flagA = True if s[-i] == 'Z' and flagZ == False: z = len(s) - i flagZ = True i += 1 print(z-a+1)
s363396651
p03814
u539517139
1560260265
Python
Python (3.4.3)
py
Runtime Error
17
3516
150
s=input() l=len(s) x,y=0 for i in range(l): if s[i]=='A': x=i break for j in range(l-1,0,-1): if s[j]=='Z': y=j break print(y-x+1)
s185739991
p03814
u172111219
1559933783
Python
PyPy3 (2.4.0)
py
Runtime Error
179
38384
180
s = input() a=0 z=0 for i in range(len(s)): if s[i]=="A": a = i break for j in range(len(s)): if s[-j-1]=="Z": z = len(s)-j-1 break print(z-a+1)
s750385128
p03814
u778814286
1559871237
Python
Python (3.4.3)
py
Runtime Error
17
2940
72
S = input() dAdAd1 1 a = S.find('A') b = S.find('Z') print(len(S)-a-b)
s817480099
p03814
u399721252
1559392370
Python
Python (3.4.3)
py
Runtime Error
18
3516
150
s = input() for i in range(n): if s[i] == "A": l = i break for i in range(n-1,-1,-1): if s[i] == "Z": r = i break print(s[l:r+1])
s827650609
p03814
u846113428
1559174356
Python
Python (3.4.3)
py
Runtime Error
53
3500
183
s = input() idx_a = None idx_b = 0 for idx, char in enumerate(s): if char =='A' and idx_a: idx_a = idx if char == 'Z': idx_b = idx print(idx_b - idx_a + 1)
s230717196
p03814
u300637346
1558904498
Python
Python (3.4.3)
py
Runtime Error
24
4840
53
s=list(input()) print((s.index('z')-s.index('a'))+1)
s913675618
p03814
u839953865
1558565096
Python
Python (3.4.3)
py
Runtime Error
2108
3820
142
s=input() a=s.find("A") z0=s.count("Z") for i in range (z0-1): s=s[:s.find("Z")]+"a"+s[s.find("Z")+1:] z=s.find("Z") print(z-a+1)
s142608722
p03814
u839953865
1558565020
Python
Python (3.4.3)
py
Runtime Error
18
3512
142
s=input() a=s.find("a") z0=s.count("z") for i in range (z0-1): s=s[:s.find("z")]+"a"+s[s.find("z")+1:] z=s.find("z") print(z-a+1)
s123252581
p03814
u532966492
1557765730
Python
Python (3.4.3)
py
Runtime Error
17
2940
146
s=input() for i in range(len(s)): if s[i]==`A`: a=i break for i in reversed(range(len(s))): if s[i]==`Z`: b=i break print(b-a)
s854917718
p03814
u827202523
1557700083
Python
Python (3.4.3)
py
Runtime Error
18
3512
181
s = input() n = len(n) aind = 0 for i , c in enumerate(s): if c == "A": aind = i break zind = 0 for i,c in enumerate(s): if c == "Z": zind = i print(zind-aind)
s465781811
p03814
u064246852
1557177592
Python
Python (3.4.3)
py
Runtime Error
56
3512
134
s=input() for i in range(len(s)): if s[i]=="A": a=i for i in range(a+1,len(s)): if s[i]=="Z": z=i print(z-a+1)
s379742778
p03814
u813098295
1557171239
Python
Python (3.4.3)
py
Runtime Error
18
2940
270
package main import "fmt" func main() { var s string start := -1 end := -1 fmt.Scanf("%s", &s) for i, _ := range s { if s[i:i+1] == "A" && start == -1 { start = i } if s[i:i+1] == "Z" { end = i } } fmt.Println(end-start+1) }
s684138202
p03814
u220345792
1556919529
Python
Python (3.4.3)
py
Runtime Error
18
3516
208
S = input() min_ = 0 max_ = 0 flag_min = False for i in len(S): if flag_min: if S[i] == "A": min_ = i flag_min = True else: if S[i] == "Z": max_ = i print(max_ - min_ + 1)
s772976171
p03814
u166621202
1556812125
Python
Python (3.4.3)
py
Runtime Error
18
3500
72
s = input() head = s.fine("A") tail = s.rfind("Z") print(tail - head +1)
s665349653
p03814
u044026875
1556065109
Python
Python (3.4.3)
py
Runtime Error
17
3064
179
s=input() for i in range(0,len(s)): if s[i] == "A": a = i break for i in range(a,len(s)): if s[i] == "Z": z = i break print(len(s[a:z+1])
s916646570
p03814
u330314953
1555969287
Python
Python (3.4.3)
py
Runtime Error
18
2940
156
s = str(input()) a = 0 z = 0 for i in range(len(s)): if s[i] = "A": a = min(a,i) elif s[i] = "Z": z = max(z,i) print(z - a + 1)
s070187124
p03814
u714300041
1555376772
Python
Python (3.4.3)
py
Runtime Error
64
9036
269
string = input() string_list = [s for s in string] def find(s, slist): index = [] for i, st in enumerate(slist): if st == s: index.append(i) index_of_a = find("A", string_list) index_of_z = find("Z", string_list) print(index_of_z[-1] - index_of_a[0]+1)
s132413022
p03814
u585482323
1554160218
Python
PyPy3 (2.4.0)
py
Runtime Error
163
38256
1361
#!usr/bin/env python3 from collections import defaultdict from heapq import heappush, heappop import sys import math import bisect import random def LI(): return list(map(int, sys.stdin.readline().split())) def I(): return int(sys.stdin.readline()) def LS():return list(map(list, sys.stdin.readline().split())) def S(): return list(sys.stdin.readline())[:-1] def IR(n): l = [None for i in range(n)] for i in range(n):l[i] = I() return l def LIR(n): l = [None for i in range(n)] for i in range(n):l[i] = LI() return l def SR(n): l = [None for i in range(n)] for i in range(n):l[i] = S() return l def LSR(n): l = [None for i in range(n)] for i in range(n):l[i] = SR() return l mod = 1000000007 #A """ x = I() if x < 1200: print("ABC") else: print("ARC") """ #B s = input() n = len(s) for i in range(n): if s[i] == "A": for j in range(i+1,n): s[j] == "Z": print(j-i+1) quit() #C """ x = I() ans = 2*(x//11)+1 x %= 11 if x == 0: ans -= 1 if x > 6: ans += 1 print(ans) """ #D """ n = I() a = LI() d = defaultdict(int) for i in a: d[i] += 1 l = list(d.values()) k = len(l)+sum(l) for i in d.keys(): d[i] = 1 ans = sum(list(d.values())) ans -= 1 if k%2 else 0 print(ans) """ #E #F #G #H #I #J #K #L #M #N #O #P #Q #R #S #T
s262259543
p03814
u585482323
1554160185
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38384
1357
#!usr/bin/env python3 from collections import defaultdict from heapq import heappush, heappop import sys import math import bisect import random def LI(): return list(map(int, sys.stdin.readline().split())) def I(): return int(sys.stdin.readline()) def LS():return list(map(list, sys.stdin.readline().split())) def S(): return list(sys.stdin.readline())[:-1] def IR(n): l = [None for i in range(n)] for i in range(n):l[i] = I() return l def LIR(n): l = [None for i in range(n)] for i in range(n):l[i] = LI() return l def SR(n): l = [None for i in range(n)] for i in range(n):l[i] = S() return l def LSR(n): l = [None for i in range(n)] for i in range(n):l[i] = SR() return l mod = 1000000007 #A """ x = I() if x < 1200: print("ABC") else: print("ARC") """ #B s = S() n = len(s) for i in range(n): if s[i] == "A": for j in range(i+1,n): s[j] == "Z": print(j-i+1) quit() #C """ x = I() ans = 2*(x//11)+1 x %= 11 if x == 0: ans -= 1 if x > 6: ans += 1 print(ans) """ #D """ n = I() a = LI() d = defaultdict(int) for i in a: d[i] += 1 l = list(d.values()) k = len(l)+sum(l) for i in d.keys(): d[i] = 1 ans = sum(list(d.values())) ans -= 1 if k%2 else 0 print(ans) """ #E #F #G #H #I #J #K #L #M #N #O #P #Q #R #S #T
s140465989
p03814
u175034939
1553928318
Python
Python (3.4.3)
py
Runtime Error
18
3516
254
s = input() a = z = '' for i, v in enumerate(s): if not a: if v == 'A': a = i if not z: if s[len(s) - i -1] == 'Z': z = len(s) - i if a >= 0 and z >= 0: print(z - a) exit()
s826916802
p03814
u565204025
1553831174
Python
Python (3.4.3)
py
Runtime Error
17
2940
229
# -*- coding: utf-8 -*- x = input() a = 0 z = 0 for i in range(len(x)): if x[i] == "A": a = i break for i in range(len(x)): if x[-(i+1)] == "Z": z = len(x) - i break print(len(x[a:z])
s931044530
p03814
u013408661
1553650288
Python
Python (3.4.3)
py
Runtime Error
21
4840
77
s=list(input()) x=s.index('A') t=reversed(s) y=t.index('Z') print(len(s)-x-y)
s243546422
p03814
u224156735
1553620869
Python
Python (3.4.3)
py
Runtime Error
18
3500
44
S=input() print(S.rfind("Z")-S.find("A"+1))
s879808633
p03814
u391875425
1553235529
Python
Python (3.4.3)
py
Runtime Error
17
2940
120
S = input() a = min[i for i, x in enumerate(S) if x == 'A'] z = max[i for i, x in enumerate(S) if x == 'Z'] print(z - a)
s696012413
p03814
u518042385
1553231132
Python
Python (3.4.3)
py
Runtime Error
17
2940
156
s=list(input()) x=0 y=0 while x=0: if s[0]!="A": del s[0] else: x=1 while y=0: if s[-1]!="Z": del s[-1] else: y=1 print(len(s))
s897990052
p03814
u179169725
1553230202
Python
Python (3.4.3)
py
Runtime Error
25
3512
205
S = input() N = len(S) for i in range(N): if S[i] == 'A': a_index = i break for i in range(N,-1,-1): if S[i] == 'Z': z_index = i break print(N - z_index - a_index)
s895900367
p03814
u325264482
1553227318
Python
Python (3.4.3)
py
Runtime Error
61
3512
213
S = input() N = len(S) for s, i in enumerate(S): if s == 'A': a_index = i break for s, i in enumerate(S[::-1]): if s == 'A': z_index = i break print(N - z_index - a_index)
s888818973
p03814
u280512618
1552968767
Python
Python (3.4.3)
py
Runtime Error
19
3640
67
import re m = re.match(r'A.*Z', input()) print(m.end() - m.start())
s782974219
p03814
u280512618
1552968681
Python
Python (3.4.3)
py
Runtime Error
20
3644
63
import re m = re.match(r'A.*Z', input()) print(m.end - m.start)
s817090124
p03814
u807772568
1552438491
Python
Python (3.4.3)
py
Runtime Error
44
4968
142
a = list(input()) for i in range(len(a)): if a[i] == "A": k = i for i in range(len(a),0,-1): if a[i] == "Z": kk = i print(kk-k+1)
s443598651
p03814
u518064858
1550705472
Python
Python (3.4.3)
py
Runtime Error
54
3516
177
s=input() a=0 z=0 i=0 j=len(s)-1 while a==0: if s[i]=="a": a=1 else: i+=1 while z==0: if s[j]=="z": z=1 else: j-=1 print(j-i+1)
s638281534
p03814
u518064858
1550705336
Python
Python (3.4.3)
py
Runtime Error
51
3516
177
s=input() a=0 z=0 i=0 j=0 while a==0: if s[i]=="a": a=1 else: i+=1 while z==0: if s[len(s)-1-j]=="z": z=1 else: j+=1 print(j-i+1)
s506301219
p03814
u023229441
1550620156
Python
Python (3.4.3)
py
Runtime Error
17
3516
63
A=input() n=A.index("a") m=A[::-1].index("z") print(len(A)-n-m)
s937195876
p03814
u023229441
1550619964
Python
Python (3.4.3)
py
Runtime Error
17
3500
42
A=input() print(A.index("z")-A.index("a"))
s325336734
p03814
u516272298
1550559921
Python
Python (3.4.3)
py
Runtime Error
17
3064
203
s = str(input()) l = [] for i in range(len(s)): for j in range(len(s)-1,0,-1): if s[i] == "A": if s[j] == "Z": l.append((j+1-i) break print(max(l))
s885115899
p03814
u459639226
1545371639
Python
Python (3.4.3)
py
Runtime Error
18
3512
82
s = input() a = s.index('a') sr = s[::-1] z = sr.index('z') print(len(s) - a - z)
s938430031
p03814
u459639226
1545371345
Python
Python (3.4.3)
py
Runtime Error
18
3500
75
s = input() a = s.index('a') sr = s[::-1] z = sr.index('z') print(s[a:-z])
s484190877
p03814
u615615456
1544814486
Python
Python (2.7.6)
py
Runtime Error
78
10556
218
s =map(str,(raw_input())) flg = 0 for i in range(len(s)): if flg==0 and s[i]=='A': flg += 1 elif flg!=0 and s[i]=='Z': flg+=1 if s[i+1] == 'Z': flg+=1 break elif flg!=0: flg+=1 print flg
s649931707
p03814
u026155812
1544250660
Python
Python (3.4.3)
py
Runtime Error
72
11180
167
s = input().strip() a = [] b = [] for i in range(len(s)): if s[i] == 'A': a.append(i) elif s[i] == 'Z': b.append(i) print(b.max()-a.min()+1)
s106496576
p03814
u026155812
1544250470
Python
Python (3.4.3)
py
Runtime Error
18
3512
129
s = input().strip() a = 0 b = 0 for i in s: if s[i] == 'A': a = i elif s[i] == 'Z': b = i print(b-a+1)
s865970497
p03814
u111365959
1542947794
Python
Python (3.4.3)
py
Runtime Error
18
3500
47
a = input() b = a[a.index('A'):a.rindex('z')+1]
s518503304
p03814
u669770658
1542666539
Python
Python (3.4.3)
py
Runtime Error
19
3516
211
def abc053_b(): s = str(input()) start = int(s.index('a')) for i in range(len(s), 0, -1): if s[i] == "z": return i - start if __name__ == '__main__': print(abc053_b())
s053277723
p03814
u233131404
1539822115
Python
Python (3.4.3)
py
Runtime Error
52
7520
171
A=str(input()) a=A.index("A") Z=[] for i in enumerate(A): if i[1]=="Z": Z.append(i[0]) if len(Z)>=2: b=max(Z) else: b=A.index("B") print(len(A[a:b+1]))
s449135267
p03814
u589087860
1538108240
Python
Python (3.4.3)
py
Runtime Error
73
5096
486
s = input() ans = [] flag = 0 #print(s) #print(s[0]) for i in range(len(s)): if flag == 0: if s[i] == "A": flag = 1 ans.append(s[i]) else: if s[i] == "Z": if s[i+1] != "Z": flag = 0 ans.append(s[i]) break else: ans.append(s[i]) else: ans.append(s[i]) #print(ans) #print("".join(ans)) print(len(ans))
s608094840
p03814
u589087860
1538108194
Python
Python (3.4.3)
py
Runtime Error
73
5096
504
s = input() ans = [] flag = 0 #print(s) #print(s[0]) for i in range(len(s)): if flag == 0: if s[i] == "A": flag = 1 ans.append(s[i]) else: if s[i] == "Z": if i > len(s) - 1 or s[i+1] != "Z": flag = 0 ans.append(s[i]) break else: ans.append(s[i]) else: ans.append(s[i]) #print(ans) #print("".join(ans)) print(len(ans))
s943470918
p03814
u462214100
1537898955
Python
Python (3.4.3)
py
Runtime Error
17
2940
145
s = list(input()) a = 200000 z = 0 for i in range(len(s)): if s[i] = 'A' and a > i: a = i if s[i] = 'Z' and z < i: z = i print(z-a+1)
s031476589
p03814
u270681687
1536057675
Python
Python (3.4.3)
py
Runtime Error
89
3516
214
s = input() ans = 0 i = 0 while i < len(s): if s[i] == "A": num = 1 while s[i] != "Z" and i < len(s): i += 1 num += 1 ans = max(ans, num) i += 1 print(ans)
s644588353
p03814
u657913472
1535433897
Python
Python (3.4.3)
py
Runtime Error
18
3516
102
s=input() a=-1 z=0 for i in range(s.len()): if a<0 and s[i]=='A':a=i if s[i]=='Z':z=i print(z-a+1)
s214189961
p03814
u052347048
1534816975
Python
Python (3.4.3)
py
Runtime Error
73
5096
261
a = input() lis = [] for i in range(len(a)): if a[i] == "A": while True: if a[i] == "Z" and a[i+1] != "Z": print(len(lis)+1) exit() else: lis.append(a[i]) i += 1
s794902952
p03814
u052347048
1534816629
Python
Python (3.4.3)
py
Runtime Error
190
5720
243
a = input() lis = [] for i in range(len(a)): if a[i] == "A": while True: if a[i] == "Z": print(len(lis)+1) break else: lis.append(a[i]) i += 1
s942139210
p03814
u787562674
1534785934
Python
Python (3.4.3)
py
Runtime Error
18
3516
133
s = input() start = s.index("A") for i in range(len(s), start, -1): if s[i] == "Z": print(i - start + 1) break
s988845336
p03814
u140251125
1532220189
Python
Python (3.4.3)
py
Runtime Error
48
3516
132
# input s = input() i = 0 while s[i] != 'a': i += 1 j = len(s) - 1 while s[j] != 'z': j -= 1 ans = j - i + 1 print(ans)
s544396447
p03814
u350179603
1515884715
Python
Python (3.4.3)
py
Runtime Error
57
4840
155
s = list(input()) for i in range(len(s)): if s[i] == "A": i_tmp1= i elif s[i] == "Z" and i >= i_tmp1: i_tmp2 = i print(i_tmp2-i_tmp1+1)
s142415723
p03814
u778700306
1515385295
Python
Python (3.4.3)
py
Runtime Error
161
198564
159
s = input() def drop(s): if s[0] != 'A': return drop(s[1:]) if s[-1] != 'Z': return drop(s[:-1]) return s print(len(drop(s)))
s697498976
p03814
u495267515
1498360020
Python
Python (3.4.3)
py
Runtime Error
16
2940
137
-*- coding: utf-8 -*- import sys import subprocess import json import time import math import re import sqlite3 s = input() print(1)
s711756682
p03814
u495267515
1498359986
Python
Python (3.4.3)
py
Runtime Error
17
2940
166
-*- coding: utf-8 -*- import sys import subprocess import json import time import math import re import sqlite3 s = input() print(s.rfind("Z") - s.find("A") + 1)