Hi,
Maybe this falls a bit out of ambit of Codechef, but, a colleague at my university has a certain problem he was shown and he hasn’t been able to find any solution for it so far…
We have to design a discrete function f(N), where N goes from 1 to 12582909 (very specific upper limit, maybe its a hint), that for each N will associate a vector of 10 elements that respects the conditions:
-
first entry goes from 1 to 9;
-
Second and remaining entries go from 0 to 4;
-
If value at the nth position is 0, all further entries are also 0;
So 1040000000 is not a valid vector, for example…
I wonder is hashing, some strange transform or domain reduction can be used somehow…Any ideas?
Best,
Bruno