#include <iostream>
#include <vector>
using namespace std;
int main() {
int count = 0;
int answer = 0;
cin >> count;
for(size_t i = 0; i < count; i++)
{
int n = 0;
cin >> n;
(n < 100 && n > 9 && ((n - 5) % 10 == 0 || (n - 7) % 10 == 0)) ? answer++ : n;
}
cout << answer << endl;
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
#include <vector>
using namespace std;
int main() {
int count = 0;
int answer = 0;
cin >> count;
for(size_t i = 0; i < count; i++)
{
int n = 0;
cin >> n;
(n < 100 && n > 9 && ((n - 5) % 10 == 0 || (n - 7) % 10 == 0)) ? answer++ : n;
}
cout << answer << endl;
}