代码实现
public static int getResult(int index){
int a = 1, b = 1, c = 1;
// 要是求第四项,则i < 4, 同理推得求20190324,则i < 20190324。
for (int i = 3; i < index; i++) {
int sum = (a + b + c)%100000;
a = b;
b = c;
c = sum;
}
return c;
}