eolymp
bolt
Try our new interface for solving problems
Məsələlər

Повторение цифры

dərc olunub 21.02.24 17:50:46

include <bits/stdc++.h>

define ll long long int

define ld long double

using namespace std; int main(){

ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n, ans = 0;
multiset<ll>s;
while(cin>>n){
    s.insert(n);
    ans++;
    if(s.count(n) > 1){
        cout<<ans;
        return 0;
    }
}

} //TECHNOBLADE NEVER DIES