/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 10ms 2.777 MiB
#2 Wrong Answer 11ms 2.918 MiB
#3 Accepted 12ms 2.832 MiB
#4 Wrong Answer 11ms 2.758 MiB
#5 Wrong Answer 38ms 2.918 MiB
#6 Accepted 40ms 2.91 MiB
#7 Wrong Answer 41ms 2.91 MiB
#8 Wrong Answer 40ms 3.105 MiB

Code

from math import*
t=int(input())
for x in range(t):
    n=int(input())
    if n%2==0:
        print(n//2)
    else:
        lcm=1
        for j in (3,sqrt(n)+1,2):
            if n%j==0:
                lcm=j
                break
        if lcm >1:
            print(n//lcm)
        else:
            print(1)

Information

Submit By
Type
Submission
Problem
P1052 Yet Another Array Partition
Language
Python 3 (Python 3.12.3)
Submit At
2024-05-07 12:36:18
Judged At
2024-05-07 12:36:18
Judged By
Score
30
Total Time
41ms
Peak Memory
3.105 MiB