Skip to content

Commit 487a57c

Browse files
authored
Create sohuchangyouweipinhui.md
1 parent 1ff889b commit 487a57c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/sohuchangyouweipinhui.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
```python
2+
"""搜狐畅游第一题"""
3+
nums = [int(i) for i in input().split()]
4+
print(int(sum(nums) - (len(nums)-1)*(len(nums)-2)/2))
5+
6+
7+
"""唯品会第一题"""
8+
import heapq
9+
[k, n] = [int(i) for i in input().split()]
10+
topk = []
11+
for i in range(n):
12+
nums = [int(i) for i in input().split()]
13+
for num in nums:
14+
heapq.heappush(topk, num)
15+
res = 0
16+
for i in range(k):
17+
res = heapq.heappop(topk)
18+
print(res)
19+
20+
21+
"""唯品会第二题"""
22+
print(bin(sum([int(i, 2) for i in input().split()]))[2:])
23+
```

0 commit comments

Comments
 (0)