```java import java.util.Scanner; public class LuckyNumber { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int m = scanner.nextInt(); if (isLuckyNumber(m)) { System.out.println("lucky"); } else { System.out.println("no"); } } public static boolean isLuckyNumber(int num) { if (num < 10) { return false; } // 检查是否包含因子 5 for (int i = 1; i <= num; i++) { if (num % i == 0 && i % 5 == 0) { // 检查十位数是否为 5 int tensDigit = (num / 10) % 10; if (tensDigit == 5) { return true; } } } return false; } } ``` [2024-10-31 14:45:49 | AI写代码神器 | 228点数解答]