题目描述
代码实现
package TEST;public class Main {public static void main(String[] args) {int cnt = 0;for (int i = 1; i <= 2019; i++)if (check(i)) cnt += i;System.out.print(cnt);}static boolean check(int n) {String a=n+"";if (a.contains("2")||a.contains("0")||a.contains("1")||a.contains("9")){return true;}else {return false;}}}
答案
1905111