GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — JavaInterview/java/src/BiShi/Shopee_01.java at master · damaohongtu/JavaInterview Expand file tree/ Copy pathShopee_01.javaMore file actions 33 lines (27 loc) · 728 Bytes / Copy pathShopee_01.javaFile metadata and controls33 lines (27 loc) · 728 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 package BiShi; import java.util.HashMap; import java.util.Scanner; /** * @Classname Shopee_01 * @Description TODO * @Date 19-7-27 下午6:52 * @Created by mao<[email protected]> */ public class Shopee_01 { public static void main(String[] args) { Scanner sc= new Scanner(System.in); while(sc.hasNextLine()){ String s=sc.nextLine(); String[] nums=s.split(" "); HashMap<String,Integer> tmp=new HashMap<>(); String res=""; for(String t:nums){ if(!tmp.containsKey(t)){ tmp.put(t,1); res=res+t+" "; } } System.out.println(res); } } } |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |