AtCoder 第6回 ドワンゴからの挑戦状 予選 参戦記
A - Falling Asleep
4分で突破. 書くだけ.
N = int(input())
total = 0
p = 0
d = {}
for _ in range(N):
s, t = input().split()
t = int(t)
total += t
d[s] = total
print(total - d[input()])
B - Fusing Slimes
敗退.
Go to list of users who liked
More than 3 years have passed since last update.
4分で突破. 書くだけ.
N = int(input())
total = 0
p = 0
d = {}
for _ in range(N):
s, t = input().split()
t = int(t)
total += t
d[s] = total
print(total - d[input()])
敗退.
Register as a new user and use Qiita more conveniently
Go to list of users who liked