/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Accepted 0ms 284.0 KiB
#2 Time Exceeded ≥1091ms ≥320.0 KiB
#3 Runtime Error 1ms 284.0 KiB

Code

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

void func(char* s)
{
    while (strlen(s) > 1)
    {
        int j = 0;
        for (int i = 0; s[i] != '\0'; i += 2)
        {
            s[j++] = s[i];
        }
        s[j] = '\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
C++20 (G++ 13.2.0)
Submit At
2024-08-16 15:39:03
Judged At
2024-11-11 03:18:15
Judged By
Score
2
Total Time
1091ms
Peak Memory
320.0 KiB