214172026-01-13 07:59:24bombinigusiniBimmbamm (30)cpp11Accepted 30/301ms504 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int i=1;
    int hely=0;
    char t[5];
    while(n>0)
    {
        cin>>t;
        if(i%15==0){
            if(not(t[1]=='U') and hely==0)
            {
                hely=i;
            }
        }
        else if(i%5==0)
        {
            if(not(t[1]=='A') and hely==0)
            {
                hely=i;
            }
        }
        else if(i%3==0)
        {
            if(not(t[1]=='I') and hely==0)
            {
                hely=i;
            }
        }
        else{
            if(not(t[1]=='Z') and hely==0)
            {
                hely=i;
            }
        }
        n--;
        i++;
    }
    cout<<hely;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/01ms316 KiB
2Accepted0/01ms504 KiB
3Accepted3/31ms500 KiB
4Accepted3/31ms316 KiB
5Accepted3/31ms408 KiB
6Accepted3/31ms316 KiB
7Accepted3/31ms316 KiB
8Accepted3/31ms316 KiB
9Accepted3/31ms316 KiB
10Accepted3/31ms396 KiB
11Accepted3/31ms316 KiB
12Accepted3/31ms316 KiB