Submission #4830524


Source Code Expand

Copy
public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt(), a[] = java.util.stream.IntStream.range(0, n).map(i -> scanner.nextInt()).toArray();
        System.out.println(java.util.stream.IntStream.range(0, n).peek(i -> java.util.stream.IntStream.range(0, n).filter(j -> a[i] != 0 && a[j] != 0 && i != j && a[j] % a[i] == 0).forEach(j -> a[j] = 0)).filter(i -> a[i] != 0).count());
    }
}

Submission Info

Submission Time
Task C - 高橋くんと魔法の箱
User Yu_212
Language Java8 (OpenJDK 1.8.0)
Score 0
Code Size 514 Byte
Status
Exec Time 2109 ms
Memory 67216 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 subtask0_0.txt, subtask0_1.txt, subtask0_2.txt
Subtask1 0 / 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 0 / 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 0 / 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 272 ms 28624 KB
subtask0_1.txt 193 ms 27216 KB
subtask0_2.txt 199 ms 26704 KB
subtask1_0.txt 347 ms 29772 KB
subtask1_1.txt 388 ms 27908 KB
subtask1_10.txt 300 ms 29660 KB
subtask1_11.txt 382 ms 28044 KB
subtask1_12.txt 386 ms 29708 KB
subtask1_13.txt 391 ms 27264 KB
subtask1_14.txt 391 ms 28588 KB
subtask1_15.txt 387 ms 27724 KB
subtask1_16.txt 377 ms 29512 KB
subtask1_17.txt 392 ms 27900 KB
subtask1_18.txt 387 ms 27980 KB
subtask1_19.txt 391 ms 27508 KB
subtask1_2.txt 399 ms 28148 KB
subtask1_3.txt 384 ms 29732 KB
subtask1_4.txt 395 ms 27956 KB
subtask1_5.txt 392 ms 29788 KB
subtask1_6.txt 388 ms 29964 KB
subtask1_7.txt 390 ms 29816 KB
subtask1_8.txt 376 ms 27740 KB
subtask1_9.txt 392 ms 29844 KB
subtask2_0.txt 2109 ms 49688 KB
subtask2_1.txt 2106 ms 67216 KB
subtask2_2.txt 2109 ms 51476 KB
subtask2_3.txt 2109 ms 49636 KB
subtask2_4.txt 2109 ms 51716 KB
subtask2_5.txt 2109 ms 48032 KB
subtask2_6.txt 2109 ms 48120 KB
subtask2_7.txt 2109 ms 48356 KB
subtask2_8.txt 2109 ms 57964 KB
subtask2_9.txt 2109 ms 51484 KB
subtask3_0.txt 2109 ms 47660 KB
subtask3_1.txt 2109 ms 59696 KB
subtask3_2.txt 2105 ms 61364 KB
subtask3_3.txt 2109 ms 50372 KB
subtask3_4.txt 2109 ms 48700 KB
subtask3_5.txt 2109 ms 51220 KB
subtask3_6.txt 2109 ms 52364 KB
subtask3_7.txt 2109 ms 49368 KB
subtask3_8.txt 2105 ms 63704 KB
subtask3_9.txt 2109 ms 49556 KB