B07 - Convenience Store 2
https://atcoder.jp/contests/tessoku-book/tasks/math_and_algorithm_al
提出
code: python
t = int(input())
n = int(input())
lr = list(map(int, input().split())) for _ in range(n)
emp = 0 * t
for l, r in lr:
empl += 1
empr+1 -= 1
ans = 0
for v in emp:
ans.append(ans-1 + v)
print(ans)
解答
code: python
t = int(input())
n = int(input())
lr = list(map(int, input().split())) for _ in range(n)
b = 0 * (t + 1)
for l, r in lr:
bl += 1
br -= 1
# print(b)
# 2, 1, 1, -3, -1, 3, -3, 0, 0, 0, 0
ans = 0
for v in b:
ans.append(ans-1 + v)
for i in range(1, t+1):
print(ansi)