CSES - Practice Contest 2024 - Results
Submission details
Task:Interesting number
Sender:\(._.)/
Submission time:2024-09-28 16:56:00 +0300
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.10 sdetails
#20.07 sdetails

Code

t = int(input())
nums = [1, 2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929]
for i in range(t):
    n = int(input())
    xs = list(map(int, input().split()))
    for j in range(n):
        if xs[j] in nums:
            print(xs[j])


Test details

Test 1

Verdict:

input
1000
9
300 988 956 931 116 3 386 202 ...

correct output
3
3
181
919
191
...

user output
3
3
181
919
191
...
Truncated

Test 2

Verdict:

input
1
100000
72 247 605 249 10 422 594 490 ...

correct output
191

user output
1
1
1
1
1
...
Truncated