#D. 考级202109-4:满足条件的数的累加

    Type: Default 1000ms 128MiB

考级202109-4:满足条件的数的累加

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

现有 n 个整数,将其中个位数为 k 的数进行累加求和。

输入格式

第一行两个整数 n、k,以空格分隔。( 0 < n < 1000, 0 ≤ k ≤ 9) 第二行 n 个非负整数,以空格分隔,每个数不大于 100000。

输出格式

输出满足题目要求的累加和。

输入数据 1

10 7

2 5 7 17 11 18 4 27 1 7

输出数据 1

58

数据范围与提示

一级测试第二轮

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
5
Start at
2023-7-25 9:45
End at
2023-8-19 9:45
Duration
600 hour(s)
Host
Partic.
24