第一题 暴力解: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); int temp = 0; for (Integer i = 2; i < Integer.MAX_VALUE; i ++ ) { String tmp = i.toString(); tmp = tmp.replace("2","").replace("3", "").replace("5", ""); if (tmp.length() == 0) { temp++; } if (temp == n) { System.out.println(i); break; } } } }
2 5

相关推荐

莫忧莫惧莫回头:md,诈骗犯!之前的简历都是男的。现在想改成女的让我们给你建议是吧😅。
点赞 评论 收藏
分享
牛客网
牛客企业服务