import java.util.Arrays; import java.util.Scanner; public class Main { private static Scanner cin; private static boolean hasFound = false; public static void main(String args[]) throws Exception { cin = new Scanner(System.in); int A = cin.nextInt();…
https://www.luogu.org/problemnew/show/P1618 枚举所有的A,最多 $A_9^3$ ,然后生成B和C(先判断是不是能够生成),判断有没有重复数字(比之前那个优雅多了). $10^3$ 的水题,但是我忘记输出No的情况,玄学. #include<bits/stdc++.h> using namespace std; #define ll long long int A,B,C; set<int>ans; void solve(int a1,in…
public class Main { public static void main(String[] args){ for(int i = 123; i <= 329; i++){ int[] tmp = new int[10]; int b = 2*i; int c = 3*i; tmp[i%10] ++; tmp[i/10%10] ++; tmp[i/100] ++; tmp[b%10] ++; tmp[b/10%10] ++; tmp[b/100] ++; tmp[c%10] ++;…