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
s660885739
p03813
u754120791
1486596994
Python
Python (3.4.3)
py
Runtime Error
23
3064
62
x = int(input()) if x < 1200: print('ABC') else: print('ARC')
s950940081
p03813
u540815635
1486434986
Python
Python (3.4.3)
py
Runtime Error
23
3064
121
string = input() z_idx = len(string) - string[::-1].index('Z') - 1 a_idx = string.index('A') print (z_idx - a_idx + 1)
s253785940
p03813
u369752439
1486302415
Python
Python (2.7.6)
py
Runtime Error
16
2568
90
s = raw_input() aId = s.index("A") s = s[::-1] zId = s.index("Z") print len(s) - aId - zId
s109735043
p03813
u272028993
1486053462
Python
Python (2.7.6)
py
Runtime Error
16
2568
186
s=raw_input() n=len(s) for i in xrange(n): if s[i]=="a": idx1=i break for i in xrange(n-1,0,-1): if s[i]=="z": idx2=i break print idx2-idx1+1
s618156053
p03813
u873917047
1485666032
Python
Python (3.4.3)
py
Runtime Error
23
3064
315
#coding: UTF-8 N=int(input()) lis=list(map(int, input().split())) kind_dict={} for i in lis: if i in kind_dict: kind_dict[i]+=1 else: kind_dict[i]=1 kindn=len(kind_dict) out=0 for i in kind_dict: if kind_dict[i]%2==0: out+=1 if out%2==0: print(kindn) else: print(kindn-1)
s641726002
p03813
u481333386
1485659792
Python
Python (3.4.3)
py
Runtime Error
22
3064
66
x = input() if x < 1200: print("ABC") else: print("ARC")
s333059364
p03813
u668811096
1485659349
Python
Python (3.4.3)
py
Runtime Error
22
3064
85
x = [] if 1 <= x < 1200: print('ABC') elif 1200 <= x <= 3000: print('ARC')
s159763685
p03813
u788681441
1485655429
Python
Python (3.4.3)
py
Runtime Error
22
3064
60
x = int(iput()) ans = 'ABC' if x<1300 else 'ARC' print(ans)
s333417158
p03813
u104282757
1485655409
Python
Python (3.4.3)
py
Runtime Error
22
3064
73
x = int(raw_input()) if x < 1200: print('ABC') else: print('ARC')
s423021458
p03813
u277373937
1485655405
Python
Python (3.4.3)
py
Runtime Error
21
3064
65
x = input() if x < 1200: print('ABC') else: print('ARC')
s485784450
p03814
u468972478
1598203443
Python
Python (3.8.2)
py
Runtime Error
24
9324
85
n = input() a = n.index("A") n = len(n) - n[::-1].index("Z") - 1 print(len(n[a:n+1]))
s905480884
p03814
u468972478
1598203283
Python
Python (3.8.2)
py
Runtime Error
25
9268
81
n = input() a = n.index("A") n = len(n) - n[::-1].index("Z") print(len(n[a:n+1]))
s080703839
p03814
u895918162
1598103164
Python
Python (3.8.2)
py
Runtime Error
46
10824
265
sample = input() new = [] for i in sample: new.append(i) if "A" in new: a_pos = list.index(new) if "Z" in new: z_pos = list.index(new) if a_post < z_pos: out = new[a_pos:(z_pos+1)] new_string = "" for j in out: new_string += j print(len(new_string))
s918538847
p03814
u895918162
1598102917
Python
Python (3.8.2)
py
Runtime Error
46
10788
265
sample = input() new = [] for i in sample: new.append(i) if "A" in new: a_pos = list.index(new) if "Z" in new: z_pos = list.index(new) if a_post < z_pos: out = new[a_pos:(z_pos+1)] new_string = "" for i in out: new_string += i print(len(new_string))
s917870897
p03814
u895918162
1598102775
Python
Python (3.8.2)
py
Runtime Error
47
10708
264
sample = input() new = [] for i in sample: new.append(i) if "A" in new: a_pos = list.index(new) if "Z" in new: z_pos = list.index(new) if a_post < z_pos: out = new[a_pos:(z_pos+1)] new_string = "" for i in out: new_string += i print(len(new_string))
s385131390
p03814
u895918162
1598102714
Python
Python (3.8.2)
py
Runtime Error
44
10596
259
sample = input() new = [] for i in sample: new.append(i) if "A" in new: a_pos = list.index(new) if "Z" in new: z_pos = list.index(new) if a_post < z_pos: out = new[a_pos:(z_pos+1)] new_string = "" for i in out: new_string += i print(new_string)
s202509152
p03814
u895918162
1598102629
Python
Python (3.8.2)
py
Runtime Error
40
10700
179
sample = input() new = [] for i in sample: new.append(i) if "A" in new: a_pos = list.index(new) if "Z" in new: z_pos = list.index(new) out = new[a_pos:(z_pos+1)] print(out)
s187614434
p03814
u895918162
1598102523
Python
Python (3.8.2)
py
Runtime Error
44
10656
177
sample = input() new = [] for i in sample: new.append(i) if "A" in new: a_pos = list.index(new) if "Z" in new: z_pos = list.index(new) out = new[a_pos:z_pos +1] print(out)
s571626706
p03814
u250662864
1597590762
Python
Python (3.8.2)
py
Runtime Error
29
9108
141
string = input() index_of_A = string.index("A") index_of_Z = string.index("Z", index_of_A, len(string)-1) print(index_of_Z - index_of_A + 1)
s782764578
p03814
u250662864
1597590321
Python
Python (3.8.2)
py
Runtime Error
75
9128
166
string = input() count = 0 for i in range(len(string)): if string[i] == "A": count = 1 while string[i] != "Z": count += 1 i += 1 print(count+1)
s391885340
p03814
u673173160
1597530828
Python
Python (3.8.2)
py
Runtime Error
24
9028
694
import sys, math, itertools, collections, bisect input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') inf = float('inf') ;mod = 10**9+7 mans = inf ;ans = 0 ;count = 0 ;pro = 1 s = input() state = False chk2 = False chk = 0 for i in range(len(s)): if state == False and s[i] == "A": state = True chk += 1 elif state == True and s[i] == "Z": chk += 1 if ans < chk: ans = chk chk2 = True chk = 0 state = False elif state == False and s[i] == "Z" and chk2 = True: ans += 1 elif state == False ans chk2 == True: chk2 = False elif state == True: chk += 1 print(ans)
s547509379
p03814
u673173160
1597530799
Python
Python (3.8.2)
py
Runtime Error
27
9044
693
import sys, math, itertools, collections, bisect input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') inf = float('inf') ;mod = 10**9+7 mans = inf ;ans = 0 ;count = 0 ;pro = 1 s = input() state = False chk2 = False chk = 0 for i in range(len(s)): if state == False and s[i] == "A": state = True chk += 1 elif state == True and s[i] == "Z": chk += 1 if ans < chk: ans = chk chk2 = True chk = 0 state = False elif state == False and s[i] == "Z" and chk2 = True: ans += 1 elif state == False ans chk2 = True: chk2 = False elif state == True: chk += 1 print(ans)
s211147436
p03814
u673173160
1597530641
Python
Python (3.8.2)
py
Runtime Error
78
9656
567
import sys, math, itertools, collections, bisect input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') inf = float('inf') ;mod = 10**9+7 mans = inf ;ans = 0 ;count = 0 ;pro = 1 s = input() state = False chk = 0 for i in range(len(s)): if state == False and s[i] == "A": state = True chk += 1 elif state == True and s[i] == "Z": chk += 1 if ans < chk: ans = chk if s[i+1] == "Z": ans += 1 chk = 0 state = False elif state == True: chk += 1 print(ans)
s460739174
p03814
u673173160
1597530615
Python
Python (3.8.2)
py
Runtime Error
63
9060
372
s = input() state = False chk = 0 for i in range(len(s)): if state == False and s[i] == "A": state = True chk += 1 elif state == True and s[i] == "Z": chk += 1 if ans < chk: ans = chk if s[i+1] == "Z": ans += 1 chk = 0 state = False elif state == True: chk += 1 print(ans)
s260492054
p03814
u190866453
1597426664
Python
Python (3.8.2)
py
Runtime Error
49
10656
272
c = input() s = [] for i in c: s.append(i) list_a = [] list_z = [] while "a" in s: list_a.append(s.index("a")) s[s.index("a")] = "b" while "z" in s: list_z.append(s.index("z")) s[s.index("z")] = "v" answer = list_z[-1] - list_a[0] + 1 print(answer)
s125390779
p03814
u739843002
1597015680
Python
Python (3.8.2)
py
Runtime Error
45
9276
196
s = input() posA = 0 posZ = 0 for i in range(len(s)): if s[i] == "A": posA = i break for j in range(len(s)): if s[-j-1] == "Z": posZ = N - 1 - j break print(posZ - posA + 1)
s574466124
p03814
u433380437
1596515983
Python
PyPy3 (7.3.0)
py
Runtime Error
98
74692
158
for i in range(len(s)): if s[i]=='A': a=i break for j in reversed(range(len(s))): if s[j]=='Z': b=j break print(b-a+1)
s759822748
p03814
u926046014
1595449590
Python
PyPy3 (7.3.0)
py
Runtime Error
98
74460
152
s=input() a=False for i,v in enumerate(s): if a==False: if v=="A": a=i else: if v=="Z": z=i print(z-a+1)
s765903591
p03814
u786020649
1595179563
Python
Python (3.8.2)
py
Runtime Error
27
8872
115
s=input() ds=list(s) c1=0 while ds[c1]!='A' c1+=1 c2=-1 while ds[c2]!='Z': c2-=1 print(len(s[c1:c2]))
s298818305
p03814
u786020649
1595179539
Python
Python (3.8.2)
py
Runtime Error
27
8716
225
s=input() ds=list(s) c1=0 while ds[c1]!='A' c1+=1 c2=-1 while ds[c2]!='Z': c2-=1 print(s[c1:c2]) s=input() ds=list(s) c1=0 while ds[c1]!='A' c1+=1 c2=-1 while ds[c2]!='Z': c2-=1 print(len(s[c1:c2]))
s347733358
p03814
u786020649
1595179458
Python
Python (3.8.2)
py
Runtime Error
20
9016
108
s=input() ds=list(s) c1=0 while ds[c1]!='A' c1+=1 c2=-1 while ds[c2]!='Z': c2-=1 print(s[c1:c2])
s254748259
p03814
u671889550
1594097421
Python
Python (3.8.2)
py
Runtime Error
19
9072
50
s=input a=s.find('A') z=s.rfind('Z') print(z-a)
s022738631
p03814
u706414019
1593735212
Python
Python (3.8.2)
py
Runtime Error
25
9116
163
s = input() a=0 b=0 for i in range(len(s)): if s[i]=='A': a = i break for i in range(len(s),-1,-1): if s[i] == 'Z': b = i break print(b-a+1)
s945270175
p03814
u088488125
1593365942
Python
Python (3.8.2)
py
Runtime Error
26
9128
136
s=input() a_min=0 z_max=0 for i in s: if s[i]=="A": a_min=i break for i in s: if s[i]=="Z": z_max=i print(z_max-a_min+1)
s614953869
p03814
u971811058
1592762651
Python
Python (3.8.2)
py
Runtime Error
22
8876
571
#include<bits/stdc++.h> // Begin Header {{{ using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i,n) for(ll i=0; i<n; i++) #define loop(i, j, n) for(ll i=j; i<n; i++) #define all(x) (x).begin(), (x).end() constexpr int INF = 0x3f3f3f3f; const long long mod=1e9+7; const long double PI = acos(-1); // }}} End Header int main() { string s; cin >> s; int f1, f2; rep(i,s.length()){ if(s[i]=='A'){ f1=i; break; } } rep(i,s.length()){ if(s[i]=='Z') f2=i; } cout << f2-f1+1 << endl; return 0; }
s320512392
p03814
u981931040
1592581336
Python
Python (3.8.2)
py
Runtime Error
32
9068
5
ZABCZ
s806172154
p03814
u730769327
1591240628
Python
PyPy3 (2.4.0)
py
Runtime Error
181
55024
118
s=list(input()) a=s.index("A") for i in range(len(s),0): if s[i-1]=="Z": z=i-1 z-=len(s)-1 sum=z-a+1 print(sum)
s915861201
p03814
u594956556
1590557127
Python
Python (3.4.3)
py
Runtime Error
24
3516
185
s = input() for i in range(len(s)): if s[i] == 'A': left = i break for i in range(len(s)): if s[N-1-i] == 'Z': right = N-1-i break print(right - left + 1)
s820313469
p03814
u594956556
1590557037
Python
Python (3.4.3)
py
Runtime Error
19
3500
164
s = input() for i in range(N): if s[i] == 'A': left = i break for i in range(N): if s[N-1-i] == 'Z': right = N-1-i print(right - left + 1)
s640695013
p03814
u955691979
1590378836
Python
PyPy3 (2.4.0)
py
Runtime Error
184
40304
194
s = input() i = 0 j = len(s) -1 t1 = 0 t2 = 0 while True: if(s[i] == "A"): t1 = i if(s[j] == "Z"): t2 = j if(t1 != 0 and t2 != 0): break i += 1 j -= 1 print(t2-t1 +1)
s897796701
p03814
u021114240
1589584729
Python
PyPy3 (2.4.0)
py
Runtime Error
179
39788
326
import math import time from collections import defaultdict, deque from sys import stdin, stdout from bisect import bisect_left, bisect_right a=input() A=math.inf Z=0 for i in range(len(a)): if(a[i]=='A'): A=min(A,i) elif(a[i]=='Z'): Z=i ans=Z-A+1 if(ans==-math.inf): print(0) else: print(ans)
s543173375
p03814
u021114240
1589584621
Python
PyPy3 (2.4.0)
py
Runtime Error
180
39788
275
import math import time from collections import defaultdict, deque from sys import stdin, stdout from bisect import bisect_left, bisect_right a=input() A=math.inf Z=0 for i in range(len(a)): if(a[i]=='A'): A=min(A,i) elif(a[i]=='Z'): Z=i print(Z-A+1)
s837626310
p03814
u021114240
1589584531
Python
PyPy3 (2.4.0)
py
Runtime Error
172
39788
275
import math import time from collections import defaultdict, deque from sys import stdin, stdout from bisect import bisect_left, bisect_right a=input() A=math.inf Z=0 for i in range(len(a)): if(a[i]=='A'): A=min(A,i) elif(a[i]=='Z'): Z=i print(Z-A+1)
s217273188
p03814
u536034761
1589455694
Python
PyPy3 (7.3.0)
py
Runtime Error
77
68968
49
s = input() print(s.rfond("Z") - s.find("A") + 1)
s040172202
p03814
u760391419
1588887593
Python
Python (3.4.3)
py
Runtime Error
18
3512
129
S = input() a = -1 z = len(S) for i, c in enumerate(input()): if c == "A" and a == -1: a = i if c == "Z": z = i print(z-a+1)
s162767752
p03814
u728774856
1587919408
Python
Python (3.4.3)
py
Runtime Error
17
2940
299
s = list(input()) flag = 0 pos_a, pos_z = 1, 1 length = 0 for i, ltr in enumerate(s, 1): if ltr == 'A': pos_a = i flag = 1 elif ltr == 'Z' and flag == 1: pos_z = i if pos_z - (pos_a -1) > length: length = pos_z - (pos_a -1) else: flag = 0 print(length)
s936528500
p03814
u728774856
1587918976
Python
Python (3.4.3)
py
Runtime Error
17
2940
290
s = list(input()) flag = 0 pos_a, pos_z = 1, 1 length = 0 for i, ltr in enumerate(s, 1) if ltr == 'A': pos_a = i flag = 1 elif ltr == 'Z' and flag == 1: pos_z = i if pos_z - pos_a > length: length = pos_z - pos_a else: flag = 0 print(length)
s523637467
p03814
u728774856
1587918890
Python
Python (3.4.3)
py
Runtime Error
17
2940
302
s = list(input()) flag = 0 pos_a, pos_z = 1, 1 length = 0 for i, ltr in enumerate(s, 1) if ltr == 'A': pos_a = i flag = 1 elif ltr == 'Z': if flag == 1: pos_z = i if pos_z - pos_a > length: length = pos_z - pos_a else: flag = 0 print(length)
s312910351
p03814
u728774856
1587918838
Python
Python (3.4.3)
py
Runtime Error
17
2940
299
s = list(input()) flag = 0 pos_a, pos_z = 1 length = 0 for i, ltr in enumerate(s, 1) if ltr == 'A': pos_a = i flag = 1 elif ltr == 'Z': if flag == 1: pos_z = i if pos_z - pos_a > length: length = pos_z - pos_a else: flag = 0 print(length)
s316342626
p03814
u423665486
1587618052
Python
PyPy3 (2.4.0)
py
Runtime Error
194
40176
157
def resolve(): s = input() a = float('inf') z = 0 for i in s: if i == 'A': a = min(a, i) if i == 'Z': z = max(z, i) print(z - a + 1) resolve()
s736079842
p03814
u337626942
1587436036
Python
Python (3.4.3)
py
Runtime Error
17
3060
241
l=len(s) a=[] z=[] ans=0 for i in range(l): if s[i]=="A": a.append(i) elif s[i]=="Z": z.append(i) for i in range(len(a)): for j in range(len(z)): if abs(z[j]-a[i]+1)>=ans: ans=abs(z[j]-a[i]+1)
s043022808
p03814
u005469124
1587408384
Python
Python (3.4.3)
py
Runtime Error
18
3500
61
s = input() a = s.fin("A") z = s. find("Z") print(z - a + 1)
s299146431
p03814
u652656291
1587000052
Python
Python (3.4.3)
py
Runtime Error
18
2940
11
str.rfind()
s735169694
p03814
u852790844
1586454694
Python
Python (3.4.3)
py
Runtime Error
21
4840
125
s = list(input()) s1 = list(dropwhile(lambda x: x != 'A',s)) s2 = list(dropwhile(lambda x: x != 'Z',s1[::-1])) print(len(s2))
s678695218
p03814
u373047809
1586406547
Python
Python (3.4.3)
py
Runtime Error
17
3500
41
s = input() print(s.rfind(z)-s.find(a)+1)
s113517212
p03814
u757030836
1586286093
Python
Python (3.4.3)
py
Runtime Error
17
2940
184
s =input() A=0 Z=0 for i in range(len(s)): s[i] =="A": A +=i+1 break for j in range(len(s)): s[-(j+1)] =="Z": Z +=len(s)-j break print(Z-A+1)
s077531135
p03814
u757030836
1586285959
Python
Python (3.4.3)
py
Runtime Error
17
2940
179
s =input() A=0 Z=0 for i in range(len(s)): s[i] =="A": A=i+1 break for j in range(len(s)): s[-(j+1)] =="Z": Z=len(s)-j break print(Z-A+1)
s656282757
p03814
u679520304
1586152200
Python
PyPy3 (2.4.0)
py
Runtime Error
184
55024
62
s = list(input()) print(reversed(s).index("Z")-s.index("A")+1)
s650445829
p03814
u679520304
1586152133
Python
PyPy3 (2.4.0)
py
Runtime Error
177
55024
62
s = list(input()) print(s.reverse().index("Z")-s.index("A")+1)
s370234677
p03814
u679520304
1586152095
Python
PyPy3 (2.4.0)
py
Runtime Error
183
55024
60
s = list(input()) print(s.reverse.index("Z")-s.index("A")+1)
s859611002
p03814
u519939795
1586015333
Python
Python (3.4.3)
py
Runtime Error
18
2940
9
Not found
s431419942
p03814
u623819879
1584855951
Python
PyPy3 (2.4.0)
py
Runtime Error
175
40048
89
s=input() x=1e9 for i in range(len(s)): if i=='A':x=min(x,i) if i=='Z':y=i print(y-x+1)
s875084049
p03814
u045953894
1584321159
Python
Python (3.4.3)
py
Runtime Error
54
3516
340
import sys s = input() c = 0 C = 0 for i in range(len(s)): if s[i] == 'A': while(s[i] != 'Z'): c += 1 i += 1 if s[i] == 'Z': i += 1 c += 1 if s[i] == 'Z': c += 1 break else: continue break print(c)
s268858502
p03814
u075595666
1583971934
Python
Python (3.4.3)
py
Runtime Error
18
3516
75
s = input() t = s[::-1] a = s.index('a') z = t.index('z') print(len(s)-a-z)
s562017895
p03814
u075595666
1583971870
Python
Python (3.4.3)
py
Runtime Error
18
3500
75
s = input() t = s[::-1] a = s.index('a') z = t.index('z') print(len(s)-a-z)
s794007794
p03814
u075595666
1583970704
Python
Python (3.4.3)
py
Runtime Error
18
2940
73
s = input t = s[::-1] a = s.index('a') z = t.index('z') print(len(s)-a-z)
s854276307
p03814
u697696097
1583727539
Python
Python (3.4.3)
py
Runtime Error
18
3516
325
import sys def yn(b): print("Yes" if b==1 else "No") return def resolve(): readline=sys.stdin.readline ss=readline().strip() n=0 a=100000000 z=0 for s in sss: if s=="A": a=min(a,n) elif s=="Z": z=n n+=1 print(z-a+1) return resolve()
s403209312
p03814
u606523772
1583678278
Python
Python (3.4.3)
py
Runtime Error
41
6308
229
S = list(input()) ans = [] for i in range(1, len(S)-1): if S[i]=="A": ans.append(i) break T = S[::-1] for i in range(len(T)): if T[i]=="Z": ans.append(i) break print((len(S)-ans[0])-ans[1])
s910748122
p03814
u829796346
1583231657
Python
Python (3.4.3)
py
Runtime Error
17
3500
111
s=input() ia=None iz=None for i,c in s: if ia==None and c=="a": ia=i if c=="z": iz=i print(iz-ia+1)
s168883923
p03814
u744034042
1583018484
Python
Python (3.4.3)
py
Runtime Error
24
3512
153
s = input() t = 0 u = 0 n = len(s) for i in range(n): if s[i] == "A": t = i break for j in range(n): if s[n-j] == "Z": u = n-j print(u-t)
s939773738
p03814
u375695365
1582778758
Python
Python (3.4.3)
py
Runtime Error
96
5092
176
s=list(map(str,input())) #print(s) ans=0 for i in range(len(s)): if s[i]=='A': sa=i if s[i]=='Z': #print("VBHJ") ans=max(ans,i-sa+1) print(ans)
s696428510
p03814
u914330401
1582571165
Python
Python (3.4.3)
py
Runtime Error
17
2940
321
#include <iostream> using namespace std; int main() { string s; cin >> s; int min_a = s.size(), max_z = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == 'A' and i < min_a) { min_a = i; } if (s.at(i) == 'Z' and i > max_z) { max_z = i; } } cout << max_z - min_a + 1 << endl; }
s712776975
p03814
u914330401
1582571153
Python
Python (3.4.3)
py
Runtime Error
18
2940
321
#include <iostream> using namespace std; int main() { string s; cin >> s; int min_a = s.size(), max_z = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == 'A' and i < min_a) { min_a = i; } if (s.at(i) == 'Z' and i > max_z) { max_z = i; } } cout << max_z - min_a + 1 << endl; }
s514911952
p03814
u914330401
1582571083
Python
Python (3.4.3)
py
Runtime Error
17
2940
321
#include <iostream> using namespace std; int main() { string s; cin >> s; int min_a = s.size(), max_z = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == 'A' and i < min_a) { min_a = i; } if (s.at(i) == 'Z' and i > max_z) { max_z = i; } } cout << max_z - min_a + 1 << endl; }
s551900157
p03814
u408375121
1582123461
Python
Python (3.4.3)
py
Runtime Error
17
3512
183
S = input() list_A = [] list_Z = [] for i in range(len(S)): if s[i] == 'A': list_A.append(i) if s[i] == 'Z': list_Z.append(i) a = list_A[0] z = list_Z[-1] print(z - a + 1)
s942689384
p03814
u796708718
1581283526
Python
Python (3.4.3)
py
Runtime Error
22
6180
63
s = list(input()) print(len(s[s.index("A"):s.index("Z",-1)]+1))
s639580794
p03814
u127499732
1581138580
Python
Python (3.4.3)
py
Runtime Error
17
3500
56
s=str(input()) a,b=s.find("A"),s,rfind("Z") print(b-a+1)
s271643382
p03814
u257018224
1581015175
Python
Python (3.4.3)
py
Runtime Error
17
3512
100
s=input() N=len(s) f=s.index("a") F=0 for i in range(N): if s[i]=="z": F==i print(F-f+1)
s675094083
p03814
u257018224
1581015080
Python
Python (3.4.3)
py
Runtime Error
17
3516
98
s=input() N=len(s) f=s.index("a") F=0 for i in range(N): if s[i]==z: F==i print(F-f+1)
s688810403
p03814
u182594853
1581012256
Python
Python (3.4.3)
py
Runtime Error
23
3512
232
s=str(input()) L=len(s) start=0 end=0 for i in range(L): if s[i] =="A": start = s.index(s[i]) break for k in range(L,0,-1): if s[k] =="Z": end = s.index(s[i]) break Ans=end-start+1 print(Ans)
s645833839
p03814
u113971909
1580666453
Python
Python (3.4.3)
py
Runtime Error
18
3516
77
s=input() st=s.index('A') t=s t.reverse() en=t.index('Z') print(len(s)-st-en)
s341400604
p03814
u121921603
1579052365
Python
PyPy3 (2.4.0)
py
Runtime Error
179
40048
189
import sys input = sys.stdin.readline s=input().strip() for i in range(len(s)): if s[i]=="A": sa=i for i in range(len(s)): if s[i]=="Z": sz=i print(len(s[si:sz+1]))
s610138722
p03814
u143903328
1578166626
Python
Python (3.4.3)
py
Runtime Error
18
3512
430
m,n = map(int,input().split()) a = []*m b = []*n flag = False for i in range(m): a.append(input()) for j in range(n): b.append(input()) for i in range(0, m-n):#比較開始を縦方向に動かす for j in range(0, m-n):#比較開始を横方向へ動かす for k in range(0,n): if b[k] != a[i][j:j+n]: break flag = True if flag: print('Yes') else: print('No')
s876713181
p03814
u143903328
1578166542
Python
Python (3.4.3)
py
Runtime Error
19
3516
430
m,n = map(int,input().split()) a = []*m b = []*n flag = False for i in range(m): a.append(input()) for j in range(n): b.append(input()) for i in range(0, m-n):#比較開始を縦方向に動かす for j in range(0, m-n):#比較開始を横方向へ動かす for k in range(0,n): if b[k] != a[i][j:j+n]: break flag = True if flag: print('Yes') else: print('No')
s498977539
p03814
u143903328
1578166500
Python
Python (3.4.3)
py
Runtime Error
19
3516
430
m,n = map(int,input().split()) a = []*m b = []*n flag = False for i in range(m): a.append(input()) for j in range(n): b.append(input()) for i in range(0, m-n):#比較開始を縦方向に動かす for j in range(0, m-n):#比較開始を横方向へ動かす for k in range(0,n): if b[k] != a[i][j:j+n]: break flag = True if flag: print('Yes') else: print('No')
s214987927
p03814
u506858457
1578011121
Python
Python (3.4.3)
py
Runtime Error
23
3512
148
S=input() N=len(S) for i in range(N): if S[i]=='A': A=i break for i in range(N,0): if S[i]=='Z': Z=i break ans=Z-A+1 print(ans)
s921595634
p03814
u963468276
1577832338
Python
PyPy3 (2.4.0)
py
Runtime Error
193
61552
235
S = list(input()) num_first = 0 num_last = 0 for i in range(len(S)): if S[i] == 'A': num_first = i break for j in range(num_first, len(S)+1): if S[j] == 'Z': num_last = j print(num_last - num_first + 1)
s348082322
p03814
u311669106
1577309766
Python
Python (3.4.3)
py
Runtime Error
18
3500
45
print(input().rfind("Z")-input().find("A")+1)
s782943807
p03814
u311669106
1577120273
Python
Python (3.4.3)
py
Runtime Error
17
3500
45
print(input().rfind("Z")-input().find("A")+1)
s923806799
p03814
u006425112
1577022418
Python
Python (3.4.3)
py
Runtime Error
18
3500
49
s = input() print(s.rfind("Z") - s.fine("A") + 1)
s325085433
p03814
u311669106
1576687697
Python
Python (3.4.3)
py
Runtime Error
18
3500
52
s=input() print(max(s.index("Z"))-min(s.index('A')))
s351705108
p03814
u311669106
1576687659
Python
Python (3.4.3)
py
Runtime Error
17
3516
57
s=input() print(abs(min(s.index('A'))-max(s.index("Z"))))
s587439592
p03814
u470359972
1573489525
Python
Python (3.4.3)
py
Runtime Error
18
3516
184
s=input() sento=0 matubi for i in range(s): if s[i] == "A": sento=i break for i in range(s): if s[i] == "Z" and i > sento: matubi=i break print(s[sento+1:matubi+1])
s143137797
p03814
u470359972
1573489493
Python
Python (3.4.3)
py
Runtime Error
17
3516
182
s=input() sento=0 matubi for i in range(s): if s[i] == "A": sento=i break for i in range(s): if s[i] == "Z" and i > sento: matubi=i break print(s[sento:matubi+1])
s945531766
p03814
u923659712
1572566815
Python
Python (3.4.3)
py
Runtime Error
18
3500
236
# -*- coding: utf-8 -*- # input s = input() # solve for f in range(len(s)): if s[i] == 'A': a = i break for f in reversed(range(len(s))): if s[i] == 'Z': z = i break # output print(z - a + 1)
s198192663
p03814
u923659712
1572566752
Python
Python (3.4.3)
py
Runtime Error
17
2940
199
s = str(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': z = i break print(z - a + 1)
s733290730
p03814
u254871849
1572395990
Python
Python (3.4.3)
py
Runtime Error
58
3516
218
s = input() for i in range(len(s)): if s[i] == 'A': a_index = i for j in range(-1, -(len(s)-a_index), -1): if s[j] == 'Z': z_index = j length = (len(s) + z_index) - a_index + 1 print(length)
s161357607
p03814
u884657429
1571353360
Python
Python (3.4.3)
py
Runtime Error
17
2940
591
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String input = sc.next(); int first = -1, last = -2; for (int i = 0; i < input.length(); i++) { if(input.charAt(i) == 'A'){ first = i; break; } } for(int i = input.length() - 1; i >= 0; i--){ if(input.charAt(i) == 'Z'){ last = i; break; } } System.out.println(last - first + 1); } }
s175812662
p03814
u602863587
1571013965
Python
Python (3.4.3)
py
Runtime Error
17
3060
292
s=str(input()) S=int() G=int() #Sに最初のAのインデックスを取得 for i in range(len(s)): if s[i]=='A': S=s.index(s[i]) break ss=s[::-1] #Gに最後のZのインデックスを取得 for j in range(len(ss)): if ss[j]=='Z': G=len(ss)-j-1 break print(G-S+1
s259500610
p03814
u602863587
1571007399
Python
Python (3.4.3)
py
Runtime Error
17
2940
193
s=str(input()) S=int() G=int() for i in range(len(s)): if s[i]=='a': S=s.index(s[i]) break for i in reversed(range(len(s))): if s[i]=='z': G=s.index(s[i]) break print(G-S+1