buggy
stringlengths
1
618k
fixed
stringlengths
16
618k
buggy_submission_id
stringlengths
10
10
fixed_submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
lang
stringclasses
1 value
buggy_verdict
stringclasses
2 values
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() s = ns() k = ni() ans = [] for j in range(len(s)): ans.append(s[j]) if j < len(s)-1: t = j+2 while True: ans.append(s[j:t]) ...
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() s = ns() k = ni() ans = [] for i in range(len(s)): ans.append(s[i]) if i < len(s)-1: t = i+2 while True: ans.append(s[i:t]) ...
s681535721
s994835626
p03353
python
Time Limit Exceeded
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() a,b,k = na() f = [i for i in range(a,b+1)] if (b-a+1) // 2 >= k: ans = list(range(a,a+k)) + list(range(b-k+1,b+1)) else: ans = list(range(a,b+1)) for i in ans: p...
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() a,b,k = na() if (b-a+1) // 2 >= k: ans = list(range(a,a+k)) + list(range(b-k+1,b+1)) else: ans = list(range(a,b+1)) for i in ans: print(i)
s638582100
s978093486
p03386
python
Time Limit Exceeded
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() a,b,k = na() f = [i for i in range(a,b+1)] ans = f[:k] ans_d = f[-k:] ans += ans_d for i in sorted(set(ans), key=ans.index): print(i)
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() a,b,k = na() if (b-a+1) // 2 >= k: ans = list(range(a,a+k)) + list(range(b-k+1,b+1)) else: ans = list(range(a,b+1)) for i in ans: print(i)
s769029502
s978093486
p03386
python
Time Limit Exceeded
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() a,b,k = na() f = [i for i in range(a,b+1)] ans = [] ans += f[:k] ans_d = [] ans_d += f[::-1][:k] ans += ans_d for i in sorted(set(ans)): print(i)
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() a,b,k = na() if (b-a+1) // 2 >= k: ans = list(range(a,a+k)) + list(range(b-k+1,b+1)) else: ans = list(range(a,b+1)) for i in ans: print(i)
s055370293
s978093486
p03386
python
Time Limit Exceeded
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline() n = ni() red = [] for _ in range(n): red.append(na()) blue = [] for _ in range(n): blue.append(na()) red_1 = sorted(red) blue_1 = sorted(blue) ans_1 = 0 for i in red_1: ...
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline() n = ni() red = [] for _ in range(n): red.append(na()) blue = [] for _ in range(n): blue.append(na()) red.sort() blue.sort() ans = 0 tmp = [] for i in blue: for j in re...
s621408641
s164530214
p03409
python
Runtime Error
n = int(input()) s = [] for i in range(n): s.append(input()[0]) def qwe(y): m = 0 a = 0 r = 0 c = 0 h = 0 for i in y: if i == 'M': m += 1 elif i == 'A': a += 1 elif i == 'R': r += 1 elif i == 'C': c += 1 ...
n = int(input()) s = [] for i in range(n): s.append(input()[0]) def qwe(y): m = 0 a = 0 r = 0 c = 0 h = 0 for i in y: if i == 'M': m += 1 elif i == 'A': a += 1 elif i == 'R': r += 1 elif i == 'C': c += 1 ...
s607568420
s315655829
p03425
python
Runtime Error
n = int(input()) s = [] for i in range(n): s.append(input()[0]) def qwe(y): m = 0 a = 0 r = 0 c = 0 h = 0 for i in y: if i == 'M': m += 1 elif i == 'A': a += 1 elif i == 'R': r += 1 elif i == 'C': c += 1 ...
n = int(input()) s = [] for i in range(n): s.append(input()[0]) def qwe(y): m = 0 a = 0 r = 0 c = 0 h = 0 for i in y: if i == 'M': m += 1 elif i == 'A': a += 1 elif i == 'R': r += 1 elif i == 'C': c += 1 ...
s965624997
s315655829
p03425
python
Runtime Error
n = int(input()) s = [] for i in range(n): s.append(input()[0]) def qwe(y): m = 0 a = 0 r = 0 c = 0 h = 0 for i in y: if i == 'M': m += 1 elif i == 'A': a += 1 elif i == 'R': r += 1 elif i == 'C': c += 1 ...
n = int(input()) s = [] for i in range(n): s.append(input()[0]) def qwe(y): m = 0 a = 0 r = 0 c = 0 h = 0 for i in y: if i == 'M': m += 1 elif i == 'A': a += 1 elif i == 'R': r += 1 elif i == 'C': c += 1 ...
s382252839
s315655829
p03425
python
Runtime Error
def is_9(arr): s = [] for i in range(len(arr)): if arr[i] != '9': return False s.append(arr[i]) return sum(s) n = list(input()) fd = int(n.pop(0)) if is_9(n): print(fd + int(is_9(n))) print(fd - 1 + int(9 * len(n)))
def is_9(arr): s = [] for i in range(len(arr)): if arr[i] != '9': return False s.append(arr[i]) return True n = list(input()) fd = int(n.pop(0)) if is_9(n): print(fd + int(9 * len(n))) else: print(fd - 1 + int(9 * len(n)))
s645746337
s144767670
p03427
python
Runtime Error
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() a = na() a_lis = list(set(a)) count = 0 ans = [0]*len(a_lis) for i in range(len(a_lis)): count = a.count(a_lis[i]) if count > a_lis[i]: ans[i] = cou...
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() a = na() dic = {} for num in a: if num in dic: dic[num] += 1 else: dic[num] = 1 ans = 0 for key,value in dic.items(): if key > value:...
s861054058
s117562741
p03487
python
Time Limit Exceeded
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() x,y = na() hx = {"A":1, "B":2, "C":3, "D":4, "E":5, "F":6} if hx[x] > hx[y]: print(">") elif hx[x] < hx[y]: print("<") else: print("=")
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() x,y = ns().split() hx = {"A":1, "B":2, "C":3, "D":4, "E":5, "F":6} if hx[x] > hx[y]: print(">") elif hx[x] < hx[y]: print("<") else: print("=")
s132672974
s179116011
p03547
python
Runtime Error
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() a = [ni() for _ in range(n)] if n == 1: print(1) else: a.sort() count = 1 ans = 0 for i in range(1,n): if i == n-1: if a[i-...
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() s = set() for i in range(n): x = ni() if x in s: s.remove(x) else: s.add(x) print(len(s))
s029281408
s911525179
p03607
python
Runtime Error
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() a = [ni() for _ in range(n)] a.sort() count = 0 ans = 0 for i in a: count = a.count(i) if count % 2 != 0: ans += 1 print(ans)
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() s = set() for i in range(n): x = ni() if x in s: s.remove(x) else: s.add(x) print(len(s))
s606010793
s911525179
p03607
python
Time Limit Exceeded
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() a = [ni() for _ in range(n)] a.sort() b = 0 count = 0 ans = 0 for i in a: if b != i: count = a.count(i) if count % 2 != 0: ans += 1...
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() s = set() for i in range(n): x = ni() if x in s: s.remove(x) else: s.add(x) print(len(s))
s840711169
s911525179
p03607
python
Time Limit Exceeded
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() a = [ni() for _ in range(n)] s = [] for i in a: flag = 1 for j in s: if j == i: s.remove(i) flag = 0 break ...
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() n = ni() s = set() for i in range(n): x = ni() if x in s: s.remove(x) else: s.add(x) print(len(s))
s098318328
s911525179
p03607
python
Time Limit Exceeded
import sys n,m = list(map(int, sys.stdin.readline().split())) ab = [[0, 0]]*m for i in range(m): ab[i] = list(map(int, sys.stdin.readline().split())) tmp = [] for i in ab: if i[0] == 1: tmp.append(i[1]) tmp_n = [] for i in ab: if i[1] == n: tmp_n.append(i[0]) flag = False for i in tmp: ...
import sys n,m = map(int, sys.stdin.readline().split()) mid1 = set() mid2 = set() for _ in range(m): a,b, = map(int, input().split()) if a == 1: mid1.add(b) elif b == n: mid2.add(a) result = bool(mid1 & mid2) if result: print("POSSIBLE") else: print("IMPOSSIBLE")
s229016019
s533152924
p03645
python
Time Limit Exceeded
n = int(input()) a = list(map(int, input().split())) s = sum(a) ans = float('inf') for i in range(1, n): if abs(s-sum(a[:i])*2) < ans: ans = abs(s-sum(a[:i])*2) print(ans)
n = int(input()) a = list(map(int, input().split())) tmp = 0 sum_list = [0] for i in range(n): tmp += a[i] sum_list.append(tmp) diff = float('inf') for i in range(1,n): diff = min(diff, abs(sum_list[-1]-2*sum_list[i])) print(diff)
s166561840
s218064799
p03659
python
Time Limit Exceeded
n = int(input()) a = list(map(int, input().split())) s = sum(a) ans = float('inf') for i in range(1, n): x = sum(a[:i]) y = s - x if abs(x-y) < ans: ans = abs(x-y) print(ans)
n = int(input()) a = list(map(int, input().split())) tmp = 0 sum_list = [0] for i in range(n): tmp += a[i] sum_list.append(tmp) diff = float('inf') for i in range(1,n): diff = min(diff, abs(sum_list[-1]-2*sum_list[i])) print(diff)
s740443848
s218064799
p03659
python
Time Limit Exceeded
n = int(input()) a = [] for _ in range(n): a.append(int(input())) if a[0] == 2: print(0) else: count = 0 flag = False i = a[0] for _ in range(n): count += 1 if a[i-1] == 2: flag = True break i = a[i-1] if flag: print(count+1) else: print(...
n = int(input()) a = [] for _ in range(n): a.append(int(input())) if a[0] == 2: print(1) else: count = 0 i = a[0] flag = False for _ in range(n): count += 1 if a[i-1] == 2: flag = True break i = a[i-1] if flag: print(count+1) else:...
s574982407
s301241723
p03680
python
Runtime Error
a,b = map(int, input()) if a + b >= 10: print("error") else: print(a+b)
a,b = map(int, input().split()) if a + b >= 10: print("error") else: print(a+b)
s997704674
s571805123
p03697
python
Runtime Error
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int sum = 0; int min = Integer.MAX_VALUE; for (int i = 0; i < N; i++) { int s = sc.nextInt(); sum += s; ...
n = int(input()) s = [0]*n for i in range(n): s[i] = int(input()) max = sum(s) if max % 10 == 0: s.sort() min = 0 for i in s: if i % 10 != 0: min = i break if min == 0: print(0) else: print(max-min) else: print(max)
s678105816
s638580014
p03699
python
Runtime Error
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline() k,s = na() ans = 0 for x in range(k+1): for y in range(k+1): z = s - (x+y) if x+y+z == s and z >= 0 and z <= k: ans += 1 print(ans)
import sys stdin = sys.stdin na = lambda: list(map(int, stdin.readline().split())) k,s = na() ans = 0 for x in range(k+1): for y in range(k+1): z = s - (x+y) if z >= 0 and z <= k: ans += 1 print(ans)
s095237446
s717776437
p03835
python
Time Limit Exceeded
a, b, x = map(int, input().split()) fb = b // x if a == 0: fb += 1 fa = 0 else: fa = (a-1) // x print(fb-fa)
n = input().split() b = [] for i in n: b.append(i[0]) b = ','.join(b) b = b.replace(',','') print(b)
s031800308
s055400523
p03860
python
Runtime Error
a, b, x = map(int, input().split()) fb = b // x if a == 0: fa = 0 else: fa = (a-1) // x print(fb-fa)
n = input().split() b = [] for i in n: b.append(i[0]) b = ','.join(b) b = b.replace(',','') print(b)
s909985892
s055400523
p03860
python
Runtime Error
S = input() ans = True for i in range(0,len(S),2): if S[i] != "h" or S[i+1] != "i": ans = False break if ans: print("Yes") else: print("No")
S = input() ans = True for i in range(0,len(S)-1,2): if S[i] != "h" or S[i+1] != "i": ans = False break if not ans or len(S)%2 == 1: print("No") else: print("Yes")
s376509153
s996630148
p02747
python
Runtime Error
A,B,M = [int(x) for x in input().split()] A_list = [int(x) for x in input().split()] B_list = [int(y) for y in input().split()] discount = [] min = 10000000 for _ in range(M): case = [int(x) for x in input().split()] discount.append(case) min_a = sorted(A_list)[0] min_b = sorted(B_list)[0] for i in range(M): te...
S = input() ans = True for i in range(0,len(S)-1,2): if S[i] != "h" or S[i+1] != "i": ans = False break if not ans or len(S)%2 == 1: print("No") else: print("Yes")
s981078877
s996630148
p02747
python
Runtime Error
S = input() ans = True for i in range(0,len(S),2): if S[i] != "h" or S[i+1] != "i": ans = False break if ans: print("Yes") else: print("No")
S = input() ans = True for i in range(0,len(S)-1,2): if S[i] != "h" or S[i+1] != "i": ans = False break if not ans or len(S)%2 == 1: print("No") else: print("Yes")
s275931887
s996630148
p02747
python
Runtime Error
S = input() ans = True for i in range(0,len(S),2): if S[i] != "h" or S[i+1] != "i": ans = False break if ans: print("Yes") else: print("No")
S = input() ans = True for i in range(0,len(S)-1,2): if S[i] != "h" or S[i+1] != "i": ans = False break if not ans or len(S)%2 == 1: print("No") else: print("Yes")
s719395273
s996630148
p02747
python
Runtime Error
s = input() q_number = int(input()) reverse_flag = 1 head = "" tail = "" for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: head = temp[2] + head else: ...
a = input() if "A" in a and "B" in a: print("Yes") else: print("No")
s241187045
s482795898
p02753
python
Runtime Error
s = input() q_number = int(input()) reverse_flag = 1 for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: if int(temp[1])*reverse_flag == 1 or int(temp[1])*reverse_flag == -2: s = temp[2] + s else: s = s + temp[2] if rever...
a = input() if "A" in a and "B" in a: print("Yes") else: print("No")
s074931900
s482795898
p02753
python
Runtime Error
s = input() q_number = int(input()) queries = [input().split() for dummy in range(q_number)] flag = 1 count = 0 for i in range(q_number): if queries[i][0] == "1": flag = flag * -1 count += 1 else: if int(queries[i][1])*flag == 1 or -2: s = queries[i][2] + s else: s = s + queries[i][2]...
a = input() if "A" in a and "B" in a: print("Yes") else: print("No")
s319029739
s482795898
p02753
python
Runtime Error
s = [input()] q_number = int(input()) reverse_flag = 1 for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: s.insert(0,temp[2]) else: s.append(temp[2])...
s = input() q_number = int(input()) reverse_flag = 1 head = "" tail = "" for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: head = temp[2] + head else: ...
s159255093
s650707988
p02756
python
Time Limit Exceeded
s = input() q_number = int(input()) reverse_flag = 1 for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: s = "".join([temp[2],s]) else: s = "".join([s...
s = input() q_number = int(input()) reverse_flag = 1 head = "" tail = "" for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: head = temp[2] + head else: ...
s506403134
s650707988
p02756
python
Time Limit Exceeded
s = input() q_number = int(input()) reverse_flag = 1 for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: s = temp[2] + s else: s = s + temp[2] ...
s = input() q_number = int(input()) reverse_flag = 1 head = "" tail = "" for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: head = temp[2] + head else: ...
s770858980
s650707988
p02756
python
Time Limit Exceeded
s = input() q_number = int(input()) reverse_flag = 1 for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: if int(temp[1])*reverse_flag == 1 or int(temp[1])*reverse_flag == -2: s = temp[2] + s else: s = s + temp[2] if rever...
s = input() q_number = int(input()) reverse_flag = 1 head = "" tail = "" for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: head = temp[2] + head else: ...
s507342650
s650707988
p02756
python
Time Limit Exceeded
s = input() q_number = int(input()) reverse_flag = 1 for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: if int(temp[1]) == 1 or -2: s = temp[2] + s elif int(temp[1]) == -1 or 2: s = s + temp[2] if reverse_flag = -1: s = s[::...
s = input() q_number = int(input()) reverse_flag = 1 head = "" tail = "" for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: head = temp[2] + head else: ...
s475550593
s650707988
p02756
python
Runtime Error
s = input() q_number = int(input()) for i in range(q_number): temp = input().split() if temp[0] == "1": s = s[::-1] else: if temp[1] == "1": s = temp[2] + s else: s = s + temp[2] print(s)
s = input() q_number = int(input()) reverse_flag = 1 head = "" tail = "" for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: head = temp[2] + head else: ...
s310971917
s650707988
p02756
python
Time Limit Exceeded
s = input() q_number = int(input()) queries = [input().split() for dummy in range(q_number)] for i in range(q_number): if queries[i][0] == "1": s = s[::-1] else: if queries[i][1] == "1": s = queries[i][2] + s else: s = s + queries[i][2] print(s)
s = input() q_number = int(input()) reverse_flag = 1 head = "" tail = "" for i in range(q_number): temp = input().split() if temp[0] == "1": reverse_flag = reverse_flag * -1 else: headstails = int(temp[1])*reverse_flag if headstails == 1 or headstails == -2: head = temp[2] + head else: ...
s287144251
s650707988
p02756
python
Time Limit Exceeded
S = list(input()) Q = int(input()) is_reversed = False for i in range(Q): q = list(input()) if q[0] == '1': is_reversed = True if is_reversed == False else False else: if q[2] == '1' and is_reversed: S.append(q[4]) elif q[2] == '1': S.insert(0, q[4]) elif is_reversed: S.insert(...
S = list(input()) Q = int(input()) is_reversed = False append_first = [] my_first = append_first.append append_end = [] my_end = append_end.append for i in range(Q): q = list(input()) if q[0] == '1': is_reversed = True if is_reversed == False else False else: if q[2] == '1' and is_reversed: append_...
s207672808
s814813838
p02756
python
Time Limit Exceeded
S = list(input()) Q = int(input()) for i in range(Q): q = list(input()) if q[0] == '1': S.reverse() else: if q[2] == '1': S.insert(0, q[4]) else: S.append(q[4]) print(''.join(S))
S = list(input()) Q = int(input()) is_reversed = False append_first = [] my_first = append_first.append append_end = [] my_end = append_end.append for i in range(Q): q = list(input()) if q[0] == '1': is_reversed = True if is_reversed == False else False else: if q[2] == '1' and is_reversed: append_...
s885434940
s814813838
p02756
python
Time Limit Exceeded
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i+K] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
s168570859
s602841340
p02780
python
Runtime Error
N, K = map(int, input().split()) p = list(map(int, input().split())) pos = 0 saidai = 0 for i in range(N-K+1): temp = sum(list(map(lambda x: (x+1)/2, p[i:i+K]))) if saidai < temp: saidai = temp print('{:.12f}'.format(saidai))
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
s257280094
s602841340
p02780
python
Time Limit Exceeded
N, K = map(int, input().split()) p = list(map(int, input().split())) pos = 0 saidai = 0 for i in range(N-K+1): temp = sum(p[i:i+K]) if saidai < temp: saidai = temp pos = i kitaichi = 0 for i in range(K): temp = (p[pos+i]+1)*p[pos+i]/2 kitaichi = kitaichi + float(temp/p[pos+i]) print('{:.12f}'....
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
s826131557
s602841340
p02780
python
Time Limit Exceeded
N, K = map(int, input().split()) p = list(map(int, input().split())) pos = 0 saidai = 0 for i in range(N-K+1): temp = sum(p[i:i+K]) if saidai < temp: saidai = temp pos = i kitaichi = 0 for i in range(K): temp = (p[pos+i]+1)*p[pos+i]/2 kitaichi = kitaichi + float(temp/p[pos+i]) print('{:.12f}'.f...
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
s728901470
s602841340
p02780
python
Time Limit Exceeded
import numpy as np N, K = map(int, input().split()) p = list(map(int, input().split())) pos = 0 saidai = 0 for i in range(N-K+1): temp = sum(p[i:i+K]) if saidai < temp: saidai = temp pos = i kitaichi = 0 for i in range(K): temp = (p[pos+i]+1)*p[pos+i]/2 kitaichi = kitaichi + float(temp/p[pos+i]) ...
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
s565996496
s602841340
p02780
python
Runtime Error
N, K = map(int, input().split()) p = list(map(int, input().split())) pos = 0 saidai = 0 for i in range(N-K+1): temp = sum(p[i:i+K]) if saidai < temp: saidai = temp pos = i kitaichi = 0 for i in range(K): temp = sum(list(range(p[pos+i] + 1))) kitaichi = kitaichi + float(temp/p[pos+i]) print('{:....
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
s048498492
s602841340
p02780
python
Time Limit Exceeded
N, K = map(int, input().split()) p = list(map(int, input().split())) pos = 0 saidai = 0 for i in range(N-K+1): temp = sum(p[i:i+K]) if saidai < temp: saidai = temp pos = i kitaichi = 0 for i in range(K): temp = sum(list(range(p[pos+i] + 1))) kitaichi = kitaichi + float(temp/p[pos+i]) print('{:....
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
s961155876
s602841340
p02780
python
Time Limit Exceeded
N, K = map(int, input().split()) p = list(map(int, input().split())) pos = 0 saidai = 0 for i in range(N-K+1): temp = sum(p[i:i+K]) if saidai < temp: saidai = temp pos = i kitaichi = 0 for i in range(K): temp = 0 for j in range(p[pos+i] + 1): temp = temp + j kitaichi = kitaichi + float(temp/...
N, K = map(int, input().split()) p = list(map(int, input().split())) now = sum(p[:K]) saidai = now for i in range(K, N): now -= p[i-K] now += p[i] if now > saidai: saidai = now print('{:.12f}'.format((saidai + K)/2))
s198765298
s602841340
p02780
python
Time Limit Exceeded
n, m = map(int, input().split()) p = [] s = [] for i in range(m): p_i, s_i = input().split() p.append(int(p_i)) s.append(s_i) list_correct = [0] * n list_pena = [0] * n for i in range(m): if s[i] == "AC": if list_correct[p[i]] == 0: list_correct[p[i]] = 1 else: if list_correct[p[i]] == 0: ...
n, m = map(int, input().split()) p = [] s = [] for i in range(m): p_i, s_i = input().split() p.append(int(p_i)) s.append(s_i) list_correct = [0] * n list_pena = [0] * n for i in range(m): if s[i] == "AC": if list_correct[p[i]-1] == 0: list_correct[p[i]-1] = 1 else: if list_correct[p[i]-1] == 0:...
s286578023
s578459962
p02802
python
Runtime Error
a = map(int, input()) probability = 0.0 if a%2 == 0: probability = 0.5 else: probability = 1.0/float(a)*(a/2 + 1) print(probability)
a = int(input()) probability = 0.0 if a%2 == 0: probability = 0.5 else: probability = 1.0/float(a)*(int(a/2) + 1) print(probability)
s102777272
s200885803
p02897
python
Runtime Error
a = map(int, input()) probability = 0.0 if a%2 == 0: probability = 0.5 else: probability = 1.0/float(a)*(a/2 + 1) print(probability)
a = int(input()) probability = 0.0 if a%2 == 0: probability = 0.5 else: probability = 1.0/float(a)*(int(a/2) + 1) print(probability)
s854055311
s200885803
p02897
python
Runtime Error
a = map(int, input()) probability = 0 if a%2 == 0: probability = 0 else: probability = 1.0/float(a)*(a/2 + 1) print(probability)
a = int(input()) probability = 0.0 if a%2 == 0: probability = 0.5 else: probability = 1.0/float(a)*(int(a/2) + 1) print(probability)
s473468396
s200885803
p02897
python
Runtime Error
n, k = map(int, input()) array = list(map(int, input())) goukei = 0 for i in range(len(array)): if array[i] >= k: goukei += 1 print(goukei)
n, k = map(int, input().split()) array = list(map(int, input().split())) goukei = 0 for i in range(len(array)): if array[i] >= k: goukei += 1 print(goukei)
s617054506
s886459108
p02898
python
Runtime Error
mnum, gnum = map(int, input().split()) array = list(map(int, input().split())) for i in range(gnum): array.sort() array[len(array)-1] = array[len(array)-1]/2 print(sum(array))
text = input() result = '' if text == 'Sunny': result = 'Cloudy' elif text == 'Cloudy': result = 'Rainy' else: result = 'Sunny' print(result)
s990471501
s728558567
p02909
python
Runtime Error
text = input() flg = 0 for i in range(len(text)): if i%2 == 0: if text[i:i+1] != 'R' and text[i:i+1] and 'U' and text[i:i+1] != 'D': flg = 1 else: if text[i:i+1] != 'U' and text[i:i+1] and 'U' and text[i:i+1] != 'D': flg = 1 if flg == 1: print('No') else: pring('Yes')
text = input() flg = 0 for i in range(len(text)): if i%2 == 0: if text[i:i+1] != 'R' and text[i:i+1] != 'U' and text[i:i+1] != 'D': flg = 1 else: if text[i:i+1] != 'L' and text[i:i+1] != 'U' and text[i:i+1] != 'D': flg = 1 if flg == 1: print('No') else: print('Yes')
s824817723
s795935320
p02910
python
Runtime Error
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(int(input())) point = [b] * a for i in range(c): point[int(array[i])] = point[int(array[i])] + 1 for i in range(len(point)): if point[i]-c > 0 : print('Yes') else: print('No')
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(int(input())) point = [b] * a for i in range(c): point[array[i]-1] = point[array[i]-1] + 1 for i in range(len(point)): if (point[i]-c) > 0 : print('Yes') else: print('No')
s115131850
s478038447
p02911
python
Runtime Error
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(int(input())) point = [b] * a for i in range(c): for j in range(len(point)): if j+1 != int(array[i]): point[j] = point[j] -1 for i in range(len(point)): if point[i] > 0: print('Yes') else: print('No')
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(int(input())) point = [b] * a for i in range(c): point[array[i]-1] = point[array[i]-1] + 1 for i in range(len(point)): if (point[i]-c) > 0 : print('Yes') else: print('No')
s914367471
s478038447
p02911
python
Time Limit Exceeded
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(int(input())) point = [b] * a for i in range(c): for j in range(len(point)): if j+1 != int(array[i]): point[j] = point[j] -1 for i in range(len(point)): if point[i] > 0: print('Yes') else: print('No')
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(int(input())) point = [b] * a for i in range(c): point[array[i]-1] = point[array[i]-1] + 1 for i in range(len(point)): if (point[i]-c) > 0 : print('Yes') else: print('No')
s583813400
s478038447
p02911
python
Time Limit Exceeded
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(input()) point = [b] * a for i in range(c): for j in range(a): if j+1 != int(array[c]): point[j] = point[j] -1 for i in range(a): if point[i] > 0: print('Yes') else: print('No')
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(int(input())) point = [b] * a for i in range(c): point[array[i]-1] = point[array[i]-1] + 1 for i in range(len(point)): if (point[i]-c) > 0 : print('Yes') else: print('No')
s177214512
s478038447
p02911
python
Runtime Error
a, b, c = map(int, intput().split()) array = [] for i in range(c): array.append(input()) point = [b] * a for i in range(c): for j in range(a): if j+1 != int(array[c]): point[j] = point[j] -1 for i in range(a): if point[i] > 0: print('Yes') else: print('No')
a, b, c = map(int, input().split()) array = [] for i in range(c): array.append(int(input())) point = [b] * a for i in range(c): point[array[i]-1] = point[array[i]-1] + 1 for i in range(len(point)): if (point[i]-c) > 0 : print('Yes') else: print('No')
s008731486
s478038447
p02911
python
Runtime Error
import heapq mnum, gnum = map(int, input().split()) array = list(map(lambda a: -int(a), input().split())) array.sort() heapq.heapify(array) for i in range(gnum): temp = heapq.heappop(array) temp /= 2.0 heapq.heappush(array, temp) amount = 0 for a in array: amount += math.floor(-a) print(amount)
import math import heapq N, M = list(map(int, input().split())) A = list(map(lambda a: -int(a), input().split())) A.sort() heapq.heapify(A) for i in range(M): a = heapq.heappop(A) a /= 2.0 heapq.heappush(A, a) amount = 0 for a in A: amount += math.floor(-a) print(amount)
s477904555
s336434826
p02912
python
Runtime Error
import heapq mnum, gnum = map(int, input().split()) array = list(map(lambda a: -int(a), input().split())) array.sort() heapq.heapify(array) for i in range(gnum): temp = heapq.heappop(array) temp = temp/2 heapq.heappush(array, temp) amount = 0 for a in array: amount += math.floor(-a) print(amount)
import math import heapq N, M = list(map(int, input().split())) A = list(map(lambda a: -int(a), input().split())) A.sort() heapq.heapify(A) for i in range(M): a = heapq.heappop(A) a /= 2.0 heapq.heappush(A, a) amount = 0 for a in A: amount += math.floor(-a) print(amount)
s239003052
s336434826
p02912
python
Runtime Error
mnum, gnum = map(int, input().split()) array = list(map(int, input().split()) for i in range(gnum): array.sort() array[len(array)-1] = array[len(array)-1]/2 print(sum(array))
import math import heapq N, M = list(map(int, input().split())) A = list(map(lambda a: -int(a), input().split())) A.sort() heapq.heapify(A) for i in range(M): a = heapq.heappop(A) a /= 2.0 heapq.heappush(A, a) amount = 0 for a in A: amount += math.floor(-a) print(amount)
s632982497
s336434826
p02912
python
Runtime Error
num = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += b[a[i]-1] else: sum += b[a[i]-1] if (a[i]-1) == a[i-1]: sum += c[a[i-1]] print(sum)
num = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += b[a[i]-1] else: sum += b[a[i]-1] if (a[i]-1) == a[i-1]: sum += c[a[i-1]-1] print(sum)
s594043951
s754811288
p02916
python
Runtime Error
num = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += b[a[i]-1] else: sum += b[a[i]-1] if (a[i]-1) == a[i-1]: sum += c[a[i-1]] print(sum)
num = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += b[a[i]-1] else: sum += b[a[i]-1] if (a[i]-1) == a[i-1]: sum += c[a[i-1]-1] print(sum)
s081131352
s754811288
p02916
python
Runtime Error
num = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += b[a[i]-1] else: sum += b[a[i]-1] if (a[i]-1) == a[i-1]: sum += c[a[i-1]] print(sum)
num = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += b[a[i]-1] else: sum += b[a[i]-1] if (a[i]-1) == a[i-1]: sum += c[a[i-1]-1] print(sum)
s041258266
s754811288
p02916
python
Runtime Error
num = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += b[a[i]] else: sum += b[a[i]] if (a[i]-1) == a[i-1]: sum += c[i-1] print(sum)
num = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += b[a[i]-1] else: sum += b[a[i]-1] if (a[i]-1) == a[i-1]: sum += c[a[i-1]-1] print(sum)
s009868682
s754811288
p02916
python
Runtime Error
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] else if i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] elif i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
s861067521
s514410095
p02917
python
Runtime Error
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] else if i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] elif i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
s858630940
s514410095
p02917
python
Runtime Error
num = int(input()) array = map(int, input().split()) sum = 0 for (i = 0; i < num; i++): if i == 0: sum += array[i] else if i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] elif i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
s569327250
s514410095
p02917
python
Runtime Error
num = int(input()) array = map(int, input().split()) sum = 0 for i in range(num): if i == 0: sum += array[i] else if i < (num-1): if array[i] > array[i-1]: sum += array[i] else: sum += array[i-1] else: sum += array[i-1] print(sum)
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] elif i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
s609577281
s514410095
p02917
python
Runtime Error
num = int(input()) array = list(map(int, input().split())) sum = 0 for (i = 0; i < num; i++): if i == 0: sum += array[i] else if i < (num-1): if array[i] > array[i-1]: sum += array[i] else: sum += array[i-1] else: sum += array[i-1] print(sum)
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] elif i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
s422377885
s514410095
p02917
python
Runtime Error
num = int(input()) array = map(int, input().split()) sum = 0 for (i = 0; i < num; i++): if i == 0: sum += array[i] else if i < (num-1): if array[i] > array[i-1]: sum += array[i] else: sum += array[i-1] else: sum += array[i-1] print(sum)
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] elif i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
s074646548
s514410095
p02917
python
Runtime Error
num = int(input()) array = map(int, input().split()) sum = 0 for (i = 0; i < num; i++): if i == 0: sum += i else if i < (num-1): if array[i] > array[i-1]: sum += array[i] else: sum += array[i-1] else: sum += array[i-1] print(sum)
num = int(input()) array = list(map(int, input().split())) sum = 0 for i in range(num): if i == 0: sum += array[i] elif i < (num-1): if array[i] > array[i-1]: sum += array[i-1] else: sum += array[i] else: sum += array[i-1] print(sum)
s793627386
s514410095
p02917
python
Runtime Error
def main(): size = input() a = map(int, input().split()) a = merge_sort(a) alice_res = 0 bob_res = 0 for i in range(len(a)): if i%2 == 0: alice_res += a[i] else: bob_res += a[i] print(alice_res-bob_res) def merge_sort(array): if len(array)<=1: return array spl_si...
def main(): size = input() a = list(map(int, input().split())) a = merge_sort(a) alice_res = 0 bob_res = 0 for i in range(len(a)): if i%2 == 0: alice_res += a[i] else: bob_res += a[i] print(alice_res-bob_res) def merge_sort(array): if len(array)<=1: return array ...
s615654046
s645243388
p03434
python
Runtime Error
def main(): size = int(input()) array = [] for i in range(size): array.append(list(map(int, input().split())) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1])...
def main(): size = int(input()) array = [] for i in range(size): array.append(list(map(int, input().split()))) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]...
s949146690
s215264469
p03457
python
Runtime Error
def main(): size = int(input()) array[0] = list(map(int, "3 1 2".split()) array[1] = list(map(int, "6 1 1".split()) flg = "Yes" now = [0, 0, 0] for i in range (size): time = array[i][0] - now[0] distance = abs(array[i][1]-now[1]) + abs(array[i][2]-now[2]) if ...
def main(): size = int(input()) array = [] for i in range(size): array.append(list(map(int, input().split()))) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]...
s841166579
s215264469
p03457
python
Runtime Error
def main(): size = int(input()) for i in range(size): array[i] = list(map(int, input().split()) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]) if tim...
def main(): size = int(input()) array = [] for i in range(size): array.append(list(map(int, input().split()))) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]...
s710405712
s215264469
p03457
python
Runtime Error
def main(): size = int(input()) for i in range(size): array[i] = list(map(int, input().split()) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]) if tim...
def main(): size = int(input()) array = [] for i in range(size): array.append(list(map(int, input().split()))) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]...
s425107041
s215264469
p03457
python
Runtime Error
def main(): size = int(input()) for i in range(size): array[i] = list(map(int, input().split()) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0]- pre_time distance = array[i][1]-pos[0] + array[i][2]-pos[1] if time == distan...
def main(): size = int(input()) array = [] for i in range(size): array.append(list(map(int, input().split()))) flg = "Yes" pre_time = 0 pos = [0, 0] for i in range (size): time = array[i][0] - pre_time distance = abs(array[i][1]-pos[0]) + abs(array[i][2]-pos[1]...
s881308701
s215264469
p03457
python
Runtime Error
def main(): array = [] size = input() for i in range(size): array.append(int(input())) array.sort(reverse=True) result = 1 for i in range(len(array)-1): if array[i] != array[i+1]: result+=1 print(result) main()
def main(): array = [] size = int(input()) for i in range(size): array.append(int(input())) array.sort(reverse=True) result = 1 for i in range(len(array)-1): if array[i] != array[i+1]: result+=1 print(result) main()
s678720899
s941722247
p03470
python
Runtime Error
n, a, b = map(int, input().split()) res = 0 for i in range(1:n+1): sum = 0 j=0 while True: num = i/(10**j)%10 if num != 0: sum += num j+=1 else: break if a<=sum && sum<=b: res += sum; print(res)
def main(): N, A, B = [int(_) for _ in input().split()] ans = 0 for num in range(1, N + 1): if A <= sum(map(int, list(str(num)))) <= B: ans += num print(ans) main()
s323651880
s375394523
p03478
python
Runtime Error
import sys size = int(input()) a = map(int, input().split()) cnt = 0 while True: for i in range(size): if(a[i]%2 == 1): print(cnt) sys.exit() a = list(map(lambda x:x/2, a)) cnt+=1
a = input() cnt = 0 for i in a: if i == '1': cnt+=1 print(cnt)
s827816821
s888705621
p03493
python
Runtime Error
import sys size = int(input()) a = map(int, input().split()) cnt = 0 while true: for i in range(size): if(a[i]%2 == 1): print(cnt) sys.exit() a = map(lambda x:x/2, a) cnt +=1
a = input() cnt = 0 for i in a: if i == '1': cnt+=1 print(cnt)
s924219179
s888705621
p03493
python
Runtime Error
loop = input() a = map(int, input().split()) cnt = 0 while(1): flg = 0 for i in a: if(a%2 == 1): flg = 1 break if(flg == 0): a = map(lambda x:x/2, a) cnt += 1 else: break print(cnt)
a = input() cnt = 0 for i in a: if i == '1': cnt+=1 print(cnt)
s135585713
s888705621
p03493
python
Runtime Error
loop = input() a = map(int, input().split()) cnt = 0 while(1): flg = 0 for i in a: if(a%2 == 1): flg = 1 if(flg == 0): a = map(lambda x:x/2, a) cnt += 1 else: break print(cnt)
a = input() cnt = 0 for i in a: if i == '1': cnt+=1 print(cnt)
s142103538
s888705621
p03493
python
Runtime Error
loop = input() a = map(int, input().split()) cnt = 0 while(1): flg = 0 for i in a: if(a%2 == 1): flg = 1 if(flg == 0): a = map(lamda x:x/2, a) cnt += 1 else: break print(cnt)
a = input() cnt = 0 for i in a: if i == '1': cnt+=1 print(cnt)
s413314494
s888705621
p03493
python
Runtime Error
import sys size = int(input()) a = map(int, input().split()) cnt = 0 while True: for i in range(size): if(a[i]%2 == 1): print(cnt) sys.exit() a = list(map(lambda x:x/2, a)) cnt+=1
import sys def main(): N = int(input()) A = [int(_) for _ in input().split()] t = 0 while True: for i in range(N): if A[i] % 2 == 0: A[i] //= 2 else: print(t) sys.exit() t += 1 main()
s467755984
s932505218
p03494
python
Runtime Error
import sys size = int(input()) a = map(int, input().split()) cnt = 0 while True: for i in range(size): if(a[i]%2 == 1): print(cnt) sys.exit() a = map(lambda x:x/2, a) cnt+=1
import sys def main(): N = int(input()) A = [int(_) for _ in input().split()] t = 0 while True: for i in range(N): if A[i] % 2 == 0: A[i] //= 2 else: print(t) sys.exit() t += 1 main()
s369849420
s932505218
p03494
python
Runtime Error
import sys size = int(input()) a = map(int, input().split()) cnt = 0 while true: for i in range(size): if(a[i]%2 == 1): print(cnt) sys.exit() a = map(lambda x:x/2, a) cnt +=1
import sys def main(): N = int(input()) A = [int(_) for _ in input().split()] t = 0 while True: for i in range(N): if A[i] % 2 == 0: A[i] //= 2 else: print(t) sys.exit() t += 1 main()
s634983717
s932505218
p03494
python
Runtime Error
import sys _ = input() a = map(int, input().split()) cnt = 0 while(1): flg = 0 for i in a: if(i%2 == 1): flg = 1 print(cnt) sys.exit() if(flg == 0): a = map(lambda x:x/2, a) cnt += 1 else: break
import sys def main(): N = int(input()) A = [int(_) for _ in input().split()] t = 0 while True: for i in range(N): if A[i] % 2 == 0: A[i] //= 2 else: print(t) sys.exit() t += 1 main()
s307167623
s932505218
p03494
python
Time Limit Exceeded
_ = input() a = map(int, input().split()) cnt = 0 while(1): flg = 0 for i in a: if(i%2 == 1): flg = 1 break if(flg == 0): a = map(lambda x:x/2, a) cnt += 1 else: break print(cnt)
import sys def main(): N = int(input()) A = [int(_) for _ in input().split()] t = 0 while True: for i in range(N): if A[i] % 2 == 0: A[i] //= 2 else: print(t) sys.exit() t += 1 main()
s274135347
s932505218
p03494
python
Time Limit Exceeded
loop = input() a = map(int, input().split()) cnt = 0 while(1): flg = 0 for i in a: if(i%2 == 1): flg = 1 if(flg == 0): a = map(lambda x:x/2, a) cnt += 1 else: break print(cnt)
import sys def main(): N = int(input()) A = [int(_) for _ in input().split()] t = 0 while True: for i in range(N): if A[i] % 2 == 0: A[i] //= 2 else: print(t) sys.exit() t += 1 main()
s837796759
s932505218
p03494
python
Time Limit Exceeded
loop = input() a = map(int, input().split()) cnt = 0 while(1): flg = 0 for i in a: if(i%2 == 1): flg = 1 else: i = i/2 if(flg == 0): cnt += 1 else: break print(cnt)
import sys def main(): N = int(input()) A = [int(_) for _ in input().split()] t = 0 while True: for i in range(N): if A[i] % 2 == 0: A[i] //= 2 else: print(t) sys.exit() t += 1 main()
s716562951
s932505218
p03494
python
Time Limit Exceeded
loop = input() a = map(int, input().split()) cnt = 0 while(1): flg = 0 for i in a: if(a%2 == 1): flg = 1 else: i = i/2 if(flg == 0): cnt += 1 else: break print(cnt)
import sys def main(): N = int(input()) A = [int(_) for _ in input().split()] t = 0 while True: for i in range(N): if A[i] % 2 == 0: A[i] //= 2 else: print(t) sys.exit() t += 1 main()
s590017243
s932505218
p03494
python
Runtime Error
n=list(map(int,input().split())) m=list(map(int,input().split())) for i in range(n[1]): m.remove(max(m)) if(len(m)==0): break print(sum(m))
n=list(map(int,input().split())) m=list(map(int,input().split())) m.sort() if(n[0]<=n[1]): print(0) else: print(sum(m[0:n[0]-n[1]]))
s219790676
s906133971
p02785
python
Time Limit Exceeded
s=list(map(int,input())) if (s[0]+s[1]+s[2]>=22): print(bust) else: print(win)
s=list(map(int,input().split())) if (s[0]+s[1]+s[2]>=22): print("bust") else: print("win")
s250173642
s423002356
p02835
python
Runtime Error
cha=str(input()) if(cha==SUN): print(7) if(cha==SAT): print(1) if(cha==FRI): print(2) if(cha==THR): print(3) if(cha==WED): print(4) if(cha==TUE): print(5) if(cha==MON): print(6)
s=input() if(s=="SUN"): print(7) if(s=="MON"): print(6) if(s=="TUE"): print(5) if(s=="WED"): print(4) if(s=="THU"): print(3) if(s=="FRI"): print(2) if(s=="SAT"): print(1)
s476619621
s321863073
p02847
python
Runtime Error
print(r ** r)
m=int(input()) print(m * m)
s584100207
s982521120
p02859
python
Runtime Error
m=input() print(m*m)
m=int(input()) print(m * m)
s524411908
s982521120
p02859
python
Runtime Error