Submission #345157


Source Code Expand

Copy
import static java.util.Arrays.*;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	static void tr(Object... os) {
		System.err.println(deepToString(os));
	}
	public static void main(String[] args) {
		new Main().run();
	}

	Scanner sc = new Scanner(System.in);
	void run() {
		int n = sc.nextInt();

		Set<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			while ((x & 1) == 0) x >>= 1;
			set.add(x);
		}
		System.out.println(set.size());
	}

}

Submission Info

Submission Time
Task C - 高橋くんと魔法の箱
User hs484
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 570 Byte
Status
Exec Time 972 ms
Memory 44864 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 353 ms 24260 KB
subtask0_1.txt 352 ms 24324 KB
subtask0_2.txt 350 ms 24336 KB
subtask1_0.txt 505 ms 28492 KB
subtask1_1.txt 517 ms 29692 KB
subtask1_10.txt 508 ms 28856 KB
subtask1_11.txt 525 ms 29892 KB
subtask1_12.txt 521 ms 29424 KB
subtask1_13.txt 519 ms 29208 KB
subtask1_14.txt 520 ms 30220 KB
subtask1_15.txt 514 ms 29112 KB
subtask1_16.txt 524 ms 30068 KB
subtask1_17.txt 518 ms 28976 KB
subtask1_18.txt 520 ms 29056 KB
subtask1_19.txt 523 ms 29812 KB
subtask1_2.txt 512 ms 29080 KB
subtask1_3.txt 510 ms 29380 KB
subtask1_4.txt 519 ms 29464 KB
subtask1_5.txt 539 ms 28860 KB
subtask1_6.txt 518 ms 29032 KB
subtask1_7.txt 531 ms 28996 KB
subtask1_8.txt 531 ms 28888 KB
subtask1_9.txt 521 ms 28832 KB
subtask2_0.txt 857 ms 43580 KB
subtask2_1.txt 900 ms 42280 KB
subtask2_2.txt 902 ms 42700 KB
subtask2_3.txt 919 ms 42576 KB
subtask2_4.txt 879 ms 42308 KB
subtask2_5.txt 904 ms 42484 KB
subtask2_6.txt 879 ms 42308 KB
subtask2_7.txt 915 ms 42312 KB
subtask2_8.txt 931 ms 42128 KB
subtask2_9.txt 930 ms 42548 KB
subtask3_0.txt 868 ms 43712 KB
subtask3_1.txt 965 ms 44092 KB
subtask3_2.txt 969 ms 44504 KB
subtask3_3.txt 972 ms 44764 KB
subtask3_4.txt 968 ms 44384 KB
subtask3_5.txt 928 ms 44636 KB
subtask3_6.txt 917 ms 44864 KB
subtask3_7.txt 936 ms 44796 KB
subtask3_8.txt 932 ms 44676 KB
subtask3_9.txt 942 ms 44072 KB