Submission #20292570


Source Code Expand

#include <stdio.h>
#include <stdbool.h>
#include <string.h>

int main(void) {
    char S[1001];

    scanf("%s", S);

    for(int i = 0; i < strlen(S); i++) {
        if(i % 2 == 0) {
            if((S[i] >= 'A') && (S[i] <= 'Z')) {
                printf("No\n");
                return 0;
            }
        }
        else {
            if((S[i] >= 'a') && (S[i] <= 'z')) {
                printf("No\n");
                return 0;
            }
        }
    }

    printf("Yes\n");
    return 0;
}

Submission Info

Submission Time
Task B - uNrEaDaBlE sTrInG
User Meguru2238
Language C (GCC 9.2.1)
Score 200
Code Size 532 Byte
Status AC
Exec Time 5 ms
Memory 1664 KiB

Compile Error

./Main.c: In function ‘main’:
./Main.c:8:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    8 |     scanf("%s", S);
      |     ^~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 26
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, no2_01.txt, no2_02.txt, no_01.txt, no_02.txt, no_03.txt, no_04.txt, no_05.txt, no_06.txt, no_07.txt, no_08.txt, no_09.txt, no_10.txt, sample_01.txt, sample_02.txt, sample_03.txt, yes_01.txt, yes_02.txt, yes_03.txt, yes_04.txt, yes_05.txt, yes_06.txt, yes_07.txt, yes_08.txt, yes_09.txt, yes_10.txt
Case Name Status Exec Time Memory
hand_01.txt AC 5 ms 1608 KiB
no2_01.txt AC 1 ms 1552 KiB
no2_02.txt AC 1 ms 1504 KiB
no_01.txt AC 3 ms 1584 KiB
no_02.txt AC 1 ms 1568 KiB
no_03.txt AC 2 ms 1512 KiB
no_04.txt AC 1 ms 1504 KiB
no_05.txt AC 1 ms 1504 KiB
no_06.txt AC 1 ms 1556 KiB
no_07.txt AC 1 ms 1568 KiB
no_08.txt AC 1 ms 1620 KiB
no_09.txt AC 1 ms 1552 KiB
no_10.txt AC 1 ms 1664 KiB
sample_01.txt AC 1 ms 1608 KiB
sample_02.txt AC 1 ms 1612 KiB
sample_03.txt AC 1 ms 1616 KiB
yes_01.txt AC 1 ms 1604 KiB
yes_02.txt AC 1 ms 1564 KiB
yes_03.txt AC 2 ms 1512 KiB
yes_04.txt AC 1 ms 1616 KiB
yes_05.txt AC 1 ms 1592 KiB
yes_06.txt AC 2 ms 1600 KiB
yes_07.txt AC 1 ms 1664 KiB
yes_08.txt AC 2 ms 1612 KiB
yes_09.txt AC 3 ms 1552 KiB
yes_10.txt AC 1 ms 1620 KiB