Answers

2015-04-29T11:53:22+05:30
You're 9875 if repetition is not allowed, 9999 if repetition is allowed.
1 5 1
2015-04-29T11:53:49+05:30
I think  it is 9999 if it is wrong comment on it
1 5 1