mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-05-10 08:10:27 +08:00
21 lines
247 B
C++
21 lines
247 B
C++
#include <iostream>
|
|
#include <iomanip>
|
|
using namespace std;
|
|
int main(){
|
|
int a,b[10000],c,sum=0;
|
|
cin >>a;
|
|
for(int i=0;i<a;i++){
|
|
cin >>b[i];
|
|
}
|
|
cin >>c;
|
|
for(int i=0;i<a;i++){
|
|
if(b[i]%10==c){
|
|
sum+=b[i];
|
|
}
|
|
}
|
|
cout <<sum;
|
|
return 0;
|
|
}
|
|
|
|
|