- 一级202305-4满足条件的数的累加
yhgbnvnhjjb j
- 2024-2-1 15:41:25 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n=0,k=0,a=0,b=0;
cin>>n>>k;
for(int i=1;i<=n;i++)
{
cin>>a;
if(a%10==k)
{
b+=a;
}
}
cout<<b;
return 0;
}
0 comments
No comments so far...
Information
- ID
- 939
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 6
- Tags
- # Submissions
- 35
- Accepted
- 12
- Uploaded By