206252026-01-08 08:24:03DhaneHaneBimmbamm (30)cpp17Elfogadva 30/301ms512 KiB
#include <iostream>
#include <string>
using namespace std;
int main(){
    long long db=0;
    long long n; cin>>n;
    for (int i=1;i<=n;++i){
        string s; cin>>s;
        if (i%5==0 && i%3==0){
            if (s[1]!='U'){
                cout<<i; return 0;
            }
        }
        else if (i%3==0){
            if (s[1]!='I'){
                cout<<i; return 0;
            }
        }
        else if (i%5==0){
            if (s[1]!='A'){
                cout<<i; return 0;
            }
        }
        else if (s[0]!='S'){
            cout<<i; return 0;
        }
    }
    cout<<"0";
    return 0;
}
RészfeladatÖsszpontTesztVerdiktIdőMemória
base30/30
1Elfogadva0/01ms512 KiB
2Elfogadva0/01ms316 KiB
3Elfogadva3/31ms316 KiB
4Elfogadva3/31ms316 KiB
5Elfogadva3/31ms316 KiB
6Elfogadva3/31ms316 KiB
7Elfogadva3/31ms316 KiB
8Elfogadva3/31ms316 KiB
9Elfogadva3/31ms316 KiB
10Elfogadva3/31ms316 KiB
11Elfogadva3/31ms316 KiB
12Elfogadva3/31ms316 KiB