Submission #68713667


Source Code Expand

x = int(input())
ans = []
c = 4 * x - 1

def add(d):
    ans.append((d - c // d - 2) // 4)

d = -1
while d * d <= abs(c):
    d += 2
    if c % d != 0:
        continue
    add(d), add(-d)
    add(c // d), add(-c // d)
ans = sorted(list(set(ans)))
print(len(ans))
print(*ans)

Submission Info

Submission Time
Task G - sqrt(n²+n+X)
User sounansya
Language Python (PyPy 3.10-v7.3.12)
Score 575
Code Size 291 Byte
Status AC
Exec Time 91 ms
Memory 81828 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 575 / 575
Status
AC × 3
AC × 63
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 01_handmade_07.txt, 01_handmade_08.txt, 01_handmade_09.txt, 01_handmade_10.txt, 01_handmade_11.txt, 01_handmade_12.txt, 01_handmade_13.txt, 01_handmade_14.txt, 01_handmade_15.txt, 01_handmade_16.txt, 01_handmade_17.txt, 01_handmade_18.txt, 01_handmade_19.txt, 01_handmade_20.txt, 01_handmade_21.txt, 01_handmade_22.txt, 01_handmade_23.txt, 01_handmade_24.txt, 01_handmade_25.txt, 01_handmade_26.txt, 01_handmade_27.txt, 01_handmade_28.txt, 01_handmade_29.txt, 01_handmade_30.txt, 01_handmade_31.txt, 01_handmade_32.txt, 01_handmade_33.txt, 01_handmade_34.txt, 01_handmade_35.txt, 01_handmade_36.txt, 01_handmade_37.txt, 01_handmade_38.txt, 01_handmade_39.txt, 01_handmade_40.txt, 01_handmade_41.txt, 01_handmade_42.txt, 01_handmade_43.txt, 01_handmade_44.txt, 01_handmade_45.txt, 01_handmade_46.txt, 01_handmade_47.txt, 01_handmade_48.txt, 01_handmade_49.txt, 02_radom_00.txt, 02_radom_01.txt, 02_radom_02.txt, 02_radom_03.txt, 02_radom_04.txt, 02_radom_05.txt, 02_radom_06.txt, 02_radom_07.txt, 02_radom_08.txt, 02_radom_09.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 57 ms 76896 KiB
00_sample_01.txt AC 57 ms 76440 KiB
00_sample_02.txt AC 58 ms 80924 KiB
01_handmade_00.txt AC 57 ms 76468 KiB
01_handmade_01.txt AC 56 ms 76584 KiB
01_handmade_02.txt AC 57 ms 76488 KiB
01_handmade_03.txt AC 56 ms 76580 KiB
01_handmade_04.txt AC 56 ms 76808 KiB
01_handmade_05.txt AC 56 ms 76424 KiB
01_handmade_06.txt AC 57 ms 76772 KiB
01_handmade_07.txt AC 57 ms 76464 KiB
01_handmade_08.txt AC 58 ms 76872 KiB
01_handmade_09.txt AC 58 ms 76728 KiB
01_handmade_10.txt AC 57 ms 76452 KiB
01_handmade_11.txt AC 57 ms 76528 KiB
01_handmade_12.txt AC 57 ms 76576 KiB
01_handmade_13.txt AC 56 ms 76332 KiB
01_handmade_14.txt AC 57 ms 76732 KiB
01_handmade_15.txt AC 56 ms 76628 KiB
01_handmade_16.txt AC 56 ms 76836 KiB
01_handmade_17.txt AC 56 ms 76816 KiB
01_handmade_18.txt AC 57 ms 76612 KiB
01_handmade_19.txt AC 56 ms 76496 KiB
01_handmade_20.txt AC 56 ms 76320 KiB
01_handmade_21.txt AC 87 ms 81200 KiB
01_handmade_22.txt AC 80 ms 80908 KiB
01_handmade_23.txt AC 82 ms 80940 KiB
01_handmade_24.txt AC 69 ms 81260 KiB
01_handmade_25.txt AC 73 ms 81148 KiB
01_handmade_26.txt AC 82 ms 80884 KiB
01_handmade_27.txt AC 87 ms 81128 KiB
01_handmade_28.txt AC 88 ms 81112 KiB
01_handmade_29.txt AC 87 ms 80932 KiB
01_handmade_30.txt AC 87 ms 81280 KiB
01_handmade_31.txt AC 89 ms 81124 KiB
01_handmade_32.txt AC 87 ms 81216 KiB
01_handmade_33.txt AC 87 ms 81120 KiB
01_handmade_34.txt AC 87 ms 81112 KiB
01_handmade_35.txt AC 87 ms 81104 KiB
01_handmade_36.txt AC 88 ms 81276 KiB
01_handmade_37.txt AC 87 ms 81256 KiB
01_handmade_38.txt AC 87 ms 80852 KiB
01_handmade_39.txt AC 87 ms 80900 KiB
01_handmade_40.txt AC 87 ms 80952 KiB
01_handmade_41.txt AC 87 ms 81292 KiB
01_handmade_42.txt AC 87 ms 80992 KiB
01_handmade_43.txt AC 87 ms 81256 KiB
01_handmade_44.txt AC 87 ms 80948 KiB
01_handmade_45.txt AC 87 ms 80840 KiB
01_handmade_46.txt AC 88 ms 81044 KiB
01_handmade_47.txt AC 89 ms 81124 KiB
01_handmade_48.txt AC 87 ms 81152 KiB
01_handmade_49.txt AC 91 ms 81828 KiB
02_radom_00.txt AC 82 ms 81244 KiB
02_radom_01.txt AC 80 ms 80908 KiB
02_radom_02.txt AC 69 ms 81328 KiB
02_radom_03.txt AC 86 ms 81132 KiB
02_radom_04.txt AC 86 ms 81188 KiB
02_radom_05.txt AC 80 ms 81116 KiB
02_radom_06.txt AC 76 ms 81112 KiB
02_radom_07.txt AC 73 ms 80940 KiB
02_radom_08.txt AC 82 ms 81240 KiB
02_radom_09.txt AC 84 ms 81204 KiB