/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 328.0 KiB
#2 Time Exceeded ≥1045ms ≥332.0 KiB
#3 Runtime Error 1ms 428.0 KiB

Code

#include <stdio.h>

void func(char* s)
{
    int i = 0;
    while (s[1] != '\0')
    {
        for (int j = 0; s[j] != '\0'; j += 2)
        {
            s[i++] = s[j];
        }
        s[i] = '\0';
        i = 0;
    }
    printf("%s\n", s);
}

int main()
{
    int t;
    scanf("%d", &t);
    while (t--)
    {
        char S[105];
        scanf("%s", S);
        func(S);
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1080 String Algorithm
Contest
Bangladesh 2.0
Language
C99 (GCC 13.2.0)
Submit At
2024-08-16 15:35:22
Judged At
2024-10-03 13:31:17
Judged By
Score
2
Total Time
1045ms
Peak Memory
428.0 KiB