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
s688794369
p03494
u514383727
1537499277
Python
Python (3.4.3)
py
Runtime Error
17
2940
139
i = int(input()) num = map(int, input().split()) count = 0 while True: if type(sum(num/2)) is float: break count += 1 print(count)
s195077893
p03494
u514383727
1537499089
Python
Python (3.4.3)
py
Runtime Error
17
2940
141
i = int(input()) num = map(int, input().split()) count = 0 while True: if(type(sum(num/2)) == "float"): break count += 1 print(count)
s141202038
p03494
u479953984
1536954724
Python
Python (3.4.3)
py
Runtime Error
18
3064
516
#-*- coding: utf-8 -*- #関数は気持ち上に書いておきたい def check_num(): for i in range(N): if A[i] % 2 != 0: return False else: A[i] = A[i] / 2 return True #C++のmain関数みたいな if __name__ == '__main__': N = int(input()) A = list(map(int, input().split())) ans = 0 #counterと同じ ...
s890900638
p03494
u094565093
1536165231
Python
Python (3.4.3)
py
Runtime Error
17
3064
268
N=int(input()) A=list(input().split()) num=int(A[0]) while num%2!=1 and num>0: num=num/2 cnt+=1 mini=cnt for i in range(N): cnt=0 num=int(A[i]) while num%2!=1 and num>0: num=num/2 cnt+=1 if cnt<mini: mini=cnt print(mini)
s030007239
p03494
u094565093
1536165018
Python
Python (3.4.3)
py
Runtime Error
17
3064
268
N=int(input()) A=list(input().split()) num=int(A[0]) while num%2!=1 and num>0: num=num/2 cnt+=1 mini=cnt for i in range(N): cnt=0 num=int(A[i]) while num%2!=1 and num>0: num=num/2 cnt+=1 if cnt<mini: mini=cnt print(mini)
s898631240
p03494
u094565093
1536164899
Python
Python (3.4.3)
py
Runtime Error
17
3064
268
N=int(input()) A=list(input().split()) num=int(A[0]) while num%2!=1 and num>0: num=num/2 cnt+=1 mini=cnt for i in range(N): cnt=0 num=int(A[i]) while num%2!=1 and num>0: num=num/2 cnt+=1 if cnt<mini: mini=cnt print(mini)
s481876494
p03494
u383267466
1535755121
Python
Python (3.4.3)
py
Runtime Error
18
3060
225
i = int(input()) l = [int(n) for n in input().split(' ')] t = 0 bool = True while bool: t += 1 for j in l: if j % 2 == 1: bool = False break else: l /= 2 print(t-1)
s851097402
p03494
u383267466
1535754440
Python
Python (3.4.3)
py
Runtime Error
17
3060
191
i = int(input()) l = [int(i) for i in list(input())] j = 0 t = 0 while True: k = l[j] % 2 if k == 1: break else: l[j] /= 2 j = j + 1 % i if j == 0: t += 1 print(t)
s075935393
p03494
u659640418
1534122917
Python
Python (3.4.3)
py
Runtime Error
17
2940
163
import math n = input() a = list(map(int, input().split())) ans = float("inf") for i in a: ans = min(ans, len(bin(i) - bin(i).rfind("1") - 1) print(round(ans))
s483405387
p03494
u659640418
1534122871
Python
Python (3.4.3)
py
Runtime Error
17
2940
151
n = input() a = list(map(int, input().split())) ans = float("inf") for i in a: ans = min(ans, len(bin(i) - bin(i).rfind("1") - 1) print(round(ans))
s994493523
p03494
u065923107
1532722676
Python
Python (3.4.3)
py
Runtime Error
18
3060
217
a, b, c, x = map(int, [input() for i in range(4)]) ans = 0 for i in range(a+1): for j in range(b+1): for k in range(c+1): if i * 500 + j * 100 + k * 50 == x: ans += 1 print(ans)
s605026934
p03494
u870998297
1531959985
Python
Python (3.4.3)
py
Runtime Error
17
2940
994
#include "bits/stdc++.h" using namespace std; int div_count(int); int main(void) { int N; cin >> N; // 割れる最大回数の計算 int count = 0, tmp; for (int i=0; i < N; i++) { int A_i; std::cin >> A_i; tmp = div_count(A_i); // 2の倍数の判定 2の倍数でなければ 0 を出力 if (tmp >= 1) { ...
s814852979
p03494
u176796545
1530388124
Python
Python (3.4.3)
py
Runtime Error
17
2940
172
n=int(input()) A=map(int,input().split()) c=0 loop=True while(loop): for a in A: if a%2!=0: loop=False break a = map(lambda a//2, a) count+=1 print(c)
s658028906
p03494
u409064224
1530332922
Python
Python (3.4.3)
py
Runtime Error
17
3060
227
n = int(input()) a,b,c = list(map(int,input().split())) num = 0 while True: if a%2 == 0 and b%2 == 0 and c%2 == 0: a = a/2 b = b/2 c = c/2 num += 1 else: print(num) break
s229656442
p03494
u108808596
1529561589
Python
Python (2.7.6)
py
Runtime Error
10
2568
151
N=int(raw_input()) A=map(int,raw_input().split()) def f(x): cnt = 0 while x >= 2: x /= 2 cnt += 1 return cnt C=map(f,A) pritn min(C)
s721826805
p03494
u153729035
1528939984
Python
Python (3.4.3)
py
Runtime Error
17
2940
119
from math import gcd from functools import reduce input() print(len(bin(reduce(gcd,list(map(int,input().split())))))-3)
s216078043
p03494
u253041628
1528813285
Python
Python (3.4.3)
py
Runtime Error
17
2940
307
#codigng: utf-8 from sys import stdin N = int(stdin.readline().rstrip()) num = stdin.readline().rstrip().split() i = 0 Flag = True while Flag: for x in num: if x % 2 == 0: x /= 2 else: print(i) Flag = False break else: i += 1
s424942563
p03494
u253041628
1528813103
Python
Python (3.4.3)
py
Runtime Error
17
2940
326
#codigng: utf-8 from sys import stdin N = int(stdin.readline().rstrip()) num = stdin.readline().rstrip().split() i = 0 Flag = True while Flag: for i, x in enumerate(num): if x % 2 == 0: num[i] /= 2 else: print(i) Flag = False break else: i...
s211725012
p03494
u253041628
1528812881
Python
Python (3.4.3)
py
Runtime Error
17
2940
295
#codigng: utf-8 from sys import stdin N = int(stdin.readline().rstrip()) num = stdin.readline().rstrip().split() i = 0 Flag = True while Flag: for x in num: if x % 2 == 0: x /= 2 else: print(i) Flag = False break
s296073774
p03494
u120431259
1527919521
Python
Python (3.4.3)
py
Runtime Error
17
3064
455
n = int(input()) e = [[int(i) for i in input().split()] for i in range(n)] numbers = e[0] def has_odd(numbers): odds = [number for number in numbers if number%2 == 1] if len(odds) > 0: return True else: return False divid_count = 0 while True: if not has_odd(numbers): print("...
s209650742
p03494
u545411641
1526720046
Python
Python (3.4.3)
py
Runtime Error
17
2940
189
N = int(input()) A = [int(a) for a in input().split()] cnt = 0 while True: for i in range(N): if A[i] % 2 == 1: print(cnt) exit(0) else: A[i] = A[i] // 2 cnt++
s459673427
p03494
u545411641
1526719964
Python
Python (3.4.3)
py
Runtime Error
17
2940
188
N = int(input()) A = [int(a) for a in input().split()] cnt = 0 while True: for i in range(N): if A[i] % 2 == 1: print cnt exit(0) else: A[i] = A[i] // 2 cnt++
s684676830
p03494
u289923433
1526440998
Python
Python (3.4.3)
py
Runtime Error
21
3316
197
input_num = input() input = input().split() times = 0 i = 0 while True: if int(input[i]) % 2 == 0: i += 1 if i == input_num: i = 0 times += 1 else: break print(times)
s325582571
p03494
u289923433
1526440777
Python
Python (3.4.3)
py
Runtime Error
17
2940
181
input_num = input() input = input().split() times = 0 i = 0 while true: if input % 2 == 0: i += 1 if i % input_num == 0: times += 1 else: break print(times)
s678750192
p03494
u351721573
1526223358
Python
Python (3.4.3)
py
Runtime Error
18
3064
681
import fraction from functools import reduce def factorize(n): fct = [] # prime factor b, e = 2, 0 # base, exponent while b * b <= n: while n % b == 0: n = n // b e = e + 1 if e > 0: fct.append((b, e)) b, e = b + 1, 0 if n > 1: fct.a...
s588725167
p03494
u735912743
1523484891
Python
Python (3.4.3)
py
Runtime Error
18
3060
197
import math n = int(input()) a = map(int, input().split()) def cnt(arr): g = c = 0 for i in arr: g = math.gcd(g,i) while g%2==0: g/=2 c += 1 return c print(cnt(a))
s495982955
p03494
u400596590
1523320909
Python
PyPy3 (2.4.0)
py
Runtime Error
164
38256
164
import math n = input() a = list(map(int, input().split())) ans = float('inf') for i in a: ans = min(ans, len(bin(i) - bin(i).rfind('1') - 1) print(round(ans))
s434978791
p03494
u400596590
1523320872
Python
Python (3.4.3)
py
Runtime Error
17
2940
164
import math n = input() a = list(map(int, input().split())) ans = float('inf') for i in a: ans = min(ans, len(bin(i) - bin(i).rfind('1') - 1) print(round(ans))
s383060780
p03494
u734805215
1522620435
Python
Python (3.4.3)
py
Runtime Error
17
2940
190
import sympy as sp x=[] N =int(input()) array=list(map(int, input().split())) for i in array: if i%2==0: x.append(sp.factorint(i)[2]) else: x.append(0) print(min(x))
s840741702
p03494
u406828576
1521861901
Python
Python (3.4.3)
py
Runtime Error
17
2940
248
kazu = int(input()) nums = list(map(int, input().split())) count = 0 flg = True while flg: for i in range(kazu): if nums[i] % 2 == 1: flg = False break else: nums[i] /= 2 finally: count += 1 print(count)
s700491852
p03494
u406828576
1521861643
Python
Python (3.4.3)
py
Runtime Error
17
2940
230
kazu = input() nums = list(map(int, input().split())) count = 0 flg = True while flg: for i in range(kazu): if nums[i] % 2 == 1: flg = False break else: nums[i] /= 2 count += 1 print(count)
s963040680
p03494
u406828576
1521861461
Python
Python (3.4.3)
py
Runtime Error
17
2940
227
input() nums = lint(map(int, input().split())) count = 0 flg = True while flg: for i, n in enumerate(nums): if n % 2 == 1: flg = False break else: nums[i] = n / 2 count += 1 print(count)
s272816869
p03494
u406828576
1521861215
Python
Python (3.4.3)
py
Runtime Error
17
2940
221
input() nums = map(int, input().split()) count = 0 flg = True while flg: for i, n in enumerate(nums): if n % 2 == 1: flg = False break else: nums[i] = n / 2 count += 1 print(count)
s136238411
p03494
u406828576
1521861185
Python
Python (3.4.3)
py
Runtime Error
17
2940
221
input() nums = map(int, input().split()) count = 0 flg = True while Flg: for i, n in enumerate(nums): if n % 2 == 1: flg = False break else: nums[i] = n / 2 count += 1 print(count)
s903982973
p03494
u406828576
1521861073
Python
Python (3.4.3)
py
Runtime Error
19
2940
193
input() nums = map(int, input().split()) count = 0 while True: for i, n in enumerate(nums): if n % 2 == 1: break else: nums[i] = n / 2 count += 1 print(count)
s811712740
p03494
u406828576
1521860939
Python
Python (3.4.3)
py
Runtime Error
2104
2940
185
nums = map(int, input().split()) count = 0 while True: for i, n in enumerate(nums): if n % 2 == 1: break else: nums[i] = n / 2 count += 1 print(count)
s185679661
p03494
u127856129
1521833986
Python
Python (3.4.3)
py
Runtime Error
17
2940
127
a=input() b=list(map(int,input().split()) count=0 for i in b: if b%2==0: count+=1 continue else: break
s416896580
p03494
u747837595
1521323847
Python
Python (3.4.3)
py
Runtime Error
28
3956
215
import re; import sys; import math; from functools import reduce; sys.stdin.readline() a=reduce(math.gcd,map(int, sys.stdin.readline()[:-1].split())) m=re.search(r'.*?1?(0+)$','{0:b}0'.format(a)) print(len(m[1])-1)
s180565512
p03494
u477651929
1521234851
Python
Python (3.4.3)
py
Runtime Error
17
3060
147
import math n = input() a = list(map(int, input().split())) ans = float('inf') for i in a: ans = min(ans, len(bin(i)) - bin(i).refind('1') - 1)
s057789350
p03494
u477651929
1521234731
Python
Python (3.4.3)
py
Runtime Error
17
3060
147
import math n = input() a = list(map(int, input().split())) ans = float('inf') for i in a: ans = min(ans, len(bin(i)) - bin(i).refind('1') - 1)
s383170291
p03494
u757919796
1521130242
Python
Python (3.4.3)
py
Runtime Error
17
2940
163
N = int(input()) As = [int(input()) for _ in range(N)] sunuke = 0 while all([a % 2 == 0 for a in As]): sunuke += 1 As = [a / 2 for a in As] print(sunuke)
s431502021
p03494
u131273629
1521029770
Python
Python (3.4.3)
py
Runtime Error
17
2940
200
n = int(input()) a = list(map(int, input().split())) end = 0 count = 0 while: for i in range(n): if a[i]%2 == 1: end = 1 break a[i] = a[i]/2 if end == 1: break count += 1 print(count)
s729707213
p03494
u702582248
1520476830
Python
Python (3.4.3)
py
Runtime Error
18
2940
92
input();print(max(int(i) for i in input().split() if int(i) in [1 << i for i in range(9)]))
s510574140
p03494
u702582248
1520476763
Python
Python (3.4.3)
py
Runtime Error
17
2940
86
n = [1 << i for i range(9)] print(max(int(i) for i in input().split() if int(i) in n))
s617761981
p03494
u019584841
1519745358
Python
Python (3.4.3)
py
Runtime Error
18
2940
213
n=int(input()) l=maplist((int,input().split())) count=0 while True: if all(elem % 2==0 for elem in l): count+=1 for i in range(n): l[i]=l[i]//2 else: break print(count)
s060578687
p03494
u820351940
1519176883
Python
Python (3.4.3)
py
Runtime Error
17
2940
114
n = int(input()) a = list(map(int, input().split())) for i in range(n): if a[i] & 1: break a[i] = x//2 print(i)
s354507597
p03494
u390958150
1516793707
Python
Python (3.4.3)
py
Runtime Error
17
3060
213
import math as m n = int(input()) numbers = map(int,input().split()) order = [] for i in range(n): if numbers[i] == 0: a = 0 else: a = m.floor(m.log(numbers[i],2)) order.append(a) print(min(order))
s867025068
p03494
u390958150
1516793655
Python
Python (3.4.3)
py
Runtime Error
17
3060
216
import math as m n = int(input()) numbers = map(int,input().split()) order = [] for i in range(6): if numbers[i] == 0: a = 0 else: a = m.floor(m.log(numbers[i],2)) order.append(a) print(min(order))
s542811207
p03494
u854627522
1514093671
Python
Python (3.4.3)
py
Runtime Error
18
2940
218
n = int(input()) nums = [i for i in map(int, sys.stdin.readline().split())] cnt = 0 while True: for num in nums: if num % 2 == 0: num /= 2 else: break cnt += 1 print(cnt)
s190326362
p03494
u359856428
1513630123
Python
Python (3.4.3)
py
Runtime Error
17
2940
143
s = input() t = input() s_2 = "".join(sorted(s)) t_2 = "".join(sorted(t,reverse = True) if(s_2 < t_2): print("Yes") else: print("No")
s289101579
p03494
u123896133
1513184679
Python
Python (3.4.3)
py
Runtime Error
17
2940
206
def how_many_times_divisible(n): ans = 0 while n % 2 == 0: n /= 2 ans += 1 return ans n = int(raw_input()) a = map(int, raw_input().split()) ans = min(map(how_many_times_divisible, a)) print(ans)
s138261502
p03494
u466331465
1513109003
Python
Python (3.4.3)
py
Runtime Error
17
2940
238
import numpy as np N = list(input()) a = list(map(int,input().split())) for i in range(1,10): b = np.array([n/2 if n%2==0 else 0 for n in a]) a = b if 0 in list(b): print(i-1) exit()
s803216567
p03494
u315419875
1513034015
Python
Python (3.4.3)
py
Runtime Error
17
2940
173
n=int(input()) num=[] i=0 while n>0 num.add(int(input())) n -= 1 while True: for j in num: if j%2==1: print(i) break else: j=j/2 i += 1
s834670767
p03494
u601913978
1512960248
Python
Python (2.7.6)
py
Runtime Error
10
2568
254
raw_input() t=map(int, raw_input().split(" ")) count=0 while True: for i in t: flag=True if i % 2 != 0: flag=False if !flag: break else: t = [x / 2 for x in t] count+=1 print count
s991210309
p03494
u657357805
1512959766
Python
Python (3.4.3)
py
Runtime Error
2104
2940
179
n = input() b = [int(x) for x in input().split()] c = 0 while True: for i,x in enumerate(b): if x%2 != 0: break b[x] = int(x/2) c += 1 print(c)
s855300343
p03494
u158225062
1512959541
Python
Python (3.4.3)
py
Runtime Error
1378
21356
259
# coding: utf-8 import numpy as np N = input() array = map(int,input().split()) resalt = [] if array[0] != (array[0]/2==0): print("0") else: flg = 0 while 1: array = array/2 flg += 1 for i in range(N): if array[i]/2 != 0: break print(flg)
s338633839
p03494
u657357805
1512959450
Python
Python (3.4.3)
py
Runtime Error
17
3060
184
n = input() b = ['{0:b}'.format(int(x)) for x in input().split()] a = 0 for c in b: m = re.match(r'.*(10*)$',c) if m is None: continue a = max(a,len(m[1])-1) print(a)
s485185307
p03494
u657357805
1512959395
Python
Python (3.4.3)
py
Runtime Error
17
3060
203
n = input() b = ['{0:b}'.format(int(x)) for x in input().split()] a = 0 for c in b: m = re.match(r'.*(10*)$',c) print(m[1]) if m is None: continue a = max(a,len(m[1])-1) print(a)
s510928475
p03494
u060464363
1512959315
Python
Python (3.4.3)
py
Runtime Error
17
2940
234
N = int(input()) a = [] a.append(list(map(int, input().split()))) ans=0 while True: for i in range(N): if(a[i]%2 == 1): break: ans = ans+1 for i in range(N): a[i] = a[i]/2 print(ans)
s139238129
p03494
u007808656
1512959163
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38640
131
import numpy as np s=input() ar=np.array(list(map(int,input().split()))) i=0 while(np.all(ar%2==0)): i+=1 ar//=2 print(i)
s175075012
p03494
u391533749
1512958569
Python
Python (3.4.3)
py
Runtime Error
117
3700
232
import functools import math N = int(input()) A = list(map(int, input().split())) x = functools.reduce(math.gcd, A) flag = 0 i = 0 while flag == 0: if x % pow(2,i) == 0: i += 1 else : flag = 1 print(i-1)
s813274319
p03494
u391533749
1512958387
Python
Python (3.4.3)
py
Runtime Error
135
4196
232
import functools import math N = int(input()) A = list(map(int, input().split())) x = functools.reduce(math.gcd, A) flag = 0 i = 0 while flag == 0: if x % pow(2,i) == 0: i += 1 else : flag = 1 print(i-1)
s221775888
p03495
u043340861
1601246886
Python
Python (3.8.2)
py
Runtime Error
26
9132
113
n=int(input()) k=int(input()) a=list(map(int,input().split())) c=0 for i in a: if a>k: c+=1; print(c)
s655344598
p03495
u043340861
1601246797
Python
Python (3.8.2)
py
Runtime Error
27
8960
111
n=int(input()) k=int(input()) a=list(map(int,input().split())) c=0 for i in a: if a>k: c++; print(c)
s265537528
p03495
u440276250
1600719935
Python
Python (3.8.2)
py
Runtime Error
128
35124
320
from collections import Counter n, k = map(int, input().split()) s = list(map(int, input().split())) num = Counter(s) if len(num) <= k: print(0) else: cnt = len(num) - k ans = 0 i = 0 for v in sorted(num.values()): if cnt == i: break ans += v i += 1 print(ans)
s285917762
p03495
u498531348
1600561651
Python
PyPy3 (7.3.0)
py
Runtime Error
2209
116228
373
import itertools import collections N, K = map(int, input().split()) A = list(map(int, input().split())) a = collections.Counter(A) V = list(a.values()) V = sorted(V) if N <= K: print(0) exit() L = len(V) if L <= K: print(0) exit() cn = 0 for i in range(L): cn = cn + V[i] del V[0...
s903611138
p03495
u620846115
1600541930
Python
Python (3.8.2)
py
Runtime Error
74
32328
196
n,k= map(int,input().split()) Xl = list(map(int,input().split())) from collections import Counter Xdic = Counter(xl) valuelist = sorted(list(Xdic.values()), reverse=True) print(sum(valuelist[k:]))
s101786220
p03495
u620846115
1600541880
Python
Python (3.8.2)
py
Runtime Error
79
32364
196
n,k= map(int,input().split()) Xl = list(map(int,input().split())) from collections import Counter Xdic = Counter(xl) valuelist = sorted(list(Xdic.values(), reverse=True)) print(sum(valuelist[k:]))
s644908601
p03495
u620846115
1600541833
Python
Python (3.8.2)
py
Runtime Error
79
32332
194
n,k= map(int,input().split()) Xl = list(map(int,input().split())) from collections import Counter Xdic = Counter(xl) valuelist = sorted(list(Xdic.values), reverse=True) print(sum(valuelist[k:]))
s736080605
p03495
u613920660
1600361380
Python
Python (3.8.2)
py
Runtime Error
216
42688
396
N,K=map(int,input().strip().split()) A=list(map(int,input().strip().split())) d={} for n in range(N): if d.get(A[n])==None: d[A[n]]=1 else: d[A[n]]+=1 dn=sorted(d.items(),key=lambda x:x[1]) if K>=len(d): print(0) else: cnt=0 ans=0 for n in range(len(dn)): ans+=dn[n][1...
s516113269
p03495
u382209062
1599942552
Python
Python (3.8.2)
py
Runtime Error
27
8844
155
N, K = map(int, input().split()) *A, = map(int, input().split()) d = [0]*(N+1) for a in A: d[a] += 1 d.sort() d.reverse() print(sum(d[K:]))
s493464832
p03495
u434966508
1599425632
Python
PyPy3 (7.3.0)
py
Runtime Error
254
99912
232
N, K = map(int, input().split()) A = list(map(int, input().split())) # B = [0 for i in range(N + 1)] B=[] for a in A: B[a] += 1 # nums = [b for b in B if b > 0] nums=B.sort() n = len(nums) print(0 if n<=K else sum(nums[:n - K]))
s863975076
p03495
u198336369
1598344052
Python
Python (3.8.2)
py
Runtime Error
106
32180
222
n, k = map(int, input().split()) a = list(map(int, input().split())) b = [0]*n for i in range(n): b[a[i]] += 1 c = [i for i in b if i != 0] c.sort() if len(c) - k > 0: print(sum((c[0:len(c)-k]))) else: print(0)
s225196280
p03495
u198336369
1598343864
Python
Python (3.8.2)
py
Runtime Error
107
32284
224
n, k = map(int, input().split()) a = list(map(int, input().split())) b = [0]*n for i in range(n): b[a[i-1]] += 1 c = [i for i in b if i != 0] c.sort() if len(c) - k > 0: print(sum((c[0:len(c)-k]))) else: print(0)
s344375842
p03495
u198336369
1598343838
Python
Python (3.8.2)
py
Runtime Error
109
32188
224
n, k = map(int, input().split()) a = list(map(int, input().split())) b = [0]*n for i in range(n): b[a[i-1]] += 1 c = [i for i in b if i != 0] c.sort() if len(c) - k > 0: print(sum((c[0:len(c)-k]))) else: print(0)
s611127925
p03495
u106778233
1597703484
Python
Python (3.8.2)
py
Runtime Error
103
32332
261
N,K = map(int,input().split()) A = list(map(int,input().split())) A.sort() temp = 1 V = [] for i in range(n-1): if A[i] == A[i+1]: temp+=1 else: V.append(temp) temp = 1 V.append(temp) V.sort() ans = N- sum(V[-k:]) print(ans)
s631831190
p03495
u112247039
1597216051
Python
Python (3.8.2)
py
Runtime Error
70
32368
184
n,k = map(int,input().split()) l = list(map(int, input().split())) freq = [0]*n+1 for i in l: freq[i]+=1 freq.sort() vf = len(freq) - k if len(freq)> k else 0 print(sum(freq[:vf]))
s606340524
p03495
u112247039
1597215974
Python
Python (3.8.2)
py
Runtime Error
93
32256
143
n,k = map(int,input().split()) l = list(map(int, input().split())) freq = [0]*n for i in l: freq[i]+=1 freq.sort() print(sum(freq[:n-k+1]))
s797552307
p03495
u112247039
1597215799
Python
Python (3.8.2)
py
Runtime Error
96
32156
182
n,k = map(int,input().split()) l = list(map(int, input().split())) freq = [0]*n for i in l: freq[i]+=1 freq.sort() vf = len(freq) - k if len(freq)> k else 0 print(sum(freq[:vf]))
s557374408
p03495
u112247039
1597214348
Python
Python (3.8.2)
py
Runtime Error
47
24360
234
n,k = map(int,input().split()) l = map(int, input().split()) def counter(l): count = {} for i in l: count[i] = l.count(i) return sorted(count.values()) freq = counter(l) print(len(freq) - k if len(freq)> k else 0)
s066775383
p03495
u755313517
1596586591
Python
Python (3.8.2)
py
Runtime Error
2206
32212
267
n,k=map(int,input().split()) a=list(map(int,input().split())) x=[0 for i in range(n)] y=[] s=0 for i in range(n): if a[i] in a: x[a[i]-1]+=1 for i in range(n): if x[i]: y.append(x[i]) y.sort() i=0 while(len(y)>k): s+=y[i] y.pop(i) i+=1 print(s)
s006776812
p03495
u125269142
1596156311
Python
Python (3.8.2)
py
Runtime Error
2207
33384
353
n, k = map(int, input().split()) num_lists = list(map(int, input().split())) num_counts = dict() if len(set(num_lists)) <= k: ans = 0 else: for i in set(num_lists): num_counts[i] = num_lists.count(i) numbers = [num_counts.values()] numbers.sort() ans = 0 for i in range(len(set(num_lists)) - k): ...
s845934590
p03495
u125269142
1595603154
Python
Python (3.8.2)
py
Runtime Error
25
8924
350
n, k = map(int, input().split()) num_lists = list(map(int, input().split())) if len(set(num_lists)) <= k: ans = 0 else: num_counts = {} for i in set(num_lists): num_counts[i] = num_lists.count(i) numbers = list(num_counts.values()) numbers.sort() ans = 0 for i in range(k - len(set(num_lists)): ...
s953256640
p03495
u125269142
1595603080
Python
Python (3.8.2)
py
Runtime Error
25
9004
347
n, k = map(int, input().split()) num_lists = list(map(int, input().split())) if len(set(num_lists)) <= k: ans = 0 else: num_counts = {} for i in set(num_lists): num_counts[i] = num_lists.count(i) numbers = list(num_counts.values) numbers.sort() ans = 0 for i in range(k - len(set(num_lists)): a...
s160230204
p03495
u539123425
1594630135
Python
Python (3.8.2)
py
Runtime Error
80
32168
309
n,k = map(int,input().split()) a = list(map(int,input().split())) if(len(set(a)) <= k): print(0) else: dic_a = {x:0 for x in set(A)} for i in a: dic_a[i] += 1 sum = 0 a = sorted(dic_a.items(), key=lambda x: x[0]) for i in range(k,len(a)): sum += a[i][1] print(sum)
s842687738
p03495
u159335277
1593740102
Python
Python (3.8.2)
py
Runtime Error
124
35320
258
from collections import defaultdict n, k = list(map(int, input().split())) a = list(map(int, input().split())) d = defaultdict(int) for x in a: d[x] += 1 av = reverse(sorted(d.values())) ks = 0 idx = 0 while ks < k: ks += av[idx] idx += 1 print(idx)
s420791726
p03495
u554784585
1593734189
Python
Python (3.8.2)
py
Runtime Error
228
43020
386
N,K=map(int,input().split()) A=list(map(int,input().split())) kind=1 A.sort() for i in range(N-1): if A[i]!=A[i+1]: kind+=1 if N!=1: if A[0]!=A[1]: kind+=1 else: kind=1 if kind>K: flood_kind=kind-K else: flood_kind=0 import collections c=collections.Counter(A) li=c.most_common() ans=...
s212494451
p03495
u554784585
1593733665
Python
Python (3.8.2)
py
Runtime Error
235
43036
386
N,K=map(int,input().split()) A=list(map(int,input().split())) kind=1 A.sort() for i in range(N-1): if A[i]!=A[i+1]: kind+=1 if N!=1: if A[0]!=A[1]: kind+=1 else: kind=1 if kind>K: flood_kind=kind-K else: flood_kind=0 import collections c=collections.Counter(A) li=c.most_common() ans=...
s341362135
p03495
u554784585
1593733193
Python
Python (3.8.2)
py
Runtime Error
218
42972
369
N,K=map(int,input().split()) A=list(map(int,input().split())) kind=1 A.sort() for i in range(N-1): if A[i]!=A[i+1]: kind+=1 if N!=1: if A[0]!=A[1]: kind+=1 if kind>K: flood_kind=kind-K else: flood_kind=0 import collections c=collections.Counter(A) li=c.most_common() ans=0 for k in range(...
s345399441
p03495
u731467249
1593638490
Python
Python (3.8.2)
py
Runtime Error
90
32168
185
N, K = map(int, input().split()) A = list(map(int, input().split())) li = [0]*10**5 for i in range(N): li[A[i]] += 1 # print(li) li.sort(reverse=True) # print(li) print(sum(li[K:]))
s945030048
p03495
u731467249
1593638397
Python
Python (3.8.2)
py
Runtime Error
70
32376
158
N, K = map(int, input().split()) A = list(map(int, input().split())) li = [0]*10 for i in range(N): li[A[i]] += 1 li.sort(reverse=True) print(sum(li[K:]))
s949980491
p03495
u496619173
1592953146
Python
Python (3.8.2)
py
Runtime Error
84
32164
159
n, k = map(int, input().split()) A = list(map(int, input().split())) B = [] C = set(A); for i in C: B.append(C.count(i)) print(sum(sorted(B)[:len(C) - k]))
s882114108
p03495
u496619173
1592952980
Python
Python (3.8.2)
py
Runtime Error
87
32152
161
n, k = map(int, input().split()) A = list(map(int, input().split())) C = set(A); B = [] for i in C: B.append(C.count(i)) print(sum(sorted(B)[:len(C) - k]))
s379384468
p03495
u496619173
1592952841
Python
Python (3.8.2)
py
Runtime Error
89
40564
147
n, k = map(int, input().split()) A = set(map(int, input().split())) B = [] for i in A: B.append(A.count(i)) print(sum(sorted(B)[:len(A) - k]))
s450391391
p03495
u496619173
1592952798
Python
Python (3.8.2)
py
Runtime Error
25
8928
170
n, k = map(int, input().split()) A = set(map(int, input().split())) B = [] for i in A: B.append(A.count(i)) print(sum(sorted(B)[:len(A) - k]))
s406862281
p03495
u537976628
1592937781
Python
Python (3.8.2)
py
Runtime Error
24
8952
24
10 3 5 1 3 2 4 1 1 2 3 4
s719277821
p03495
u548525760
1592697218
Python
Python (3.8.2)
py
Runtime Error
2206
42952
242
N, K = map(int, input().split()) A = list(map(int, input().split())) import collections a = collections.Counter(A) d = 0 for i in range(K): d += a.most_common()[i][1] ans = len(A) - d if ans <= 0: print('0') else: print(ans)
s330547561
p03495
u736546944
1592450779
Python
Python (3.4.3)
py
Runtime Error
17
2940
24
10 3 5 1 3 2 4 1 1 2 3 4
s540046398
p03495
u789565565
1592361121
Python
Python (3.4.3)
py
Runtime Error
17
2940
135
n,k = map(int,input().split()) A = Counter(list(map(int,input().split()))) print(sum(sorted(A.values(),reverse = True)[k:]))
s203959071
p03495
u256363575
1592083535
Python
Python (3.4.3)
py
Runtime Error
18
3064
118
N,K=map(int,input().split()) A=Counter(list(map(int,input().split())) ) print(sum(sorted(A.keys(), reverse=True)[K:]))