-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP1for2017.java
More file actions
30 lines (25 loc) · 814 Bytes
/
P1for2017.java
File metadata and controls
30 lines (25 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.util.ArrayList;
public class P1for2017 {
ArrayList<Integer> digitList = new ArrayList<Integer>();
Digit dgt = new Digit(0);
}
class Digit {
private int index;
ArrayList<Integer> digitList = new ArrayList<Integer>();
public Digit(int num) {
digitList.add(0, num % 10);
double element = num % 10;
int numRemaining = num / 10;
while (numRemaining > 0) {
digitList.add(0, numRemaining % 10);
numRemaining /= 10;
}
}
public boolean isStrictlyIncreasing()
{
for(int i = 1; i < digitList.size(); i++)
if(digitList.get(i - 1).compareTo(digitList.get(i)) >= 0)
return false;
return true;
}
}