/ SeriousOJ /

Record Detail

Compile Error

foo.c: In function 'main':
foo.c:23:25: error: expected ';' before ')' token
   23 |         printf("%s\n",S));
      |                         ^
      |                         ;
foo.c:23:25: error: expected statement before ')' token

Code

#include<stdio.h>
#include<string.h>
//My Name is maher Ahmed i am a new student at leading university.batch 63 (c)
int main(){
    int T;
    scanf("%d",&T);
    for(int i=0;i<T;i++)
    {
        char S[105];
        scanf("%s",S);
        int n=strlen(S);
        while(n>1)
        {
            int j=0;
            //for skiping even postive
            for(int i=0;i<n;i=i+2)
            {
                S[j++]=S[i];
            }
            S[j]='\0';
            n=j;
        }
        printf("%s\n",S));
    }
}

Information

Submit By
Type
Submission
Problem
P1080 String Algorithm
Contest
Bangladesh 2.0
Language
C11 (GCC 13.2.0)
Submit At
2024-08-16 17:12:13
Judged At
2024-11-11 03:12:20
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes