救救我
  • 板块P1161 开灯
  • 楼主BearBiscuit
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/12/3 20:05
  • 上次更新2024/12/3 22:14:19
查看原帖
救救我
1538085
BearBiscuit楼主2024/12/3 20:05
n = int(input().strip())
op = []

for _ in range(n):
    a, t = input().split()
    a = float(a)
    t = int(t)
    op.append((a, t))

lights = set()

for a, t in op:
    k = int(a)
    for x in range(1, t + 1):
        ad = k * x
        if ad in lights:
            lights.remove(ad)
        else:
            lights.add(ad)

print(lights.pop())
2024/12/3 20:05
加载中...