Untitled

mail@pastecode.io avatar
unknown
c_cpp
6 months ago
391 B
4
Indexable
Never
#include <iostream>
using namespace std;

int main() {
    int particularGroup;
    cin >> particularGroup;

    int studentGroup;
    cin >> studentGroup;

    int count = 0;
    while (studentGroup > 0) {
        if (studentGroup % 10 == particularGroup) {
            count++;
        }
        studentGroup /= 10;
    }

    cout << count << endl;

    return 0;
}