2 条题解
-
0
k, n = map(int, input().split()) ops = list(map(int, input().split())) increase = 0 length = 1 ls = [] for op in ops: if op == 0: length *= 2 else: length += length ls.append(length) for i in range(n - 1, -1, -1): half = ls[i] // 2 if k > half: k -= half if ops[i] == 1: increase += 1 print(chr(ord('a') + (increase % 26)))
信息
- ID
- 1085
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 9
- 标签
- 递交数
- 11
- 已通过
- 3
- 上传者