Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Question1 {
- public static void main(String[] args) {
- for (int i = 102; i < 1000; ++i){
- String x = "" + i;
- if (x.contains("1")){
- if (!x.contains("11") && !(x.charAt(0) == '1' && x.charAt(2) == '1'))
- System.out.println(i);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement