- 考级202109-4:满足条件的数的累加
wsrfsdgbedxvg
- 2024-2-2 15:23:11 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n=0,k=0,d=0;
long long sum=0;
cin>>n>>k;
for(int i=0;i<n;i++)
{
cin>>d;
if(d%10==k)
{
sum+=d;
}
}
cout<<sum;
return 0;
}
0 comments
No comments so far...
Information
- ID
- 563
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- # Submissions
- 126
- Accepted
- 25
- Uploaded By