Submission #2428007


Source Code Expand

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] arr = new int[n];
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      int d = sc.nextInt();
      Boolean f = true;
      for (int ii = 0; ii < arr.length; ii++) {
        if (arr[ii] == d) {
          f = false;
          break;
        }
      }
      if (f) {
        arr[i] = d;
        cnt += 1;
      }
    }
    System.out.println(cnt);
  }
}

Submission Info

Submission Time
Task B - Kagami Mochi
User amama
Language Java8 (OpenJDK 1.8.0)
Score 200
Code Size 547 Byte
Status AC
Exec Time 111 ms
Memory 23636 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 13
Set Name Test Cases
Sample a01, a02, a03
All a01, a02, a03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13
Case Name Status Exec Time Memory
a01 AC 93 ms 21844 KB
a02 AC 93 ms 18900 KB
a03 AC 93 ms 21204 KB
b04 AC 91 ms 21716 KB
b05 AC 110 ms 21972 KB
b06 AC 111 ms 17108 KB
b07 AC 99 ms 18644 KB
b08 AC 99 ms 21844 KB
b09 AC 100 ms 18772 KB
b10 AC 98 ms 19924 KB
b11 AC 100 ms 23636 KB
b12 AC 100 ms 21332 KB
b13 AC 101 ms 21460 KB