鼠鼠0.66 0.13 1,太菜了第三题代码:public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] arr = new int[n]; for (int i = 0; i arr[i] = sc.nextInt(); } Set result = new HashSet<>(); Set prev = new HashSet<>(); for (int num : arr) { Set current = new HashSet<>(); current.add(num); for (int s : prev) { current.add(orValue | num); } result.addAll(current); prev = current; } System.out.println(result.size()); }}比较朴素的解法