Skip to content

Commit e91f894

Browse files
committed
Finish question A file
1 parent 3387180 commit e91f894

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ABCクラス/AtCoder Beginner Contest 290/A - Contest Result.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,17 @@
1616
1≤B_1<B_2<…<B_M≤N
1717
入力は全て整数
1818
"""
19+
from typing import List
20+
21+
22+
class Solution:
23+
@staticmethod
24+
def find_contest_score(points: List[int], correct_questions: List[int]) -> int:
25+
return sum([points[question - 1] for question in correct_questions])
26+
27+
28+
if __name__ == '__main__':
29+
N, M = map(int, input().split())
30+
A = [int(n) for n in input().split()]
31+
B = [int(n) for n in input().split()]
32+
print(Solution.find_contest_score(A, B))

0 commit comments

Comments
 (0)