/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Runtime Error *** stack smashing detected ***: terminated 1ms 432.0 KiB
#3 Runtime Error 1ms 420.0 KiB

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
C99 (GCC 13.2.0)
Submit At
2024-08-16 17:02:31
Judged At
2024-11-11 03:13:03
Judged By
Score
2
Total Time
1ms
Peak Memory
432.0 KiB