/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 13ms 2.754 MiB
#2 Accepted 22ms 2.77 MiB
#3 Accepted 21ms 2.816 MiB

Code

def remove_even_positions(s):
    result = ""
    for i in range(0, len(s), 2):
        result += s[i]
    return result

t = int(input())
for _ in range(t):
    s = input()
    while len(s) > 1:
        s = remove_even_positions(s)
    print(s)

Information

Submit By
Type
Submission
Problem
P1080 String Algorithm
Contest
Bangladesh 2.0
Language
Python 3 (Python 3.12.3)
Submit At
2024-08-16 15:47:17
Judged At
2024-08-16 15:47:17
Judged By
Score
100
Total Time
22ms
Peak Memory
2.816 MiB