114512024-09-26 08:33:13tKriszBimmbamm (30)cpp14Accepted 30/303ms504 KiB
#include <iostream>

using namespace std;

int main()
{
    char a,b;
    int n;
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>b>>a>>b>>b;
        if((a=='Z'&&i%3*i%5)||(a=='I'&&i%3==0&&i%5)||(a=='A'&&i%3&&i%5==0)||(a=='U'&&i%3+i%5==0)){
            continue;
        }
        else{
            cout<<i;
            break;
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/03ms360 KiB
2Accepted0/03ms360 KiB
3Accepted3/33ms360 KiB
4Accepted3/33ms396 KiB
5Accepted3/32ms360 KiB
6Accepted3/32ms504 KiB
7Accepted3/33ms256 KiB
8Accepted3/33ms364 KiB
9Accepted3/32ms380 KiB
10Accepted3/33ms232 KiB
11Accepted3/32ms376 KiB
12Accepted3/33ms256 KiB