-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinputs.py
58 lines (36 loc) · 1.18 KB
/
inputs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import sys
from collections import deque
n = int(sys.stdin.readline().strip())
d = deque([1, 2, 3, 4, 5])
for i in range(0, n, +1):
str = (sys.stdin.readline().strip())
n = int(input())
n = int(sys.stdin.readline())
a = (list(map(int, input().strip().split(' '))))
a = (list(map(int, sys.stdin.readline().strip().split(' '))))
# print ((str (ser[k])).zfill (5), end=' ')
n, k = (map(int, sys.stdin.readline().strip().split(' ')))
n, k = (map(int, input().strip().split(' ')))
string, k = (map(str, input().strip().split(' ')))
a = [int(input()) for b in (range(n))]
arr = [int(x) for x in sys.stdin.readline().split()]
# initialize dictionary
dict = {}
ans = []
for i, j in enumerate(a):
q = j % k
ans.append((i, j, q))
ans.sort(key=lambda x: x[0])
ans.sort(key=lambda x: x[2])
for i in ans:
# print (i[1], end=' ', sep='' )
def most_common(lst):
return max(set(lst), key=lst.count)
import sys
def main():
n = int(sys.stdin.readline().strip())
for i in range(0, n, +1):
a = (list(map(int, sys.stdin.readline().strip().split(' '))))
n, k = (map(int, sys.stdin.readline().strip().split(' ')))
if __name__ == "__main__":
main()