Codeforces Is your horseshoe on the other hoof?

来源:互联网 发布:美服战网客户端mac 编辑:程序博客网 时间:2024/06/05 01:55


题目链接:http://codeforces.com/problemset/problem/228/A


import java.util.HashMap;import java.util.Map;import java.util.Scanner;public class Isyourhorseshoeontheotherhoof {public static void main(String[] args) {Scanner scanner = new Scanner(System.in);Map<Integer, Integer> map = new HashMap<>();for(int i = 0; i < 4; i++) {map.put(scanner.nextInt(), 1);}System.out.println(4-map.size());}}


阅读全文
0 0
原创粉丝点击