Skip to content

Instantly share code, notes, and snippets.

@MirkoPani
Created April 2, 2015 11:36
Show Gist options
  • Select an option

  • Save MirkoPani/b4edf16a7f43b69f4d6c to your computer and use it in GitHub Desktop.

Select an option

Save MirkoPani/b4edf16a7f43b69f4d6c to your computer and use it in GitHub Desktop.
#208 [Easy] Culling Numbers in [Java] /r/dailychallenge
public class main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
HashSet<Integer> hs=new HashSet<Integer>();
while(in.hasNextInt())
{
hs.add(in.nextInt());
}
System.out.println(hs);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment