Submission #6393492


Source Code Expand

Copy
two = [2]

while two[-1] <= 10 ** 9:
    two.append(two[-1] * 2)

N = int(input())

A = list(map(int, input().split()))

ret = 0
for i, a in enumerate(A):
    for t in two[::-1]:
        if a % t == 0:
            A[i] = a // t
            break

print(len(set(A)))

Submission Info

Submission Time
Task C - 高橋くんと魔法の箱
User wat_shun
Language Python (3.4.3)
Score 100
Code Size 283 Byte
Status
Exec Time 478 ms
Memory 14972 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 subtask0_0.txt, subtask0_1.txt, subtask0_2.txt
Subtask1 20 / 20 subtask1_0.txt, subtask1_1.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_2.txt, subtask1_3.txt, subtask1_4.txt, subtask1_5.txt, subtask1_6.txt, subtask1_7.txt, subtask1_8.txt, subtask1_9.txt, subtask0_0.txt, subtask0_1.txt, subtask0_2.txt
Subtask2 30 / 30 subtask2_0.txt, subtask2_1.txt, subtask2_2.txt, subtask2_3.txt, subtask2_4.txt, subtask2_5.txt, subtask2_6.txt, subtask2_7.txt, subtask2_8.txt, subtask2_9.txt, subtask0_0.txt, subtask0_1.txt, subtask0_2.txt
All 50 / 50 subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask1_0.txt, subtask1_1.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_2.txt, subtask1_3.txt, subtask1_4.txt, subtask1_5.txt, subtask1_6.txt, subtask1_7.txt, subtask1_8.txt, subtask1_9.txt, subtask2_0.txt, subtask2_1.txt, subtask2_2.txt, subtask2_3.txt, subtask2_4.txt, subtask2_5.txt, subtask2_6.txt, subtask2_7.txt, subtask2_8.txt, subtask2_9.txt, subtask3_0.txt, subtask3_1.txt, subtask3_2.txt, subtask3_3.txt, subtask3_4.txt, subtask3_5.txt, subtask3_6.txt, subtask3_7.txt, subtask3_8.txt, subtask3_9.txt
Case Name Status Exec Time Memory
subtask0_0.txt 17 ms 3060 KB
subtask0_1.txt 17 ms 2940 KB
subtask0_2.txt 17 ms 3060 KB
subtask1_0.txt 26 ms 3444 KB
subtask1_1.txt 28 ms 3444 KB
subtask1_10.txt 27 ms 3444 KB
subtask1_11.txt 28 ms 3444 KB
subtask1_12.txt 28 ms 3444 KB
subtask1_13.txt 28 ms 3444 KB
subtask1_14.txt 29 ms 3444 KB
subtask1_15.txt 28 ms 3444 KB
subtask1_16.txt 29 ms 3444 KB
subtask1_17.txt 28 ms 3444 KB
subtask1_18.txt 29 ms 3444 KB
subtask1_19.txt 28 ms 3444 KB
subtask1_2.txt 27 ms 3444 KB
subtask1_3.txt 27 ms 3444 KB
subtask1_4.txt 27 ms 3444 KB
subtask1_5.txt 27 ms 3444 KB
subtask1_6.txt 27 ms 3444 KB
subtask1_7.txt 27 ms 3444 KB
subtask1_8.txt 28 ms 3444 KB
subtask1_9.txt 28 ms 3444 KB
subtask2_0.txt 332 ms 14596 KB
subtask2_1.txt 349 ms 14684 KB
subtask2_2.txt 340 ms 13604 KB
subtask2_3.txt 354 ms 13604 KB
subtask2_4.txt 351 ms 14684 KB
subtask2_5.txt 375 ms 13604 KB
subtask2_6.txt 348 ms 13604 KB
subtask2_7.txt 362 ms 14556 KB
subtask2_8.txt 345 ms 13604 KB
subtask2_9.txt 366 ms 13608 KB
subtask3_0.txt 328 ms 14972 KB
subtask3_1.txt 406 ms 14364 KB
subtask3_2.txt 478 ms 14360 KB
subtask3_3.txt 385 ms 14360 KB
subtask3_4.txt 385 ms 14360 KB
subtask3_5.txt 433 ms 14364 KB
subtask3_6.txt 391 ms 14360 KB
subtask3_7.txt 385 ms 14356 KB
subtask3_8.txt 389 ms 14360 KB
subtask3_9.txt 406 ms 14360 KB