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
s056290709
p03672
u216962796
1523629426
Python
Python (3.4.3)
py
Runtime Error
17
3052
114
print((lambda s:[s for s in reversed(range(len(s))) if len(s)%2==0 and s[:len(s)//2]==s[len(s)//2:]][0])(input()))
s473952444
p03672
u403355272
1522438088
Python
Python (3.4.3)
py
Runtime Error
17
2940
131
S = input() for i in range(len(S) -1,-1,-1): if i % 2 != 0: continue if s[:i // 2] == s[i // 2:i]: print(i) break
s559153243
p03672
u667949809
1520469486
Python
Python (3.4.3)
py
Runtime Error
17
2940
157
s = input() for i in range(len(s)): s = s[:-1] if len(s)%2 == 0: if s[:len(s)/2] == s[len(s)/2:]: print(len(s)) break
s988991759
p03672
u046136258
1515278267
Python
Python (3.4.3)
py
Runtime Error
18
3064
580
Beta paiza.IO 新規コード 一覧 ウェブ開発 New! 日本語 サインアップ ログイン Python3 Split Button! Enter a title here Main.py Success 

 1 2 3 4 5 6 7 8 9 10 11 12 13 def chunked(iterable, n): return [iterable[x:x + n] for x in range(0, len(iterable), n)] s=input() for i in range(1,len(s)): a=s[:(-1*i)] if len(a)>1: ...
s698019636
p03672
u858136677
1507816913
Python
Python (3.4.3)
py
Runtime Error
20
3188
220
s = str(input()) n = len(s) s = s.rstrip(s[n-1]) for i in range(n): a = len(s) if (a % 2) == 0: ss = s[0:a//2] if s.count(ss) == 2: print(a) break else: s = s.rstrip(s[a-1]) else: s = s.rstrip(s[a-1])
s596172730
p03672
u858136677
1507816745
Python
Python (3.4.3)
py
Runtime Error
17
3060
241
s = str(input()) n = len(s) s = s.rstrip(s[n-1]) for i in range(n): a = len(s) if (a % 2) == 0: ss = s[0:a//2] print(s.count(ss)) if s.count(ss) == 2: print(a) break else: s = s.rstrip(s[a-1]) else: s = s.rstrip(s[a-1])
s166052640
p03672
u650245944
1501763964
Python
Python (3.4.3)
py
Runtime Error
17
2940
165
#!/usr/bin # -*- coding:"utf-8" -*- s = input() sn = len(s) if sn % 2 == 1: sn = sn -1 for i in range(sn, 0, -2) if s[:i/2] == s[i/2:]: break print(s[:i])
s934638008
p03672
u240502040
1500252308
Python
Python (3.4.3)
py
Runtime Error
17
3060
261
if __name__ == "__main__": s = input() data = list(s) while len(data): data.pop() if len(data) % 2 == 0: if data[:len(data) / 2] == data[len(data) / 2 + 1:]: print(len(data) / 2) break
s265556808
p03672
u889811773
1500135829
Python
Python (3.4.3)
py
Runtime Error
18
3060
174
s = input() s = s[:-1] if len(s) % 2 != 0: s = s[:-1] while(True): s1, s2 = zip(*[iter(s)]*2) if s1 is s2: print(s1) break s = s[:-2]
s053776412
p03672
u889811773
1500135764
Python
Python (3.4.3)
py
Runtime Error
18
3060
169
s = input() s = a[:-1] if len(s) % 2 != 0: s = s[:-1] while(True): s1, s2 = zip(*[iter(s)]*2) if s1 is s2: print(s1) break s = s[:-2]
s333787162
p03672
u085883871
1499734157
Python
Python (3.4.3)
py
Runtime Error
17
2940
124
s = input() for i in reversed(range(1, int((len(s)-1)/2+1))): if(s[:i] == s[i:2*i]): print(2*i) return
s886470334
p03672
u078200872
1499722815
Python
Python (2.7.6)
py
Runtime Error
11
2568
267
string = [] l = raw_input().split() length = len(l) for i in range(length): string.append(l[i]) for j in range(length): string.pop(-1) string.pop(-1) num = len(string)/2 if string[0:num] == string[num+1:len(string)]: print len(string) + 1 break else: pass
s678522340
p03672
u078200872
1499722771
Python
Python (2.7.6)
py
Runtime Error
10
2568
267
string = [] l = raw_input().split() length = len(l) for i in range(length): string.append(l[i]) for j in range(length): string.pop(-1) string.pop(-1) num = len(string)/2 if string[0:num] == string[num+1:len(string)]: print len(string) + 1 break else: pass
s793992923
p03672
u343437894
1499644775
Python
Python (3.4.3)
py
Runtime Error
17
2940
216
s = input() def iseven(str, n): for i in range(0, n/2): if str[i] != str[i+n/2]: return False else: return True for i in range(2, n, 2): if iseven(s, n-i): print(i)
s319168192
p03672
u166538981
1499278213
Python
Python (3.4.3)
py
Runtime Error
17
3056
124
def f(x): return len(x) % 2 == 0 and x[:len(x)/2] == x[len(x)/2:] x=input() while not f(x): x=x[:-1] print(len(x))
s197983644
p03672
u166538981
1499278139
Python
Python (3.4.3)
py
Runtime Error
17
2940
118
def f(x): return len(x) % 2 == 0 and x[:len(x)/2] == x[len(x)/2:] x=input() while f(x): x=x[:-1] print(len(x))
s056815053
p03672
u552668967
1498964423
Python
Python (2.7.6)
py
Runtime Error
10
2568
125
from sys import stdin s = stdin.readline().strip() n = len(s) n-=2 while True: if s[n/2]== s[n/2+1:n]: break n-=2 print n
s407961174
p03672
u855200003
1498960295
Python
Python (3.4.3)
py
Runtime Error
17
3064
415
S = list(input()) length = len(S) if length == 2: ans = 0 if length % 2 == 1: length -= 1 ans = 0 else: length -= 2 def hantei(list_str,n): k = int(n/2) if list_str[0:k] == list_str[k:n]: return n else: return 0 while length != 2: ans = hantei(S,length) if a...
s930973194
p03672
u855200003
1498958809
Python
Python (3.4.3)
py
Runtime Error
17
3060
375
S = list(input()) length = len(S) if length % 2 == 1: length -= 1 else: length -= 2 def hantei(list_str,n): k = int(n/2) if list_str[0:k] == list_str[k:n]: return n else: return 0 while length != 2: ans = hantei(S,length) if ans != 0: break lengt...
s940390708
p03672
u780709476
1498958637
Python
Python (3.4.3)
py
Runtime Error
16
2940
130
S = input() for i in range(len(S) - 1, 0, -1): if(S[0:i//2] == S[i//2:i]): print(i) break
s196987157
p03673
u043844098
1601009108
Python
Python (3.8.2)
py
Runtime Error
41
13972
694
from collections import deque from typing import List def main(): n = int(input()) v = input().split("") print(pp(n, v)) def pp(n: int, v: List[str]) -> List[str]: x = [] y = deque([]) if n % 2 == 0: for i in range(n): if i % 2 == 0: y.append(v[i]) ...
s836302585
p03673
u043844098
1601009018
Python
Python (3.8.2)
py
Runtime Error
41
13964
696
from collections import deque from typing import List def main(): n = int(input()) v = [input().split("")] print(pp(n, v)) def pp(n: int, v: List[str]) -> List[str]: x = [] y = deque([]) if n % 2 == 0: for i in range(n): if i % 2 == 0: y.append(v[i]) ...
s520946097
p03673
u620846115
1600873932
Python
Python (3.8.2)
py
Runtime Error
2206
31128
285
n = int(input()) l = list(map(int,input().split())) a = [l[0]] if n % 2 ==1: for i in range(1,n): if i % 2 == 1: a.insert(0,l[i]) else: a.append(l[i]) else: for i in range(1,n): if i % 2 == 1: a.appen(l[i]) else: a.insert(0,l[i]) print(a)
s891799452
p03673
u620846115
1600873222
Python
Python (3.8.2)
py
Runtime Error
2206
30972
117
n = int(input()) l = list(map(int,input().split())) a = [] for i in range(n): a.append(l[i]) a = a[::-1] pritn(a)
s988348567
p03673
u758933970
1600495920
Python
PyPy3 (7.3.0)
py
Runtime Error
173
74508
61
input() input = list(input()) print(*input[::-2], *input[::2]
s722122596
p03673
u758933970
1600495745
Python
PyPy3 (7.3.0)
py
Runtime Error
98
74660
53
input = list(input()) print(*input[::-2], *input[::2]
s922521295
p03673
u748722044
1599259250
Python
PyPy3 (7.3.0)
py
Runtime Error
153
94196
237
from collections import deque n = int(input()) a = list(map(int, input().split())) order = n%2 ans = deque([]) for i in range(n): if i%2 == order: ans.append(a[i]) else: ans.appendleft(a[i]) print(' '.join(ans))
s631911612
p03673
u748722044
1599259231
Python
PyPy3 (7.3.0)
py
Runtime Error
152
106588
239
from collections import deque n = int(input()) a = list(map(int, input().split())) order = n%2 ans = deque([]) for i in range(n): if i & 1 == order: ans.append(a[i]) else: ans.appendleft(a[i]) print(' '.join(ans))
s878317355
p03673
u655048024
1598373106
Python
Python (3.8.2)
py
Runtime Error
26
8956
293
n = int(input()) a = list(map(int,input().split())) b = [] for i in range(n): b.append(0) k = 0 if(n%2==1): k = (n-1)//2 else: k = n//2 for i in range(n): if(i%2==0): print(a[i]) print(k+i//2) b[k+i//2]=a[i] else: print(a[i]) b[k-(i+1)//2]=a[i] print(b)
s879246100
p03673
u655048024
1598372639
Python
Python (3.8.2)
py
Runtime Error
137
30832
237
n = int(input()) a = list(map(int,input().split())) b = [] for i in range(n): b.append(0) k = 0 if(n%2==1): k = (n-1)/2 else: k = n//2 for i in range(n): if(i%2==0): b[k+i//2]==a[i] else: b[k-i//2]==a[i] print(b)
s857879205
p03673
u655048024
1598372588
Python
Python (3.8.2)
py
Runtime Error
108
30976
241
n = int(input()) a = list(map(int,input().split())) b = [] for i in range(n): b.append(0) k = 0 if(n%2==1): k = (n-1)/2 else: k = n//2 for i in range(n): if(i%2==0): b[k+i]==a[i] else: b[k-i]==a[i] print(b)
s910722354
p03673
u655048024
1598372563
Python
Python (3.8.2)
py
Runtime Error
101
30848
232
n = int(input()) a = list(map(int,input().split())) b = [] for i in range(n): b.append(0) k = 0 if(n%2==1): k = (n-1)/2 else: k = n//2 for i in range(n): if(i%2==0): b[k+i]==a[i] else: b[k-i]==a[i]
s819591552
p03673
u856775981
1598285927
Python
Python (3.8.2)
py
Runtime Error
24
9004
18
!pip install numpy
s189892832
p03673
u312078744
1598137013
Python
Python (3.8.2)
py
Runtime Error
161
34968
487
n = int(input()) a = list(map(int, input().split())) b = [] ''' b = [str(a[0])] if (n == 1): print(a[0]) exit() a = a[1:] for i in a: b.append(str(i)) b.reverse() ''' loop = int(n / 2) loop_rest = n - loop for i in range(loop): tar_index = (n - 1) - 2 * i tar = a[tar_index] b.append(str...
s673381604
p03673
u706984643
1598093081
Python
PyPy3 (7.3.0)
py
Runtime Error
222
106208
454
import math from collections import defaultdict,deque from itertools import permutations ml=lambda:map(int,input().split()) ll=lambda:list(map(int,input().split())) ii=lambda:int(input()) ip=lambda:list(input()) ips=lambda:input().split() """========main code===============""" t=1 #t=ii() for _ in range(t): n=ii()...
s886325169
p03673
u609814378
1597617108
Python
Python (3.8.2)
py
Runtime Error
1818
30984
364
N = int(input()) A = list(map(int, input().split())) mae = [] usiro = [] #0の時に前 1の時に後ろ Flag = 0 for i in reversed(range(0,N,1)): if Flag == 0: # 前の時 mae.append(A[i]) Flag = 1 else: usiro.insert(0,A[i]) Flag = 0 moziretu = (mae + usiro) moziretu = ''.join(moziretu) print(...
s891601406
p03673
u681444474
1597540292
Python
Python (3.8.2)
py
Runtime Error
164
38172
439
# coding: utf-8 import math from collections import deque n = int(input()) #x, y = map(int,input().split()) A = list(map(int,input().split())) ans = 0 B = deque() if n%2==0: for i in range(n): a=str(A[i]) if i%2==1: B.appendleft(a) else: B.append(a) if n%2==1: for...
s176959101
p03673
u036104576
1596689239
Python
Python (3.8.2)
py
Runtime Error
148
30880
252
n = int(input()) A = list(map(int, input().split())) from collections import deque b = deque([]) for i, a in enumerate(A): if i % 2 == 0: b.append(a) else: b.appendleft(a) if n % 2 == 0: print(*b) else: print(*b[::-1])
s895072506
p03673
u814986259
1594950567
Python
Python (3.8.2)
py
Runtime Error
146
32500
279
import collections n = int(input()) a = list(map(int, input().split())) b = collections.deque() flag = True for x in a: if flag: b.append(x) flag = False else: b.appendleft(x) flag = True if flag: print(*b) else: print(*b[::-1])
s613646824
p03673
u350093546
1592763174
Python
Python (3.8.2)
py
Runtime Error
2206
31040
111
n=int(input()) a=list(map(int,input().split())) b=[] for i in a: b.append(i) b.reverse() print(' '.join(b))
s142108511
p03673
u261103969
1592381038
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38256
365
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): n = int(readline()) a = list(map(int, readline().split())) odd = a[0::2] even = a[1::2] if n % 2 == 0: print(*even[::-1], *odd) else: print(*odd[::-1], *e...
s909242585
p03673
u344065503
1591763244
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[N%2::2])
s179450858
p03673
u344065503
1591763206
Python
PyPy3 (2.4.0)
py
Runtime Error
165
38256
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2]+*A[N%2::2])
s278375852
p03673
u344065503
1591763172
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38384
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[N%2::2])
s787664734
p03673
u642883360
1591368868
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38384
130
n = int(input()) A = list(map(int, input().split())) if len(A) % 2: print(*A[-1::-2], *A[1::2]) else: print(*A[-1::-2], *A[::2])
s511533066
p03673
u344065503
1591327746
Python
PyPy3 (2.4.0)
py
Runtime Error
163
38500
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[N%2::2])
s258942694
p03673
u593567568
1591217462
Python
Python (3.4.3)
py
Runtime Error
165
28992
257
from collections import deque N = int(input()) A = list(map(int,input().split())) ANS = deque() for i in range(N): if i % 2 == 0: ANS.append(A[i]) else: ANS.appendleft(A[i]) if N % 2 == 1: ANS = ANS[::-1] print("".join(map(str,ANS)))
s323889099
p03673
u954774382
1591134792
Python
PyPy3 (2.4.0)
py
Runtime Error
177
38256
1116
import sys from functools import lru_cache, cmp_to_key from heapq import merge, heapify, heappop, heappush from math import * # import math from collections import defaultdict as dd, deque, Counter as C from itertools import combinations as comb, permutations as perm from bisect import bisect_left as bl, bisect_right a...
s410596708
p03673
u138869642
1590873032
Python
Python (3.4.3)
py
Runtime Error
52
19152
239
n = int(input()) a = list(map(str, input().split())) a_even = list(filter(lambda x: x % 2 == 0, a)) a_odd = list(filter(lambda x: x % 2 != 0, a)) ans = a_even[::-1] + a_odd if n % 2 != 0: ans = ans[::-1] print(' '.join(map(str, ans)))
s554889691
p03673
u138869642
1590873008
Python
Python (3.4.3)
py
Runtime Error
37
20012
223
n = int(input()) a = input().split() a_even = list(filter(lambda x: x % 2 == 0, a)) a_odd = list(filter(lambda x: x % 2 != 0, a)) ans = a_even[::-1] + a_odd if n % 2 != 0: ans = ans[::-1] print(' '.join(map(str, ans)))
s402411277
p03673
u726872801
1590871669
Python
Python (3.4.3)
py
Runtime Error
17
2940
1318
import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.*; public class Main { long MOD = (long) 1e9 + 7; InputStream in; OutputStream out; public Main() { this(System.in, System.out); } public Main(InputStream in, OutputStream out) { ...
s626241033
p03673
u383450070
1590851954
Python
Python (3.4.3)
py
Runtime Error
17
2940
13
6 0 6 7 6 7 0
s087725921
p03673
u075304271
1590590845
Python
Python (3.4.3)
py
Runtime Error
71
25412
302
import collections def solve(): n = int(input()) a = list(map(int, input().split())) b = collections.deque() for i in range(n): if i % 2 == n % 2: b.append(a[i]) else: b.insert(0,a[i]) b = map(str, b) print(" ".join(b)) return 0 if __name__ == "__main__": solve()
s532442600
p03673
u075304271
1590590802
Python
Python (3.4.3)
py
Runtime Error
219
35616
398
import numpy as np import functools import math import collections import scipy import fractions import itertools def solve(): n = int(input()) a = list(map(int, input().split())) b = collections.deque() for i in range(n): if i % 2 == n % 2: b.append(a[i]) else: b.insert(0,a[i]) b = map(s...
s593605936
p03673
u075304271
1590590042
Python
Python (3.4.3)
py
Runtime Error
214
35600
394
import numpy as np import functools import math import collections import scipy import fractions import itertools def solve(): n = int(input()) a = list(map(int, input().split())) b = collections.deque() for i in range(n): if i % 2 == 1: b.insert(0,a[i]) else: b.append(a[i]) b = map(str, ...
s862263198
p03673
u054514819
1590544736
Python
Python (3.4.3)
py
Runtime Error
121
27296
271
n = int(input()) As = list(map(str, input().split())) from collections import deque b = [] b = deque(b) for i, a in enumerate(As): if i%2==0: b.append(a) else: b.appendleft(a) if n%2==0: print(' '.join(b)) else: print(' '.join(b[::-1]))
s712418202
p03673
u453642820
1590437246
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
n=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[n%2::2])
s620913995
p03673
u453642820
1590437166
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
n=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[n%2::2])
s384050438
p03673
u103902792
1590254273
Python
Python (3.4.3)
py
Runtime Error
202
25156
214
n = int(input()) A = list(map(int,input().split())) from collections import deque B = deque([]) for i in range(n): if i %2: B.appendleft(A[i]) else: B.append(A[i]) if n%2: B = B[::-1] print(*B)
s109858547
p03673
u103902792
1590254158
Python
PyPy3 (2.4.0)
py
Runtime Error
268
86356
177
n = int(input()) A = list(map(int,input().split())) B = [] for i in range(n): if i %2: B = [A[i]] + B else: B = B.append(A[i]) if n%2: B = B[::-1] print(*B)
s160412421
p03673
u493130708
1590215559
Python
PyPy3 (2.4.0)
py
Runtime Error
185
38256
3269
# -*- 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...
s381681350
p03673
u645436608
1589722593
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[N%2::2])
s417802379
p03673
u645436608
1589722506
Python
Python (3.4.3)
py
Runtime Error
17
2940
73
N=int(input()) A=list(map(int,input().split()) print(*A[::-2],*A[N%2::2])
s396299331
p03673
u645436608
1589722480
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[N%2::2])
s963632006
p03673
u948522631
1587921021
Python
Python (3.4.3)
py
Runtime Error
17
2940
622
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = Integer.parseInt(scan.next()); Vector<Integer> left = new Vector<>(); Vector<Integer> right= new Vector<>(); for (int i = 0;i < n; ++i){ if (i%2 == 0){ right.add(Integer.par...
s209257217
p03673
u437215432
1587914089
Python
Python (3.4.3)
py
Runtime Error
17
2940
245
n = int(input()) a = list(map(int, input().split())) even = [] odd = [] for i in range(n): if i % 2: even.append(a[i]) else: odd.append(a[i]) if n % 2 == 0: print(*even[::-1], *odd) else: print(*odd[::-1], *even)
s358044207
p03673
u695079172
1587144314
Python
Python (3.4.3)
py
Runtime Error
140
25528
331
from collections import deque n = int(input()) lst = list(map(int,input().split())) reverse = False b = deque() for a in lst: if reverse: b.appendleft(a) else: b.append(a) reverse = not reverse answer =[] if reverse: while b: answer.append(b.pop()) else: while b: answer.append(b.popleft()) print(" ".jo...
s300538798
p03673
u787449825
1587074493
Python
Python (3.4.3)
py
Runtime Error
69
25416
230
from collections import deque n = int(input()) a = list(map(int, input().split())) s = deque([]) for i in range(n): if i%2==1: s.insert(0, a[i]) else: s.append(a[i]) if n%2 == 1: s.reverse() print(*s)
s434517374
p03673
u787449825
1587074242
Python
Python (3.4.3)
py
Runtime Error
71
25412
232
from collections import deque n = int(input()) a = list((map(int, input().split()))) s = deque([]) for i in range(n): if i%2==1: s.insert(0, a[i]) else: s.append(a[i]) if n%2 == 1: s.reverse() print(*s)
s804090386
p03673
u787449825
1587074033
Python
Python (3.4.3)
py
Runtime Error
96
25540
204
from collections import deque n = int(input()) a = list((map(int, input().split()))) s = deque([]) for i in range(n): if i%2==1: s.insert(0, a[i]) else: s.append(a[i]) print(*s)
s019425491
p03673
u011062360
1587050917
Python
Python (3.4.3)
py
Runtime Error
69
25412
258
from collections import deque n = int(input()) list_A = list(map(int, input().split())) ans = deque() for i in range(n): if i % 2 == 0: ans.append(list_A[i]) else: ans.insert(0, list_A[i]) if n % 2 == 1: ans.reverse() print(*ans)
s212001267
p03673
u440161695
1586965254
Python
Python (3.4.3)
py
Runtime Error
17
2940
212
from collections import deque N=int(input()) A=list(map(int,input().split())) l=deque() for i in range(N): if i%2==0: l.append(A[i]) else: l.appendleft(A[i]) print(*l if N%2==0 else *list(revrsed(l)))
s477827284
p03673
u440161695
1586964206
Python
Python (3.4.3)
py
Runtime Error
71
25416
152
from collections import deque N=int(input()) A=list(map(int,input().split())) B=[] for i in range(N): B.append(A[i]) B=reversed(B) print("".join(B))
s065062117
p03673
u254871849
1586845264
Python
Python (3.4.3)
py
Runtime Error
202
25948
295
import sys from collections import deque n, *a = map(int, sys.stdin.read().split()) def main(): b = deque() for i in range(n): if (i & 1): b.appendleft(a[i]) else: b.append(a[i]) if (n & 1): b = b[::-1] print(*b, sep=' ') if __name__ == '__main__': main()
s659052769
p03673
u478266845
1586791222
Python
Python (3.4.3)
py
Runtime Error
205
34196
259
import numpy as np n = int(input()) a = [int(i) for i in input().split()] begin = a[0::2] end =a[1::0] if n%2 == 0: end = end[:-1] ans = np.concatenate(end,begin) else: begin = begin[::-1] ans = np.concatenate(begin,end) print(ans)
s867926591
p03673
u852790844
1586645352
Python
Python (3.4.3)
py
Runtime Error
66
26016
129
n = int(input()) a = list(map(int,input().split())) b = deque() for i in range(n): b.append(a[i]) b.reverse() print(*b)
s220102449
p03673
u271934630
1586307235
Python
Python (3.4.3)
py
Runtime Error
17
2940
231
import sys stdin = sys.stdin sys.setrecursionlimit(10 ** 7) i_i = lambda: int(i_s()) i_l = lambda: list(map(int, stdin.readline().split())) i_s = lambda: stdin.readline().rstrip() n = i_i() a = i_l() print(*a[::-2],*a[n%2::2])
s241852415
p03673
u271934630
1586307169
Python
Python (3.4.3)
py
Runtime Error
17
2940
230
import sys stdin = sys.stdin sys.setrecursionlimit(10 ** 7) i_i = lambda: int(i_s()) i_l = lambda: list(map(int, stdin.readline().split())) i_s = lambda: stdin.readline().rstrip() n = i_i() a = i_l() print(*a[::-2],*a[n%2::2])
s987780705
p03673
u837240662
1586304197
Python
Python (3.4.3)
py
Runtime Error
2109
124420
760
import sys sys.setrecursionlimit(100000) def main(): n = int(input()) data = list(map(int, input().split())) if n == 1: print(data[0]) elif n == 2: print(data[1], data[0]) else: firs_value = [data[0]] second_value = [data[1], data[0]] def get_value(index, d...
s815922256
p03673
u837240662
1586303604
Python
PyPy3 (2.4.0)
py
Runtime Error
392
94804
583
n = int(input()) data = list(map(int, input().split())) if n == 1: print(data[0]) elif n == 2: print(data[1], data[0]) else: firs_value = [data[0]] second_value = [data[1], data[0]] def get_value(index, data): if index == 0: return firs_value elif index == 1: ...
s288899227
p03673
u837240662
1586303408
Python
PyPy3 (2.4.0)
py
Runtime Error
377
93396
718
def main(): n = int(input()) data = list(map(int, input().split())) if n == 1: print(data[0]) elif n == 2: print(data[1], data[0]) else: firs_value = [data[0]] second_value = [data[1], data[0]] def get_value(index, data): if index == 0: ...
s224682369
p03673
u837240662
1586303292
Python
PyPy3 (2.4.0)
py
Runtime Error
165
38256
723
def main(): n = int(input()) data = list(map(int, input().split())) if n == 1: print(data[0]) elif n == 2: print(data[1], data[0]) else: firs_value = [data[0]] second_value = [data[1], data[0]] def get_value(index, data): if index == 0: ...
s623579724
p03673
u837240662
1586303213
Python
PyPy3 (2.4.0)
py
Runtime Error
168
38256
721
def main(): n = int(input()) data = list(map(int, input().split())) if n == 1: print(data[0]) elif n == 2: print(data[1], data[0]) else: firs_value = [data[0]] second_value = [data[1], data[0]] def get_value(index, data): if index == 0: ...
s896166023
p03673
u038408819
1586027282
Python
Python (3.4.3)
py
Runtime Error
1486
145924
461
N = int(input()) a = list(map(int, input().split())) from collections import deque b = deque([]) if len(a) % 2 == 0: for i in range(1, N + 1): print(b) if i % 2 == 0: b.appendleft(a[i - 1]) else: b.append(a[i - 1]) else: for i in range(1, N + 1): print(b)...
s729710148
p03673
u038408819
1586027182
Python
Python (3.4.3)
py
Runtime Error
1356
145272
423
N = int(input()) a = list(map(int, input().split())) from collections import deque b = deque([]) if len(a) % 2 == 0: for i in range(1, N + 1): print(b) if i % 2 == 0: b.appendleft(a[i - 1]) else: b.append(a[i - 1]) else: for i in range(1, N + 1): print(b)...
s064249366
p03673
u757030836
1585586126
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[N%2::2])
s964896833
p03673
u599114793
1585100289
Python
Python (3.4.3)
py
Runtime Error
17
2940
286
n = int(input()) a = list(map(int, input().split())) a1 = [] a2 = [] for i in range(n): if i % 2 == 0: a1.append(a[i]) else: a2.append(a[i]) if n % 2 == 0: rev = list(reversed(a2)) print(*rev, *a1) else: rev = list(reversed(a1)) print(*rev, *a2)
s589574825
p03673
u599114793
1585100183
Python
Python (3.4.3)
py
Runtime Error
17
2940
274
n = int(input()) a = list(map(int, input().split())) a1 = [] a2 = [] for i in range(n): if i % 2 == 0: a1.append(a[i]) else: a2.append(a[i]) if n % 2 == 0: rev = reversed(a2) print(*rev, *a1) else: rev = reversed(a1) print(*rev, *a2)
s438874907
p03673
u599114793
1585100058
Python
Python (3.4.3)
py
Runtime Error
17
2940
273
n = int(input()) a = list(map(int,input().split())) a1 = [] a2 = [] for i in range(n): if i % 2 == 0: a1.append(a[i]) else: a2.append(a[i]) if n % 2 == 0: rev = reversed(a2) print(*rev, *a1) else: rev = reversed(a1) print(*rev, *a2)
s710477545
p03673
u080364835
1584750984
Python
Python (3.4.3)
py
Runtime Error
17
2940
316
n = int(input()) al = list(map(int, input().split())) left = [] right = [] for i in range(n): if i % 2 == 0: right.append(al[i]) else: left.append(al[i]) if n % 2 == 0: left = left[::-1] print(*left, *right, sep=' ') else: right = right[::-1] print(*right, *left, sep=' ')
s379097802
p03673
u080364835
1584750941
Python
Python (3.4.3)
py
Runtime Error
18
2940
315
n = int(input()) al = list(map(int, input().split())) left = [] right = [] for i in range(n): if i % 2 == 0: right.append(al[i]) else: left.append(al[i]) if n % 2 == 0: left = left[::-1] print(*left, *right, sep=' ') else: right = right[::-1] print(*right, *left, sep=' ')
s714903593
p03673
u080364835
1584750914
Python
Python (3.4.3)
py
Runtime Error
17
2940
315
n = int(input()) al = list(map(int, input().split())) left = [] right = [] for i in range(n): if i % 2 == 0: right.append(al[i]) else: left.append(al[i]) if n % 2 == 0: left = left[::-1] print(*left, *right, sep=' ') else: right = right[::-1] print(*right, *left, sep=' ')
s703479342
p03673
u066855390
1584229650
Python
Python (3.4.3)
py
Runtime Error
211
25412
281
from collections import deque n = int(input()) aa = list(map(int, input().split())) bb = deque() left = True for a in aa: if left: bb.append(a) else: bb.appendleft(a) left = not left if left: print(*list(bb)) else: print(*list(bb).reverse())
s311270072
p03673
u038815010
1583975934
Python
Python (3.4.3)
py
Runtime Error
20
3316
266
from collections import deque N = int(sys.stdin.readline()) A = list(map(int, sys.stdin.readline().split())) que = deque() for i in range(N): if i % 2 == 0: que.append(A[i]) else: que.appendleft(A[i]) if N % 2: que.reverse() print(*que)
s216987492
p03673
u038815010
1583975907
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38512
266
from collections import deque N = int(sys.stdin.readline()) A = list(map(int, sys.stdin.readline().split())) que = deque() for i in range(N): if i % 2 == 0: que.append(A[i]) else: que.appendleft(A[i]) if N % 2: que.reverse() print(*que)
s802197650
p03673
u934868410
1583847905
Python
Python (3.4.3)
py
Runtime Error
114
26020
285
n = int(input()) a = list(map(int,input().split())) s1 = [] s2 = [] for i in range(n): if i % 2 == 0: s1.append(a[i]) else: s2.append(a[i]) if n % 2 == 0: for x in reversed(s2) + s1: print(x, end=' ') else: for x in reversed(s1) + s2: print(x, end=' ') print()
s190696150
p03673
u506858457
1583678502
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[N%2::2])
s081864290
p03673
u308684517
1583649084
Python
Python (3.4.3)
py
Runtime Error
17
2940
242
n = int(input()) A = list(map(int, input().split())) B = [] C = [] for i in range(n): if i % 2 == 0: B.append(A[i]) else: C.append(A[i]) if len(B) > len(C): print(*reversed(B), *C) else: print(*reversed(C), *B)
s746677030
p03673
u750838232
1583166748
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
N=int(input()) A=list(map(int,input().split())) print(*A[::-2],*A[N%2::2])
s806701073
p03673
u413165887
1583028389
Python
Python (3.4.3)
py
Runtime Error
17
2940
129
n = int(input()) a = list(input().split()) if n%2==1: print(*a[n-1::-2], *a[1:n+1:2]) else: print(*a[n::-2], *a[:n+1:2])